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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
12,300
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
|
void
TriRefinement::populateEdgeFaceRelation() {
//
// This is essentially the same as the quad-split version except for the
// sizing estimates:
// - every child-edge within a face will have 2 incident faces
// - every child-edge from a edge may have N incident faces
// - use the parents edge-face count for this
//
int childEdgeFaceIndexSizeEstimate = (int)_faceChildEdgeIndices.size() * 2 +
(int)_parent->_edgeFaceIndices.size() * 2;
_child->_edgeFaceCountsAndOffsets.resize(_child->getNumEdges() * 2);
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
// Update _maxEdgeFaces from the parent level before calling the
// populateEdgeFacesFromParent methods below, as these may further
// update _maxEdgeFaces.
_child->_maxEdgeFaces = _parent->_maxEdgeFaces;
populateEdgeFacesFromParentFaces();
populateEdgeFacesFromParentEdges();
// Revise the over-allocated estimate based on what is used (as indicated in the
// count/offset for the last vertex) and trim the index vector accordingly:
childEdgeFaceIndexSizeEstimate = _child->getNumEdgeFaces(_child->getNumEdges()-1) +
_child->getOffsetOfEdgeFaces(_child->getNumEdges()-1);
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rax
subq 0x90(%rdi), %rax
shrq $0x2, %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
movq 0xb0(%rcx), %r14
subq 0xa8(%rcx), %r14
shrq $0x2, %r14
addl %eax, %r14d
addl %r14d, %r14d
movslq 0x4(%rdi), %rsi
addq $0x90, %rdi
addq %rsi, %rsi
callq 0x39690
movl $0xa8, %r12d
movq 0x10(%rbx), %rdi
addq %r12, %rdi
movslq %r14d, %r15
movq %r15, %rsi
callq 0x39690
movl $0xc0, %r14d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x39160
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movl 0x10(%rax), %eax
movl %eax, 0x10(%rcx)
movq %rbx, %rdi
callq 0x3b700
movq %rbx, %rdi
callq 0x3b780
movq 0x10(%rbx), %rdi
movl 0x4(%rdi), %eax
leal -0x2(,%rax,2), %ecx
movslq %ecx, %rcx
movq 0x90(%rdi), %rdx
movslq (%rdx,%rcx,4), %rcx
leal -0x1(,%rax,2), %eax
cltq
movslq (%rdx,%rax,4), %r15
addq %rcx, %r15
addq %r12, %rdi
movq %r15, %rsi
callq 0x39690
addq 0x10(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x39160
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement24populateEdgeFaceRelationEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+98h]
sub rax, [rdi+90h]
shr rax, 2
mov rcx, [rdi+8]
mov rdi, [rdi+10h]
mov r14, [rcx+0B0h]
sub r14, [rcx+0A8h]
shr r14, 2
add r14d, eax
add r14d, r14d
movsxd rsi, dword ptr [rdi+4]
add rdi, 90h
add rsi, rsi
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov r12d, 0A8h
mov rdi, [rbx+10h]
add rdi, r12
movsxd r15, r14d
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov r14d, 0C0h
mov rdi, [rbx+10h]
add rdi, r14
mov rsi, r15
call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov eax, [rax+10h]
mov [rcx+10h], eax
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement32populateEdgeFacesFromParentFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentFaces(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement32populateEdgeFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentEdges(void)
mov rdi, [rbx+10h]
mov eax, [rdi+4]
lea ecx, ds:0FFFFFFFFFFFFFFFEh[rax*2]
movsxd rcx, ecx
mov rdx, [rdi+90h]
movsxd rcx, dword ptr [rdx+rcx*4]
lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2]
cdqe
movsxd r15, dword ptr [rdx+rax*4]
add r15, rcx
add rdi, r12
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
add r14, [rbx+10h]
mov rdi, r14
mov rsi, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
|
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation(
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this)
{
int v2; // r14d
long long v3; // rdi
long long v4; // r15
v2 = 2
* (((*((_QWORD *)this + 19) - *((_QWORD *)this + 18)) >> 2)
+ ((*(_QWORD *)(*((_QWORD *)this + 1) + 176LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 168LL)) >> 2));
std::vector<int>::resize(*((_QWORD *)this + 2) + 144LL, 2LL * *(int *)(*((_QWORD *)this + 2) + 4LL));
std::vector<int>::resize(*((_QWORD *)this + 2) + 168LL, v2);
std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 192LL, v2);
*(_DWORD *)(*((_QWORD *)this + 2) + 16LL) = *(_DWORD *)(*((_QWORD *)this + 1) + 16LL);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentFaces(this);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentEdges(this);
v3 = *((_QWORD *)this + 2);
v4 = *(int *)(*(_QWORD *)(v3 + 144) + 4LL * (2 * *(_DWORD *)(v3 + 4) - 2))
+ (long long)*(int *)(*(_QWORD *)(v3 + 144) + 4LL * (2 * *(_DWORD *)(v3 + 4) - 1));
std::vector<int>::resize(v3 + 168, v4);
return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 192LL, v4);
}
|
populateEdgeFaceRelation:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x98]
SUB RAX,qword ptr [RDI + 0x90]
SHR RAX,0x2
MOV RCX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RDI + 0x10]
MOV R14,qword ptr [RCX + 0xb0]
SUB R14,qword ptr [RCX + 0xa8]
SHR R14,0x2
ADD R14D,EAX
ADD R14D,R14D
MOVSXD RSI,dword ptr [RDI + 0x4]
ADD RDI,0x90
ADD RSI,RSI
CALL 0x00139690
MOV R12D,0xa8
MOV RDI,qword ptr [RBX + 0x10]
ADD RDI,R12
MOVSXD R15,R14D
MOV RSI,R15
CALL 0x00139690
MOV R14D,0xc0
MOV RDI,qword ptr [RBX + 0x10]
ADD RDI,R14
MOV RSI,R15
CALL 0x00139160
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RCX + 0x10],EAX
MOV RDI,RBX
CALL 0x0013b700
MOV RDI,RBX
CALL 0x0013b780
MOV RDI,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x4]
LEA ECX,[-0x2 + RAX*0x2]
MOVSXD RCX,ECX
MOV RDX,qword ptr [RDI + 0x90]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
LEA EAX,[-0x1 + RAX*0x2]
CDQE
MOVSXD R15,dword ptr [RDX + RAX*0x4]
ADD R15,RCX
ADD RDI,R12
MOV RSI,R15
CALL 0x00139690
ADD R14,qword ptr [RBX + 0x10]
MOV RDI,R14
MOV RSI,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00139160
|
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation(TriRefinement *this)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
ulong uVar5;
lVar1 = *(long *)(this + 0x98);
lVar2 = *(long *)(this + 0x90);
lVar3 = *(long *)(*(long *)(this + 8) + 0xb0);
lVar4 = *(long *)(*(long *)(this + 8) + 0xa8);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x90),
(long)*(int *)(*(long *)(this + 0x10) + 4) * 2);
uVar5 = (ulong)(((int)((ulong)(lVar3 - lVar4) >> 2) + (int)((ulong)(lVar1 - lVar2) >> 2)) * 2);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0xa8),uVar5);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0xc0),uVar5);
*(int4 *)(*(long *)(this + 0x10) + 0x10) = *(int4 *)(*(long *)(this + 8) + 0x10);
populateEdgeFacesFromParentFaces(this);
populateEdgeFacesFromParentEdges(this);
lVar1 = *(long *)(this + 0x10);
uVar5 = (long)*(int *)(*(long *)(lVar1 + 0x90) + (long)(*(int *)(lVar1 + 4) * 2 + -1) * 4) +
(long)*(int *)(*(long *)(lVar1 + 0x90) + (long)(*(int *)(lVar1 + 4) * 2 + -2) * 4);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(lVar1 + 0xa8),uVar5);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0xc0),uVar5);
return;
}
|
|
12,301
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
|
void
TriRefinement::populateEdgeFaceRelation() {
//
// This is essentially the same as the quad-split version except for the
// sizing estimates:
// - every child-edge within a face will have 2 incident faces
// - every child-edge from a edge may have N incident faces
// - use the parents edge-face count for this
//
int childEdgeFaceIndexSizeEstimate = (int)_faceChildEdgeIndices.size() * 2 +
(int)_parent->_edgeFaceIndices.size() * 2;
_child->_edgeFaceCountsAndOffsets.resize(_child->getNumEdges() * 2);
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
// Update _maxEdgeFaces from the parent level before calling the
// populateEdgeFacesFromParent methods below, as these may further
// update _maxEdgeFaces.
_child->_maxEdgeFaces = _parent->_maxEdgeFaces;
populateEdgeFacesFromParentFaces();
populateEdgeFacesFromParentEdges();
// Revise the over-allocated estimate based on what is used (as indicated in the
// count/offset for the last vertex) and trim the index vector accordingly:
childEdgeFaceIndexSizeEstimate = _child->getNumEdgeFaces(_child->getNumEdges()-1) +
_child->getOffsetOfEdgeFaces(_child->getNumEdges()-1);
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rax
subq 0x90(%rdi), %rax
shrq $0x2, %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
movq 0xb0(%rcx), %r14
subq 0xa8(%rcx), %r14
shrq $0x2, %r14
addl %eax, %r14d
addl %r14d, %r14d
movslq 0x4(%rdi), %rsi
addq $0x90, %rdi
addq %rsi, %rsi
callq 0x514b0
movl $0xa8, %r12d
movq 0x10(%rbx), %rdi
addq %r12, %rdi
movslq %r14d, %r15
movq %r15, %rsi
callq 0x514b0
movl $0xc0, %r14d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x50b30
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movl 0x10(%rax), %eax
movl %eax, 0x10(%rcx)
movq %rbx, %rdi
callq 0x54970
movq %rbx, %rdi
callq 0x54a30
movq 0x10(%rbx), %rdi
movl 0x4(%rdi), %eax
leal -0x2(,%rax,2), %ecx
movslq %ecx, %rcx
movq 0x90(%rdi), %rdx
movslq (%rdx,%rcx,4), %rcx
leal -0x1(,%rax,2), %eax
cltq
movslq (%rdx,%rax,4), %r15
addq %rcx, %r15
addq %r12, %rdi
movq %r15, %rsi
callq 0x514b0
addq 0x10(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x50b30
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement24populateEdgeFaceRelationEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+98h]
sub rax, [rdi+90h]
shr rax, 2
mov rcx, [rdi+8]
mov rdi, [rdi+10h]
mov r14, [rcx+0B0h]
sub r14, [rcx+0A8h]
shr r14, 2
add r14d, eax
add r14d, r14d
movsxd rsi, dword ptr [rdi+4]
add rdi, 90h
add rsi, rsi
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov r12d, 0A8h
mov rdi, [rbx+10h]
add rdi, r12
movsxd r15, r14d
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov r14d, 0C0h
mov rdi, [rbx+10h]
add rdi, r14
mov rsi, r15
call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov eax, [rax+10h]
mov [rcx+10h], eax
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement32populateEdgeFacesFromParentFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentFaces(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement32populateEdgeFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentEdges(void)
mov rdi, [rbx+10h]
mov eax, [rdi+4]
lea ecx, ds:0FFFFFFFFFFFFFFFEh[rax*2]
movsxd rcx, ecx
mov rdx, [rdi+90h]
movsxd rcx, dword ptr [rdx+rcx*4]
lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2]
cdqe
movsxd r15, dword ptr [rdx+rax*4]
add r15, rcx
add rdi, r12
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
add r14, [rbx+10h]
mov rdi, r14
mov rsi, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
|
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation(
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this)
{
int v2; // r14d
long long v3; // rdi
long long v4; // r15
v2 = 2
* (((*((_QWORD *)this + 19) - *((_QWORD *)this + 18)) >> 2)
+ ((*(_QWORD *)(*((_QWORD *)this + 1) + 176LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 168LL)) >> 2));
std::vector<int>::resize(*((_QWORD *)this + 2) + 144LL, 2LL * *(int *)(*((_QWORD *)this + 2) + 4LL));
std::vector<int>::resize(*((_QWORD *)this + 2) + 168LL, v2);
std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 192LL, v2);
*(_DWORD *)(*((_QWORD *)this + 2) + 16LL) = *(_DWORD *)(*((_QWORD *)this + 1) + 16LL);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentFaces(this);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentEdges(this);
v3 = *((_QWORD *)this + 2);
v4 = *(int *)(*(_QWORD *)(v3 + 144) + 4LL * (2 * *(_DWORD *)(v3 + 4) - 2))
+ (long long)*(int *)(*(_QWORD *)(v3 + 144) + 4LL * (2 * *(_DWORD *)(v3 + 4) - 1));
std::vector<int>::resize(v3 + 168, v4);
return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 192LL, v4);
}
|
populateEdgeFaceRelation:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x98]
SUB RAX,qword ptr [RDI + 0x90]
SHR RAX,0x2
MOV RCX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RDI + 0x10]
MOV R14,qword ptr [RCX + 0xb0]
SUB R14,qword ptr [RCX + 0xa8]
SHR R14,0x2
ADD R14D,EAX
ADD R14D,R14D
MOVSXD RSI,dword ptr [RDI + 0x4]
ADD RDI,0x90
ADD RSI,RSI
CALL 0x001514b0
MOV R12D,0xa8
MOV RDI,qword ptr [RBX + 0x10]
ADD RDI,R12
MOVSXD R15,R14D
MOV RSI,R15
CALL 0x001514b0
MOV R14D,0xc0
MOV RDI,qword ptr [RBX + 0x10]
ADD RDI,R14
MOV RSI,R15
CALL 0x00150b30
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RCX + 0x10],EAX
MOV RDI,RBX
CALL 0x00154970
MOV RDI,RBX
CALL 0x00154a30
MOV RDI,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x4]
LEA ECX,[-0x2 + RAX*0x2]
MOVSXD RCX,ECX
MOV RDX,qword ptr [RDI + 0x90]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
LEA EAX,[-0x1 + RAX*0x2]
CDQE
MOVSXD R15,dword ptr [RDX + RAX*0x4]
ADD R15,RCX
ADD RDI,R12
MOV RSI,R15
CALL 0x001514b0
ADD R14,qword ptr [RBX + 0x10]
MOV RDI,R14
MOV RSI,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00150b30
|
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation(TriRefinement *this)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
ulong uVar5;
lVar1 = *(long *)(this + 0x98);
lVar2 = *(long *)(this + 0x90);
lVar3 = *(long *)(*(long *)(this + 8) + 0xb0);
lVar4 = *(long *)(*(long *)(this + 8) + 0xa8);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x90),
(long)*(int *)(*(long *)(this + 0x10) + 4) * 2);
uVar5 = (ulong)(((int)((ulong)(lVar3 - lVar4) >> 2) + (int)((ulong)(lVar1 - lVar2) >> 2)) * 2);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0xa8),uVar5);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0xc0),uVar5);
*(int4 *)(*(long *)(this + 0x10) + 0x10) = *(int4 *)(*(long *)(this + 8) + 0x10);
populateEdgeFacesFromParentFaces(this);
populateEdgeFacesFromParentEdges(this);
lVar1 = *(long *)(this + 0x10);
uVar5 = (long)*(int *)(*(long *)(lVar1 + 0x90) + (long)(*(int *)(lVar1 + 4) * 2 + -1) * 4) +
(long)*(int *)(*(long *)(lVar1 + 0x90) + (long)(*(int *)(lVar1 + 4) * 2 + -2) * 4);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(lVar1 + 0xa8),uVar5);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0xc0),uVar5);
return;
}
|
|
12,302
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
|
void
TriRefinement::populateEdgeFaceRelation() {
//
// This is essentially the same as the quad-split version except for the
// sizing estimates:
// - every child-edge within a face will have 2 incident faces
// - every child-edge from a edge may have N incident faces
// - use the parents edge-face count for this
//
int childEdgeFaceIndexSizeEstimate = (int)_faceChildEdgeIndices.size() * 2 +
(int)_parent->_edgeFaceIndices.size() * 2;
_child->_edgeFaceCountsAndOffsets.resize(_child->getNumEdges() * 2);
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
// Update _maxEdgeFaces from the parent level before calling the
// populateEdgeFacesFromParent methods below, as these may further
// update _maxEdgeFaces.
_child->_maxEdgeFaces = _parent->_maxEdgeFaces;
populateEdgeFacesFromParentFaces();
populateEdgeFacesFromParentEdges();
// Revise the over-allocated estimate based on what is used (as indicated in the
// count/offset for the last vertex) and trim the index vector accordingly:
childEdgeFaceIndexSizeEstimate = _child->getNumEdgeFaces(_child->getNumEdges()-1) +
_child->getOffsetOfEdgeFaces(_child->getNumEdges()-1);
_child->_edgeFaceIndices.resize(childEdgeFaceIndexSizeEstimate);
_child->_edgeFaceLocalIndices.resize(childEdgeFaceIndexSizeEstimate);
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rax
subq 0x90(%rdi), %rax
shrq $0x2, %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdi
movq 0xb0(%rcx), %r14
subq 0xa8(%rcx), %r14
shrq $0x2, %r14
addl %eax, %r14d
addl %r14d, %r14d
movslq 0x4(%rdi), %rsi
addq $0x90, %rdi
addq %rsi, %rsi
callq 0x39670
movl $0xa8, %r12d
movq 0x10(%rbx), %rdi
addq %r12, %rdi
movslq %r14d, %r15
movq %r15, %rsi
callq 0x39670
movl $0xc0, %r14d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x39150
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movl 0x10(%rax), %eax
movl %eax, 0x10(%rcx)
movq %rbx, %rdi
callq 0x3b6c0
movq %rbx, %rdi
callq 0x3b740
movq 0x10(%rbx), %rdi
movl 0x4(%rdi), %eax
leal -0x2(,%rax,2), %ecx
movslq %ecx, %rcx
movq 0x90(%rdi), %rdx
movslq (%rdx,%rcx,4), %rcx
leal -0x1(,%rax,2), %eax
cltq
movslq (%rdx,%rax,4), %r15
addq %rcx, %r15
addq %r12, %rdi
movq %r15, %rsi
callq 0x39670
addq 0x10(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x39150
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement24populateEdgeFaceRelationEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+98h]
sub rax, [rdi+90h]
shr rax, 2
mov rcx, [rdi+8]
mov rdi, [rdi+10h]
mov r14, [rcx+0B0h]
sub r14, [rcx+0A8h]
shr r14, 2
add r14d, eax
add r14d, r14d
movsxd rsi, dword ptr [rdi+4]
add rdi, 90h
add rsi, rsi
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov r12d, 0A8h
mov rdi, [rbx+10h]
add rdi, r12
movsxd r15, r14d
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov r14d, 0C0h
mov rdi, [rbx+10h]
add rdi, r14
mov rsi, r15
call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov eax, [rax+10h]
mov [rcx+10h], eax
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement32populateEdgeFacesFromParentFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentFaces(void)
mov rdi, rbx; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement32populateEdgeFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentEdges(void)
mov rdi, [rbx+10h]
mov eax, [rdi+4]
lea ecx, ds:0FFFFFFFFFFFFFFFEh[rax*2]
movsxd rcx, ecx
mov rdx, [rdi+90h]
movsxd rcx, dword ptr [rdx+rcx*4]
lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2]
cdqe
movsxd r15, dword ptr [rdx+rax*4]
add r15, rcx
add rdi, r12
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
add r14, [rbx+10h]
mov rdi, r14
mov rsi, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
|
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation(
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this)
{
int v2; // r14d
long long v3; // rdi
long long v4; // r15
v2 = 2
* (((*((_QWORD *)this + 19) - *((_QWORD *)this + 18)) >> 2)
+ ((*(_QWORD *)(*((_QWORD *)this + 1) + 176LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 168LL)) >> 2));
std::vector<int>::resize(*((_QWORD *)this + 2) + 144LL, 2LL * *(int *)(*((_QWORD *)this + 2) + 4LL));
std::vector<int>::resize(*((_QWORD *)this + 2) + 168LL, v2);
std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 192LL, v2);
*(_DWORD *)(*((_QWORD *)this + 2) + 16LL) = *(_DWORD *)(*((_QWORD *)this + 1) + 16LL);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentFaces(this);
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFacesFromParentEdges(this);
v3 = *((_QWORD *)this + 2);
v4 = *(int *)(*(_QWORD *)(v3 + 144) + 4LL * (2 * *(_DWORD *)(v3 + 4) - 2))
+ (long long)*(int *)(*(_QWORD *)(v3 + 144) + 4LL * (2 * *(_DWORD *)(v3 + 4) - 1));
std::vector<int>::resize(v3 + 168, v4);
return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 192LL, v4);
}
|
populateEdgeFaceRelation:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x98]
SUB RAX,qword ptr [RDI + 0x90]
SHR RAX,0x2
MOV RCX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RDI + 0x10]
MOV R14,qword ptr [RCX + 0xb0]
SUB R14,qword ptr [RCX + 0xa8]
SHR R14,0x2
ADD R14D,EAX
ADD R14D,R14D
MOVSXD RSI,dword ptr [RDI + 0x4]
ADD RDI,0x90
ADD RSI,RSI
CALL 0x00139670
MOV R12D,0xa8
MOV RDI,qword ptr [RBX + 0x10]
ADD RDI,R12
MOVSXD R15,R14D
MOV RSI,R15
CALL 0x00139670
MOV R14D,0xc0
MOV RDI,qword ptr [RBX + 0x10]
ADD RDI,R14
MOV RSI,R15
CALL 0x00139150
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RCX + 0x10],EAX
MOV RDI,RBX
CALL 0x0013b6c0
MOV RDI,RBX
CALL 0x0013b740
MOV RDI,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x4]
LEA ECX,[-0x2 + RAX*0x2]
MOVSXD RCX,ECX
MOV RDX,qword ptr [RDI + 0x90]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
LEA EAX,[-0x1 + RAX*0x2]
CDQE
MOVSXD R15,dword ptr [RDX + RAX*0x4]
ADD R15,RCX
ADD RDI,R12
MOV RSI,R15
CALL 0x00139670
ADD R14,qword ptr [RBX + 0x10]
MOV RDI,R14
MOV RSI,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00139150
|
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateEdgeFaceRelation(TriRefinement *this)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
ulong uVar5;
lVar1 = *(long *)(this + 0x98);
lVar2 = *(long *)(this + 0x90);
lVar3 = *(long *)(*(long *)(this + 8) + 0xb0);
lVar4 = *(long *)(*(long *)(this + 8) + 0xa8);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x90),
(long)*(int *)(*(long *)(this + 0x10) + 4) * 2);
uVar5 = (ulong)(((int)((ulong)(lVar3 - lVar4) >> 2) + (int)((ulong)(lVar1 - lVar2) >> 2)) * 2);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0xa8),uVar5);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0xc0),uVar5);
*(int4 *)(*(long *)(this + 0x10) + 0x10) = *(int4 *)(*(long *)(this + 8) + 0x10);
populateEdgeFacesFromParentFaces(this);
populateEdgeFacesFromParentEdges(this);
lVar1 = *(long *)(this + 0x10);
uVar5 = (long)*(int *)(*(long *)(lVar1 + 0x90) + (long)(*(int *)(lVar1 + 4) * 2 + -1) * 4) +
(long)*(int *)(*(long *)(lVar1 + 0x90) + (long)(*(int *)(lVar1 + 4) * 2 + -2) * 4);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(lVar1 + 0xa8),uVar5);
std::vector<unsigned_short,std::allocator<unsigned_short>>::resize
((vector<unsigned_short,std::allocator<unsigned_short>> *)
(*(long *)(this + 0x10) + 0xc0),uVar5);
return;
}
|
|
12,303
|
nglog::SetVLOGLevel(char const*, int)
|
ng-log[P]ng-log/src/vlog_is_on.cc
|
int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
}
|
O1
|
cpp
|
nglog::SetVLOGLevel(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xe537(%rip), %rax # 0x2fa9c
movl (%rax), %ebp
callq 0x71f0
movq %rax, %r15
leaq 0x1e51a(%rip), %rdi # 0x3fa90
callq 0x7820
testl %eax, %eax
jne 0x21719
movq 0x1e4ce(%rip), %r12 # 0x3fa58
testq %r12, %r12
je 0x215ec
xorl %r13d, %r13d
movq %r12, %rdi
movq %r14, %rsi
callq 0x7100
testl %eax, %eax
je 0x215c9
testb $0x1, %r13b
jne 0x215dc
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x21494
testb %al, %al
je 0x215dc
movl 0x20(%r12), %ebp
movb $0x1, %r13b
jmp 0x215dc
testb $0x1, %r13b
jne 0x215d7
movl 0x20(%r12), %ebp
movb $0x1, %r13b
movl %ebx, 0x20(%r12)
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x21592
movl %ebp, 0x4(%rsp)
jmp 0x215f3
movl %ebp, 0x4(%rsp)
xorl %r13d, %r13d
testb $0x1, %r13b
jne 0x2169f
movl $0x30, %edi
callq 0x7530
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq %r14, %rdi
callq 0x71f0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x7880
movl %ebx, 0x20(%r12)
movq 0x1e411(%rip), %rax # 0x3fa58
movq %rax, 0x28(%r12)
movq %r12, 0x1e405(%rip) # 0x3fa58
movq 0x1e406(%rip), %r13 # 0x3fa60
testq %r13, %r13
je 0x2169f
addq $0x20, %r12
leaq 0x1e3f6(%rip), %rbp # 0x3fa60
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21494
testb %al, %al
je 0x2168f
movq %r12, (%r13)
movq 0x18(%r13), %rax
movq %rax, (%rbp)
jmp 0x21696
addq $0x18, %r13
movq %r13, %rbp
movq (%rbp), %r13
testq %r13, %r13
jne 0x2166a
leaq 0x1e3ea(%rip), %rdi # 0x3fa90
callq 0x73e0
movq 0x1e3b6(%rip), %rax # 0x3fa68
testq %rax, %rax
je 0x216bf
cmpl $0x0, (%rax)
setg %al
jmp 0x216de
leaq 0x1e3a2(%rip), %rdi # 0x3fa68
leaq 0xe3cf(%rip), %rsi # 0x2fa9c
leaq 0x28bd(%rip), %rdx # 0x23f91
movl $0x1, %ecx
callq 0x21737
movl 0x4(%rsp), %ebp
testb %al, %al
je 0x21708
leaq 0x28a4(%rip), %rsi # 0x23f91
leaq 0x28e7(%rip), %rcx # 0x23fdb
xorl %edi, %edi
movl $0xc5, %edx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1f22c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
leaq 0x1e366(%rip), %rdi # 0x3fa90
callq 0x73e0
movq %rbx, %rdi
callq 0x7980
|
_ZN5nglog12SetVLOGLevelEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov ebp, [rax]
call _strlen
mov r15, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_21719
mov r12, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
test r12, r12
jz short loc_215EC
xor r13d, r13d
loc_21592:
mov rdi, r12
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_215C9
test r13b, 1
jnz short loc_215DC
mov rdi, [r12]; this
mov rsi, [r12+8]; char *
mov rdx, r14; unsigned __int64
mov rcx, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_215DC
mov ebp, [r12+20h]
mov r13b, 1
jmp short loc_215DC
loc_215C9:
test r13b, 1
jnz short loc_215D7
mov ebp, [r12+20h]
mov r13b, 1
loc_215D7:
mov [r12+20h], ebx
loc_215DC:
mov r12, [r12+28h]
test r12, r12
jnz short loc_21592
mov [rsp+38h+var_34], ebp
jmp short loc_215F3
loc_215EC:
mov [rsp+38h+var_34], ebp
xor r13d, r13d
loc_215F3:
test r13b, 1
jnz loc_2169F
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
add rax, 10h
mov [r12], rax
mov qword ptr [r12+8], 0
mov byte ptr [r12+10h], 0
mov rdi, r14
call _strlen
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov [r12+20h], ebx
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [r12+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, r12; nglog::vmodule_list
mov r13, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
test r13, r13
jz short loc_2169F
add r12, 20h ; ' '
lea rbp, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
loc_2166A:
mov rdx, [r13+8]; unsigned __int64
mov rcx, [r13+10h]; char *
mov rdi, r14; this
mov rsi, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_2168F
mov [r13+0], r12
mov rax, [r13+18h]
mov [rbp+0], rax
jmp short loc_21696
loc_2168F:
add r13, 18h
mov rbp, r13
loc_21696:
mov r13, [rbp+0]
test r13, r13
jnz short loc_2166A
loc_2169F:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
test rax, rax
jz short loc_216BF
cmp dword ptr [rax], 0
setnle al
jmp short loc_216DE
loc_216BF:
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
loc_216DE:
mov ebp, [rsp+38h+var_34]
test al, al
jz short loc_21708
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
xor edi, edi
mov edx, 0C5h
mov r8, r14
mov r9d, ebx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_21708:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_21719:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::SetVLOGLevel(
nglog *this,
const char *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
unsigned int v11; // ebp
const char *v12; // r15
int v13; // eax
long long v14; // r12
char v15; // r13
unsigned long long v16; // r8
long long v17; // r12
long long v18; // rax
unsigned long long v19; // r8
long long v20; // r13
long long v21; // r12
long long *v22; // rbp
__m128 v23; // xmm4
__m128 v24; // xmm5
char v25; // al
unsigned int v26; // ebp
char v28; // [rsp-4h] [rbp-38h]
unsigned int v29; // [rsp+0h] [rbp-34h]
v28 = v10;
v11 = fLI::FLAGS_v;
v12 = (const char *)strlen(this);
v13 = pthread_mutex_lock(&nglog::vmodule_mutex);
if ( v13 )
std::__throw_system_error(v13);
v14 = nglog::vmodule_list;
if ( nglog::vmodule_list )
{
v15 = 0;
do
{
if ( !(unsigned int)std::string::compare(v14, this) )
{
if ( (v15 & 1) == 0 )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
*(_DWORD *)(v14 + 32) = (_DWORD)a2;
}
else if ( (v15 & 1) == 0
&& nglog::tools::SafeFNMatch_(*(nglog::tools **)v14, *(const char **)(v14 + 8), (long long)this, v12, v16) )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
v14 = *(_QWORD *)(v14 + 40);
}
while ( v14 );
v29 = v11;
}
else
{
v29 = v11;
v15 = 0;
}
if ( (v15 & 1) == 0 )
{
v17 = operator new(0x30uLL);
*(_QWORD *)v17 = v17 + 16;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
v18 = strlen(this);
std::string::_M_replace(v17, 0LL, 0LL, this, v18);
*(_DWORD *)(v17 + 32) = (_DWORD)a2;
*(_QWORD *)(v17 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v17;
v20 = nglog::cached_site_list;
if ( nglog::cached_site_list )
{
v21 = v17 + 32;
v22 = &nglog::cached_site_list;
do
{
if ( nglog::tools::SafeFNMatch_(this, v12, *(_QWORD *)(v20 + 8), *(const char **)(v20 + 16), v19) )
{
*(_QWORD *)v20 = v21;
*v22 = *(_QWORD *)(v20 + 24);
}
else
{
v22 = (long long *)(v20 + 24);
}
v20 = *v22;
}
while ( *v22 );
}
}
pthread_mutex_unlock(&nglog::vmodule_mutex);
if ( nglog::SetVLOGLevel(char const*,int)::vlocal__ )
v25 = *(_DWORD *)nglog::SetVLOGLevel(char const*,int)::vlocal__ > 0;
else
v25 = nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL);
v26 = v29;
if ( v25 )
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
(long long)"Set VLOG level for \"%s\" to %d",
(long long)this,
(unsigned int)a2,
a3,
a4,
a5,
a6,
v23,
v24,
a9,
a10,
v28);
return v26;
}
|
SetVLOGLevel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA RAX,[0x12fa9c]
MOV EBP,dword ptr [RAX]
CALL 0x001071f0
MOV R15,RAX
LEA RDI,[0x13fa90]
CALL 0x00107820
TEST EAX,EAX
JNZ 0x00121719
MOV R12,qword ptr [0x0013fa58]
TEST R12,R12
JZ 0x001215ec
XOR R13D,R13D
LAB_00121592:
MOV RDI,R12
MOV RSI,R14
CALL 0x00107100
TEST EAX,EAX
JZ 0x001215c9
TEST R13B,0x1
JNZ 0x001215dc
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,R14
MOV RCX,R15
CALL 0x00121494
TEST AL,AL
JZ 0x001215dc
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
JMP 0x001215dc
LAB_001215c9:
TEST R13B,0x1
JNZ 0x001215d7
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_001215d7:
MOV dword ptr [R12 + 0x20],EBX
LAB_001215dc:
MOV R12,qword ptr [R12 + 0x28]
TEST R12,R12
JNZ 0x00121592
MOV dword ptr [RSP + 0x4],EBP
JMP 0x001215f3
LAB_001215ec:
MOV dword ptr [RSP + 0x4],EBP
XOR R13D,R13D
LAB_001215f3:
TEST R13B,0x1
JNZ 0x0012169f
LAB_001215fd:
MOV EDI,0x30
CALL 0x00107530
MOV R12,RAX
ADD RAX,0x10
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x0
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R14
CALL 0x001071f0
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x00107880
LAB_0012163b:
MOV dword ptr [R12 + 0x20],EBX
MOV RAX,qword ptr [0x0013fa58]
MOV qword ptr [R12 + 0x28],RAX
MOV qword ptr [0x0013fa58],R12
MOV R13,qword ptr [0x0013fa60]
TEST R13,R13
JZ 0x0012169f
ADD R12,0x20
LEA RBP,[0x13fa60]
LAB_0012166a:
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00121494
TEST AL,AL
JZ 0x0012168f
MOV qword ptr [R13],R12
MOV RAX,qword ptr [R13 + 0x18]
MOV qword ptr [RBP],RAX
JMP 0x00121696
LAB_0012168f:
ADD R13,0x18
MOV RBP,R13
LAB_00121696:
MOV R13,qword ptr [RBP]
TEST R13,R13
JNZ 0x0012166a
LAB_0012169f:
LEA RDI,[0x13fa90]
CALL 0x001073e0
MOV RAX,qword ptr [0x0013fa68]
TEST RAX,RAX
JZ 0x001216bf
CMP dword ptr [RAX],0x0
SETG AL
JMP 0x001216de
LAB_001216bf:
LEA RDI,[0x13fa68]
LEA RSI,[0x12fa9c]
LEA RDX,[0x123f91]
MOV ECX,0x1
CALL 0x00121737
LAB_001216de:
MOV EBP,dword ptr [RSP + 0x4]
TEST AL,AL
JZ 0x00121708
LEA RSI,[0x123f91]
LEA RCX,[0x123fdb]
XOR EDI,EDI
MOV EDX,0xc5
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x0011f22c
LAB_00121708:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00121719:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
bool bVar1;
char cVar2;
int iVar3;
size_t sVar4;
long *plVar5;
long *plVar6;
int8 *puVar7;
int4 local_34;
local_34 = fLI::FLAGS_v;
sVar4 = strlen(param_1);
iVar3 = pthread_mutex_lock((pthread_mutex_t *)vmodule_mutex);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (vmodule_list == (long *)0x0) {
bVar1 = false;
}
else {
bVar1 = false;
plVar5 = vmodule_list;
do {
iVar3 = std::__cxx11::string::compare((char *)plVar5);
if (iVar3 == 0) {
if (!bVar1) {
local_34 = (int4)plVar5[4];
bVar1 = true;
}
*(int *)(plVar5 + 4) = param_2;
}
else if ((!bVar1) &&
(cVar2 = tools::SafeFNMatch_((char *)*plVar5,plVar5[1],param_1,sVar4), cVar2 != '\0'))
{
local_34 = (int4)plVar5[4];
bVar1 = true;
}
plVar5 = (long *)plVar5[5];
} while (plVar5 != (long *)0x0);
}
if (!bVar1) {
/* try { // try from 001215fd to 0012163a has its CatchHandler @ 00121720 */
plVar5 = (long *)operator_new(0x30);
*plVar5 = (long)(plVar5 + 2);
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
strlen(param_1);
std::__cxx11::string::_M_replace((ulong)plVar5,0,(char *)0x0,(ulong)param_1);
*(int *)(plVar5 + 4) = param_2;
plVar5[5] = (long)vmodule_list;
vmodule_list = plVar5;
if (cached_site_list != (int8 *)0x0) {
plVar6 = (long *)&cached_site_list;
puVar7 = cached_site_list;
do {
cVar2 = tools::SafeFNMatch_(param_1,sVar4,(char *)puVar7[1],puVar7[2]);
if (cVar2 == '\0') {
plVar6 = puVar7 + 3;
}
else {
*puVar7 = plVar5 + 4;
*plVar6 = puVar7[3];
}
puVar7 = (int8 *)*plVar6;
} while (puVar7 != (int8 *)0x0);
}
}
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
cVar2 = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
}
else {
cVar2 = 0 < *SetVLOGLevel(char_const*,int)::vlocal__;
}
if (cVar2 != '\0') {
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",param_1,param_2);
}
return local_34;
}
|
|
12,304
|
nglog::SetVLOGLevel(char const*, int)
|
ng-log[P]ng-log/src/vlog_is_on.cc
|
int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
}
|
O3
|
cpp
|
nglog::SetVLOGLevel(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xe85f(%rip), %rax # 0x2fa9c
movl (%rax), %ebp
callq 0x71f0
movq %rax, %r15
leaq 0x1e842(%rip), %rdi # 0x3fa90
callq 0x7820
testl %eax, %eax
jne 0x213e7
movq 0x1e7f6(%rip), %r12 # 0x3fa58
testq %r12, %r12
je 0x212c8
xorl %r13d, %r13d
movq %r12, %rdi
movq %r14, %rsi
callq 0x7100
testl %eax, %eax
je 0x212a1
testb $0x1, %r13b
jne 0x212b4
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x21174
testb %al, %al
je 0x212b4
movl 0x20(%r12), %ebp
movb $0x1, %r13b
jmp 0x212b4
testb $0x1, %r13b
jne 0x212af
movl 0x20(%r12), %ebp
movb $0x1, %r13b
movl %ebx, 0x20(%r12)
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x2126a
testb $0x1, %r13b
jne 0x21372
movl $0x30, %edi
callq 0x7530
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq %r14, %rdi
callq 0x71f0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x7880
movl %ebx, 0x20(%r12)
movq 0x1e746(%rip), %rax # 0x3fa58
movq %rax, 0x28(%r12)
movq %r12, 0x1e73a(%rip) # 0x3fa58
movq 0x1e73b(%rip), %r13 # 0x3fa60
testq %r13, %r13
je 0x21372
movl %ebp, 0x4(%rsp)
addq $0x20, %r12
leaq 0x1e727(%rip), %rbp # 0x3fa60
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21174
testb %al, %al
je 0x2135e
movq %r12, (%r13)
movq 0x18(%r13), %r13
movq %r13, (%rbp)
jmp 0x21369
movq %r13, %rbp
movq 0x18(%r13), %r13
addq $0x18, %rbp
testq %r13, %r13
jne 0x21339
movl 0x4(%rsp), %ebp
leaq 0x1e717(%rip), %rdi # 0x3fa90
callq 0x73e0
movq 0x1e6e3(%rip), %rax # 0x3fa68
testq %rax, %rax
je 0x213c2
cmpl $0x0, (%rax)
jle 0x213b1
leaq 0x2be7(%rip), %rsi # 0x23f7d
leaq 0x2c2a(%rip), %rcx # 0x23fc7
xorl %edi, %edi
movl $0xc5, %edx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x1efec
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e69f(%rip), %rdi # 0x3fa68
leaq 0xe6cc(%rip), %rsi # 0x2fa9c
leaq 0x2ba6(%rip), %rdx # 0x23f7d
movl $0x1, %ecx
callq 0x21405
testb %al, %al
jne 0x2138f
jmp 0x213b1
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
leaq 0x1e698(%rip), %rdi # 0x3fa90
callq 0x73e0
movq %rbx, %rdi
callq 0x7980
|
_ZN5nglog12SetVLOGLevelEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov ebp, [rax]
call _strlen
mov r15, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_213E7
mov r12, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
test r12, r12
jz short loc_212C8
xor r13d, r13d
loc_2126A:
mov rdi, r12
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_212A1
test r13b, 1
jnz short loc_212B4
mov rdi, [r12]; this
mov rsi, [r12+8]; char *
mov rdx, r14; unsigned __int64
mov rcx, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_212B4
mov ebp, [r12+20h]
mov r13b, 1
jmp short loc_212B4
loc_212A1:
test r13b, 1
jnz short loc_212AF
mov ebp, [r12+20h]
mov r13b, 1
loc_212AF:
mov [r12+20h], ebx
loc_212B4:
mov r12, [r12+28h]
test r12, r12
jnz short loc_2126A
test r13b, 1
jnz loc_21372
loc_212C8:
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
add rax, 10h
mov [r12], rax
mov qword ptr [r12+8], 0
mov byte ptr [r12+10h], 0
mov rdi, r14
call _strlen
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov [r12+20h], ebx
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [r12+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, r12; nglog::vmodule_list
mov r13, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
test r13, r13
jz short loc_21372
mov [rsp+38h+var_34], ebp
add r12, 20h ; ' '
lea rbp, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
loc_21339:
mov rdx, [r13+8]; unsigned __int64
mov rcx, [r13+10h]; char *
mov rdi, r14; this
mov rsi, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_2135E
mov [r13+0], r12
mov r13, [r13+18h]
mov [rbp+0], r13
jmp short loc_21369
loc_2135E:
mov rbp, r13
mov r13, [r13+18h]
add rbp, 18h
loc_21369:
test r13, r13
jnz short loc_21339
mov ebp, [rsp+38h+var_34]
loc_21372:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
test rax, rax
jz short loc_213C2
cmp dword ptr [rax], 0
jle short loc_213B1
loc_2138F:
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
xor edi, edi
mov edx, 0C5h
mov r8, r14
mov r9d, ebx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_213B1:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_213C2:
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
test al, al
jnz short loc_2138F
jmp short loc_213B1
loc_213E7:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::SetVLOGLevel(
nglog *this,
const char *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
unsigned int v11; // ebp
const char *v12; // r15
int v13; // eax
long long v14; // r12
char v15; // r13
unsigned long long v16; // r8
long long v17; // r12
long long v18; // rax
unsigned long long v19; // r8
long long v20; // r13
long long v21; // r12
long long *v22; // rbp
long long v23; // rbp
__m128 v24; // xmm4
__m128 v25; // xmm5
char v27; // [rsp-4h] [rbp-38h]
unsigned int v28; // [rsp+0h] [rbp-34h]
v27 = v10;
v11 = fLI::FLAGS_v;
v12 = (const char *)strlen(this);
v13 = pthread_mutex_lock(&nglog::vmodule_mutex);
if ( v13 )
std::__throw_system_error(v13);
v14 = nglog::vmodule_list;
if ( !nglog::vmodule_list )
goto LABEL_13;
v15 = 0;
do
{
if ( !(unsigned int)std::string::compare(v14, this) )
{
if ( (v15 & 1) == 0 )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
*(_DWORD *)(v14 + 32) = (_DWORD)a2;
}
else if ( (v15 & 1) == 0
&& nglog::tools::SafeFNMatch_(*(nglog::tools **)v14, *(const char **)(v14 + 8), (long long)this, v12, v16) )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
v14 = *(_QWORD *)(v14 + 40);
}
while ( v14 );
if ( (v15 & 1) == 0 )
{
LABEL_13:
v17 = operator new(0x30uLL);
*(_QWORD *)v17 = v17 + 16;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
v18 = strlen(this);
std::string::_M_replace(v17, 0LL, 0LL, this, v18);
*(_DWORD *)(v17 + 32) = (_DWORD)a2;
*(_QWORD *)(v17 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v17;
v20 = nglog::cached_site_list;
if ( nglog::cached_site_list )
{
v28 = v11;
v21 = v17 + 32;
v22 = &nglog::cached_site_list;
do
{
if ( nglog::tools::SafeFNMatch_(this, v12, *(_QWORD *)(v20 + 8), *(const char **)(v20 + 16), v19) )
{
*(_QWORD *)v20 = v21;
v20 = *(_QWORD *)(v20 + 24);
*v22 = v20;
}
else
{
v23 = v20;
v20 = *(_QWORD *)(v20 + 24);
v22 = (long long *)(v23 + 24);
}
}
while ( v20 );
v11 = v28;
}
}
pthread_mutex_unlock(&nglog::vmodule_mutex);
if ( !nglog::SetVLOGLevel(char const*,int)::vlocal__ )
{
if ( !(unsigned __int8)nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL) )
return v11;
goto LABEL_22;
}
if ( *(int *)nglog::SetVLOGLevel(char const*,int)::vlocal__ > 0 )
LABEL_22:
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
(long long)"Set VLOG level for \"%s\" to %d",
(long long)this,
(unsigned int)a2,
a3,
a4,
a5,
a6,
v24,
v25,
a9,
a10,
v27);
return v11;
}
|
SetVLOGLevel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA RAX,[0x12fa9c]
MOV EBP,dword ptr [RAX]
CALL 0x001071f0
MOV R15,RAX
LEA RDI,[0x13fa90]
CALL 0x00107820
TEST EAX,EAX
JNZ 0x001213e7
MOV R12,qword ptr [0x0013fa58]
TEST R12,R12
JZ 0x001212c8
XOR R13D,R13D
LAB_0012126a:
MOV RDI,R12
MOV RSI,R14
CALL 0x00107100
TEST EAX,EAX
JZ 0x001212a1
TEST R13B,0x1
JNZ 0x001212b4
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,R14
MOV RCX,R15
CALL 0x00121174
TEST AL,AL
JZ 0x001212b4
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
JMP 0x001212b4
LAB_001212a1:
TEST R13B,0x1
JNZ 0x001212af
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_001212af:
MOV dword ptr [R12 + 0x20],EBX
LAB_001212b4:
MOV R12,qword ptr [R12 + 0x28]
TEST R12,R12
JNZ 0x0012126a
TEST R13B,0x1
JNZ 0x00121372
LAB_001212c8:
MOV EDI,0x30
CALL 0x00107530
MOV R12,RAX
ADD RAX,0x10
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x0
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R14
CALL 0x001071f0
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x00107880
LAB_00121306:
MOV dword ptr [R12 + 0x20],EBX
MOV RAX,qword ptr [0x0013fa58]
MOV qword ptr [R12 + 0x28],RAX
MOV qword ptr [0x0013fa58],R12
MOV R13,qword ptr [0x0013fa60]
TEST R13,R13
JZ 0x00121372
MOV dword ptr [RSP + 0x4],EBP
ADD R12,0x20
LEA RBP,[0x13fa60]
LAB_00121339:
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00121174
TEST AL,AL
JZ 0x0012135e
MOV qword ptr [R13],R12
MOV R13,qword ptr [R13 + 0x18]
MOV qword ptr [RBP],R13
JMP 0x00121369
LAB_0012135e:
MOV RBP,R13
MOV R13,qword ptr [R13 + 0x18]
ADD RBP,0x18
LAB_00121369:
TEST R13,R13
JNZ 0x00121339
MOV EBP,dword ptr [RSP + 0x4]
LAB_00121372:
LEA RDI,[0x13fa90]
CALL 0x001073e0
MOV RAX,qword ptr [0x0013fa68]
TEST RAX,RAX
JZ 0x001213c2
CMP dword ptr [RAX],0x0
JLE 0x001213b1
LAB_0012138f:
LEA RSI,[0x123f7d]
LEA RCX,[0x123fc7]
XOR EDI,EDI
MOV EDX,0xc5
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x0011efec
LAB_001213b1:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001213c2:
LEA RDI,[0x13fa68]
LEA RSI,[0x12fa9c]
LEA RDX,[0x123f7d]
MOV ECX,0x1
CALL 0x00121405
TEST AL,AL
JNZ 0x0012138f
JMP 0x001213b1
LAB_001213e7:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
bool bVar1;
char cVar2;
int iVar3;
size_t sVar4;
long *plVar5;
int4 uVar6;
int8 *puVar7;
int8 *puVar8;
int8 *puVar9;
uVar6 = fLI::FLAGS_v;
sVar4 = strlen(param_1);
iVar3 = pthread_mutex_lock((pthread_mutex_t *)vmodule_mutex);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (vmodule_list != (long *)0x0) {
bVar1 = false;
plVar5 = vmodule_list;
do {
iVar3 = std::__cxx11::string::compare((char *)plVar5);
if (iVar3 == 0) {
if (!bVar1) {
uVar6 = (int4)plVar5[4];
bVar1 = true;
}
*(int *)(plVar5 + 4) = param_2;
}
else if ((!bVar1) &&
(cVar2 = tools::SafeFNMatch_((char *)*plVar5,plVar5[1],param_1,sVar4), cVar2 != '\0'))
{
uVar6 = (int4)plVar5[4];
bVar1 = true;
}
plVar5 = (long *)plVar5[5];
} while (plVar5 != (long *)0x0);
if (bVar1) goto LAB_00121372;
}
/* try { // try from 001212c8 to 00121305 has its CatchHandler @ 001213ee */
plVar5 = (long *)operator_new(0x30);
*plVar5 = (long)(plVar5 + 2);
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
strlen(param_1);
std::__cxx11::string::_M_replace((ulong)plVar5,0,(char *)0x0,(ulong)param_1);
*(int *)(plVar5 + 4) = param_2;
plVar5[5] = (long)vmodule_list;
vmodule_list = plVar5;
if (cached_site_list != (int8 *)0x0) {
puVar7 = &cached_site_list;
puVar8 = cached_site_list;
do {
cVar2 = tools::SafeFNMatch_(param_1,sVar4,(char *)puVar8[1],puVar8[2]);
if (cVar2 == '\0') {
puVar9 = (int8 *)puVar8[3];
puVar7 = puVar8 + 3;
}
else {
*puVar8 = plVar5 + 4;
puVar9 = (int8 *)puVar8[3];
*puVar7 = puVar9;
}
puVar8 = puVar9;
} while (puVar9 != (int8 *)0x0);
}
LAB_00121372:
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
cVar2 = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
if (cVar2 == '\0') {
return uVar6;
}
}
else if (*SetVLOGLevel(char_const*,int)::vlocal__ < 1) {
return uVar6;
}
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",param_1,param_2);
return uVar6;
}
|
|
12,305
|
js_create_resolving_functions
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_create_resolving_functions(JSContext *ctx,
JSValue *resolving_funcs,
JSValue promise)
{
JSValue obj;
JSPromiseFunctionData *s;
JSPromiseFunctionDataResolved *sr;
int i, ret;
sr = js_malloc(ctx, sizeof(*sr));
if (!sr)
return -1;
sr->ref_count = 1;
sr->already_resolved = FALSE; /* must be shared between the two functions */
ret = 0;
for(i = 0; i < 2; i++) {
obj = JS_NewObjectProtoClass(ctx, ctx->function_proto,
JS_CLASS_PROMISE_RESOLVE_FUNCTION + i);
if (JS_IsException(obj))
goto fail;
s = js_malloc(ctx, sizeof(*s));
if (!s) {
JS_FreeValue(ctx, obj);
fail:
if (i != 0)
JS_FreeValue(ctx, resolving_funcs[0]);
ret = -1;
break;
}
sr->ref_count++;
s->presolved = sr;
s->promise = js_dup(promise);
JS_SetOpaqueInternal(obj, s);
js_function_set_properties(ctx, obj, JS_ATOM_empty_string, 1);
resolving_funcs[i] = obj;
}
js_promise_resolve_function_free_resolved(ctx->rt, sr);
return ret;
}
|
O1
|
c
|
js_create_resolving_functions:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x8
popq %rsi
callq 0xede6
testq %rax, %rax
je 0x11901
movq %rax, %r14
movq $0x1, (%rax)
movq %r15, 0x18(%rsp)
leaq 0x8(%r15), %r13
xorl %r12d, %r12d
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movl %r12d, %ecx
orl $0x32, %ecx
movq %rbx, %rdi
callq 0x20f05
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x11915
movq %rax, %r15
movq %rbx, %rdi
pushq $0x18
popq %rsi
callq 0xede6
testq %rax, %rax
je 0x11906
incl (%r14)
movq %r14, 0x10(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x20(%rsp)
cmpl $-0x9, 0x10(%rsp)
jb 0x118ba
movq 0x20(%rsp), %rcx
incl (%rcx)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x30(%r15)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
pushq $0x2f
popq %rcx
pushq $0x1
popq %r8
callq 0x211fc
movq %r15, -0x8(%r13)
movq %rbp, (%r13)
incq %r12
addq $0x10, %r13
cmpq $0x1, %r12
je 0x11866
xorl %ebp, %ebp
jmp 0x11932
pushq $-0x1
popq %rbp
jmp 0x1193e
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1d8c6
pushq $-0x1
popq %rbp
testq %r12, %r12
je 0x11932
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x52b4e
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_create_resolving_functions:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_48], rcx
mov [rsp+58h+var_50], rdx
mov r15, rsi
mov rbx, rdi
push 8
pop rsi
call js_malloc
test rax, rax
jz loc_11901
mov r14, rax
mov qword ptr [rax], 1
mov [rsp+58h+var_40], r15
lea r13, [r15+8]
xor r12d, r12d
loc_11866:
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov ecx, r12d
or ecx, 32h
mov rdi, rbx
call JS_NewObjectProtoClass
mov rbp, rdx
cmp ebp, 6
jz loc_11915
mov r15, rax
mov rdi, rbx
push 18h
pop rsi
call js_malloc
test rax, rax
jz short loc_11906
inc dword ptr [r14]
mov [rax+10h], r14
mov rcx, [rsp+58h+var_50]
mov [rsp+58h+var_38], rcx
cmp dword ptr [rsp+58h+var_48], 0FFFFFFF7h
jb short loc_118BA
mov rcx, [rsp+58h+var_38]
inc dword ptr [rcx]
loc_118BA:
mov rcx, [rsp+58h+var_50]
mov [rax], rcx
mov rcx, [rsp+58h+var_48]
mov [rax+8], rcx
mov [r15+30h], rax
mov rdi, rbx
mov rsi, r15
mov rdx, rbp
push 2Fh ; '/'
pop rcx
push 1
pop r8
call js_function_set_properties
mov [r13-8], r15
mov [r13+0], rbp
inc r12
add r13, 10h
cmp r12, 1
jz loc_11866
xor ebp, ebp
jmp short loc_11932
loc_11901:
push 0FFFFFFFFFFFFFFFFh
pop rbp
jmp short loc_1193E
loc_11906:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, rbp
call JS_FreeValueRT
loc_11915:
push 0FFFFFFFFFFFFFFFFh
pop rbp
test r12, r12
jz short loc_11932
mov rax, [rsp+58h+var_40]
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
loc_11932:
mov rdi, [rbx+18h]
mov rsi, r14
call js_promise_resolve_function_free_resolved
loc_1193E:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_create_resolving_functions(_QWORD *a1, _QWORD *a2, _DWORD *a3, long long a4)
{
_QWORD *v4; // rax
_DWORD *v5; // r14
_QWORD *v6; // r13
long long v7; // r12
long long v8; // rax
long long v9; // rdx
long long v10; // rbp
long long v11; // r15
_QWORD *v12; // rax
unsigned int v13; // ebp
v4 = (_QWORD *)js_malloc((long long)a1, 8LL);
if ( v4 )
{
v5 = v4;
*v4 = 1LL;
v6 = a2 + 1;
v7 = 0LL;
while ( 1 )
{
v8 = JS_NewObjectProtoClass(a1, a1[9], a1[10], (unsigned int)v7 | 0x32);
v10 = v9;
if ( (_DWORD)v9 == 6 )
break;
v11 = v8;
v12 = (_QWORD *)js_malloc((long long)a1, 24LL);
if ( !v12 )
{
JS_FreeValueRT(a1[3], v11);
break;
}
++*v5;
v12[2] = v5;
if ( (unsigned int)a4 >= 0xFFFFFFF7 )
++*a3;
*v12 = a3;
v12[1] = a4;
*(_QWORD *)(v11 + 48) = v12;
js_function_set_properties(a1, v11, v10, 47LL, 1LL);
*(v6 - 1) = v11;
*v6 = v10;
++v7;
v6 += 2;
if ( v7 != 1 )
{
v13 = 0;
goto LABEL_13;
}
}
v13 = -1;
if ( v7 )
JS_FreeValueRT(a1[3], *a2);
LABEL_13:
js_promise_resolve_function_free_resolved(a1[3], v5);
}
else
{
return (unsigned int)-1;
}
return v13;
}
|
js_create_resolving_functions:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x8],RDX
MOV R15,RSI
MOV RBX,RDI
PUSH 0x8
POP RSI
CALL 0x0010ede6
TEST RAX,RAX
JZ 0x00111901
MOV R14,RAX
MOV qword ptr [RAX],0x1
MOV qword ptr [RSP + 0x18],R15
LEA R13,[R15 + 0x8]
XOR R12D,R12D
LAB_00111866:
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV ECX,R12D
OR ECX,0x32
MOV RDI,RBX
CALL 0x00120f05
MOV RBP,RDX
CMP EBP,0x6
JZ 0x00111915
MOV R15,RAX
MOV RDI,RBX
PUSH 0x18
POP RSI
CALL 0x0010ede6
TEST RAX,RAX
JZ 0x00111906
INC dword ptr [R14]
MOV qword ptr [RAX + 0x10],R14
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RCX
CMP dword ptr [RSP + 0x10],-0x9
JC 0x001118ba
MOV RCX,qword ptr [RSP + 0x20]
INC dword ptr [RCX]
LAB_001118ba:
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [R15 + 0x30],RAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RBP
PUSH 0x2f
POP RCX
PUSH 0x1
POP R8
CALL 0x001211fc
MOV qword ptr [R13 + -0x8],R15
MOV qword ptr [R13],RBP
INC R12
ADD R13,0x10
CMP R12,0x1
JZ 0x00111866
XOR EBP,EBP
JMP 0x00111932
LAB_00111901:
PUSH -0x1
POP RBP
JMP 0x0011193e
LAB_00111906:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,RBP
CALL 0x0011d8c6
LAB_00111915:
PUSH -0x1
POP RBP
TEST R12,R12
JZ 0x00111932
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
LAB_00111932:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
CALL 0x00152b4e
LAB_0011193e:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
js_create_resolving_functions(long param_1,int8 *param_2,int *param_3,int8 param_4)
{
int *piVar1;
long lVar2;
int8 *puVar3;
int8 uVar4;
int4 uVar5;
long lVar6;
int8 *puVar7;
int1 auVar8 [16];
uint local_48;
piVar1 = (int *)js_malloc(param_1,8);
if (piVar1 == (int *)0x0) {
uVar5 = 0xffffffff;
}
else {
piVar1[0] = 1;
piVar1[1] = 0;
puVar7 = param_2 + 1;
lVar6 = 0;
do {
auVar8 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),
(uint)lVar6 | 0x32);
uVar4 = auVar8._8_8_;
lVar2 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
LAB_00111915:
uVar5 = 0xffffffff;
if (lVar6 != 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),*param_2,param_2[1]);
}
goto LAB_00111932;
}
puVar3 = (int8 *)js_malloc(param_1,0x18);
if (puVar3 == (int8 *)0x0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar2,uVar4);
goto LAB_00111915;
}
*piVar1 = *piVar1 + 1;
puVar3[2] = piVar1;
local_48 = (uint)param_4;
if (0xfffffff6 < local_48) {
*param_3 = *param_3 + 1;
}
*puVar3 = param_3;
puVar3[1] = param_4;
*(int8 **)(lVar2 + 0x30) = puVar3;
js_function_set_properties(param_1,lVar2,uVar4,0x2f,1);
puVar7[-1] = lVar2;
*puVar7 = uVar4;
lVar6 = lVar6 + 1;
puVar7 = puVar7 + 2;
} while (lVar6 == 1);
uVar5 = 0;
LAB_00111932:
js_promise_resolve_function_free_resolved(*(int8 *)(param_1 + 0x18),piVar1);
}
return uVar5;
}
|
|
12,306
|
js_create_resolving_functions
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_create_resolving_functions(JSContext *ctx,
JSValue *resolving_funcs,
JSValue promise)
{
JSValue obj;
JSPromiseFunctionData *s;
JSPromiseFunctionDataResolved *sr;
int i, ret;
sr = js_malloc(ctx, sizeof(*sr));
if (!sr)
return -1;
sr->ref_count = 1;
sr->already_resolved = FALSE; /* must be shared between the two functions */
ret = 0;
for(i = 0; i < 2; i++) {
obj = JS_NewObjectProtoClass(ctx, ctx->function_proto,
JS_CLASS_PROMISE_RESOLVE_FUNCTION + i);
if (JS_IsException(obj))
goto fail;
s = js_malloc(ctx, sizeof(*s));
if (!s) {
JS_FreeValue(ctx, obj);
fail:
if (i != 0)
JS_FreeValue(ctx, resolving_funcs[0]);
ret = -1;
break;
}
sr->ref_count++;
s->presolved = sr;
s->promise = js_dup(promise);
JS_SetOpaqueInternal(obj, s);
js_function_set_properties(ctx, obj, JS_ATOM_empty_string, 1);
resolving_funcs[i] = obj;
}
js_promise_resolve_function_free_resolved(ctx->rt, sr);
return ret;
}
|
O2
|
c
|
js_create_resolving_functions:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x8
popq %rsi
callq 0x17214
testq %rax, %rax
je 0x47412
movq %rax, (%rsp)
movq $0x1, (%rax)
movq %r14, 0x10(%rsp)
addq $0x8, %r14
xorl %ebp, %ebp
cmpq $0x2, %rbp
je 0x47418
movq 0x48(%rbx), %rsi
movq 0x50(%rbx), %rdx
movl %ebp, %ecx
orl $0x32, %ecx
movq %rbx, %rdi
callq 0x1b069
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x4742f
movq %rax, %r12
movq %rbx, %rdi
pushq $0x18
popq %rsi
callq 0x17214
testq %rax, %rax
je 0x47421
movq (%rsp), %rcx
incl (%rcx)
movq %rcx, 0x10(%rax)
cmpl $-0x9, %r13d
jb 0x473d9
movq 0x8(%rsp), %rcx
incl (%rcx)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq %r13, 0x8(%rax)
movq %rax, 0x30(%r12)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
pushq $0x2f
popq %rcx
pushq $0x1
popq %r8
callq 0x1b4ad
movq %r12, -0x8(%r14)
movq %r15, (%r14)
incq %rbp
addq $0x10, %r14
jmp 0x47383
pushq $-0x1
popq %r15
jmp 0x4745c
movq (%rsp), %r14
xorl %r15d, %r15d
jmp 0x47450
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1801e
pushq $-0x1
popq %r15
testq %rbp, %rbp
movq (%rsp), %r14
je 0x47450
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x1801e
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x46f56
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_create_resolving_functions:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov [rsp+48h+var_40], rdx
mov r14, rsi
mov rbx, rdi
push 8
pop rsi
call js_malloc
test rax, rax
jz loc_47412
mov [rsp+48h+var_48], rax
mov qword ptr [rax], 1
mov [rsp+48h+var_38], r14
add r14, 8
xor ebp, ebp
loc_47383:
cmp rbp, 2
jz loc_47418
mov rsi, [rbx+48h]
mov rdx, [rbx+50h]
mov ecx, ebp
or ecx, 32h
mov rdi, rbx
call JS_NewObjectProtoClass
mov r15, rdx
cmp r15d, 6
jz loc_4742F
mov r12, rax
mov rdi, rbx
push 18h
pop rsi
call js_malloc
test rax, rax
jz short loc_47421
mov rcx, [rsp+48h+var_48]
inc dword ptr [rcx]
mov [rax+10h], rcx
cmp r13d, 0FFFFFFF7h
jb short loc_473D9
mov rcx, [rsp+48h+var_40]
inc dword ptr [rcx]
loc_473D9:
mov rcx, [rsp+48h+var_40]
mov [rax], rcx
mov [rax+8], r13
mov [r12+30h], rax
mov rdi, rbx
mov rsi, r12
mov rdx, r15
push 2Fh ; '/'
pop rcx
push 1
pop r8
call js_function_set_properties
mov [r14-8], r12
mov [r14], r15
inc rbp
add r14, 10h
jmp loc_47383
loc_47412:
push 0FFFFFFFFFFFFFFFFh
pop r15
jmp short loc_4745C
loc_47418:
mov r14, [rsp+48h+var_48]
xor r15d, r15d
jmp short loc_47450
loc_47421:
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call JS_FreeValue
loc_4742F:
push 0FFFFFFFFFFFFFFFFh
pop r15
test rbp, rbp
mov r14, [rsp+48h+var_48]
jz short loc_47450
mov rax, [rsp+48h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, rbx
call JS_FreeValue
loc_47450:
mov rdi, [rbx+18h]
mov rsi, r14
call js_promise_resolve_function_free_resolved
loc_4745C:
mov eax, r15d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_create_resolving_functions(long long *a1, long long *a2, _DWORD *a3, long long a4)
{
_QWORD *v5; // rax
long long *v6; // r14
long long i; // rbp
long long v8; // rax
long long v9; // rdx
long long v10; // r15
long long v11; // r12
_QWORD *v12; // rax
unsigned int v13; // r15d
long long v14; // r14
_DWORD *v16; // [rsp+0h] [rbp-48h]
v5 = (_QWORD *)js_malloc((long long)a1, 8LL);
if ( v5 )
{
v16 = v5;
*v5 = 1LL;
v6 = a2 + 1;
for ( i = 0LL; ; ++i )
{
if ( i == 2 )
{
v14 = (long long)v16;
v13 = 0;
goto LABEL_14;
}
v8 = JS_NewObjectProtoClass((long long)a1, a1[9], a1[10], (unsigned int)i | 0x32);
v10 = v9;
if ( (_DWORD)v9 == 6 )
break;
v11 = v8;
v12 = (_QWORD *)js_malloc((long long)a1, 24LL);
if ( !v12 )
{
JS_FreeValue((long long)a1, v11, v10);
break;
}
++*v16;
v12[2] = v16;
if ( (unsigned int)a4 >= 0xFFFFFFF7 )
++*a3;
*v12 = a3;
v12[1] = a4;
*(_QWORD *)(v11 + 48) = v12;
js_function_set_properties((long long)a1, v11, v10, 47, 1);
*(v6 - 1) = v11;
*v6 = v10;
v6 += 2;
}
v13 = -1;
v14 = (long long)v16;
if ( i )
JS_FreeValue((long long)a1, *a2, a2[1]);
LABEL_14:
js_promise_resolve_function_free_resolved(a1[3], v14);
}
else
{
return (unsigned int)-1;
}
return v13;
}
|
js_create_resolving_functions:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV qword ptr [RSP + 0x8],RDX
MOV R14,RSI
MOV RBX,RDI
PUSH 0x8
POP RSI
CALL 0x00117214
TEST RAX,RAX
JZ 0x00147412
MOV qword ptr [RSP],RAX
MOV qword ptr [RAX],0x1
MOV qword ptr [RSP + 0x10],R14
ADD R14,0x8
XOR EBP,EBP
LAB_00147383:
CMP RBP,0x2
JZ 0x00147418
MOV RSI,qword ptr [RBX + 0x48]
MOV RDX,qword ptr [RBX + 0x50]
MOV ECX,EBP
OR ECX,0x32
MOV RDI,RBX
CALL 0x0011b069
MOV R15,RDX
CMP R15D,0x6
JZ 0x0014742f
MOV R12,RAX
MOV RDI,RBX
PUSH 0x18
POP RSI
CALL 0x00117214
TEST RAX,RAX
JZ 0x00147421
MOV RCX,qword ptr [RSP]
INC dword ptr [RCX]
MOV qword ptr [RAX + 0x10],RCX
CMP R13D,-0x9
JC 0x001473d9
MOV RCX,qword ptr [RSP + 0x8]
INC dword ptr [RCX]
LAB_001473d9:
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R13
MOV qword ptr [R12 + 0x30],RAX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
PUSH 0x2f
POP RCX
PUSH 0x1
POP R8
CALL 0x0011b4ad
MOV qword ptr [R14 + -0x8],R12
MOV qword ptr [R14],R15
INC RBP
ADD R14,0x10
JMP 0x00147383
LAB_00147412:
PUSH -0x1
POP R15
JMP 0x0014745c
LAB_00147418:
MOV R14,qword ptr [RSP]
XOR R15D,R15D
JMP 0x00147450
LAB_00147421:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL 0x0011801e
LAB_0014742f:
PUSH -0x1
POP R15
TEST RBP,RBP
MOV R14,qword ptr [RSP]
JZ 0x00147450
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,RBX
CALL 0x0011801e
LAB_00147450:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
CALL 0x00146f56
LAB_0014745c:
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
js_create_resolving_functions(long param_1,int8 *param_2,int *param_3,int8 param_4)
{
int *piVar1;
long lVar2;
int8 *puVar3;
int8 uVar4;
long lVar5;
int8 *puVar6;
int4 uVar7;
int1 auVar8 [16];
piVar1 = (int *)js_malloc(param_1,8);
if (piVar1 == (int *)0x0) {
uVar7 = 0xffffffff;
}
else {
piVar1[0] = 1;
piVar1[1] = 0;
puVar6 = param_2 + 1;
for (lVar5 = 0; lVar5 != 2; lVar5 = lVar5 + 1) {
auVar8 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),
(uint)lVar5 | 0x32);
uVar4 = auVar8._8_8_;
lVar2 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
LAB_0014742f:
uVar7 = 0xffffffff;
if (lVar5 != 0) {
JS_FreeValue(param_1,*param_2,param_2[1]);
}
goto LAB_00147450;
}
puVar3 = (int8 *)js_malloc(param_1,0x18);
if (puVar3 == (int8 *)0x0) {
JS_FreeValue(param_1,lVar2,uVar4);
goto LAB_0014742f;
}
*piVar1 = *piVar1 + 1;
puVar3[2] = piVar1;
if (0xfffffff6 < (uint)param_4) {
*param_3 = *param_3 + 1;
}
*puVar3 = param_3;
puVar3[1] = param_4;
*(int8 **)(lVar2 + 0x30) = puVar3;
js_function_set_properties(param_1,lVar2,uVar4,0x2f,1);
puVar6[-1] = lVar2;
*puVar6 = uVar4;
puVar6 = puVar6 + 2;
}
uVar7 = 0;
LAB_00147450:
js_promise_resolve_function_free_resolved(*(int8 *)(param_1 + 0x18),piVar1);
}
return uVar7;
}
|
|
12,307
|
ma_enlarge_root
|
eloqsql/storage/maria/ma_write.c
|
my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, my_off_t *root)
{
uint t_length, nod_flag;
MARIA_KEY_PARAM s_temp;
MARIA_SHARE *share= info->s;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
my_bool res= 0;
DBUG_ENTER("_ma_enlarge_root");
page.info= info;
page.keyinfo= keyinfo;
page.buff= info->buff;
page.flag= 0;
nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0;
/* Store pointer to prev page if nod */
_ma_kpointer(info, page.buff + share->keypage_header, *root);
t_length= (*keyinfo->pack_key)(key, nod_flag, (uchar*) 0,
(uchar*) 0, (uchar*) 0, &s_temp);
page.size= share->keypage_header + t_length + nod_flag;
bzero(page.buff, share->keypage_header);
_ma_store_keynr(share, page.buff, keyinfo->key_nr);
if (nod_flag)
page.flag|= KEYPAGE_FLAG_ISNOD;
if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
page.flag|= KEYPAGE_FLAG_HAS_TRANSID;
(*keyinfo->store_key)(keyinfo, page.buff + share->keypage_header +
nod_flag, &s_temp);
/* Mark that info->buff was used */
info->keyread_buff_used= info->page_changed= 1;
if ((page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) ==
HA_OFFSET_ERROR)
DBUG_RETURN(1);
*root= page.pos;
page_store_info(share, &page);
/*
Clear unitialized part of page to avoid valgrind/purify warnings
and to get a clean page that is easier to compress and compare with
pages generated with redo
*/
bzero(page.buff + page.size, share->block_size - page.size);
if (share->now_transactional && _ma_log_new(&page, 1))
res= 1;
if (_ma_write_keypage(&page, page_link->write_lock,
PAGECACHE_PRIORITY_HIGH))
res= 1;
DBUG_RETURN(res);
}
|
O0
|
c
|
ma_enlarge_root:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa8(%rbp)
movb $0x0, -0xe1(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rax
movq %rax, -0xd0(%rbp)
movl $0x0, -0xb4(%rbp)
movq -0x20(%rbp), %rax
cmpq $-0x1, (%rax)
je 0x69e67
movq -0x80(%rbp), %rax
movl 0x3e4(%rax), %eax
movl %eax, -0xec(%rbp)
jmp 0x69e71
xorl %eax, %eax
movl %eax, -0xec(%rbp)
jmp 0x69e71
movl -0xec(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
addq %rax, %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x976f0
movq -0xa8(%rbp), %rax
movq 0xf0(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0x28(%rbp), %esi
xorl %ecx, %ecx
movl %ecx, %r8d
leaq -0x78(%rbp), %r9
movq %r8, %rdx
movq %r8, %rcx
callq *%rax
movl %eax, -0x24(%rbp)
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
addl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0xc0(%rbp)
movq -0xd0(%rbp), %rdi
movq -0x80(%rbp), %rax
movl 0x744(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0xa8(%rbp), %rax
movb 0xa5(%rax), %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x1, %ecx
subl $0x1, %ecx
subl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
cmpl $0x0, -0x28(%rbp)
je 0x69f38
movl -0xb4(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xb4(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x180000, %eax # imm = 0x180000
cmpl $0x0, %eax
je 0x69f58
movl -0xb4(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xb4(%rbp)
movq -0xa8(%rbp), %rax
movq 0xf8(%rax), %rax
movq -0xa8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rsi
movl -0x28(%rbp), %ecx
addq %rcx, %rsi
leaq -0x78(%rbp), %rdx
callq *%rax
movq -0x10(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movq -0x10(%rbp), %rdi
movl $0x6, %esi
leaq -0xa0(%rbp), %rdx
callq 0x9bf70
movq %rax, -0xc8(%rbp)
cmpq $-0x1, %rax
jne 0x69fd0
jmp 0x69fc7
movb $0x1, -0x1(%rbp)
jmp 0x6a0d7
movq -0xc8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0xb4(%rbp), %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0xc0(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x1(%rax,%rcx)
movl -0xe8(%rbp), %eax
shrl $0x8, %eax
movb %al, %dl
movq -0xd0(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x2(%rax,%rcx)
movq -0xd0(%rbp), %rdi
movl -0xc0(%rbp), %eax
addq %rax, %rdi
movq -0x80(%rbp), %rax
movl 0x7bc(%rax), %eax
subl -0xc0(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x80(%rbp), %rax
movsbl 0x7e7(%rax), %eax
cmpl $0x0, %eax
je 0x6a0a6
leaq -0xe0(%rbp), %rdi
movl $0x1, %esi
callq 0x6a0f0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x6a0a6
movb $0x1, -0xe1(%rbp)
movq -0xa0(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0xe0(%rbp), %rdi
movl $0x6, %edx
callq 0x9b9a0
cmpb $0x0, %al
je 0x6a0cc
movb $0x1, -0xe1(%rbp)
jmp 0x6a0ce
movb -0xe1(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_enlarge_root:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_80], rax
lea rax, [rbp+var_98]
mov [rbp+var_A0], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_A8], rax
mov [rbp+var_E1], 0
mov rax, [rbp+var_10]
mov [rbp+var_E0], rax
mov rax, [rbp+var_A8]
mov [rbp+var_D8], rax
mov rax, [rbp+var_10]
mov rax, [rax+378h]
mov [rbp+var_D0], rax
mov [rbp+var_B4], 0
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_69E67
mov rax, [rbp+var_80]
mov eax, [rax+3E4h]
mov [rbp+var_EC], eax
jmp short loc_69E71
loc_69E67:
xor eax, eax
mov [rbp+var_EC], eax
jmp short $+2
loc_69E71:
mov eax, [rbp+var_EC]
mov [rbp+var_28], eax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_D0]
mov rax, [rbp+var_80]
mov eax, [rax+744h]
add rsi, rax
mov rax, [rbp+var_20]
mov rdx, [rax]
call _ma_kpointer
mov rax, [rbp+var_A8]
mov rax, [rax+0F0h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_28]
xor ecx, ecx
mov r8d, ecx
lea r9, [rbp+var_78]
mov rdx, r8
mov rcx, r8
call rax
mov [rbp+var_24], eax
mov rax, [rbp+var_80]
mov eax, [rax+744h]
add eax, [rbp+var_24]
add eax, [rbp+var_28]
mov [rbp+var_C0], eax
mov rdi, [rbp+var_D0]
mov rax, [rbp+var_80]
mov eax, [rax+744h]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_A8]
mov dl, [rax+0A5h]
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
sub ecx, 1
sub ecx, 1
sub ecx, 2
mov ecx, ecx
mov [rax+rcx], dl
cmp [rbp+var_28], 0
jz short loc_69F38
mov eax, [rbp+var_B4]
or eax, 1
mov [rbp+var_B4], eax
loc_69F38:
mov rax, [rbp+var_18]
mov eax, [rax+18h]
and eax, 180000h
cmp eax, 0
jz short loc_69F58
mov eax, [rbp+var_B4]
or eax, 2
mov [rbp+var_B4], eax
loc_69F58:
mov rax, [rbp+var_A8]
mov rax, [rax+0F8h]
mov rdi, [rbp+var_A8]
mov rsi, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
add rsi, rcx
mov ecx, [rbp+var_28]
add rsi, rcx
lea rdx, [rbp+var_78]
call rax
mov rax, [rbp+var_10]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
mov rdi, [rbp+var_10]
mov esi, 6
lea rdx, [rbp+var_A0]
call _ma_new
mov [rbp+var_C8], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_69FD0
jmp short $+2
loc_69FC7:
mov [rbp+var_1], 1
jmp loc_6A0D7
loc_69FD0:
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_20]
mov [rax], rcx
mov eax, [rbp+var_B4]
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_C0]
mov [rbp+var_E8], eax
mov eax, [rbp+var_E8]
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
mov [rax+rcx-1], dl
mov eax, [rbp+var_E8]
shr eax, 8
mov dl, al
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_80]
mov ecx, [rcx+744h]
mov [rax+rcx-2], dl
mov rdi, [rbp+var_D0]
mov eax, [rbp+var_C0]
add rdi, rax
mov rax, [rbp+var_80]
mov eax, [rax+7BCh]
sub eax, [rbp+var_C0]
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_80]
movsx eax, byte ptr [rax+7E7h]
cmp eax, 0
jz short loc_6A0A6
lea rdi, [rbp+var_E0]
mov esi, 1
call _ma_log_new
movsx eax, al
cmp eax, 0
jz short loc_6A0A6
mov [rbp+var_E1], 1
loc_6A0A6:
mov rax, [rbp+var_A0]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_E0]
mov edx, 6
call _ma_write_keypage
cmp al, 0
jz short loc_6A0CC
mov [rbp+var_E1], 1
loc_6A0CC:
jmp short $+2
loc_6A0CE:
mov al, [rbp+var_E1]
mov [rbp+var_1], al
loc_6A0D7:
mov al, [rbp+var_1]
add rsp, 0F0h
pop rbp
retn
|
char ma_enlarge_root(_QWORD *a1, long long a2, long long *a3)
{
unsigned int v4; // [rsp+4h] [rbp-ECh]
char v5; // [rsp+9h] [rbp-E7h]
char v6; // [rsp+Fh] [rbp-E1h]
_QWORD v7[2]; // [rsp+10h] [rbp-E0h] BYREF
long long v8; // [rsp+20h] [rbp-D0h]
long long v9; // [rsp+28h] [rbp-C8h]
unsigned int v10; // [rsp+30h] [rbp-C0h]
int v11; // [rsp+3Ch] [rbp-B4h]
long long v12; // [rsp+48h] [rbp-A8h]
char *v13; // [rsp+50h] [rbp-A0h] BYREF
char v14; // [rsp+58h] [rbp-98h] BYREF
long long v15; // [rsp+70h] [rbp-80h]
_BYTE v16[80]; // [rsp+78h] [rbp-78h] BYREF
unsigned int v17; // [rsp+C8h] [rbp-28h]
int v18; // [rsp+CCh] [rbp-24h]
long long *v19; // [rsp+D0h] [rbp-20h]
long long v20; // [rsp+D8h] [rbp-18h]
_QWORD *v21; // [rsp+E0h] [rbp-10h]
v21 = a1;
v20 = a2;
v19 = a3;
v15 = *a1;
v13 = &v14;
v12 = *(_QWORD *)(a2 + 8);
v6 = 0;
v7[0] = a1;
v7[1] = v12;
v8 = a1[111];
v11 = 0;
if ( *a3 == -1 )
v4 = 0;
else
v4 = *(_DWORD *)(v15 + 996);
v17 = v4;
ma_kpointer(v21, *(unsigned int *)(v15 + 1860) + v8, *v19);
v18 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))(v12 + 240))(
v20,
v17,
0LL,
0LL,
0LL,
v16);
v10 = v17 + v18 + *(_DWORD *)(v15 + 1860);
memset(v8, 0LL, *(unsigned int *)(v15 + 1860));
*(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 4)) = *(_BYTE *)(v12 + 165);
if ( v17 )
v11 |= 1u;
if ( (*(_DWORD *)(v20 + 24) & 0x180000) != 0 )
v11 |= 2u;
(*(void ( **)(long long, long long, _BYTE *))(v12 + 248))(v12, v17 + *(unsigned int *)(v15 + 1860) + v8, v16);
*((_BYTE *)v21 + 1668) = 1;
*((_BYTE *)v21 + 1669) = 1;
v9 = ma_new(v21, 6LL, &v13);
if ( v9 == -1 )
return 1;
*v19 = v9;
*(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(v15 + 1860) - 3)) = v11;
v5 = BYTE1(v10);
*(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 1) = v10;
*(_BYTE *)(v8 + *(unsigned int *)(v15 + 1860) - 2) = v5;
memset(v10 + v8, 0LL, *(_DWORD *)(v15 + 1980) - v10);
if ( *(_BYTE *)(v15 + 2023) && (unsigned __int8)ma_log_new(v7, 1LL) )
v6 = 1;
if ( (unsigned __int8)ma_write_keypage(v7, *((unsigned int *)v13 + 3), 6LL) )
return 1;
return v6;
}
|
_ma_enlarge_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x80],RAX
LEA RAX,[RBP + -0x98]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xa8],RAX
MOV byte ptr [RBP + -0xe1],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xe0],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x378]
MOV qword ptr [RBP + -0xd0],RAX
MOV dword ptr [RBP + -0xb4],0x0
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],-0x1
JZ 0x00169e67
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x3e4]
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00169e71
LAB_00169e67:
XOR EAX,EAX
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00169e71
LAB_00169e71:
MOV EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
CALL 0x001976f0
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX + 0xf0]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x28]
XOR ECX,ECX
MOV R8D,ECX
LEA R9,[RBP + -0x78]
MOV RDX,R8
MOV RCX,R8
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
ADD EAX,dword ptr [RBP + -0x24]
ADD EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0xc0],EAX
MOV RDI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x744]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RAX,qword ptr [RBP + -0xa8]
MOV DL,byte ptr [RAX + 0xa5]
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x1
SUB ECX,0x1
SUB ECX,0x2
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
CMP dword ptr [RBP + -0x28],0x0
JZ 0x00169f38
MOV EAX,dword ptr [RBP + -0xb4]
OR EAX,0x1
MOV dword ptr [RBP + -0xb4],EAX
LAB_00169f38:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x180000
CMP EAX,0x0
JZ 0x00169f58
MOV EAX,dword ptr [RBP + -0xb4]
OR EAX,0x2
MOV dword ptr [RBP + -0xb4],EAX
LAB_00169f58:
MOV RAX,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
ADD RSI,RCX
MOV ECX,dword ptr [RBP + -0x28]
ADD RSI,RCX
LEA RDX,[RBP + -0x78]
CALL RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x6
LEA RDX,[RBP + -0xa0]
CALL 0x0019bf70
MOV qword ptr [RBP + -0xc8],RAX
CMP RAX,-0x1
JNZ 0x00169fd0
JMP 0x00169fc7
LAB_00169fc7:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016a0d7
LAB_00169fd0:
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0xb4]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0xc0]
MOV dword ptr [RBP + -0xe8],EAX
MOV EAX,dword ptr [RBP + -0xe8]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x1],DL
MOV EAX,dword ptr [RBP + -0xe8]
SHR EAX,0x8
MOV DL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x80]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x2],DL
MOV RDI,qword ptr [RBP + -0xd0]
MOV EAX,dword ptr [RBP + -0xc0]
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x7bc]
SUB EAX,dword ptr [RBP + -0xc0]
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RAX,qword ptr [RBP + -0x80]
MOVSX EAX,byte ptr [RAX + 0x7e7]
CMP EAX,0x0
JZ 0x0016a0a6
LEA RDI,[RBP + -0xe0]
MOV ESI,0x1
CALL 0x0016a0f0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0016a0a6
MOV byte ptr [RBP + -0xe1],0x1
LAB_0016a0a6:
MOV RAX,qword ptr [RBP + -0xa0]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0xe0]
MOV EDX,0x6
CALL 0x0019b9a0
CMP AL,0x0
JZ 0x0016a0cc
MOV byte ptr [RBP + -0xe1],0x1
LAB_0016a0cc:
JMP 0x0016a0ce
LAB_0016a0ce:
MOV AL,byte ptr [RBP + -0xe1]
MOV byte ptr [RBP + -0x1],AL
LAB_0016a0d7:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xf0
POP RBP
RET
|
int8 _ma_enlarge_root(long *param_1,long param_2,long *param_3)
{
char cVar1;
int8 uVar2;
int7 uVar3;
uint local_f4;
int1 local_e9;
long *local_e8;
long local_e0;
void *local_d8;
long local_d0;
uint local_c8;
uint local_bc;
long local_b0;
int1 *local_a8;
int1 local_a0 [24];
long local_88;
int1 local_80 [80];
uint local_30;
int local_2c;
long *local_28;
long local_20;
long *local_18;
int1 local_9;
local_88 = *param_1;
local_a8 = local_a0;
local_e0 = *(long *)(param_2 + 8);
local_e9 = 0;
local_d8 = (void *)param_1[0x6f];
local_bc = 0;
if (*param_3 == -1) {
local_f4 = 0;
}
else {
local_f4 = *(uint *)(local_88 + 0x3e4);
}
local_30 = local_f4;
local_e8 = param_1;
local_b0 = local_e0;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
_ma_kpointer(param_1,(long)local_d8 + (ulong)*(uint *)(local_88 + 0x744),*param_3);
local_2c = (**(code **)(local_b0 + 0xf0))(local_20,local_30,0,0,0,local_80);
local_c8 = *(int *)(local_88 + 0x744) + local_2c + local_30;
memset(local_d8,0,(ulong)*(uint *)(local_88 + 0x744));
*(int1 *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 4)) =
*(int1 *)(local_b0 + 0xa5);
if (local_30 != 0) {
local_bc = local_bc | 1;
}
if ((*(uint *)(local_20 + 0x18) & 0x180000) != 0) {
local_bc = local_bc | 2;
}
(**(code **)(local_b0 + 0xf8))
(local_b0,(long)local_d8 + (ulong)local_30 + (ulong)*(uint *)(local_88 + 0x744),local_80
);
*(int1 *)((long)local_18 + 0x684) = 1;
*(int1 *)((long)local_18 + 0x685) = 1;
local_d0 = _ma_new(local_18,6,&local_a8);
if (local_d0 == -1) {
local_9 = 1;
uVar3 = 0xffffffffffffff;
}
else {
*local_28 = local_d0;
*(char *)((long)local_d8 + (ulong)(*(int *)(local_88 + 0x744) - 3)) = (char)local_bc;
*(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 1)) = (char)local_c8;
*(char *)((long)local_d8 + ((ulong)*(uint *)(local_88 + 0x744) - 2)) = (char)(local_c8 >> 8);
memset((void *)((long)local_d8 + (ulong)local_c8),0,
(ulong)(*(int *)(local_88 + 0x7bc) - local_c8));
if (*(char *)(local_88 + 0x7e7) != '\0') {
cVar1 = _ma_log_new(&local_e8,1);
if (cVar1 != '\0') {
local_e9 = 1;
}
}
uVar2 = _ma_write_keypage(&local_e8,*(int4 *)(local_a8 + 0xc),6);
if ((char)uVar2 != '\0') {
local_e9 = 1;
}
uVar3 = (int7)((ulong)uVar2 >> 8);
local_9 = local_e9;
}
return CONCAT71(uVar3,local_9);
}
|
|
12,308
|
UpdateCameraPro
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcamera.h
|
void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom)
{
// Required values
// movement.x - Move forward/backward
// movement.y - Move right/left
// movement.z - Move up/down
// rotation.x - yaw
// rotation.y - pitch
// rotation.z - roll
// zoom - Move towards target
bool lockView = true;
bool rotateAroundTarget = false;
bool rotateUp = false;
bool moveInWorldPlane = true;
// Camera rotation
CameraPitch(camera, -rotation.y*DEG2RAD, lockView, rotateAroundTarget, rotateUp);
CameraYaw(camera, -rotation.x*DEG2RAD, rotateAroundTarget);
CameraRoll(camera, rotation.z*DEG2RAD);
// Camera movement
CameraMoveForward(camera, movement.x, moveInWorldPlane);
CameraMoveRight(camera, movement.y, moveInWorldPlane);
CameraMoveUp(camera, movement.z);
// Zoom target distance
CameraMoveToTarget(camera, zoom);
}
|
O0
|
c
|
UpdateCameraPro:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movlpd %xmm0, -0x20(%rbp)
movss %xmm1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movlpd %xmm2, -0x3c(%rbp)
movss %xmm3, -0x34(%rbp)
movq -0x3c(%rbp), %rax
movq %rax, -0x2c(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x24(%rbp)
movq %rdi, -0x48(%rbp)
movss %xmm4, -0x4c(%rbp)
movb $0x1, -0x4d(%rbp)
movb $0x0, -0x4e(%rbp)
movb $0x0, -0x4f(%rbp)
movb $0x1, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movss -0x28(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm0
movss 0xee161(%rip), %xmm1 # 0x1b3330
mulss %xmm1, %xmm0
movb -0x4d(%rbp), %dl
movb -0x4e(%rbp), %cl
movb -0x4f(%rbp), %al
andb $0x1, %dl
andb $0x1, %cl
andb $0x1, %al
movzbl %dl, %esi
movzbl %cl, %edx
movzbl %al, %ecx
callq 0xc3e20
movq -0x48(%rbp), %rdi
movss -0x2c(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm0
movss 0xee120(%rip), %xmm1 # 0x1b3330
mulss %xmm1, %xmm0
movb -0x4e(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xc3bb0
movq -0x48(%rbp), %rdi
movss 0xee103(%rip), %xmm0 # 0x1b3330
mulss -0x24(%rbp), %xmm0
callq 0xc4310
movq -0x48(%rbp), %rdi
movss -0x10(%rbp), %xmm0
movb -0x50(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xc3420
movq -0x48(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movb -0x50(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0xc37f0
movq -0x48(%rbp), %rdi
movss -0x8(%rbp), %xmm0
callq 0xc3650
movq -0x48(%rbp), %rdi
movss -0x4c(%rbp), %xmm0
callq 0xc3a20
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
UpdateCameraPro:
push rbp
mov rbp, rsp
sub rsp, 50h
movlpd [rbp+var_20], xmm0
movss [rbp+var_18], xmm1
mov eax, [rbp+var_18]
mov [rbp+var_8], eax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
movlpd [rbp+var_3C], xmm2
movss [rbp+var_34], xmm3
mov rax, [rbp+var_3C]
mov [rbp+var_2C], rax
mov eax, [rbp+var_34]
mov [rbp+var_24], eax
mov [rbp+var_48], rdi
movss [rbp+var_4C], xmm4
mov [rbp+var_4D], 1
mov [rbp+var_4E], 0
mov [rbp+var_4F], 0
mov [rbp+var_50], 1
mov rdi, [rbp+var_48]
movss xmm0, dword ptr [rbp+var_2C+4]
movd eax, xmm0
xor eax, 80000000h
movd xmm0, eax
movss xmm1, cs:dword_1B3330
mulss xmm0, xmm1
mov dl, [rbp+var_4D]
mov cl, [rbp+var_4E]
mov al, [rbp+var_4F]
and dl, 1
and cl, 1
and al, 1
movzx esi, dl
movzx edx, cl
movzx ecx, al
call CameraPitch
mov rdi, [rbp+var_48]
movss xmm0, dword ptr [rbp+var_2C]
movd eax, xmm0
xor eax, 80000000h
movd xmm0, eax
movss xmm1, cs:dword_1B3330
mulss xmm0, xmm1
mov al, [rbp+var_4E]
and al, 1
movzx esi, al
call CameraYaw
mov rdi, [rbp+var_48]
movss xmm0, cs:dword_1B3330
mulss xmm0, [rbp+var_24]
call CameraRoll
mov rdi, [rbp+var_48]
movss xmm0, dword ptr [rbp+var_10]
mov al, [rbp+var_50]
and al, 1
movzx esi, al
call CameraMoveForward
mov rdi, [rbp+var_48]
movss xmm0, dword ptr [rbp+var_10+4]
mov al, [rbp+var_50]
and al, 1
movzx esi, al
call CameraMoveRight
mov rdi, [rbp+var_48]
movss xmm0, [rbp+var_8]
call CameraMoveUp
mov rdi, [rbp+var_48]
movss xmm0, [rbp+var_4C]
call CameraMoveToTarget
add rsp, 50h
pop rbp
retn
|
long long UpdateCameraPro(long long a1, double a2, float a3, double a4, float a5, float a6)
{
double v6; // xmm0_8
double v7; // xmm0_8
*(_QWORD *)&v6 = _mm_cvtsi32_si128(_mm_cvtsi128_si32((__m128i)HIDWORD(a4)) ^ 0x80000000).m128i_u64[0];
*(float *)&v6 = *(float *)&v6 * 0.017453292;
CameraPitch(a1, 1, 0, 0, v6, 0.017453292);
*(_QWORD *)&v7 = _mm_cvtsi32_si128(_mm_cvtsi128_si32((__m128i)LODWORD(a4)) ^ 0x80000000).m128i_u64[0];
*(float *)&v7 = *(float *)&v7 * 0.017453292;
CameraYaw(a1, 0, v7, 0.017453292);
CameraRoll(a1, COERCE_DOUBLE((unsigned long long)COERCE_UNSIGNED_INT(0.017453292 * a5)), 0.017453292);
CameraMoveForward(a1, 1, COERCE_DOUBLE((unsigned long long)LODWORD(a2)), 0.017453292);
CameraMoveRight(a1, 1, COERCE_DOUBLE((unsigned long long)HIDWORD(a2)), 0.017453292);
CameraMoveUp(a1, COERCE_DOUBLE((unsigned long long)LODWORD(a3)), 0.017453292);
return CameraMoveToTarget(a1, a6);
}
|
UpdateCameraPro:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOVLPD qword ptr [RBP + -0x20],XMM0
MOVSS dword ptr [RBP + -0x18],XMM1
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x8],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
MOVLPD qword ptr [RBP + -0x3c],XMM2
MOVSS dword ptr [RBP + -0x34],XMM3
MOV RAX,qword ptr [RBP + -0x3c]
MOV qword ptr [RBP + -0x2c],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x24],EAX
MOV qword ptr [RBP + -0x48],RDI
MOVSS dword ptr [RBP + -0x4c],XMM4
MOV byte ptr [RBP + -0x4d],0x1
MOV byte ptr [RBP + -0x4e],0x0
MOV byte ptr [RBP + -0x4f],0x0
MOV byte ptr [RBP + -0x50],0x1
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RBP + -0x28]
MOVD EAX,XMM0
XOR EAX,0x80000000
MOVD XMM0,EAX
MOVSS XMM1,dword ptr [0x002b3330]
MULSS XMM0,XMM1
MOV DL,byte ptr [RBP + -0x4d]
MOV CL,byte ptr [RBP + -0x4e]
MOV AL,byte ptr [RBP + -0x4f]
AND DL,0x1
AND CL,0x1
AND AL,0x1
MOVZX ESI,DL
MOVZX EDX,CL
MOVZX ECX,AL
CALL 0x001c3e20
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RBP + -0x2c]
MOVD EAX,XMM0
XOR EAX,0x80000000
MOVD XMM0,EAX
MOVSS XMM1,dword ptr [0x002b3330]
MULSS XMM0,XMM1
MOV AL,byte ptr [RBP + -0x4e]
AND AL,0x1
MOVZX ESI,AL
CALL 0x001c3bb0
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [0x002b3330]
MULSS XMM0,dword ptr [RBP + -0x24]
CALL 0x001c4310
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RBP + -0x10]
MOV AL,byte ptr [RBP + -0x50]
AND AL,0x1
MOVZX ESI,AL
CALL 0x001c3420
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RBP + -0xc]
MOV AL,byte ptr [RBP + -0x50]
AND AL,0x1
MOVZX ESI,AL
CALL 0x001c37f0
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RBP + -0x8]
CALL 0x001c3650
MOV RDI,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RBP + -0x4c]
CALL 0x001c3a20
ADD RSP,0x50
POP RBP
RET
|
void UpdateCameraPro(int8 param_1,int8 param_2,int8 param_3,float param_4,
int8 param_5)
{
int4 local_34;
int4 uStack_30;
uStack_30 = (float)((ulong)param_3 >> 0x20);
CameraPitch(-uStack_30 * DAT_002b3330,param_5,1,0,0);
local_34 = (float)param_3;
CameraYaw(-local_34 * DAT_002b3330,param_5,0);
CameraRoll(DAT_002b3330 * param_4,param_5);
CameraMoveForward(param_5,1);
CameraMoveRight(param_5,1);
CameraMoveUp(param_5);
CameraMoveToTarget(param_5);
return;
}
|
|
12,309
|
UpdateCameraPro
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcamera.h
|
void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom)
{
// Required values
// movement.x - Move forward/backward
// movement.y - Move right/left
// movement.z - Move up/down
// rotation.x - yaw
// rotation.y - pitch
// rotation.z - roll
// zoom - Move towards target
bool lockView = true;
bool rotateAroundTarget = false;
bool rotateUp = false;
bool moveInWorldPlane = true;
// Camera rotation
CameraPitch(camera, -rotation.y*DEG2RAD, lockView, rotateAroundTarget, rotateUp);
CameraYaw(camera, -rotation.x*DEG2RAD, rotateAroundTarget);
CameraRoll(camera, rotation.z*DEG2RAD);
// Camera movement
CameraMoveForward(camera, movement.x, moveInWorldPlane);
CameraMoveRight(camera, movement.y, moveInWorldPlane);
CameraMoveUp(camera, movement.z);
// Zoom target distance
CameraMoveToTarget(camera, zoom);
}
|
O1
|
c
|
UpdateCameraPro:
pushq %rbx
subq $0x30, %rsp
movss %xmm4, 0xc(%rsp)
movss %xmm3, 0x4(%rsp)
movaps %xmm2, 0x20(%rsp)
movss %xmm1, 0x8(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rdi, %rbx
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0 # xmm0 = xmm0[1,1],xmm2[1,1]
mulss 0x731d3(%rip), %xmm0 # 0xe349c
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x6eaf6
movaps 0x20(%rsp), %xmm0
mulss 0x731b8(%rip), %xmm0 # 0xe349c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6e82a
movss 0x4(%rsp), %xmm0
mulss 0x73144(%rip), %xmm0 # 0xe3440
movq %rbx, %rdi
callq 0x6f163
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
movl $0x1, %esi
callq 0x6e354
movaps 0x10(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6e5e2
movq %rbx, %rdi
movss 0x8(%rsp), %xmm0
callq 0x6e4e3
movq %rbx, %rdi
movss 0xc(%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
jmp 0x6e6d7
|
UpdateCameraPro:
push rbx
sub rsp, 30h
movss [rsp+38h+var_2C], xmm4
movss [rsp+38h+var_34], xmm3
movaps [rsp+38h+var_18], xmm2
movss [rsp+38h+var_30], xmm1
movaps [rsp+38h+var_28], xmm0
mov rbx, rdi
movaps xmm0, xmm2
shufps xmm0, xmm2, 55h ; 'U'
mulss xmm0, cs:dword_E349C
mov esi, 1
xor edx, edx
xor ecx, ecx
call CameraPitch
movaps xmm0, [rsp+38h+var_18]
mulss xmm0, cs:dword_E349C
mov rdi, rbx
xor esi, esi
call CameraYaw
movss xmm0, [rsp+38h+var_34]
mulss xmm0, cs:dword_E3440
mov rdi, rbx
call CameraRoll
mov rdi, rbx
movaps xmm0, [rsp+38h+var_28]
mov esi, 1
call CameraMoveForward
movaps xmm0, [rsp+38h+var_28]
shufps xmm0, xmm0, 55h ; 'U'
mov rdi, rbx
mov esi, 1
call CameraMoveRight
mov rdi, rbx
movss xmm0, [rsp+38h+var_30]
call CameraMoveUp
mov rdi, rbx
movss xmm0, [rsp+38h+var_2C]
add rsp, 30h
pop rbx
jmp CameraMoveToTarget
|
void UpdateCameraPro(unsigned long long *a1, __m128 a2, double a3, __m128 a4, float a5, float a6)
{
CameraPitch(a1, 1, 0, 0, _mm_shuffle_ps(a4, a4, 85).m128_f32[0] * -0.017453292);
CameraYaw(a1, 0, a4.m128_f32[0] * -0.017453292);
CameraRoll(a1, a5 * 0.017453292);
CameraMoveForward(a1, 1, a2.m128_f32[0]);
CameraMoveRight(a1, 1, _mm_shuffle_ps(a2, a2, 85).m128_f32[0], a3);
CameraMoveUp(a1, *(float *)&a3);
CameraMoveToTarget(a1, a6);
}
|
UpdateCameraPro:
PUSH RBX
SUB RSP,0x30
MOVSS dword ptr [RSP + 0xc],XMM4
MOVSS dword ptr [RSP + 0x4],XMM3
MOVAPS xmmword ptr [RSP + 0x20],XMM2
MOVSS dword ptr [RSP + 0x8],XMM1
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RBX,RDI
MOVAPS XMM0,XMM2
SHUFPS XMM0,XMM2,0x55
MULSS XMM0,dword ptr [0x001e349c]
MOV ESI,0x1
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0016eaf6
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MULSS XMM0,dword ptr [0x001e349c]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0016e82a
MOVSS XMM0,dword ptr [RSP + 0x4]
MULSS XMM0,dword ptr [0x001e3440]
MOV RDI,RBX
CALL 0x0016f163
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOV ESI,0x1
CALL 0x0016e354
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
SHUFPS XMM0,XMM0,0x55
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0016e5e2
MOV RDI,RBX
MOVSS XMM0,dword ptr [RSP + 0x8]
CALL 0x0016e4e3
MOV RDI,RBX
MOVSS XMM0,dword ptr [RSP + 0xc]
ADD RSP,0x30
POP RBX
JMP 0x0016e6d7
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void UpdateCameraPro(int8 param_1,int4 param_2,int8 param_3,float param_4,
int4 param_5,int8 param_6)
{
CameraPitch((float)((ulong)param_3 >> 0x20) * _DAT_001e349c,param_6,1,0,0);
CameraYaw((float)param_3 * _DAT_001e349c,param_6,0);
CameraRoll(param_4 * DAT_001e3440,param_6);
CameraMoveForward((int)param_1,param_6,1);
CameraMoveRight((int)((ulong)param_1 >> 0x20),param_6,1);
CameraMoveUp(param_2,param_6);
CameraMoveToTarget(param_5,param_6);
return;
}
|
|
12,310
|
UpdateCameraPro
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcamera.h
|
void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom)
{
// Required values
// movement.x - Move forward/backward
// movement.y - Move right/left
// movement.z - Move up/down
// rotation.x - yaw
// rotation.y - pitch
// rotation.z - roll
// zoom - Move towards target
bool lockView = true;
bool rotateAroundTarget = false;
bool rotateUp = false;
bool moveInWorldPlane = true;
// Camera rotation
CameraPitch(camera, -rotation.y*DEG2RAD, lockView, rotateAroundTarget, rotateUp);
CameraYaw(camera, -rotation.x*DEG2RAD, rotateAroundTarget);
CameraRoll(camera, rotation.z*DEG2RAD);
// Camera movement
CameraMoveForward(camera, movement.x, moveInWorldPlane);
CameraMoveRight(camera, movement.y, moveInWorldPlane);
CameraMoveUp(camera, movement.z);
// Zoom target distance
CameraMoveToTarget(camera, zoom);
}
|
O2
|
c
|
UpdateCameraPro:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movss %xmm4, 0xc(%rsp)
movss %xmm3, 0x4(%rsp)
movaps %xmm2, 0x20(%rsp)
movss %xmm1, 0x8(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rdi, %rbx
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0 # xmm0 = xmm0[1,1],xmm2[1,1]
mulss 0x67bac(%rip), %xmm0 # 0xc3520
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5af27
movaps 0x20(%rsp), %xmm0
mulss 0x67b91(%rip), %xmm0 # 0xc3520
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5aeb2
movss 0x4(%rsp), %xmm0
mulss 0x67b29(%rip), %xmm0 # 0xc34d0
movq %rbx, %rdi
callq 0x5b072
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
movl %ebp, %esi
callq 0x5acea
movaps 0x10(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5ada8
movq %rbx, %rdi
movss 0x8(%rsp), %xmm0
callq 0x5ad51
movq %rbx, %rdi
movss 0xc(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %rbp
jmp 0x5ae0f
|
UpdateCameraPro:
push rbp
push rbx
sub rsp, 38h
movss [rsp+48h+var_3C], xmm4
movss [rsp+48h+var_44], xmm3
movaps [rsp+48h+var_28], xmm2
movss [rsp+48h+var_40], xmm1
movaps [rsp+48h+var_38], xmm0
mov rbx, rdi
movaps xmm0, xmm2
shufps xmm0, xmm2, 55h ; 'U'
mulss xmm0, cs:dword_C3520
push 1
pop rbp
mov esi, ebp
xor edx, edx
xor ecx, ecx
call CameraPitch
movaps xmm0, [rsp+48h+var_28]
mulss xmm0, cs:dword_C3520
mov rdi, rbx
xor esi, esi
call CameraYaw
movss xmm0, [rsp+48h+var_44]
mulss xmm0, cs:dword_C34D0
mov rdi, rbx
call CameraRoll
mov rdi, rbx
movaps xmm0, [rsp+48h+var_38]
mov esi, ebp
call CameraMoveForward
movaps xmm0, [rsp+48h+var_38]
shufps xmm0, xmm0, 55h ; 'U'
mov rdi, rbx
mov esi, ebp
call CameraMoveRight
mov rdi, rbx
movss xmm0, [rsp+48h+var_40]
call CameraMoveUp
mov rdi, rbx
movss xmm0, [rsp+48h+var_3C]
add rsp, 38h
pop rbx
pop rbp
jmp CameraMoveToTarget
|
void UpdateCameraPro(unsigned long long *a1, __m128 a2, __m128 a3, __m128 a4, float a5, float a6)
{
double v6; // xmm0_8
*(_QWORD *)&v6 = _mm_shuffle_ps(a4, a4, 85).m128_u64[0];
*(float *)&v6 = *(float *)&v6 * -0.017453292;
CameraPitch(a1, 1, 0, 0, v6);
CameraYaw(a1, 0, a4.m128_f32[0] * -0.017453292, a3);
CameraRoll((long long)a1, a5 * 0.017453292, a3);
CameraMoveForward(a1, 1, a2, a3.m128_f32[0]);
CameraMoveRight(a1, 1, _mm_shuffle_ps(a2, a2, 85), a3);
CameraMoveUp(a1, (__m128)a3.m128_u32[0], a3.m128_f32[0]);
CameraMoveToTarget(a1, a6);
}
|
UpdateCameraPro:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOVSS dword ptr [RSP + 0xc],XMM4
MOVSS dword ptr [RSP + 0x4],XMM3
MOVAPS xmmword ptr [RSP + 0x20],XMM2
MOVSS dword ptr [RSP + 0x8],XMM1
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RBX,RDI
MOVAPS XMM0,XMM2
SHUFPS XMM0,XMM2,0x55
MULSS XMM0,dword ptr [0x001c3520]
PUSH 0x1
POP RBP
MOV ESI,EBP
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0015af27
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MULSS XMM0,dword ptr [0x001c3520]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015aeb2
MOVSS XMM0,dword ptr [RSP + 0x4]
MULSS XMM0,dword ptr [0x001c34d0]
MOV RDI,RBX
CALL 0x0015b072
MOV RDI,RBX
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOV ESI,EBP
CALL 0x0015acea
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
SHUFPS XMM0,XMM0,0x55
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0015ada8
MOV RDI,RBX
MOVSS XMM0,dword ptr [RSP + 0x8]
CALL 0x0015ad51
MOV RDI,RBX
MOVSS XMM0,dword ptr [RSP + 0xc]
ADD RSP,0x38
POP RBX
POP RBP
JMP 0x0015ae0f
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void UpdateCameraPro(int8 param_1,int4 param_2,int8 param_3,float param_4,
int4 param_5,int8 param_6)
{
CameraPitch((float)((ulong)param_3 >> 0x20) * _DAT_001c3520,param_6,1,0,0);
CameraYaw((float)param_3 * _DAT_001c3520,param_6,0);
CameraRoll(param_4 * DAT_001c34d0,param_6);
CameraMoveForward((int)param_1,param_6,1);
CameraMoveRight((int)((ulong)param_1 >> 0x20),param_6,1);
CameraMoveUp(param_2,param_6);
CameraMoveToTarget(param_5,param_6);
return;
}
|
|
12,311
|
my_strxfrm_flag_normalize
|
eloqsql/strings/ctype-simple.c
|
uint my_strxfrm_flag_normalize(uint flags, uint maximum)
{
DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS);
/* If levels are omitted, then 1-maximum is assumed*/
if (!(flags & MY_STRXFRM_LEVEL_ALL))
{
static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F };
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
flags= def_level_flags[maximum] | flag_pad;
}
else
{
uint i;
uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL;
uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
/*
If any level number is greater than the maximum,
it is treated as the maximum.
*/
for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++)
{
uint src_bit= 1 << i;
if (flag_lev & src_bit)
{
uint dst_bit= 1 << MY_MIN(i, maximum);
flags|= dst_bit;
flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT;
flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT;
}
}
flags|= flag_pad;
}
return flags;
}
|
O0
|
c
|
my_strxfrm_flag_normalize:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
jmp 0x3b0fc
movl -0x4(%rbp), %eax
andl $0x3f, %eax
cmpl $0x0, %eax
jne 0x3b12c
movl -0x4(%rbp), %eax
andl $0xc0, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x1be482(%rip), %rax # 0x1f95a0
movl (%rax,%rcx,4), %eax
orl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3b1ed
movl -0x4(%rbp), %eax
andl $0x3f, %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
andl $0x3f, %eax
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
andl $0x3f, %eax
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %eax
andl $0xc0, %eax
movl %eax, -0x20(%rbp)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x6, -0x10(%rbp)
jae 0x3b1e4
movl -0x10(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
andl -0x24(%rbp), %eax
cmpl $0x0, %eax
je 0x3b1d7
movl -0x10(%rbp), %eax
cmpl -0x8(%rbp), %eax
jae 0x3b19d
movl -0x10(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x3b1a3
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x18(%rbp), %eax
andl -0x28(%rbp), %eax
shll $0x8, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x1c(%rbp), %eax
andl -0x28(%rbp), %eax
shll $0x10, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3b1d9
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3b16f
movl -0x20(%rbp), %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strxfrm_flag_normalize:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
jmp short $+2
loc_3B0FC:
mov eax, [rbp+var_4]
and eax, 3Fh
cmp eax, 0
jnz short loc_3B12C
mov eax, [rbp+var_4]
and eax, 0C0h
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
mov ecx, eax
lea rax, my_strxfrm_flag_normalize_def_level_flags
mov eax, [rax+rcx*4]
or eax, [rbp+var_C]
mov [rbp+var_4], eax
jmp loc_3B1ED
loc_3B12C:
mov eax, [rbp+var_4]
and eax, 3Fh
mov [rbp+var_14], eax
mov eax, [rbp+var_4]
shr eax, 8
and eax, 3Fh
mov [rbp+var_18], eax
mov eax, [rbp+var_4]
shr eax, 10h
and eax, 3Fh
mov [rbp+var_1C], eax
mov eax, [rbp+var_4]
and eax, 0C0h
mov [rbp+var_20], eax
mov eax, [rbp+var_8]
add eax, 0FFFFFFFFh
mov [rbp+var_8], eax
mov [rbp+var_4], 0
mov [rbp+var_10], 0
loc_3B16F:
cmp [rbp+var_10], 6
jnb short loc_3B1E4
mov ecx, [rbp+var_10]
mov eax, 1
shl eax, cl
mov [rbp+var_24], eax
mov eax, [rbp+var_14]
and eax, [rbp+var_24]
cmp eax, 0
jz short loc_3B1D7
mov eax, [rbp+var_10]
cmp eax, [rbp+var_8]
jnb short loc_3B19D
mov eax, [rbp+var_10]
mov [rbp+var_2C], eax
jmp short loc_3B1A3
loc_3B19D:
mov eax, [rbp+var_8]
mov [rbp+var_2C], eax
loc_3B1A3:
mov ecx, [rbp+var_2C]
mov eax, 1
shl eax, cl
mov [rbp+var_28], eax
mov eax, [rbp+var_28]
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_18]
and eax, [rbp+var_28]
shl eax, 8
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_1C]
and eax, [rbp+var_28]
shl eax, 10h
or eax, [rbp+var_4]
mov [rbp+var_4], eax
loc_3B1D7:
jmp short $+2
loc_3B1D9:
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
jmp short loc_3B16F
loc_3B1E4:
mov eax, [rbp+var_20]
or eax, [rbp+var_4]
mov [rbp+var_4], eax
loc_3B1ED:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_strxfrm_flag_normalize(unsigned int a1, int a2)
{
char v3; // [rsp+0h] [rbp-2Ch]
unsigned int i; // [rsp+1Ch] [rbp-10h]
int v6; // [rsp+28h] [rbp-4h]
if ( (a1 & 0x3F) != 0 )
{
v6 = 0;
for ( i = 0; i < 6; ++i )
{
if ( ((1 << i) & a1 & 0x3F) != 0 )
{
if ( i >= a2 - 1 )
v3 = a2 - 1;
else
v3 = i;
v6 |= (1 << v3) | (((1 << v3) & (a1 >> 8) & 0x3F) << 8) | (((1 << v3) & HIWORD(a1) & 0x3F) << 16);
}
}
return v6 | a1 & 0xC0;
}
else
{
return a1 & 0xC0 | my_strxfrm_flag_normalize_def_level_flags[a2];
}
}
|
my_strxfrm_flag_normalize:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
JMP 0x0013b0fc
LAB_0013b0fc:
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x3f
CMP EAX,0x0
JNZ 0x0013b12c
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0xc0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV ECX,EAX
LEA RAX,[0x2f95a0]
MOV EAX,dword ptr [RAX + RCX*0x4]
OR EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013b1ed
LAB_0013b12c:
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x3f
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x8
AND EAX,0x3f
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x10
AND EAX,0x3f
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0xc0
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0x4],0x0
MOV dword ptr [RBP + -0x10],0x0
LAB_0013b16f:
CMP dword ptr [RBP + -0x10],0x6
JNC 0x0013b1e4
MOV ECX,dword ptr [RBP + -0x10]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,dword ptr [RBP + -0x24]
CMP EAX,0x0
JZ 0x0013b1d7
MOV EAX,dword ptr [RBP + -0x10]
CMP EAX,dword ptr [RBP + -0x8]
JNC 0x0013b19d
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0013b1a3
LAB_0013b19d:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x2c],EAX
LAB_0013b1a3:
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x28]
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,dword ptr [RBP + -0x28]
SHL EAX,0x8
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,dword ptr [RBP + -0x28]
SHL EAX,0x10
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013b1d7:
JMP 0x0013b1d9
LAB_0013b1d9:
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x0013b16f
LAB_0013b1e4:
MOV EAX,dword ptr [RBP + -0x20]
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013b1ed:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_strxfrm_flag_normalize(uint param_1,uint param_2)
{
uint uVar1;
uint local_34;
uint local_18;
uint local_c;
if ((param_1 & 0x3f) == 0) {
local_c = *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4) |
param_1 & 0xc0;
}
else {
local_c = 0;
for (local_18 = 0; local_18 < 6; local_18 = local_18 + 1) {
if ((param_1 & 0x3f & 1 << ((byte)local_18 & 0x1f)) != 0) {
local_34 = param_2 - 1;
if (local_18 < param_2 - 1) {
local_34 = local_18;
}
uVar1 = 1 << ((byte)local_34 & 0x1f);
local_c = (param_1 >> 0x10 & 0x3f & uVar1) << 0x10 |
(param_1 >> 8 & 0x3f & uVar1) << 8 | uVar1 | local_c;
}
}
local_c = param_1 & 0xc0 | local_c;
}
return local_c;
}
|
|
12,312
|
int testing::internal::CountIf<std::vector<testing::TestPartResult, std::allocator<testing::TestPartResult>>, bool (*)(testing::TestPartResult const&)>(std::vector<testing::TestPartResult, std::allocator<testing::TestPartResult>> const&, bool (*)(testing::TestPartResult const&))
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
inline int CountIf(const Container& c, Predicate predicate) {
// Implemented as an explicit loop since std::count_if() in libCstd on
// Solaris has a non-standard signature.
int count = 0;
for (auto it = c.begin(); it != c.end(); ++it) {
if (predicate(*it)) ++count;
}
return count;
}
|
O0
|
c
|
int testing::internal::CountIf<std::vector<testing::TestPartResult, std::allocator<testing::TestPartResult>>, bool (*)(testing::TestPartResult const&)>(std::vector<testing::TestPartResult, std::allocator<testing::TestPartResult>> const&, bool (*)(testing::TestPartResult const&)):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1030b0
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
callq 0x103120
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1030e0
xorb $-0x1, %al
testb $0x1, %al
jne 0xe748b
jmp 0xe74c8
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x103150
movq %rax, %rdi
movq 0x8(%rsp), %rax
callq *%rax
testb $0x1, %al
jne 0xe74af
jmp 0xe74ba
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xe74bc
leaq 0x18(%rsp), %rdi
callq 0x103160
jmp 0xe7465
movl 0x24(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN7testing8internal7CountIfISt6vectorINS_14TestPartResultESaIS3_EEPFbRKS3_EEEiRKT_T0_:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_14], 0
mov rdi, [rsp+38h+var_8]
call _ZNKSt6vectorIN7testing14TestPartResultESaIS1_EE5beginEv; std::vector<testing::TestPartResult>::begin(void)
mov [rsp+38h+var_20], rax
loc_E7465:
mov rdi, [rsp+38h+var_8]
call _ZNKSt6vectorIN7testing14TestPartResultESaIS1_EE3endEv; std::vector<testing::TestPartResult>::end(void)
mov [rsp+38h+var_28], rax
lea rdi, [rsp+38h+var_20]
lea rsi, [rsp+38h+var_28]
call _ZN9__gnu_cxxeqIPKN7testing14TestPartResultESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_E748B
jmp short loc_E74C8
loc_E748B:
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
lea rdi, [rsp+38h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPKN7testing14TestPartResultESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<testing::TestPartResult const*,std::vector<testing::TestPartResult>>::operator*(void)
mov rdi, rax
mov rax, [rsp+38h+var_30]
call rax
test al, 1
jnz short loc_E74AF
jmp short loc_E74BA
loc_E74AF:
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
loc_E74BA:
jmp short $+2
loc_E74BC:
lea rdi, [rsp+38h+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPKN7testing14TestPartResultESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<testing::TestPartResult const*,std::vector<testing::TestPartResult>>::operator++(void)
jmp short loc_E7465
loc_E74C8:
mov eax, [rsp+38h+var_14]
add rsp, 38h
retn
|
long long testing::internal::CountIf<std::vector<testing::TestPartResult>,bool (*)(testing::TestPartResult const&)>(
long long a1,
long long ( *a2)(long long))
{
long long v2; // rax
long long ( *v4)(long long); // [rsp+8h] [rbp-30h]
long long v5; // [rsp+10h] [rbp-28h] BYREF
long long i; // [rsp+18h] [rbp-20h] BYREF
unsigned int v7; // [rsp+24h] [rbp-14h]
long long ( *v8)(long long); // [rsp+28h] [rbp-10h]
long long v9; // [rsp+30h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = 0;
for ( i = std::vector<testing::TestPartResult>::begin(a1);
;
__gnu_cxx::__normal_iterator<testing::TestPartResult const*,std::vector<testing::TestPartResult>>::operator++(&i) )
{
v5 = std::vector<testing::TestPartResult>::end(v9);
if ( (__gnu_cxx::operator==<testing::TestPartResult const*,std::vector<testing::TestPartResult>>(&i, &v5) & 1) != 0 )
break;
v4 = v8;
v2 = __gnu_cxx::__normal_iterator<testing::TestPartResult const*,std::vector<testing::TestPartResult>>::operator*(&i);
if ( (v4(v2) & 1) != 0 )
++v7;
}
return v7;
}
|
CountIf<std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>,bool(*)(testing::TestPartResult_const&)>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0x24],0x0
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x002030b0
MOV qword ptr [RSP + 0x18],RAX
LAB_001e7465:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00203120
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
CALL 0x002030e0
XOR AL,0xff
TEST AL,0x1
JNZ 0x001e748b
JMP 0x001e74c8
LAB_001e748b:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x18]
CALL 0x00203150
MOV RDI,RAX
MOV RAX,qword ptr [RSP + 0x8]
CALL RAX
TEST AL,0x1
JNZ 0x001e74af
JMP 0x001e74ba
LAB_001e74af:
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
LAB_001e74ba:
JMP 0x001e74bc
LAB_001e74bc:
LEA RDI,[RSP + 0x18]
CALL 0x00203160
JMP 0x001e7465
LAB_001e74c8:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x38
RET
|
/* int testing::internal::CountIf<std::vector<testing::TestPartResult,
std::allocator<testing::TestPartResult> >, bool (*)(testing::TestPartResult
const&)>(std::vector<testing::TestPartResult, std::allocator<testing::TestPartResult> > const&,
bool (*)(testing::TestPartResult const&)) */
int testing::internal::
CountIf<std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>,bool(*)(testing::TestPartResult_const&)>
(vector *param_1,_func_bool_TestPartResult_ptr *param_2)
{
_func_bool_TestPartResult_ptr *p_Var1;
byte bVar2;
bool bVar3;
TestPartResult *pTVar4;
int8 local_28;
int8 local_20;
int local_14;
_func_bool_TestPartResult_ptr *local_10;
vector *local_8;
local_14 = 0;
local_10 = param_2;
local_8 = param_1;
local_20 = std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>::begin
((vector<testing::TestPartResult,std::allocator<testing::TestPartResult>> *)
param_1);
while( true ) {
local_28 = std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>::end
((vector<testing::TestPartResult,std::allocator<testing::TestPartResult>> *
)local_8);
bVar2 = _ZN9__gnu_cxxeqIPKN7testing14TestPartResultESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_20,&local_28);
p_Var1 = local_10;
if (((bVar2 ^ 0xff) & 1) == 0) break;
pTVar4 = (TestPartResult *)
__gnu_cxx::
__normal_iterator<testing::TestPartResult_const*,std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>>
::operator*((__normal_iterator<testing::TestPartResult_const*,std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>>
*)&local_20);
bVar3 = (*p_Var1)(pTVar4);
if (bVar3) {
local_14 = local_14 + 1;
}
__gnu_cxx::
__normal_iterator<testing::TestPartResult_const*,std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>>
::operator++((__normal_iterator<testing::TestPartResult_const*,std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>>
*)&local_20);
}
return local_14;
}
|
|
12,313
|
get_charset_number
|
eloqsql/mysys/charset.c
|
uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
}
|
O3
|
c
|
get_charset_number:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
leaq 0x367a39(%rip), %rdi # 0x3b5fe0
leaq -0x20b(%rip), %rsi # 0x4e3a3
callq 0x28350
movq %r15, %rdi
movl %ebx, %esi
callq 0x4e614
testl %eax, %eax
jne 0x4e5e4
leaq 0x30e218(%rip), %rdi # 0x35c7e0
movq 0xc0(%rdi), %rax
leaq 0x483cc(%rip), %rdx # 0x969a2
movq %r15, %rsi
callq *0x40(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x4e5ef
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
btl $0xa, %r14d
leaq 0x4839f(%rip), %rax # 0x9699a
leaq 0x48390(%rip), %rdi # 0x96992
cmovaeq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4e614
|
get_charset_number:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov ebx, esi
mov r15, rdi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, r15
mov esi, ebx
call get_charset_number_internal
test eax, eax
jnz short loc_4E5E4
lea rdi, my_charset_latin1
mov rax, [rdi+0C0h]
lea rdx, aUtf8; "utf8"
mov rsi, r15
call qword ptr [rax+40h]
mov ecx, eax
xor eax, eax
test ecx, ecx
jz short loc_4E5EF
loc_4E5E4:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4E5EF:
bt r14d, 0Ah
lea rax, aUtf8mb4; "utf8mb4"
lea rdi, aUtf8mb3; "utf8mb3"
cmovnb rdi, rax
mov esi, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp short $+2
|
long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
long long result; // rax
int v5; // ecx
const char *v6; // rdi
pthread_once(&charsets_initialized, init_available_charsets);
result = get_charset_number_internal(a1, a2);
if ( !(_DWORD)result )
{
v5 = (*(long long ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8");
result = 0LL;
if ( !v5 )
{
v6 = "utf8mb3";
if ( (a3 & 0x400) == 0 )
v6 = "utf8mb4";
return get_charset_number_internal(v6, a2);
}
}
return result;
}
|
get_charset_number:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV EBX,ESI
MOV R15,RDI
LEA RDI,[0x4b5fe0]
LEA RSI,[0x14e3a3]
CALL 0x00128350
MOV RDI,R15
MOV ESI,EBX
CALL 0x0014e614
TEST EAX,EAX
JNZ 0x0014e5e4
LEA RDI,[0x45c7e0]
MOV RAX,qword ptr [RDI + 0xc0]
LEA RDX,[0x1969a2]
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JZ 0x0014e5ef
LAB_0014e5e4:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014e5ef:
BT R14D,0xa
LEA RAX,[0x19699a]
LEA RDI,[0x196992]
CMOVNC RDI,RAX
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0014e614
|
int8 get_charset_number(int8 param_1,int4 param_2,uint param_3)
{
int iVar1;
int8 uVar2;
char *pcVar3;
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_charset_number_internal(param_1,param_2);
if ((int)uVar2 == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0045c8a0 + 0x40))
(&my_charset_latin1,param_1,&DAT_001969a2);
uVar2 = 0;
if (iVar1 == 0) {
pcVar3 = "utf8mb3";
if ((param_3 >> 10 & 1) == 0) {
pcVar3 = "utf8mb4";
}
uVar2 = get_charset_number_internal(pcVar3,param_2);
return uVar2;
}
}
return uVar2;
}
|
|
12,314
|
nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::token_type)
|
llama.cpp/common/json.hpp
|
static const char* token_type_name(const token_type t) noexcept
{
switch (t)
{
case token_type::uninitialized:
return "<uninitialized>";
case token_type::literal_true:
return "true literal";
case token_type::literal_false:
return "false literal";
case token_type::literal_null:
return "null literal";
case token_type::value_string:
return "string literal";
case token_type::value_unsigned:
case token_type::value_integer:
case token_type::value_float:
return "number literal";
case token_type::begin_array:
return "'['";
case token_type::begin_object:
return "'{'";
case token_type::end_array:
return "']'";
case token_type::end_object:
return "'}'";
case token_type::name_separator:
return "':'";
case token_type::value_separator:
return "','";
case token_type::parse_error:
return "<parse error>";
case token_type::end_of_input:
return "end of input";
case token_type::literal_or_value:
return "'[', '{', or a literal";
// LCOV_EXCL_START
default: // catch non-enum values
return "unknown token";
// LCOV_EXCL_STOP
}
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>::token_type):
cmpl $0x10, %edi
ja 0x8c025
movl %edi, %eax
leaq 0xd3c68(%rip), %rcx # 0x15fc88
movq (%rcx,%rax,8), %rax
retq
leaq 0x8ebc5(%rip), %rax # 0x11abf1
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE:
cmp edi, 10h
ja short loc_8C025
mov eax, edi
lea rcx, off_15FC88; "<uninitialized>"
mov rax, [rcx+rax*8]
retn
loc_8C025:
lea rax, aUnknownToken; "unknown token"
retn
|
const char * nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(
unsigned int a1)
{
if ( a1 > 0x10 )
return "unknown token";
else
return off_15FC88[a1];
}
|
token_type_name:
CMP EDI,0x10
JA 0x0018c025
MOV EAX,EDI
LEA RCX,[0x25fc88]
MOV RAX,qword ptr [RCX + RAX*0x8]
RET
LAB_0018c025:
LEA RAX,[0x21abf1]
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__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>
>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__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> >::token_type) */
char * nlohmann::json_abi_v3_11_3::detail::
lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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>>
::token_type_name(uint param_1)
{
if (param_1 < 0x11) {
return (&PTR_s_<uninitialized>_0025fc88)[param_1];
}
return "unknown token";
}
|
|
12,315
|
ggml_backend_cpu_device_context::ggml_backend_cpu_device_context()
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.cpp
|
ggml_backend_cpu_device_context() {
#ifdef __APPLE__
size_t len = 0;
if (!sysctlbyname("machdep.cpu.brand_string", NULL, &len, NULL, 0)) {
description.resize(len);
sysctlbyname("machdep.cpu.brand_string", &description[0], &len, NULL, 0); // NOLINT
}
#elif defined(__linux__)
FILE * f = fopen("/proc/cpuinfo", "r");
if (f) {
char buf[1024];
while (fgets(buf, sizeof(buf), f)) {
if (strncmp(buf, "model name", 10) == 0) {
char * p = strchr(buf, ':');
if (p) {
p++;
while (std::isspace(*p)) {
p++;
}
while (std::isspace(p[strlen(p) - 1])) {
p[strlen(p) - 1] = '\0';
}
description = p;
break;
}
}
}
fclose(f);
}
#elif defined(_WIN32)
HKEY hKey;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
TEXT("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"),
0,
KEY_READ,
&hKey) == ERROR_SUCCESS) {
DWORD cpu_brand_size = 0;
if (RegQueryValueExA(hKey,
"ProcessorNameString",
NULL,
NULL,
NULL,
&cpu_brand_size) == ERROR_SUCCESS) {
description.resize(cpu_brand_size);
if (RegQueryValueExA(hKey,
"ProcessorNameString",
NULL,
NULL,
(LPBYTE)&description[0], // NOLINT
&cpu_brand_size) == ERROR_SUCCESS) {
if (description.find('\0') != std::string::npos) {
description.resize(description.find('\0'));
}
}
}
RegCloseKey(hKey);
}
#endif
}
|
O0
|
cpp
|
ggml_backend_cpu_device_context::ggml_backend_cpu_device_context():
subq $0x468, %rsp # imm = 0x468
movq %rdi, 0x460(%rsp)
movq 0x460(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
leaq 0x45f(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x107f0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x914fd(%rip), %rsi # 0xabfd1
callq 0x106e0
jmp 0x1aadb
leaq 0x45f(%rsp), %rdi
callq 0xfdd0
leaq 0x914f1(%rip), %rdi # 0xabfe0
leaq 0x9b6f9(%rip), %rsi # 0xb61ef
callq 0xff70
movq %rax, 0x18(%rsp)
jmp 0x1ab02
movq 0x18(%rsp), %rax
movq %rax, 0x440(%rsp)
cmpq $0x0, 0x440(%rsp)
je 0x1ac84
jmp 0x1ab20
movq 0x440(%rsp), %rdx
leaq 0x40(%rsp), %rdi
movl $0x400, %esi # imm = 0x400
callq 0x10420
movq %rax, 0x10(%rsp)
jmp 0x1ab3e
movq 0x10(%rsp), %rax
cmpq $0x0, %rax
je 0x1ac73
leaq 0x40(%rsp), %rdi
leaq 0x91495(%rip), %rsi # 0xabfee
movl $0xa, %edx
callq 0xf4d0
cmpl $0x0, %eax
jne 0x1ac6e
leaq 0x40(%rsp), %rdi
movl $0x3a, %esi
callq 0xf350
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x1ac6c
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movsbl (%rax), %edi
callq 0xf0d0
cmpl $0x0, %eax
je 0x1ac05
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x1ab9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x450(%rsp)
movl %eax, 0x44c(%rsp)
leaq 0x45f(%rsp), %rdi
callq 0xfdd0
jmp 0x1ac8c
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x450(%rsp)
movl %eax, 0x44c(%rsp)
callq 0x10b58
jmp 0x1ac8c
jmp 0x1ac07
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0xf450
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq $0x1, %rcx
movsbl (%rax,%rcx), %edi
callq 0xf0d0
cmpl $0x0, %eax
je 0x1ac59
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
callq 0xf450
movq %rax, %rcx
movq (%rsp), %rax
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x1ac07
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x10120
jmp 0x1ac6a
jmp 0x1ac73
jmp 0x1ac6e
jmp 0x1ab20
movq 0x440(%rsp), %rdi
callq 0xfcc0
jmp 0x1ac82
jmp 0x1ac84
addq $0x468, %rsp # imm = 0x468
retq
movq 0x450(%rsp), %rdi
callq 0x107c0
nopl (%rax)
|
_ZN31ggml_backend_cpu_device_contextC2Ev:
sub rsp, 468h
mov [rsp+468h+var_8], rdi
mov rax, [rsp+468h+var_8]
mov [rsp+468h+var_440], rax
mov [rsp+468h+var_448], rax
lea rdi, [rsp+468h+var_9]
mov [rsp+468h+var_438], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+468h+var_440]
mov rdx, [rsp+468h+var_438]
lea rsi, aCpu; "CPU"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1AADB:
lea rdi, [rsp+468h+var_9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, aProcCpuinfo; "/proc/cpuinfo"
lea rsi, aDstNe0Nr+0Fh; "r"
call _fopen
mov [rsp+468h+var_450], rax
jmp short $+2
loc_1AB02:
mov rax, [rsp+468h+var_450]
mov [rsp+468h+var_28], rax
cmp [rsp+468h+var_28], 0
jz loc_1AC84
jmp short $+2
loc_1AB20:
mov rdx, [rsp+468h+var_28]
lea rdi, [rsp+468h+var_428]
mov esi, 400h
call _fgets
mov [rsp+468h+var_458], rax
jmp short $+2
loc_1AB3E:
mov rax, [rsp+468h+var_458]
cmp rax, 0
jz loc_1AC73
lea rdi, [rsp+468h+var_428]
lea rsi, aModelName; "model name"
mov edx, 0Ah
call _strncmp
cmp eax, 0
jnz loc_1AC6E
lea rdi, [rsp+468h+var_428]
mov esi, 3Ah ; ':'
call _strchr
mov [rsp+468h+var_430], rax
cmp [rsp+468h+var_430], 0
jz loc_1AC6C
mov rax, [rsp+468h+var_430]
add rax, 1
mov [rsp+468h+var_430], rax
loc_1AB9A:
mov rax, [rsp+468h+var_430]
movsx edi, byte ptr [rax]
call _isspace
cmp eax, 0
jz short loc_1AC05
mov rax, [rsp+468h+var_430]
add rax, 1
mov [rsp+468h+var_430], rax
jmp short loc_1AB9A
mov rcx, rax
mov eax, edx
mov [rsp+arg_448], rcx
mov [rsp+arg_444], eax
lea rdi, [rsp+arg_457]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_1AC8C
mov rdi, [rsp+arg_20]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_448], rcx
mov [rsp+arg_444], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_1AC8C
loc_1AC05:
jmp short $+2
loc_1AC07:
mov rax, [rsp+468h+var_430]
mov [rsp+468h+var_460], rax
mov rdi, [rsp+468h+var_430]
call _strlen
mov rcx, rax
mov rax, [rsp+468h+var_460]
sub rcx, 1
movsx edi, byte ptr [rax+rcx]
call _isspace
cmp eax, 0
jz short loc_1AC59
mov rax, [rsp+468h+var_430]
mov [rsp+468h+var_468], rax
mov rdi, [rsp+468h+var_430]
call _strlen
mov rcx, rax
mov rax, [rsp+468h+var_468]
sub rcx, 1
mov byte ptr [rax+rcx], 0
jmp short loc_1AC07
loc_1AC59:
mov rdi, [rsp+468h+var_448]
mov rsi, [rsp+468h+var_430]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_1AC6A:
jmp short loc_1AC73
loc_1AC6C:
jmp short $+2
loc_1AC6E:
jmp loc_1AB20
loc_1AC73:
mov rdi, [rsp+468h+var_28]
call _fclose
jmp short $+2
loc_1AC82:
jmp short $+2
loc_1AC84:
add rsp, 468h
retn
loc_1AC8C:
mov rdi, [rsp+arg_448]
call __Unwind_Resume
|
void ggml_backend_cpu_device_context::ggml_backend_cpu_device_context(ggml_backend_cpu_device_context *this)
{
int v1; // ecx
int v2; // r8d
int v3; // r9d
long long v4; // rax
long long v5; // [rsp+38h] [rbp-430h]
char *i; // [rsp+38h] [rbp-430h]
_BYTE v7[1024]; // [rsp+40h] [rbp-428h] BYREF
long long v8; // [rsp+440h] [rbp-28h]
char v9; // [rsp+45Fh] [rbp-9h] BYREF
ggml_backend_cpu_device_context *v10; // [rsp+460h] [rbp-8h]
v10 = this;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((_DWORD)this, (unsigned int)"CPU", (unsigned int)&v9, v1, v2, v3);
std::allocator<char>::~allocator(&v9);
v8 = fopen("/proc/cpuinfo", "r");
if ( v8 )
{
while ( fgets(v7, 1024LL, v8) )
{
if ( !(unsigned int)strncmp(v7, "model name", 10LL) )
{
v5 = strchr(v7, 58LL);
if ( v5 )
{
for ( i = (char *)(v5 + 1); (unsigned int)isspace((unsigned int)*i); ++i )
;
while ( 1 )
{
v4 = strlen(i);
if ( !(unsigned int)isspace((unsigned int)i[v4 - 1]) )
break;
i[strlen(i) - 1] = 0;
}
std::string::operator=(this, i);
break;
}
}
}
fclose(v8);
}
}
|
ggml_backend_cpu_device_context:
SUB RSP,0x468
MOV qword ptr [RSP + 0x460],RDI
MOV RAX,qword ptr [RSP + 0x460]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x45f]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x001107f0
MOV RDI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_0011aacd:
LEA RSI,[0x1abfd1]
CALL 0x001106e0
JMP 0x0011aadb
LAB_0011aadb:
LEA RDI,[RSP + 0x45f]
CALL 0x0010fdd0
LAB_0011aae8:
LEA RDI,[0x1abfe0]
LEA RSI,[0x1b61ef]
CALL 0x0010ff70
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0011ab02
LAB_0011ab02:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x440],RAX
CMP qword ptr [RSP + 0x440],0x0
JZ 0x0011ac84
JMP 0x0011ab20
LAB_0011ab20:
MOV RDX,qword ptr [RSP + 0x440]
LEA RDI,[RSP + 0x40]
MOV ESI,0x400
CALL 0x00110420
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0011ab3e
LAB_0011ab3e:
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,0x0
JZ 0x0011ac73
LEA RDI,[RSP + 0x40]
LEA RSI,[0x1abfee]
MOV EDX,0xa
CALL 0x0010f4d0
CMP EAX,0x0
JNZ 0x0011ac6e
LEA RDI,[RSP + 0x40]
MOV ESI,0x3a
CALL 0x0010f350
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0011ac6c
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,0x1
MOV qword ptr [RSP + 0x38],RAX
LAB_0011ab9a:
MOV RAX,qword ptr [RSP + 0x38]
MOVSX EDI,byte ptr [RAX]
CALL 0x0010f0d0
CMP EAX,0x0
JZ 0x0011ac05
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,0x1
MOV qword ptr [RSP + 0x38],RAX
JMP 0x0011ab9a
LAB_0011ac05:
JMP 0x0011ac07
LAB_0011ac07:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0010f450
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
SUB RCX,0x1
MOVSX EDI,byte ptr [RAX + RCX*0x1]
CALL 0x0010f0d0
CMP EAX,0x0
JZ 0x0011ac59
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0010f450
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
SUB RCX,0x1
MOV byte ptr [RAX + RCX*0x1],0x0
JMP 0x0011ac07
LAB_0011ac59:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00110120
JMP 0x0011ac6a
LAB_0011ac6a:
JMP 0x0011ac73
LAB_0011ac6c:
JMP 0x0011ac6e
LAB_0011ac6e:
JMP 0x0011ab20
LAB_0011ac73:
MOV RDI,qword ptr [RSP + 0x440]
CALL 0x0010fcc0
LAB_0011ac80:
JMP 0x0011ac82
LAB_0011ac82:
JMP 0x0011ac84
LAB_0011ac84:
ADD RSP,0x468
RET
|
/* ggml_backend_cpu_device_context::ggml_backend_cpu_device_context() */
void __thiscall
ggml_backend_cpu_device_context::ggml_backend_cpu_device_context
(ggml_backend_cpu_device_context *this)
{
int iVar1;
char *pcVar2;
size_t sVar3;
char *local_430;
char local_428 [1024];
FILE *local_28;
allocator local_9;
ggml_backend_cpu_device_context *local_8;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 0011aacd to 0011aad8 has its CatchHandler @ 0011abbc */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"CPU",&local_9);
std::allocator<char>::~allocator((allocator<char> *)&local_9);
/* try { // try from 0011aae8 to 0011ac7f has its CatchHandler @ 0011abe2 */
local_28 = fopen("/proc/cpuinfo","r");
if (local_28 != (FILE *)0x0) {
do {
pcVar2 = fgets(local_428,0x400,local_28);
if (pcVar2 == (char *)0x0) goto LAB_0011ac73;
iVar1 = strncmp(local_428,"model name",10);
} while ((iVar1 != 0) || (local_430 = strchr(local_428,0x3a), local_430 == (char *)0x0));
do {
local_430 = local_430 + 1;
iVar1 = isspace((int)*local_430);
} while (iVar1 != 0);
while( true ) {
sVar3 = strlen(local_430);
iVar1 = isspace((int)local_430[sVar3 - 1]);
if (iVar1 == 0) break;
sVar3 = strlen(local_430);
local_430[sVar3 - 1] = '\0';
}
std::__cxx11::string::operator=((string *)this,local_430);
LAB_0011ac73:
fclose(local_28);
}
return;
}
|
|
12,316
|
google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
bool DescriptorPool::IsSubSymbolOfBuiltType(StringPiece name) const {
auto prefix = std::string(name);
for (;;) {
std::string::size_type dot_pos = prefix.find_last_of('.');
if (dot_pos == std::string::npos) {
break;
}
prefix = prefix.substr(0, dot_pos);
Symbol symbol = tables_->FindSymbol(prefix);
// If the symbol type is anything other than PACKAGE, then its complete
// definition is already known.
if (!symbol.IsNull() && !symbol.IsPackage()) {
return true;
}
}
if (underlay_ != nullptr) {
// Check to see if any prefix of this symbol exists in the underlay.
return underlay_->IsSubSymbolOfBuiltType(name);
}
return false;
}
|
O0
|
cpp
|
google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) const:
subq $0xd8, %rsp
movq %rsi, 0xc0(%rsp)
movq %rdx, 0xc8(%rsp)
movq %rdi, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x30e20
leaq 0x98(%rsp), %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x137d0
movq %rax, 0x90(%rsp)
cmpq $-0x1, 0x90(%rsp)
jne 0x37212
jmp 0x3730f
movq 0x90(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x70(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x14820
jmp 0x37232
leaq 0x98(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0x70(%rsp), %rsi
movq %rsi, 0x10(%rsp)
callq 0x15c40
movq 0x10(%rsp), %rdi
callq 0x13290
movq 0x28(%rsp), %rdi
addq $0x20, %rdi
callq 0x732b0
movq 0x18(%rsp), %rsi
movq %rax, 0x20(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x30550
jmp 0x3727c
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x73150
movq %rax, 0x8(%rsp)
jmp 0x37297
movq 0x8(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x73220
movb %al, 0x7(%rsp)
jmp 0x372b1
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x3730a
jmp 0x372bb
leaq 0x58(%rsp), %rdi
callq 0x75950
movb %al, 0x6(%rsp)
jmp 0x372cb
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x3730a
jmp 0x372d5
movb $0x1, 0xd7(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0x3736d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x13290
jmp 0x3738b
jmp 0x371e1
movq 0x28(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3735d
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movups 0xc0(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x371a0
movb %al, 0x5(%rsp)
jmp 0x37346
movb 0x5(%rsp), %al
andb $0x1, %al
movb %al, 0xd7(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0x3736d
movb $0x0, 0xd7(%rsp)
movl $0x1, 0x44(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x13290
movb 0xd7(%rsp), %al
andb $0x1, %al
addq $0xd8, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
|
_ZNK6google8protobuf14DescriptorPool22IsSubSymbolOfBuiltTypeENS0_20stringpiece_internal11StringPieceE:
sub rsp, 0D8h
mov qword ptr [rsp+0D8h+var_18], rsi
mov qword ptr [rsp+0D8h+var_18+8], rdx
mov [rsp+0D8h+var_20], rdi
mov rax, [rsp+0D8h+var_20]
mov [rsp+0D8h+var_B0], rax
lea rdi, [rsp+0D8h+var_40]
lea rsi, [rsp+0D8h+var_18]
call _ZNK6google8protobuf20stringpiece_internal11StringPiececvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; google::protobuf::stringpiece_internal::StringPiece::operator std::string(void)
loc_371E1:
lea rdi, [rsp+0D8h+var_40]
mov esi, 2Eh ; '.'
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEcm; std::string::find_last_of(char,ulong)
mov [rsp+0D8h+var_48], rax
cmp [rsp+0D8h+var_48], 0FFFFFFFFFFFFFFFFh
jnz short loc_37212
jmp loc_3730F
loc_37212:
mov rcx, [rsp+0D8h+var_48]
xor eax, eax
mov edx, eax
lea rdi, [rsp+0D8h+var_68]
lea rsi, [rsp+0D8h+var_40]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_37232:
lea rdi, [rsp+0D8h+var_40]
mov [rsp+0D8h+var_C0], rdi
lea rsi, [rsp+0D8h+var_68]
mov [rsp+0D8h+var_C8], rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+0D8h+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+0D8h+var_B0]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rsi, [rsp+0D8h+var_C0]
mov [rsp+0D8h+var_B8], rax
lea rdi, [rsp+0D8h+var_90]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
jmp short $+2
loc_3727C:
mov rdi, [rsp+0D8h+var_B8]
mov rsi, [rsp+0D8h+var_90]
mov rdx, [rsp+0D8h+var_88]
call _ZNK6google8protobuf14DescriptorPool6Tables10FindSymbolENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindSymbol(google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+0D8h+var_D0], rax
jmp short $+2
loc_37297:
mov rax, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_80], rax
lea rdi, [rsp+0D8h+var_80]; this
call _ZNK6google8protobuf6Symbol6IsNullEv; google::protobuf::Symbol::IsNull(void)
mov [rsp+0D8h+var_D1], al
jmp short $+2
loc_372B1:
mov al, [rsp+0D8h+var_D1]
test al, 1
jnz short loc_3730A
jmp short $+2
loc_372BB:
lea rdi, [rsp+0D8h+var_80]; this
call _ZNK6google8protobuf6Symbol9IsPackageEv; google::protobuf::Symbol::IsPackage(void)
mov [rsp+0D8h+var_D2], al
jmp short $+2
loc_372CB:
mov al, [rsp+0D8h+var_D2]
test al, 1
jnz short loc_3730A
jmp short $+2
loc_372D5:
mov [rsp+0D8h+var_1], 1
mov [rsp+0D8h+var_94], 1
jmp loc_3736D
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
lea rdi, [rsp+arg_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_3738B
loc_3730A:
jmp loc_371E1
loc_3730F:
mov rax, [rsp+0D8h+var_B0]
cmp qword ptr [rax+18h], 0
jz short loc_3735D
mov rax, [rsp+0D8h+var_B0]
mov rdi, [rax+18h]
movups xmm0, [rsp+0D8h+var_18]
movaps [rsp+0D8h+var_A8], xmm0
mov rsi, qword ptr [rsp+0D8h+var_A8]
mov rdx, qword ptr [rsp+0D8h+var_A8+8]
call _ZNK6google8protobuf14DescriptorPool22IsSubSymbolOfBuiltTypeENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+0D8h+var_D3], al
jmp short $+2
loc_37346:
mov al, [rsp+0D8h+var_D3]
and al, 1
mov [rsp+0D8h+var_1], al
mov [rsp+0D8h+var_94], 1
jmp short loc_3736D
loc_3735D:
mov [rsp+0D8h+var_1], 0
mov [rsp+0D8h+var_94], 1
loc_3736D:
lea rdi, [rsp+0D8h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rsp+0D8h+var_1]
and al, 1
add rsp, 0D8h
retn
loc_3738B:
mov rdi, [rsp+arg_60]
call __Unwind_Resume
|
char google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+20h] [rbp-B8h]
long long v5[2]; // [rsp+48h] [rbp-90h] BYREF
_QWORD v6[3]; // [rsp+58h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+70h] [rbp-68h] BYREF
long long last_of; // [rsp+90h] [rbp-48h]
_BYTE v9[32]; // [rsp+98h] [rbp-40h] BYREF
long long v10; // [rsp+B8h] [rbp-20h]
long long v11; // [rsp+C0h] [rbp-18h] BYREF
long long v12; // [rsp+C8h] [rbp-10h]
char v13; // [rsp+D7h] [rbp-1h]
v11 = a2;
v12 = a3;
v10 = a1;
google::protobuf::stringpiece_internal::StringPiece::operator std::string(
(long long)v9,
(google::protobuf::stringpiece_internal::StringPiece *)&v11);
while ( 1 )
{
last_of = std::string::find_last_of(v9, 46LL, -1LL);
if ( last_of == -1 )
break;
std::string::substr(v7, v9, 0LL, last_of);
std::string::operator=((long long)v9, (long long)v7);
std::string::~string(v7);
v4 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32);
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v5, (long long)v9);
v6[0] = google::protobuf::DescriptorPool::Tables::FindSymbol(v4, v5[0], v5[1]);
if ( (google::protobuf::Symbol::IsNull((google::protobuf::Symbol *)v6) & 1) == 0
&& (google::protobuf::Symbol::IsPackage((google::protobuf::Symbol *)v6) & 1) == 0 )
{
v13 = 1;
goto LABEL_10;
}
}
if ( *(_QWORD *)(a1 + 24) )
v13 = google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(*(_QWORD *)(a1 + 24), v11, v12) & 1;
else
v13 = 0;
LABEL_10:
std::string::~string(v9);
return v13 & 1;
}
|
IsSubSymbolOfBuiltType:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xc0],RSI
MOV qword ptr [RSP + 0xc8],RDX
MOV qword ptr [RSP + 0xb8],RDI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x28],RAX
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0xc0]
CALL 0x00130e20
LAB_001371e1:
LEA RDI,[RSP + 0x98]
MOV ESI,0x2e
MOV RDX,-0x1
CALL 0x001137d0
MOV qword ptr [RSP + 0x90],RAX
CMP qword ptr [RSP + 0x90],-0x1
JNZ 0x00137212
JMP 0x0013730f
LAB_00137212:
MOV RCX,qword ptr [RSP + 0x90]
LAB_0013721a:
XOR EAX,EAX
MOV EDX,EAX
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x98]
CALL 0x00114820
JMP 0x00137232
LAB_00137232:
LEA RDI,[RSP + 0x98]
MOV qword ptr [RSP + 0x18],RDI
LEA RSI,[RSP + 0x70]
MOV qword ptr [RSP + 0x10],RSI
CALL 0x00115c40
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00113290
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x20
CALL 0x001732b0
MOV RSI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x48]
CALL 0x00130550
JMP 0x0013727c
LAB_0013727c:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x00173150
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00137297
LAB_00137297:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[RSP + 0x58]
CALL 0x00173220
MOV byte ptr [RSP + 0x7],AL
JMP 0x001372b1
LAB_001372b1:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x0013730a
JMP 0x001372bb
LAB_001372bb:
LEA RDI,[RSP + 0x58]
CALL 0x00175950
MOV byte ptr [RSP + 0x6],AL
JMP 0x001372cb
LAB_001372cb:
MOV AL,byte ptr [RSP + 0x6]
TEST AL,0x1
JNZ 0x0013730a
JMP 0x001372d5
LAB_001372d5:
MOV byte ptr [RSP + 0xd7],0x1
MOV dword ptr [RSP + 0x44],0x1
JMP 0x0013736d
LAB_0013730a:
JMP 0x001371e1
LAB_0013730f:
MOV RAX,qword ptr [RSP + 0x28]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013735d
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOVUPS XMM0,xmmword ptr [RSP + 0xc0]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x001371a0
LAB_00137340:
MOV byte ptr [RSP + 0x5],AL
JMP 0x00137346
LAB_00137346:
MOV AL,byte ptr [RSP + 0x5]
AND AL,0x1
MOV byte ptr [RSP + 0xd7],AL
MOV dword ptr [RSP + 0x44],0x1
JMP 0x0013736d
LAB_0013735d:
MOV byte ptr [RSP + 0xd7],0x0
MOV dword ptr [RSP + 0x44],0x1
LAB_0013736d:
LEA RDI,[RSP + 0x98]
CALL 0x00113290
MOV AL,byte ptr [RSP + 0xd7]
AND AL,0x1
ADD RSP,0xd8
RET
|
/* google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece)
const */
ulong google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType
(long param_1,int8 param_2,int8 param_3)
{
byte bVar1;
int8 uVar2;
int8 local_90;
int8 local_88;
int8 local_80 [3];
string local_68 [32];
long local_48;
StringPiece local_40 [32];
long local_20;
int8 local_18;
int8 uStack_10;
byte local_1;
local_20 = param_1;
local_18 = param_2;
uStack_10 = param_3;
stringpiece_internal::StringPiece::operator_cast_to_string(local_40);
do {
local_48 = std::__cxx11::string::find_last_of((char)local_40,0x2e);
if (local_48 == -1) {
if (*(long *)(param_1 + 0x18) == 0) {
local_1 = 0;
}
else {
local_1 = IsSubSymbolOfBuiltType(*(int8 *)(param_1 + 0x18),local_18,uStack_10);
local_1 = local_1 & 1;
}
goto LAB_0013736d;
}
/* try { // try from 0013721a to 0013733f has its CatchHandler @ 001372ea */
std::__cxx11::string::substr((ulong)local_68,(ulong)local_40);
std::__cxx11::string::operator=((string *)local_40,local_68);
std::__cxx11::string::~string(local_68);
uVar2 = std::
unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
*)(param_1 + 0x20));
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_90,(string *)local_40);
local_80[0] = Tables::FindSymbol(uVar2,local_90,local_88);
bVar1 = Symbol::IsNull((Symbol *)local_80);
} while (((bVar1 & 1) != 0) || (bVar1 = Symbol::IsPackage((Symbol *)local_80), (bVar1 & 1) != 0));
local_1 = 1;
LAB_0013736d:
uVar2 = std::__cxx11::string::~string((string *)local_40);
return CONCAT71((int7)((ulong)uVar2 >> 8),local_1) & 0xffffffffffffff01;
}
|
|
12,317
|
my_strntoul_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static ulong
my_strntoul_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr + l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr !=NULL )
*endptr= (char*)s;
err[0]= (cnv == MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int) wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow = 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr != NULL )
*endptr= (char*)s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr= (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (overflow)
{
err[0]= (ERANGE);
return (~(uint32) 0);
}
return (negative ? -((long) res) : (long) res);
}
|
O0
|
c
|
my_strntoul_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x5a591
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x88(%rbp)
subq $0x24, %rax
ja 0x5a58d
movq -0x88(%rbp), %rax
leaq 0x1571b9(%rip), %rcx # 0x1b1724
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x5a58f
jmp 0x5a58f
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5a58f
jmp 0x5a58f
jmp 0x5a5e8
jmp 0x5a5c9
cmpq $0x0, -0x30(%rbp)
je 0x5a5a3
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x5a7b1
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x5a52a
jmp 0x5a5e6
jmp 0x5a5e8
movl $0x0, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x5a6f9
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0x5a667
cmpq $0x39, -0x50(%rbp)
ja 0x5a667
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0x5a6b0
cmpq $0x41, -0x50(%rbp)
jb 0x5a687
cmpq $0x5a, -0x50(%rbp)
ja 0x5a687
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x5a6ae
cmpq $0x61, -0x50(%rbp)
jb 0x5a6a7
cmpq $0x7a, -0x50(%rbp)
ja 0x5a6a7
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x5a6ac
jmp 0x5a738
jmp 0x5a6ae
jmp 0x5a6b0
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0x5a6bb
jmp 0x5a738
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
ja 0x5a6d7
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0x5a6e0
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x5a6e0
movl $0x1, -0x40(%rbp)
jmp 0x5a6f7
movl -0x24(%rbp), %eax
imull -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x64(%rbp)
jmp 0x5a72a
cmpl $0x0, -0x44(%rbp)
jne 0x5a728
cmpq $0x0, -0x30(%rbp)
je 0x5a711
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x5a7b1
jmp 0x5a738
jmp 0x5a72c
movb $0x1, %al
testb $0x1, %al
jne 0x5a618
jmp 0x5a738
cmpq $0x0, -0x30(%rbp)
je 0x5a74a
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x80(%rbp), %rax
jne 0x5a768
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x5a7b1
cmpl $0x0, -0x40(%rbp)
je 0x5a783
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x5a7b1
cmpl $0x0, -0x3c(%rbp)
je 0x5a79c
movl -0x64(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0x5a7a6
movl -0x64(%rbp), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
my_strntoul_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_5A52A:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_5A591
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_88], rax
sub rax, 24h
ja short def_5A572; jumptable 000000000005A572 default case, cases 10-31,33-42,44
mov rax, [rbp+var_88]
lea rcx, jpt_5A572
movsxd rax, ds:(jpt_5A572 - 1B1724h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_5A574:
jmp short loc_5A58F; jumptable 000000000005A572 case 32
loc_5A576:
jmp short loc_5A58F; jumptable 000000000005A572 case 9
loc_5A578:
cmp [rbp+var_3C], 0; jumptable 000000000005A572 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_5A58F
loc_5A58B:
jmp short loc_5A58F; jumptable 000000000005A572 case 43
def_5A572:
jmp short loc_5A5E8; jumptable 000000000005A572 default case, cases 10-31,33-42,44
loc_5A58F:
jmp short loc_5A5C9
loc_5A591:
cmp [rbp+var_30], 0
jz short loc_5A5A3
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_5A5A3:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_5A7B1
loc_5A5C9:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov al, 1
test al, 1
jnz loc_5A52A
jmp short $+2
loc_5A5E6:
jmp short $+2
loc_5A5E8:
mov [rbp+var_40], 0
mov [rbp+var_64], 0
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_60], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_5C], edx
loc_5A618:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_5A6F9
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_5A667
cmp [rbp+var_50], 39h ; '9'
ja short loc_5A667
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_5A6B0
loc_5A667:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_5A687
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_5A687
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_5A6AE
loc_5A687:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_5A6A7
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_5A6A7
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_5A6AC
loc_5A6A7:
jmp loc_5A738
loc_5A6AC:
jmp short $+2
loc_5A6AE:
jmp short $+2
loc_5A6B0:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_5A6BB
jmp short loc_5A738
loc_5A6BB:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
ja short loc_5A6D7
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
jnz short loc_5A6E0
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
cmp rax, rcx
jbe short loc_5A6E0
loc_5A6D7:
mov [rbp+var_40], 1
jmp short loc_5A6F7
loc_5A6E0:
mov eax, [rbp+var_24]
imul eax, [rbp+var_64]
mov [rbp+var_64], eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
add rax, rcx
mov [rbp+var_64], eax
loc_5A6F7:
jmp short loc_5A72A
loc_5A6F9:
cmp [rbp+var_44], 0
jnz short loc_5A728
cmp [rbp+var_30], 0
jz short loc_5A711
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_5A711:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_5A7B1
loc_5A728:
jmp short loc_5A738
loc_5A72A:
jmp short $+2
loc_5A72C:
mov al, 1
test al, 1
jnz loc_5A618
jmp short $+2
loc_5A738:
cmp [rbp+var_30], 0
jz short loc_5A74A
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_5A74A:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_80]
jnz short loc_5A768
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp short loc_5A7B1
loc_5A768:
cmp [rbp+var_40], 0
jz short loc_5A783
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_5A7B1
loc_5A783:
cmp [rbp+var_3C], 0
jz short loc_5A79C
mov eax, [rbp+var_64]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_90], rax
jmp short loc_5A7A6
loc_5A79C:
mov eax, [rbp+var_64]
mov [rbp+var_90], rax
loc_5A7A6:
mov rax, [rbp+var_90]
mov [rbp+var_8], rax
loc_5A7B1:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
|
long long my_strntoul_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v9; // [rsp+10h] [rbp-80h]
long long v10; // [rsp+18h] [rbp-78h]
long long v11; // [rsp+20h] [rbp-70h]
unsigned int v12; // [rsp+2Ch] [rbp-64h]
unsigned int v13; // [rsp+30h] [rbp-60h]
unsigned int v14; // [rsp+34h] [rbp-5Ch]
long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+38h] [rbp-58h]
unsigned long long v16; // [rsp+40h] [rbp-50h] BYREF
int v17; // [rsp+4Ch] [rbp-44h]
int v18; // [rsp+50h] [rbp-40h]
BOOL v19; // [rsp+54h] [rbp-3Ch]
int *v20; // [rsp+58h] [rbp-38h]
_QWORD *v21; // [rsp+60h] [rbp-30h]
unsigned int v22; // [rsp+6Ch] [rbp-24h]
long long v23; // [rsp+70h] [rbp-20h]
long long v24; // [rsp+78h] [rbp-18h]
long long v25; // [rsp+80h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
v19 = 0;
v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v11 = a2;
v10 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
{
if ( v21 )
*v21 = v11;
v6 = 33;
if ( !v17 )
v6 = 84;
*v20 = v6;
return 0LL;
}
else
{
switch ( v16 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v19 = !v19;
LABEL_10:
v11 += v17;
continue;
default:
v18 = 0;
v12 = 0;
v9 = v11;
v13 = 0xFFFFFFFF / v22;
v14 = 0xFFFFFFFF % v22;
break;
}
while ( 1 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
break;
v11 += v17;
if ( v16 < 0x30 || v16 > 0x39 )
{
if ( v16 < 0x41 || v16 > 0x5A )
{
if ( v16 < 0x61 || v16 > 0x7A )
goto LABEL_33;
v16 = v16 - 97 + 10;
}
else
{
v16 = v16 - 65 + 10;
}
}
else
{
v16 -= 48LL;
}
if ( (int)v16 >= (int)v22 )
goto LABEL_33;
if ( v12 > v13 || v12 == v13 && v16 > v14 )
v18 = 1;
else
v12 = v16 + v12 * v22;
}
if ( v17 )
{
LABEL_33:
if ( v21 )
*v21 = v11;
if ( v11 == v9 )
{
*v20 = 33;
return 0LL;
}
else if ( v18 )
{
*v20 = 34;
return 0xFFFFFFFFLL;
}
else if ( v19 )
{
return -(long long)v12;
}
else
{
return v12;
}
}
if ( v21 )
*v21 = v11;
*v20 = 84;
return 0LL;
}
}
}
|
my_strntoul_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
LAB_0015a52a:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x0015a591
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x9
MOV qword ptr [RBP + -0x88],RAX
SUB RAX,0x24
JA 0x0015a58d
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x2b1724]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_20:
JMP 0x0015a58f
caseD_9:
JMP 0x0015a58f
caseD_2d:
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0015a58f
caseD_2b:
JMP 0x0015a58f
caseD_a:
JMP 0x0015a5e8
LAB_0015a58f:
JMP 0x0015a5c9
LAB_0015a591:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0015a5a3
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0015a5a3:
MOV EDX,dword ptr [RBP + -0x44]
MOV ECX,0x21
MOV EAX,0x54
CMP EDX,0x0
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015a7b1
LAB_0015a5c9:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV AL,0x1
TEST AL,0x1
JNZ 0x0015a52a
JMP 0x0015a5e6
LAB_0015a5e6:
JMP 0x0015a5e8
LAB_0015a5e8:
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x64],0x0
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x60],EAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EDX
LAB_0015a618:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x0015a6f9
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x50],0x30
JC 0x0015a667
CMP qword ptr [RBP + -0x50],0x39
JA 0x0015a667
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x30
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015a6b0
LAB_0015a667:
CMP qword ptr [RBP + -0x50],0x41
JC 0x0015a687
CMP qword ptr [RBP + -0x50],0x5a
JA 0x0015a687
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x41
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015a6ae
LAB_0015a687:
CMP qword ptr [RBP + -0x50],0x61
JC 0x0015a6a7
CMP qword ptr [RBP + -0x50],0x7a
JA 0x0015a6a7
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x61
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015a6ac
LAB_0015a6a7:
JMP 0x0015a738
LAB_0015a6ac:
JMP 0x0015a6ae
LAB_0015a6ae:
JMP 0x0015a6b0
LAB_0015a6b0:
MOV RAX,qword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x0015a6bb
JMP 0x0015a738
LAB_0015a6bb:
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JA 0x0015a6d7
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JNZ 0x0015a6e0
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x5c]
CMP RAX,RCX
JBE 0x0015a6e0
LAB_0015a6d7:
MOV dword ptr [RBP + -0x40],0x1
JMP 0x0015a6f7
LAB_0015a6e0:
MOV EAX,dword ptr [RBP + -0x24]
IMUL EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x64],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x64]
ADD RAX,RCX
MOV dword ptr [RBP + -0x64],EAX
LAB_0015a6f7:
JMP 0x0015a72a
LAB_0015a6f9:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x0015a728
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0015a711
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0015a711:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x54
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015a7b1
LAB_0015a728:
JMP 0x0015a738
LAB_0015a72a:
JMP 0x0015a72c
LAB_0015a72c:
MOV AL,0x1
TEST AL,0x1
JNZ 0x0015a618
JMP 0x0015a738
LAB_0015a738:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0015a74a
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0015a74a:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x80]
JNZ 0x0015a768
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015a7b1
LAB_0015a768:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x0015a783
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015a7b1
LAB_0015a783:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0015a79c
MOV EAX,dword ptr [RBP + -0x64]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0015a7a6
LAB_0015a79c:
MOV EAX,dword ptr [RBP + -0x64]
MOV qword ptr [RBP + -0x90],RAX
LAB_0015a7a6:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015a7b1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0015a5e4) */
/* WARNING: Removing unreachable block (ram,0x0015a736) */
ulong my_strntoul_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
ulong uVar2;
long lVar3;
uint uVar4;
int4 uVar5;
ulong local_98;
long local_78;
uint local_6c;
ulong local_58;
int local_4c;
int local_48;
uint local_44;
int4 *local_40;
long *local_38;
uint local_2c;
long local_28;
long local_20;
long local_18;
ulong local_10;
local_44 = 0;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_6 = 0;
local_78 = param_2;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
lVar3 = local_78;
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
uVar5 = 0x21;
if (local_4c == 0) {
uVar5 = 0x54;
}
*local_40 = uVar5;
return 0;
}
switch(local_58) {
case 9:
break;
default:
local_48 = 0;
local_6c = 0;
uVar4 = (uint)(0xffffffff / (ulong)local_2c);
uVar2 = (ulong)local_2c;
goto LAB_0015a618;
case 0x20:
break;
case 0x2b:
break;
case 0x2d:
local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1);
}
local_78 = local_78 + local_4c;
} while( true );
LAB_0015a618:
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_4c == 0) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
*local_40 = 0x54;
local_10 = 0;
}
else {
LAB_0015a738:
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
if (local_78 == lVar3) {
*local_40 = 0x21;
local_10 = 0;
}
else if (local_48 == 0) {
if (local_44 == 0) {
local_98 = (ulong)local_6c;
}
else {
local_98 = -(ulong)local_6c;
}
local_10 = local_98;
}
else {
*local_40 = 0x22;
local_10 = 0xffffffff;
}
}
return local_10;
}
local_78 = local_78 + local_4c;
if ((local_58 < 0x30) || (0x39 < local_58)) {
if ((local_58 < 0x41) || (0x5a < local_58)) {
if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_0015a738;
local_58 = local_58 - 0x57;
}
else {
local_58 = local_58 - 0x37;
}
}
else {
local_58 = local_58 - 0x30;
}
if ((int)local_2c <= (int)local_58) goto LAB_0015a738;
if ((uVar4 < local_6c) || ((local_6c == uVar4 && (0xffffffffU % uVar2 < local_58)))) {
local_48 = 1;
}
else {
local_6c = local_2c * local_6c + (int)local_58;
}
goto LAB_0015a618;
}
|
|
12,318
|
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
llama.cpp/common/minja/minja.hpp
|
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!filter) throw std::runtime_error("FilterNode.filter is null");
if (!body) throw std::runtime_error("FilterNode.body is null");
auto filter_value = filter->evaluate(context);
if (!filter_value.is_callable()) {
throw std::runtime_error("Filter must be a callable: " + filter_value.dump());
}
std::string rendered_body = body->render(context);
ArgumentsValue filter_args = {{Value(rendered_body)}, {}};
auto result = filter_value.call(context, filter_args);
out << result.to_str();
}
|
O3
|
cpp
|
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0xf51f7
movq %rdi, %r14
cmpq $0x0, 0x30(%rdi)
je 0xf5215
movq %rdx, %r15
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0xe1340
cmpq $0x0, 0x30(%r12)
je 0xf5247
movq 0x30(%r14), %rsi
leaq 0xa0(%rsp), %rdi
movq %r15, %rdx
callq 0xbbfec
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xbbe8a
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rcx
movl $0x1, %edx
callq 0xc2988
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x851fe
movq %r14, %rdi
callq 0x89918
leaq 0x88(%rsp), %rdi
callq 0x70882
leaq 0x78(%rsp), %rdi
callq 0x70882
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x70882
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0xf5071
movq 0x6ff4c(%rip), %rax # 0x164f98
cmpb $0x0, (%rax)
je 0xf505c
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xf5066
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xf5071
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x18(%rsp), %r14
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %rsp, %rcx
movq %r15, %rdx
callq 0xca144
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xc70a8
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x22070
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf50ca
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x851fe
movq %rbx, %rdi
callq 0x89918
leaq 0x88(%rsp), %rdi
callq 0x70882
leaq 0x78(%rsp), %rdi
callq 0x70882
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x70882
movq -0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xf513d
movq 0x6fe80(%rip), %rax # 0x164f98
cmpb $0x0, (%rax)
je 0xf5128
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xf5132
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xf513d
movq (%rdi), %rax
callq *0x18(%rax)
movq %r14, %rdi
callq 0xca80e
movq %rsp, %rdi
callq 0xbdfa8
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf516e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x851fe
movq %rbx, %rdi
callq 0x89918
leaq 0xf8(%rsp), %rdi
callq 0x70882
leaq 0xe8(%rsp), %rdi
callq 0x70882
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
callq 0x70882
movq -0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xf51e7
movq 0x6fdd6(%rip), %rax # 0x164f98
cmpb $0x0, (%rax)
je 0xf51d2
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xf51dc
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xf51e7
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %r14
leaq 0x2ebdb(%rip), %rsi # 0x123de6
movq %rax, %rdi
callq 0x21400
jmp 0xf5231
movl $0x10, %edi
callq 0x21630
movq %rax, %r14
leaq 0x2ebd7(%rip), %rsi # 0x123e00
movq %rax, %rdi
callq 0x21400
movq 0x6fd88(%rip), %rsi # 0x164fc0
movq 0x6fd39(%rip), %rdx # 0x164f78
movq %r14, %rdi
callq 0x21a50
movl $0x10, %edi
callq 0x21630
movq %rax, %r14
movq %rsp, %rdi
leaq 0xc0(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb6084
leaq 0x2eba6(%rip), %rsi # 0x123e18
leaq 0x50(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf924
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0x6fd28(%rip), %rsi # 0x164fc0
movq 0x6fcd9(%rip), %rdx # 0x164f78
movq %r14, %rdi
callq 0x21a50
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf52c5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf52e0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xf530d
jmp 0xf53a8
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf530d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xf530d
movq %rax, %rbx
movq %r14, %rdi
callq 0x21f00
jmp 0xf53a8
jmp 0xf531c
movq %rax, %rbx
movq %r14, %rdi
callq 0x21f00
jmp 0xf53b5
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf534f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xf534f
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xb6120
jmp 0xf535e
movq %rax, %rbx
movq %r14, %rdi
callq 0xca80e
movq %rsp, %rdi
callq 0xbdfa8
jmp 0xf5382
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xb6120
jmp 0xf5382
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf53a8
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xf53a8
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0xb6120
movq %rbx, %rdi
callq 0x21af0
nop
|
_ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_F51F7
mov r14, rdi
cmp qword ptr [rdi+30h], 0
jz loc_F5215
mov r15, rdx
lea r12, [rsp+138h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz loc_F5247
mov rsi, [r14+30h]
lea rdi, [rsp+138h+var_98]
mov rdx, r15
call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&)
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_98]
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, rsp
lea rsi, [rsp+138h+var_E8]
lea rcx, [rsp+138h+var_108]
mov edx, 1
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&)
xorps xmm0, xmm0
movups [rsp+138h+var_120], xmm0
mov [rsp+138h+var_110], 0
lea r14, [rsp+138h+var_A8]
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()
lea rdi, [rsp+138h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+138h+var_C0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r14, [rsp+138h+var_D0]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r14-10h]
test rdi, rdi
jz short loc_F5071
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_F505C
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_F5066
loc_F505C:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_F5066:
cmp eax, 1
jnz short loc_F5071
mov rax, [rdi]
call qword ptr [rax+18h]
loc_F5071:
lea r14, [rsp+138h+var_120]
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_78]
mov rcx, rsp
mov rdx, r15
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
lea rdi, [rsp+138h+var_108]
lea rsi, [rsp+138h+var_E8]
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, [rsp+138h+var_108]
mov rdx, [rsp+138h+var_100]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F50CA
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F50CA:
lea rbx, [rsp+138h+var_A8]
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+138h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+138h+var_C0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rbx, [rsp+138h+var_D0]
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rbx-10h]
test rdi, rdi
jz short loc_F513D
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_F5128
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_F5132
loc_F5128:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_F5132:
cmp eax, 1
jnz short loc_F513D
mov rax, [rdi]
call qword ptr [rax+18h]
loc_F513D:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F516E
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F516E:
lea rbx, [rsp+138h+var_38]
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+138h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+138h+var_50]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rbx, [rsp+138h+var_60]
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rbx-10h]
test rdi, rdi
jz short loc_F51E7
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_F51D2
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_F51DC
loc_F51D2:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_F51DC:
cmp eax, 1
jnz short loc_F51E7
mov rax, [rdi]
call qword ptr [rax+18h]
loc_F51E7:
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_F51F7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeFilt; "FilterNode.filter is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_F5231
loc_F5215:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeBody; "FilterNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_F5231:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_F5247:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
lea rsi, [rsp+138h+var_78]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aFilterMustBeAC; "Filter must be a callable: "
lea rdi, [rsp+138h+var_E8]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+138h+var_E8]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rax, [rsp+138h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F52C5
mov rsi, [rsp+138h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F52C5:
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F52E0
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F52E0:
test bpl, bpl
jnz short loc_F530D
jmp loc_F53A8
mov rbx, rax
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F530D
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F530D
mov rbx, rax
loc_F530D:
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_F53A8
jmp short $+2
loc_F531C:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_F53B5
mov rbx, rax
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F534F
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F534F
mov rbx, rax
loc_F534F:
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_F535E
mov rbx, rax
loc_F535E:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_F5382
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_F5382
mov rbx, rax
loc_F5382:
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F53A8
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F53A8
mov rbx, rax
loc_F53A8:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_F53B5:
mov rdi, rbx
call __Unwind_Resume
|
void minja::FilterNode::do_render(long long a1, long long a2, int a3)
{
void (***v4)(void); // rsi
long long v6; // rdi
signed __int32 v7; // eax
long long v8; // rdi
signed __int32 v9; // eax
long long v10; // rdi
signed __int32 v11; // eax
std::runtime_error *exception; // r14
void *v13; // r14
_QWORD v14[2]; // [rsp+0h] [rbp-138h] BYREF
__int128 v15; // [rsp+18h] [rbp-120h] BYREF
long long v16; // [rsp+28h] [rbp-110h]
void *v17[2]; // [rsp+30h] [rbp-108h] BYREF
long long v18; // [rsp+40h] [rbp-F8h] BYREF
long long v19; // [rsp+50h] [rbp-E8h] BYREF
long long v20; // [rsp+58h] [rbp-E0h]
volatile signed __int32 *v21[2]; // [rsp+68h] [rbp-D0h] BYREF
volatile signed __int32 *v22[2]; // [rsp+78h] [rbp-C0h] BYREF
volatile signed __int32 *v23; // [rsp+88h] [rbp-B0h] BYREF
char v24[16]; // [rsp+90h] [rbp-A8h] BYREF
void *v25[2]; // [rsp+A0h] [rbp-98h] BYREF
long long v26; // [rsp+B0h] [rbp-88h] BYREF
_BYTE v27[8]; // [rsp+C0h] [rbp-78h] BYREF
long long v28; // [rsp+C8h] [rbp-70h]
volatile signed __int32 *v29; // [rsp+D8h] [rbp-60h] BYREF
volatile signed __int32 *v30[2]; // [rsp+E8h] [rbp-50h] BYREF
volatile signed __int32 *v31; // [rsp+F8h] [rbp-40h] BYREF
char v32[56]; // [rsp+100h] [rbp-38h] BYREF
v4 = *(void (****)(void))(a1 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.filter is null");
goto LABEL_29;
}
if ( !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.body is null");
LABEL_29:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v27, v4);
if ( !v30[1] )
{
v13 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v14, (long long)v27, 0xFFFFFFFF, 0);
std::operator+<char>(&v19, (long long)"Filter must be a callable: ", (long long)v14);
std::runtime_error::runtime_error(v13, &v19);
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render[abi:cxx11]((long long)v25, *(_QWORD *)(a1 + 48), a3);
minja::Value::Value((long long)&v19, (long long)v25);
std::vector<minja::Value>::vector((long long)v14, (long long)&v19, 1LL);
v15 = 0LL;
v16 = 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(v24);
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(v24);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v21);
v6 = v20;
if ( v20 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v20 + 12);
*(_DWORD *)(v20 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v20 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
minja::Value::call((long long)&v19, (long long)v27);
minja::Value::to_str[abi:cxx11](v17, (long long)&v19);
std::__ostream_insert<char,std::char_traits<char>>(a2, v17[0], v17[1]);
if ( v17[0] != &v18 )
operator delete(v17[0], v18 + 1);
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(v24);
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(v24);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v21);
v8 = v20;
if ( v20 )
{
if ( _libc_single_threaded )
{
v9 = *(_DWORD *)(v20 + 12);
*(_DWORD *)(v20 + 12) = v9 - 1;
}
else
{
v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(v20 + 12), 0xFFFFFFFF);
}
if ( v9 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
std::vector<std::pair<std::string,minja::Value>>::~vector(&v15);
std::vector<minja::Value>::~vector(v14);
if ( v25[0] != &v26 )
operator delete(v25[0], v26 + 1);
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(v32);
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(v32);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v31);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v29);
v10 = v28;
if ( v28 )
{
if ( _libc_single_threaded )
{
v11 = *(_DWORD *)(v28 + 12);
*(_DWORD *)(v28 + 12) = v11 - 1;
}
else
{
v11 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF);
}
if ( v11 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v10 + 24LL))(v10, 0LL);
}
}
|
do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x001f51f7
MOV R14,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001f5215
MOV R15,RDX
LEA R12,[RSP + 0xc0]
MOV RDI,R12
CALL 0x001e1340
CMP qword ptr [R12 + 0x30],0x0
JZ 0x001f5247
MOV RSI,qword ptr [R14 + 0x30]
LAB_001f4fb4:
LEA RDI,[RSP + 0xa0]
MOV RDX,R15
CALL 0x001bbfec
LAB_001f4fc4:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x001bbe8a
LAB_001f4fd6:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
LEA RCX,[RSP + 0x30]
MOV EDX,0x1
CALL 0x001c2988
LAB_001f4fed:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x28],0x0
LEA R14,[RSP + 0x90]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,R14
CALL 0x00189918
LEA RDI,[RSP + 0x88]
CALL 0x00170882
LEA RDI,[RSP + 0x78]
CALL 0x00170882
LEA R14,[RSP + 0x68]
MOV RDI,R14
CALL 0x00170882
MOV RDI,qword ptr [R14 + -0x10]
TEST RDI,RDI
JZ 0x001f5071
MOV RAX,qword ptr [0x00264f98]
CMP byte ptr [RAX],0x0
JZ 0x001f505c
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001f5066
LAB_001f505c:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001f5066:
CMP EAX,0x1
JNZ 0x001f5071
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001f5071:
LEA R14,[RSP + 0x18]
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xc0]
MOV RCX,RSP
MOV RDX,R15
CALL 0x001ca144
LAB_001f508e:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
CALL 0x001c70a8
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
LAB_001f50a7:
MOV RDI,RBX
CALL 0x00122070
LAB_001f50af:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001f50ca
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x00121170
LAB_001f50ca:
LEA RBX,[RSP + 0x90]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,RBX
CALL 0x00189918
LEA RDI,[RSP + 0x88]
CALL 0x00170882
LEA RDI,[RSP + 0x78]
CALL 0x00170882
LEA RBX,[RSP + 0x68]
MOV RDI,RBX
CALL 0x00170882
MOV RDI,qword ptr [RBX + -0x10]
TEST RDI,RDI
JZ 0x001f513d
MOV RAX,qword ptr [0x00264f98]
CMP byte ptr [RAX],0x0
JZ 0x001f5128
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001f5132
LAB_001f5128:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001f5132:
CMP EAX,0x1
JNZ 0x001f513d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001f513d:
MOV RDI,R14
CALL 0x001ca80e
MOV RDI,RSP
CALL 0x001bdfa8
LEA RAX,[RSP + 0xb0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001f516e
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x00121170
LAB_001f516e:
LEA RBX,[RSP + 0x100]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001851fe
MOV RDI,RBX
CALL 0x00189918
LEA RDI,[RSP + 0xf8]
CALL 0x00170882
LEA RDI,[RSP + 0xe8]
CALL 0x00170882
LEA RBX,[RSP + 0xd8]
MOV RDI,RBX
CALL 0x00170882
MOV RDI,qword ptr [RBX + -0x10]
TEST RDI,RDI
JZ 0x001f51e7
MOV RAX,qword ptr [0x00264f98]
CMP byte ptr [RAX],0x0
JZ 0x001f51d2
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001f51dc
LAB_001f51d2:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001f51dc:
CMP EAX,0x1
JNZ 0x001f51e7
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001f51e7:
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001f51f7:
MOV EDI,0x10
CALL 0x00121630
MOV R14,RAX
LAB_001f5204:
LEA RSI,[0x223de6]
MOV RDI,RAX
CALL 0x00121400
LAB_001f5213:
JMP 0x001f5231
LAB_001f5215:
MOV EDI,0x10
CALL 0x00121630
MOV R14,RAX
LAB_001f5222:
LEA RSI,[0x223e00]
MOV RDI,RAX
CALL 0x00121400
LAB_001f5231:
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R14
CALL 0x00121a50
LAB_001f5247:
MOV EDI,0x10
CALL 0x00121630
MOV R14,RAX
LAB_001f5254:
MOV RDI,RSP
LEA RSI,[RSP + 0xc0]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b6084
LAB_001f526b:
LEA RSI,[0x223e18]
LEA RDI,[RSP + 0x50]
MOV RDX,RSP
CALL 0x001af924
MOV BPL,0x1
LAB_001f5282:
LEA RSI,[RSP + 0x50]
MOV RDI,R14
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R14
CALL 0x00121a50
|
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int iVar2;
runtime_error *prVar3;
vector<minja::Value,std::allocator<minja::Value>> avStack_138 [24];
int8 local_120;
int8 uStack_118;
int8 local_110;
long *local_108;
long local_100;
long local_f8 [2];
Value local_e8 [8];
long *local_e0;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_d0 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_c0 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_b0 [8];
data local_a8 [16];
long *local_98 [2];
long local_88 [2];
Expression local_78 [8];
long *local_70;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_60 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_50 [8];
long local_48;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [8];
data local_38 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001f5204 to 001f5212 has its CatchHandler @ 001f531c */
std::runtime_error::runtime_error(prVar3,"FilterNode.filter is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 001f4fb4 to 001f4fc3 has its CatchHandler @ 001f53a5 */
TemplateNode::render_abi_cxx11_((TemplateNode *)local_98,*(shared_ptr **)(param_1 + 0x30));
/* try { // try from 001f4fc4 to 001f4fd5 has its CatchHandler @ 001f537f */
Value::Value(local_e8,(string *)local_98);
/* try { // try from 001f4fd6 to 001f4fec has its CatchHandler @ 001f5370 */
std::vector<minja::Value,std::allocator<minja::Value>>::vector
(avStack_138,local_e8,1,&local_108);
local_120 = 0;
uStack_118 = 0;
local_110 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_a8,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_a8);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_c0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_d0);
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
/* try { // try from 001f5071 to 001f508d has its CatchHandler @ 001f535b */
Value::call(local_e8,(ArgumentsValue *)local_78);
/* try { // try from 001f508e to 001f509c has its CatchHandler @ 001f534c */
Value::to_str_abi_cxx11_();
/* try { // try from 001f50a7 to 001f50ae has its CatchHandler @ 001f532c */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_108,local_100);
if (local_108 != local_f8) {
operator_delete(local_108,local_f8[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_a8,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_a8);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_c0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_d0);
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)&local_120);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector(avStack_138);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_38,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_38);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60);
if (local_70 != (long *)0x0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_70 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_70 + 0xc);
*(int *)((long)local_70 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_70 + 0x18))();
}
}
return;
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001f5254 to 001f526a has its CatchHandler @ 001f530a */
Value::dump_abi_cxx11_((int)avStack_138,SUB81(local_78,0));
/* try { // try from 001f526b to 001f527e has its CatchHandler @ 001f52ea */
std::operator+((char *)local_e8,(string *)"Filter must be a callable: ");
/* try { // try from 001f5282 to 001f52a6 has its CatchHandler @ 001f52a7 */
std::runtime_error::runtime_error(prVar3,(string *)local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001f5222 to 001f5230 has its CatchHandler @ 001f531a */
std::runtime_error::runtime_error(prVar3,"FilterNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
|
|
12,319
|
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*)
|
ng-log[P]ng-log/src/logging.cc
|
void InstallPrefixFormatter(PrefixFormatterCallback callback, void* data) {
if (callback != nullptr) {
g_prefix_formatter = std::make_unique<PrefixFormatter>(callback, data);
} else {
g_prefix_formatter = nullptr;
}
}
|
O1
|
cpp
|
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*):
testq %rdi, %rdi
je 0xe5dc
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x8f80
movl $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x216c2(%rip), %rdi # 0x2fc80
movq %rax, 0x216bb(%rip) # 0x2fc80
testq %rdi, %rdi
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r14
je 0xe5f3
movl $0x18, %esi
jmp 0x8fcc
movq 0x2169d(%rip), %rdi # 0x2fc80
movq $0x0, 0x21692(%rip) # 0x2fc80
testq %rdi, %rdi
jne 0xe5d2
retq
|
_ZN5nglog22InstallPrefixFormatterEPFvRSoRKNS_10LogMessageEPvES4_:
test rdi, rdi
jz short loc_E5DC
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov edi, 18h; unsigned __int64
call _Znwm; operator new(ulong)
mov dword ptr [rax], 0
mov [rax+8], r14
mov [rax+10h], rbx
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void *
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, rax; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
lea rsp, [rsp+8]
pop rbx
pop r14
jz short locret_E5F3
loc_E5D2:
mov esi, 18h; unsigned __int64
jmp _ZdlPvm; operator delete(void *,ulong)
loc_E5DC:
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; nglog::`anonymous namespace'::g_prefix_formatter
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
jnz short loc_E5D2
locret_E5F3:
retn
|
void nglog::InstallPrefixFormatter(
nglog *this,
void (*a2)(std::ostream *, const nglog::LogMessage *, void *),
void *a3)
{
_QWORD *v3; // rax
void *v4; // rdi
if ( this )
{
v3 = (_QWORD *)operator new(24LL);
*(_DWORD *)v3 = 0;
v3[1] = this;
v3[2] = a2;
v4 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = v3;
if ( !v4 )
return;
goto LABEL_3;
}
v4 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = 0LL;
if ( v4 )
LABEL_3:
operator delete(v4);
}
|
InstallPrefixFormatter:
TEST RDI,RDI
JZ 0x0010e5dc
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV EDI,0x18
CALL 0x00108f80
MOV dword ptr [RAX],0x0
MOV qword ptr [RAX + 0x8],R14
MOV qword ptr [RAX + 0x10],RBX
MOV RDI,qword ptr [0x0012fc80]
MOV qword ptr [0x0012fc80],RAX
TEST RDI,RDI
LEA RSP,[RSP + 0x8]
POP RBX
POP R14
JZ 0x0010e5f3
LAB_0010e5d2:
MOV ESI,0x18
JMP 0x00108fcc
LAB_0010e5dc:
MOV RDI,qword ptr [0x0012fc80]
MOV qword ptr [0x0012fc80],0x0
TEST RDI,RDI
JNZ 0x0010e5d2
LAB_0010e5f3:
RET
|
/* nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*) */
void nglog::InstallPrefixFormatter
(_func_void_ostream_ptr_LogMessage_ptr_void_ptr *param_1,void *param_2)
{
int4 *puVar1;
void *pvVar2;
bool bVar3;
pvVar2 = (anonymous_namespace)::g_prefix_formatter;
if (param_1 == (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *)0x0) {
(anonymous_namespace)::g_prefix_formatter = (int4 *)0x0;
if (pvVar2 == (void *)0x0) {
(anonymous_namespace)::g_prefix_formatter = (int4 *)0x0;
return;
}
}
else {
puVar1 = (int4 *)operator_new(0x18);
*puVar1 = 0;
*(_func_void_ostream_ptr_LogMessage_ptr_void_ptr **)(puVar1 + 2) = param_1;
*(void **)(puVar1 + 4) = param_2;
bVar3 = (anonymous_namespace)::g_prefix_formatter == (int4 *)0x0;
pvVar2 = (anonymous_namespace)::g_prefix_formatter;
(anonymous_namespace)::g_prefix_formatter = puVar1;
if (bVar3) {
return;
}
}
operator_delete(pvVar2,0x18);
return;
}
|
|
12,320
|
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*)
|
ng-log[P]ng-log/src/logging.cc
|
void InstallPrefixFormatter(PrefixFormatterCallback callback, void* data) {
if (callback != nullptr) {
g_prefix_formatter = std::make_unique<PrefixFormatter>(callback, data);
} else {
g_prefix_formatter = nullptr;
}
}
|
O2
|
cpp
|
nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*):
testq %rdi, %rdi
je 0xc8ea
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x8a60
andl $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rsp, %rbx
andq $0x0, (%rbx)
movq %rax, %rdi
callq 0xe17e
movq %rbx, %rdi
callq 0x94a6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
jmp 0xe17e
|
_ZN5nglog22InstallPrefixFormatterEPFvRSoRKNS_10LogMessageEPvES4_:
test rdi, rdi
jz short loc_C8EA
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
push 18h
pop rdi; unsigned __int64
call _Znwm; operator new(ulong)
and dword ptr [rax], 0
mov [rax+8], r14
mov [rax+10h], rbx
mov rbx, rsp
and qword ptr [rbx], 0
mov rdi, rax
call _ZNSt15__uniq_ptr_implIN5nglog12_GLOBAL__N_115PrefixFormatterESt14default_deleteIS2_EE5resetEPS2_; std::__uniq_ptr_impl<nglog::`anonymous namespace'::PrefixFormatter,std::default_delete<nglog::`anonymous namespace'::PrefixFormatter>>::reset(nglog::`anonymous namespace'::PrefixFormatter*)
mov rdi, rbx; void *
call _ZNSt10unique_ptrIN5nglog12_GLOBAL__N_115PrefixFormatterESt14default_deleteIS2_EED2Ev; std::unique_ptr<nglog::`anonymous namespace'::PrefixFormatter>::~unique_ptr()
add rsp, 8
pop rbx
pop r14
retn
loc_C8EA:
xor edi, edi
jmp _ZNSt15__uniq_ptr_implIN5nglog12_GLOBAL__N_115PrefixFormatterESt14default_deleteIS2_EE5resetEPS2_; std::__uniq_ptr_impl<nglog::`anonymous namespace'::PrefixFormatter,std::default_delete<nglog::`anonymous namespace'::PrefixFormatter>>::reset(nglog::`anonymous namespace'::PrefixFormatter*)
|
void nglog::InstallPrefixFormatter(
nglog *this,
void (*a2)(std::ostream *, const nglog::LogMessage *, void *),
void *a3)
{
long long v3; // rax
long long v4; // rdx
void *v5; // [rsp-18h] [rbp-18h] BYREF
if ( this )
{
v3 = operator new(24LL);
*(_DWORD *)v3 = 0;
*(_QWORD *)(v3 + 8) = this;
*(_QWORD *)(v3 + 16) = a2;
v5 = 0LL;
std::__uniq_ptr_impl<nglog::`anonymous namespace'::PrefixFormatter,std::default_delete<nglog::`anonymous namespace'::PrefixFormatter>>::reset(
v3,
a2,
v4);
std::unique_ptr<nglog::`anonymous namespace'::PrefixFormatter>::~unique_ptr(&v5);
}
else
{
std::__uniq_ptr_impl<nglog::`anonymous namespace'::PrefixFormatter,std::default_delete<nglog::`anonymous namespace'::PrefixFormatter>>::reset(
0LL,
a2,
a3);
}
}
|
InstallPrefixFormatter:
TEST RDI,RDI
JZ 0x0010c8ea
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
PUSH 0x18
POP RDI
CALL 0x00108a60
AND dword ptr [RAX],0x0
MOV qword ptr [RAX + 0x8],R14
MOV qword ptr [RAX + 0x10],RBX
MOV RBX,RSP
AND qword ptr [RBX],0x0
MOV RDI,RAX
CALL 0x0010e17e
MOV RDI,RBX
CALL 0x001094a6
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0010c8ea:
XOR EDI,EDI
JMP 0x0010e17e
|
/* nglog::InstallPrefixFormatter(void (*)(std::ostream&, nglog::LogMessage const&, void*), void*) */
void nglog::InstallPrefixFormatter
(_func_void_ostream_ptr_LogMessage_ptr_void_ptr *param_1,void *param_2)
{
PrefixFormatter *pPVar1;
int8 local_18;
if (param_1 != (_func_void_ostream_ptr_LogMessage_ptr_void_ptr *)0x0) {
pPVar1 = (PrefixFormatter *)operator_new(0x18);
*(int4 *)pPVar1 = 0;
*(_func_void_ostream_ptr_LogMessage_ptr_void_ptr **)(pPVar1 + 8) = param_1;
*(void **)(pPVar1 + 0x10) = param_2;
local_18 = 0;
std::
__uniq_ptr_impl<nglog::(anonymous_namespace)::PrefixFormatter,std::default_delete<nglog::(anonymous_namespace)::PrefixFormatter>>
::reset(pPVar1);
std::
unique_ptr<nglog::(anonymous_namespace)::PrefixFormatter,std::default_delete<nglog::(anonymous_namespace)::PrefixFormatter>>
::~unique_ptr((unique_ptr<nglog::(anonymous_namespace)::PrefixFormatter,std::default_delete<nglog::(anonymous_namespace)::PrefixFormatter>>
*)&local_18);
return;
}
std::
__uniq_ptr_impl<nglog::(anonymous_namespace)::PrefixFormatter,std::default_delete<nglog::(anonymous_namespace)::PrefixFormatter>>
::reset((PrefixFormatter *)0x0);
return;
}
|
|
12,321
|
freeze_size
|
eloqsql/mysys/array.c
|
void freeze_size(DYNAMIC_ARRAY *array)
{
uint elements;
/*
Do nothing if we are using a static buffer
*/
if (array->malloc_flags & MY_INIT_BUFFER_USED)
return;
elements= MY_MAX(array->elements, 1);
if (array->buffer && array->max_element > elements)
{
array->buffer=(uchar*) my_realloc(array->m_psi_key, array->buffer,
elements * array->size_of_element,
MYF(MY_WME | array->malloc_flags));
array->max_element= elements;
}
}
|
O0
|
c
|
freeze_size:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x30b82
jmp 0x30c00
movq -0x8(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jbe 0x30b98
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
jmp 0x30ba2
movl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x30ba2
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x30c00
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
cmpl -0xc(%rbp), %eax
jbe 0x30c00
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x10, %rcx
callq 0x2f1a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
freeze_size:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+20h]
and rax, 100h
cmp rax, 0
jz short loc_30B82
jmp short loc_30C00
loc_30B82:
mov rax, [rbp+var_8]
cmp dword ptr [rax+8], 1
jbe short loc_30B98
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_10], eax
jmp short loc_30BA2
loc_30B98:
mov eax, 1
mov [rbp+var_10], eax
jmp short $+2
loc_30BA2:
mov eax, [rbp+var_10]
mov [rbp+var_C], eax
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_30C00
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
cmp eax, [rbp+var_C]
jbe short loc_30C00
mov rax, [rbp+var_8]
mov edi, [rax+18h]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_C]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
or rcx, 10h
call my_realloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax], rcx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+0Ch], ecx
loc_30C00:
add rsp, 10h
pop rbp
retn
|
long long freeze_size(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+0h] [rbp-10h]
result = *(_QWORD *)(a1 + 32) & 0x100LL;
if ( !result )
{
if ( *(_DWORD *)(a1 + 8) <= 1u )
v2 = 1;
else
v2 = *(_DWORD *)(a1 + 8);
result = a1;
if ( *(_QWORD *)a1 )
{
result = *(unsigned int *)(a1 + 12);
if ( (unsigned int)result > v2 )
{
*(_QWORD *)a1 = my_realloc(
*(_DWORD *)(a1 + 24),
*(_QWORD *)a1,
*(_DWORD *)(a1 + 20) * v2,
*(_BYTE *)(a1 + 32) | 0x10u);
result = a1;
*(_DWORD *)(a1 + 12) = v2;
}
}
}
return result;
}
|
freeze_size:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x100
CMP RAX,0x0
JZ 0x00130b82
JMP 0x00130c00
LAB_00130b82:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8],0x1
JBE 0x00130b98
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00130ba2
LAB_00130b98:
MOV EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00130ba2
LAB_00130ba2:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00130c00
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x00130c00
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x10
CALL 0x0012f1a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc],ECX
LAB_00130c00:
ADD RSP,0x10
POP RBP
RET
|
void freeze_size(long *param_1)
{
long lVar1;
uint local_18;
if ((param_1[4] & 0x100U) == 0) {
if (*(uint *)(param_1 + 1) < 2) {
local_18 = 1;
}
else {
local_18 = *(uint *)(param_1 + 1);
}
if ((*param_1 != 0) && (local_18 < *(uint *)((long)param_1 + 0xc))) {
lVar1 = my_realloc((int)param_1[3],*param_1,local_18 * *(int *)((long)param_1 + 0x14),
param_1[4] | 0x10);
*param_1 = lVar1;
*(uint *)((long)param_1 + 0xc) = local_18;
}
}
return;
}
|
|
12,322
|
delete_dir_entry
|
eloqsql/storage/maria/ma_blockrec.c
|
static int delete_dir_entry(MARIA_SHARE *share,
uchar *buff, uint record_number,
uint *empty_space_res)
{
uint block_size= share->block_size;
uint number_of_records= (uint) buff[DIR_COUNT_OFFSET];
uint length, empty_space;
uchar *dir;
DBUG_ENTER("delete_dir_entry");
DBUG_PRINT("enter", ("record_number: %u number_of_records: %u",
record_number, number_of_records));
#ifdef SANITY_CHECKS
if (record_number >= number_of_records ||
record_number > ((block_size - LSN_SIZE - PAGE_TYPE_SIZE - 1 -
PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE))
{
DBUG_PRINT("error", ("record_number: %u number_of_records: %u",
record_number, number_of_records));
DBUG_RETURN(-1);
}
#endif
check_directory(share, buff, block_size, 0, (uint) -1);
empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
dir= dir_entry_pos(buff, block_size, record_number);
length= uint2korr(dir + 2); /* Length of entry we just deleted */
DBUG_ASSERT(uint2korr(dir) != 0 && length < block_size);
if (record_number == number_of_records - 1)
{
/* Delete this entry and all following free directory entries */
uchar *end= buff + block_size - PAGE_SUFFIX_SIZE;
number_of_records--;
dir+= DIR_ENTRY_SIZE;
empty_space+= DIR_ENTRY_SIZE;
/* Unlink and free the next empty ones */
while (dir < end && dir[0] == 0 && dir[1] == 0)
{
number_of_records--;
if (dir[2] == END_OF_DIR_FREE_LIST)
buff[DIR_FREE_OFFSET]= dir[3];
else
{
uchar *prev_entry= dir_entry_pos(buff, block_size, (uint) dir[2]);
DBUG_ASSERT(uint2korr(prev_entry) == 0 && prev_entry[3] ==
number_of_records);
prev_entry[3]= dir[3];
}
if (dir[3] != END_OF_DIR_FREE_LIST)
{
uchar *next_entry= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_entry) == 0 && next_entry[2] ==
number_of_records);
next_entry[2]= dir[2];
}
dir+= DIR_ENTRY_SIZE;
empty_space+= DIR_ENTRY_SIZE;
}
if (number_of_records == 0)
{
/* All entries on page deleted */
DBUG_PRINT("info", ("Page marked as unallocated"));
buff[PAGE_TYPE_OFFSET]= UNALLOCATED_PAGE;
#ifdef IDENTICAL_PAGES_AFTER_RECOVERY
{
dir= dir_entry_pos(buff, block_size, record_number);
bzero(dir, (record_number+1) * DIR_ENTRY_SIZE);
}
#endif
*empty_space_res= block_size;
DBUG_RETURN(1);
}
buff[DIR_COUNT_OFFSET]= (uchar) number_of_records;
}
else
{
/* Update directory */
dir[0]= dir[1]= 0;
dir[2]= END_OF_DIR_FREE_LIST;
if ((dir[3]= buff[DIR_FREE_OFFSET]) != END_OF_DIR_FREE_LIST)
{
/* Relink next entry to point to newly freed entry */
uchar *next_entry= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_entry) == 0 &&
next_entry[2] == END_OF_DIR_FREE_LIST);
next_entry[2]= record_number;
}
buff[DIR_FREE_OFFSET]= record_number;
}
empty_space+= length;
int2store(buff + EMPTY_SPACE_OFFSET, empty_space);
buff[PAGE_TYPE_OFFSET]|= (uchar) PAGE_CAN_BE_COMPACTED;
*empty_space_res= empty_space;
check_directory(share, buff, block_size, 0, empty_space);
DBUG_RETURN(0);
}
|
O3
|
c
|
delete_dir_entry:
movzbl 0x8(%rsi), %r11d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl %edx, %r11d
jbe 0x5fa3b
leal -0xd(%rdi), %r8d
shrl $0x2, %r8d
cmpl %edx, %r8d
jb 0x5fa3b
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movzwl 0xa(%rsi), %r8d
movl %edi, %r9d
addq %rsi, %r9
leal (,%rdx,4), %ebx
movq %r9, %rax
subq %rbx, %rax
movq $-0x8, %r10
subq %rbx, %r10
movzwl -0x6(%rax), %eax
decl %r11d
cmpl %edx, %r11d
jne 0x5f9e6
testl %edx, %edx
je 0x5fa2c
addl $0x4, %r8d
cmpb $0x0, 0x4(%r9,%r10)
jne 0x5f9dd
cmpb $0x0, 0x5(%r9,%r10)
jne 0x5f9dd
movzbl 0x6(%r9,%r10), %ebx
cmpq $0xff, %rbx
je 0x5f9a7
movb 0x7(%r9,%r10), %r11b
shll $0x2, %ebx
movq %r9, %r14
subq %rbx, %r14
movb %r11b, -0x5(%r14)
jmp 0x5f9b0
movb 0x7(%r9,%r10), %r11b
movb %r11b, 0x9(%rsi)
cmpb $-0x1, %r11b
je 0x5f9cd
movb 0x6(%r9,%r10), %bl
movzbl %r11b, %r11d
shll $0x2, %r11d
movq %r9, %r14
subq %r11, %r14
movb %bl, -0x6(%r14)
decl %edx
addl $0x4, %r8d
addq $0x4, %r10
cmpq $-0x8, %r10
jl 0x5f974
testl %edx, %edx
je 0x5fa2c
movb %dl, 0x8(%rsi)
jmp 0x5fa19
negq %rbx
xorl %edi, %edi
movb %dil, -0x7(%r9,%rbx)
movb %dil, (%r9,%r10)
movb $-0x1, -0x6(%r9,%rbx)
movzbl 0x9(%rsi), %edi
movb %dil, -0x5(%r9,%rbx)
cmpq $0xff, %rdi
je 0x5fa16
shll $0x2, %edi
subq %rdi, %r9
movb %dl, -0x6(%r9)
movb %dl, 0x9(%rsi)
addl %eax, %r8d
movw %r8w, 0xa(%rsi)
orb $-0x80, 0x7(%rsi)
xorl %eax, %eax
movl %r8d, %edi
jmp 0x5fa35
movb $0x0, 0x7(%rsi)
movl $0x1, %eax
movl %edi, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
|
delete_dir_entry:
movzx r11d, byte ptr [rsi+8]
mov eax, 0FFFFFFFFh
cmp r11d, edx
jbe locret_5FA3B
lea r8d, [rdi-0Dh]
shr r8d, 2
cmp r8d, edx
jb locret_5FA3B
push rbp
mov rbp, rsp
push r14
push rbx
movzx r8d, word ptr [rsi+0Ah]
mov r9d, edi
add r9, rsi
lea ebx, ds:0[rdx*4]
mov rax, r9
sub rax, rbx
mov r10, 0FFFFFFFFFFFFFFF8h
sub r10, rbx
movzx eax, word ptr [rax-6]
dec r11d
cmp r11d, edx
jnz short loc_5F9E6
test edx, edx
jz loc_5FA2C
add r8d, 4
loc_5F974:
cmp byte ptr [r9+r10+4], 0
jnz short loc_5F9DD
cmp byte ptr [r9+r10+5], 0
jnz short loc_5F9DD
movzx ebx, byte ptr [r9+r10+6]
cmp rbx, 0FFh
jz short loc_5F9A7
mov r11b, [r9+r10+7]
shl ebx, 2
mov r14, r9
sub r14, rbx
mov [r14-5], r11b
jmp short loc_5F9B0
loc_5F9A7:
mov r11b, [r9+r10+7]
mov [rsi+9], r11b
loc_5F9B0:
cmp r11b, 0FFh
jz short loc_5F9CD
mov bl, [r9+r10+6]
movzx r11d, r11b
shl r11d, 2
mov r14, r9
sub r14, r11
mov [r14-6], bl
loc_5F9CD:
dec edx
add r8d, 4
add r10, 4
cmp r10, 0FFFFFFFFFFFFFFF8h
jl short loc_5F974
loc_5F9DD:
test edx, edx
jz short loc_5FA2C
mov [rsi+8], dl
jmp short loc_5FA19
loc_5F9E6:
neg rbx
xor edi, edi
mov [r9+rbx-7], dil
mov [r9+r10], dil
mov byte ptr [r9+rbx-6], 0FFh
movzx edi, byte ptr [rsi+9]
mov [r9+rbx-5], dil
cmp rdi, 0FFh
jz short loc_5FA16
shl edi, 2
sub r9, rdi
mov [r9-6], dl
loc_5FA16:
mov [rsi+9], dl
loc_5FA19:
add r8d, eax
mov [rsi+0Ah], r8w
or byte ptr [rsi+7], 80h
xor eax, eax
mov edi, r8d
jmp short loc_5FA35
loc_5FA2C:
mov byte ptr [rsi+7], 0
mov eax, 1
loc_5FA35:
mov [rcx], edi
pop rbx
pop r14
pop rbp
locret_5FA3B:
retn
|
long long delete_dir_entry(unsigned int a1, long long a2, unsigned int a3, unsigned int *a4)
{
unsigned int v4; // r11d
long long result; // rax
int v6; // r8d
long long v7; // r9
long long v8; // rbx
long long v9; // r10
int v10; // eax
long long v11; // rbx
unsigned __int8 v12; // r11
long long v13; // rbx
long long v14; // rdi
unsigned int v15; // r8d
v4 = *(unsigned __int8 *)(a2 + 8);
result = 0xFFFFFFFFLL;
if ( v4 > a3 && (a1 - 13) >> 2 >= a3 )
{
v6 = *(unsigned __int16 *)(a2 + 10);
v7 = a2 + a1;
v8 = 4 * a3;
v9 = -8 - v8;
v10 = *(unsigned __int16 *)(v7 - v8 - 6);
if ( v4 - 1 == a3 )
{
if ( !a3 )
goto LABEL_20;
v6 += 4;
do
{
if ( *(_BYTE *)(v7 + v9 + 4) || *(_BYTE *)(v7 + v9 + 5) )
break;
v11 = *(unsigned __int8 *)(v7 + v9 + 6);
v12 = *(_BYTE *)(v7 + v9 + 7);
if ( v11 == 255 )
*(_BYTE *)(a2 + 9) = v12;
else
*(_BYTE *)(v7 - (unsigned int)(4 * v11) - 5) = v12;
if ( v12 != 0xFF )
*(_BYTE *)(v7 - 4 * (unsigned int)v12 - 6) = *(_BYTE *)(v7 + v9 + 6);
--a3;
v6 += 4;
v9 += 4LL;
}
while ( v9 < -8 );
if ( !a3 )
{
LABEL_20:
*(_BYTE *)(a2 + 7) = 0;
result = 1LL;
goto LABEL_21;
}
*(_BYTE *)(a2 + 8) = a3;
}
else
{
v13 = -v8;
*(_BYTE *)(v7 + v13 - 7) = 0;
*(_BYTE *)(v7 + v9) = 0;
*(_BYTE *)(v7 + v13 - 6) = -1;
v14 = *(unsigned __int8 *)(a2 + 9);
*(_BYTE *)(v7 + v13 - 5) = v14;
if ( v14 != 255 )
*(_BYTE *)(v7 - (unsigned int)(4 * v14) - 6) = a3;
*(_BYTE *)(a2 + 9) = a3;
}
v15 = v10 + v6;
*(_WORD *)(a2 + 10) = v15;
*(_BYTE *)(a2 + 7) |= 0x80u;
result = 0LL;
a1 = v15;
LABEL_21:
*a4 = a1;
}
return result;
}
|
delete_dir_entry:
MOVZX R11D,byte ptr [RSI + 0x8]
MOV EAX,0xffffffff
CMP R11D,EDX
JBE 0x0015fa3b
LEA R8D,[RDI + -0xd]
SHR R8D,0x2
CMP R8D,EDX
JC 0x0015fa3b
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOVZX R8D,word ptr [RSI + 0xa]
MOV R9D,EDI
ADD R9,RSI
LEA EBX,[RDX*0x4]
MOV RAX,R9
SUB RAX,RBX
MOV R10,-0x8
SUB R10,RBX
MOVZX EAX,word ptr [RAX + -0x6]
DEC R11D
CMP R11D,EDX
JNZ 0x0015f9e6
TEST EDX,EDX
JZ 0x0015fa2c
ADD R8D,0x4
LAB_0015f974:
CMP byte ptr [R9 + R10*0x1 + 0x4],0x0
JNZ 0x0015f9dd
CMP byte ptr [R9 + R10*0x1 + 0x5],0x0
JNZ 0x0015f9dd
MOVZX EBX,byte ptr [R9 + R10*0x1 + 0x6]
CMP RBX,0xff
JZ 0x0015f9a7
MOV R11B,byte ptr [R9 + R10*0x1 + 0x7]
SHL EBX,0x2
MOV R14,R9
SUB R14,RBX
MOV byte ptr [R14 + -0x5],R11B
JMP 0x0015f9b0
LAB_0015f9a7:
MOV R11B,byte ptr [R9 + R10*0x1 + 0x7]
MOV byte ptr [RSI + 0x9],R11B
LAB_0015f9b0:
CMP R11B,0xff
JZ 0x0015f9cd
MOV BL,byte ptr [R9 + R10*0x1 + 0x6]
MOVZX R11D,R11B
SHL R11D,0x2
MOV R14,R9
SUB R14,R11
MOV byte ptr [R14 + -0x6],BL
LAB_0015f9cd:
DEC EDX
ADD R8D,0x4
ADD R10,0x4
CMP R10,-0x8
JL 0x0015f974
LAB_0015f9dd:
TEST EDX,EDX
JZ 0x0015fa2c
MOV byte ptr [RSI + 0x8],DL
JMP 0x0015fa19
LAB_0015f9e6:
NEG RBX
XOR EDI,EDI
MOV byte ptr [R9 + RBX*0x1 + -0x7],DIL
MOV byte ptr [R9 + R10*0x1],DIL
MOV byte ptr [R9 + RBX*0x1 + -0x6],0xff
MOVZX EDI,byte ptr [RSI + 0x9]
MOV byte ptr [R9 + RBX*0x1 + -0x5],DIL
CMP RDI,0xff
JZ 0x0015fa16
SHL EDI,0x2
SUB R9,RDI
MOV byte ptr [R9 + -0x6],DL
LAB_0015fa16:
MOV byte ptr [RSI + 0x9],DL
LAB_0015fa19:
ADD R8D,EAX
MOV word ptr [RSI + 0xa],R8W
OR byte ptr [RSI + 0x7],0x80
XOR EAX,EAX
MOV EDI,R8D
JMP 0x0015fa35
LAB_0015fa2c:
MOV byte ptr [RSI + 0x7],0x0
MOV EAX,0x1
LAB_0015fa35:
MOV dword ptr [RCX],EDI
POP RBX
POP R14
POP RBP
LAB_0015fa3b:
RET
|
int8 delete_dir_entry(uint param_1,long param_2,uint param_3,uint *param_4)
{
byte bVar1;
ushort uVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
uint uVar6;
long lVar7;
long lVar8;
byte bVar9;
if (*(byte *)(param_2 + 8) <= param_3) {
return 0xffffffff;
}
if (param_1 - 0xd >> 2 < param_3) {
return 0xffffffff;
}
uVar6 = (uint)*(ushort *)(param_2 + 10);
lVar7 = (ulong)param_1 + param_2;
uVar4 = (ulong)(param_3 * 4);
lVar8 = -8 - uVar4;
uVar2 = *(ushort *)((lVar7 - uVar4) + -6);
if (*(byte *)(param_2 + 8) - 1 == param_3) {
if (param_3 != 0) {
uVar6 = *(ushort *)(param_2 + 10) + 4;
do {
if ((*(char *)(lVar7 + 4 + lVar8) != '\0') || (*(char *)(lVar7 + 5 + lVar8) != '\0')) break;
bVar1 = *(byte *)(lVar7 + 6 + lVar8);
if (bVar1 == 0xff) {
bVar9 = *(byte *)(lVar7 + 7 + lVar8);
*(byte *)(param_2 + 9) = bVar9;
}
else {
bVar9 = *(byte *)(lVar7 + 7 + lVar8);
*(byte *)(lVar7 + (ulong)bVar1 * -4 + -5) = bVar9;
}
if (bVar9 != 0xff) {
*(int1 *)(lVar7 + (ulong)bVar9 * -4 + -6) = *(int1 *)(lVar7 + 6 + lVar8);
}
param_3 = param_3 - 1;
uVar6 = uVar6 + 4;
lVar8 = lVar8 + 4;
} while (lVar8 < -8);
if (param_3 != 0) {
*(char *)(param_2 + 8) = (char)param_3;
goto LAB_0015fa19;
}
}
*(int1 *)(param_2 + 7) = 0;
uVar3 = 1;
}
else {
lVar5 = -uVar4;
*(int1 *)(lVar7 + -7 + lVar5) = 0;
*(int1 *)(lVar7 + lVar8) = 0;
*(int1 *)(lVar7 + -6 + lVar5) = 0xff;
bVar1 = *(byte *)(param_2 + 9);
*(byte *)(lVar7 + -5 + lVar5) = bVar1;
if (bVar1 != 0xff) {
*(char *)(lVar7 + (ulong)bVar1 * -4 + -6) = (char)param_3;
}
*(char *)(param_2 + 9) = (char)param_3;
LAB_0015fa19:
param_1 = uVar6 + uVar2;
*(short *)(param_2 + 10) = (short)param_1;
*(byte *)(param_2 + 7) = *(byte *)(param_2 + 7) | 0x80;
uVar3 = 0;
}
*param_4 = param_1;
return uVar3;
}
|
|
12,323
|
minja::Value::operator-(minja::Value const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value operator-(const Value& rhs) const {
if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() - rhs.get<int64_t>();
else
return get<double>() - rhs.get<double>();
}
|
O3
|
cpp
|
minja::Value::operator-(minja::Value const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x99ca9
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x99ca9
movq %rsi, %rdi
callq 0x88f38
movq %rax, %r15
movq %r14, %rdi
callq 0x88f38
subq %rax, %r15
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x63134
jmp 0x99cf5
movq %rsi, %rdi
callq 0x89082
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x89082
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movapd %xmm1, %xmm0
callq 0x626fc
movq %r14, %rdi
movl $0x1, %esi
callq 0x5b4ca
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZNK5minja5ValuemiERKS0_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
cmp al, 1
ja short loc_99CA9
mov al, [r14+40h]
add al, 0FBh
cmp al, 1
ja short loc_99CA9
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
sub r15, rax
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::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_integer_t)
jmp short loc_99CF5
loc_99CA9:
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+28h+var_20], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd xmm1, [rsp+28h+var_20]
subsd xmm1, xmm0
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
movapd xmm0, xmm1
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; 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,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_float_t)
loc_99CF5:
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 rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long minja::Value::operator-(long long a1, long long a2, long long a3)
{
long long v4; // r15
long long v5; // rax
char *v6; // r14
double v7; // xmm1_8
double v9; // [rsp+8h] [rbp-20h]
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u )
{
v9 = minja::Value::get<double>(a2);
v7 = v9 - minja::Value::get<double>(a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
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 + 64),
v7);
}
else
{
v4 = minja::Value::get<long>(a2);
v5 = minja::Value::get<long>(a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::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 + 64),
v4 - v5);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6);
return a1;
}
|
operator-:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x00199ca9
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x00199ca9
MOV RDI,RSI
CALL 0x00188f38
MOV R15,RAX
MOV RDI,R14
CALL 0x00188f38
SUB R15,RAX
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOV RSI,R15
CALL 0x00163134
JMP 0x00199cf5
LAB_00199ca9:
MOV RDI,RSI
CALL 0x00189082
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RDI,R14
CALL 0x00189082
MOVSD XMM1,qword ptr [RSP + 0x8]
SUBSD XMM1,XMM0
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOVAPD XMM0,XMM1
CALL 0x001626fc
LAB_00199cf5:
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015b4ca
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator-(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
double dVar4;
if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
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>>
(this + 0x40,lVar1 - lVar2);
}
else {
dVar3 = get<double>(param_1);
dVar4 = get<double>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
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>>
(dVar3 - dVar4,this + 0x40);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + '@'));
return this;
}
|
|
12,324
|
mysql_ping_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_ping_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_ping,
(parms->mysql),
parms->mysql,
int,
r_int)
}
|
O0
|
c
|
mysql_ping_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x20580
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_ping_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_ping
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
_DWORD * mysql_ping_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
v2[2] = mysql_ping(*a1);
result = v2;
*v2 = 0;
return result;
}
|
mysql_ping_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00120580
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_ping_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_ping(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
12,325
|
my_caseup_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_toupper_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O3
|
c
|
my_caseup_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xc2fd5
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0xc2fd5
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0xc2fb7
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xc2fb7
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0xc2fd5
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0xc2f71
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_caseup_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_C2FD5
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_C2F71:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_C2FD5
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_C2FB7
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_C2FB7
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4]
mov [rbp+var_40], rsi
loc_C2FB7:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_C2FD5
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_C2F71
loc_C2FD5:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
|
my_caseup_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x001c2fd5
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_001c2f71:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x001c2fd5
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x001c2fb7
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001c2fb7
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001c2fb7:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x001c2fd5
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x001c2f71
LAB_001c2fd5:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
|
|
12,326
|
maria_rtree_find_next
|
eloqsql/storage/maria/ma_rt_index.c
|
int maria_rtree_find_next(MARIA_HA *info, uint keynr, uint32 search_flag)
{
my_off_t root;
uint32 nod_cmp_flag;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
DBUG_ASSERT(info->last_key.keyinfo == keyinfo);
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if (info->update & HA_STATE_DELETED)
return maria_rtree_find_first(info, &info->last_key, search_flag);
if (!info->keyread_buff_used)
{
uchar *key= info->int_keypos;
while (key < info->int_maxpos)
{
if (!maria_rtree_key_cmp(keyinfo->seg,
info->first_mbr_key, key,
info->last_rkey_length, search_flag))
{
uchar *after_key= key + keyinfo->keylength;
MARIA_KEY tmp_key;
/*
We don't need to set all MARIA_KEY elements here as
_ma_row_pos_from_key only uses a few of them.
*/
tmp_key.keyinfo= keyinfo;
tmp_key.data= key;
tmp_key.data_length= keyinfo->keylength - info->s->base.rec_reflength;
info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key);
memcpy(info->last_key.data, key, info->last_key.data_length);
if (after_key < info->int_maxpos)
info->int_keypos= after_key;
else
info->keyread_buff_used= 1;
return 0;
}
key+= keyinfo->keylength;
}
}
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= (((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT));
*/
return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root,
0);
}
|
O0
|
c
|
maria_rtree_find_next:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x7bff3
movl $0x400, -0x24(%rbp) # imm = 0x400
movl $0x400, -0x18(%rbp) # imm = 0x400
movq -0x10(%rbp), %rax
movl 0x624(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x7c032
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x200, %rsi # imm = 0x200
movl -0x18(%rbp), %edx
callq 0x7b950
movl %eax, -0x4(%rbp)
jmp 0x7c1be
movq -0x10(%rbp), %rax
cmpb $0x0, 0x685(%rax)
jne 0x7c16e
movq -0x10(%rbp), %rax
movq 0x3b0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x7c16c
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x398(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x630(%rax), %ecx
movl -0x18(%rbp), %r8d
callq 0x7ee40
cmpl $0x0, %eax
jne 0x7c14e
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x3e0(%rcx), %eax
movl %eax, -0x50(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x97330
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x200(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x210(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x7c13a
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x3b0(%rax)
jmp 0x7c145
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7c1be
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x7c052
jmp 0x7c16e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x7c1a1
callq 0xf7a70
movl $0x89, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7c1be
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x7ba40
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
maria_rtree_find_next:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov [rbp+var_30], rax
jmp short $+2
loc_7BFF3:
mov [rbp+var_24], 400h
mov [rbp+var_18], 400h
mov rax, [rbp+var_10]
mov eax, [rax+624h]
and eax, 8
cmp eax, 0
jz short loc_7C032
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 200h
mov edx, [rbp+var_18]
call maria_rtree_find_first
mov [rbp+var_4], eax
jmp loc_7C1BE
loc_7C032:
mov rax, [rbp+var_10]
cmp byte ptr [rax+685h], 0
jnz loc_7C16E
mov rax, [rbp+var_10]
mov rax, [rax+3B0h]
mov [rbp+var_38], rax
loc_7C052:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb loc_7C16C
mov rax, [rbp+var_30]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_10]
mov rsi, [rax+398h]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_10]
mov ecx, [rax+630h]
mov r8d, [rbp+var_18]
call maria_rtree_key_cmp
cmp eax, 0
jnz loc_7C14E
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
movzx ecx, word ptr [rcx+0AAh]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov [rbp+var_60], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
sub eax, [rcx+3E0h]
mov [rbp+var_50], eax
lea rdi, [rbp+var_60]
call _ma_row_pos_from_key
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov rdi, [rax+200h]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov eax, [rax+210h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb short loc_7C13A
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+3B0h], rcx
jmp short loc_7C145
loc_7C13A:
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
loc_7C145:
mov [rbp+var_4], 0
jmp short loc_7C1BE
loc_7C14E:
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_7C052
loc_7C16C:
jmp short $+2
loc_7C16E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+118h]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_7C1A1
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_7C1BE
loc_7C1A1:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov edx, [rbp+var_18]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_20]
xor r9d, r9d
call maria_rtree_find_req
mov [rbp+var_4], eax
loc_7C1BE:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long maria_rtree_find_next(long long a1, const char *a2, unsigned int a3)
{
long long v3; // rax
_QWORD v5[2]; // [rsp+0h] [rbp-60h] BYREF
int v6; // [rsp+10h] [rbp-50h]
unsigned long long v7; // [rsp+20h] [rbp-40h]
unsigned long long i; // [rsp+28h] [rbp-38h]
long long v9; // [rsp+30h] [rbp-30h]
unsigned int v10; // [rsp+3Ch] [rbp-24h]
long long v11; // [rsp+40h] [rbp-20h]
unsigned int v12; // [rsp+48h] [rbp-18h]
unsigned int v13; // [rsp+4Ch] [rbp-14h]
char *v14; // [rsp+50h] [rbp-10h]
v14 = (char *)a1;
v13 = (unsigned int)a2;
v12 = a3;
v9 = 280LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v10 = 1024;
v12 = 1024;
if ( (*(_DWORD *)(a1 + 1572) & 8) != 0 )
{
return (unsigned int)maria_rtree_find_first((long long)v14, v14 + 512);
}
else
{
if ( !v14[1669] )
{
for ( i = *((_QWORD *)v14 + 118); i < *((_QWORD *)v14 + 119); i += *(unsigned __int16 *)(v9 + 170) )
{
a1 = *(_QWORD *)(v9 + 192);
a2 = (const char *)*((_QWORD *)v14 + 115);
if ( !(unsigned int)maria_rtree_key_cmp(a1, a2, i, *((unsigned int *)v14 + 396), v12) )
{
v7 = *(unsigned __int16 *)(v9 + 170) + i;
v5[1] = v9;
v5[0] = i;
v6 = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(*(_QWORD *)v14 + 992LL);
v3 = ma_row_pos_from_key(v5);
*((_QWORD *)v14 + 19) = v3;
memcpy(*((_QWORD *)v14 + 64), i, *((unsigned int *)v14 + 132));
if ( v7 >= *((_QWORD *)v14 + 119) )
v14[1669] = 1;
else
*((_QWORD *)v14 + 118) = v7;
return 0;
}
}
}
v11 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)v14 + 280LL) + 8LL * v13);
if ( v11 == -1 )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
return (unsigned int)maria_rtree_find_req((long long *)v14, v9, v12, v10, v11, 0);
}
}
}
|
maria_rtree_find_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017bff3
LAB_0017bff3:
MOV dword ptr [RBP + -0x24],0x400
MOV dword ptr [RBP + -0x18],0x400
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x624]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0017c032
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x200
MOV EDX,dword ptr [RBP + -0x18]
CALL 0x0017b950
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017c1be
LAB_0017c032:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x685],0x0
JNZ 0x0017c16e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017c052:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0017c16c
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x398]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x630]
MOV R8D,dword ptr [RBP + -0x18]
CALL 0x0017ee40
CMP EAX,0x0
JNZ 0x0017c14e
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SUB EAX,dword ptr [RCX + 0x3e0]
MOV dword ptr [RBP + -0x50],EAX
LEA RDI,[RBP + -0x60]
CALL 0x00197330
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x200]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x210]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0017c13a
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x3b0],RCX
JMP 0x0017c145
LAB_0017c13a:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
LAB_0017c145:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0017c1be
LAB_0017c14e:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0017c052
LAB_0017c16c:
JMP 0x0017c16e
LAB_0017c16e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x0017c1a1
CALL 0x001f7a70
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0017c1be
LAB_0017c1a1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x20]
XOR R9D,R9D
CALL 0x0017ba40
MOV dword ptr [RBP + -0x4],EAX
LAB_0017c1be:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 maria_rtree_find_next(long *param_1,uint param_2)
{
int iVar1;
long lVar2;
int4 *puVar3;
void *local_68;
long local_60;
int local_58;
ulong local_48;
void *local_40;
long local_38;
int4 local_2c;
long local_28;
int4 local_20;
uint local_1c;
long *local_18;
int4 local_c;
local_38 = *(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118;
local_2c = 0x400;
local_20 = 0x400;
local_1c = param_2;
local_18 = param_1;
if ((*(uint *)((long)param_1 + 0x624) & 8) == 0) {
if (*(char *)((long)param_1 + 0x685) == '\0') {
for (local_40 = (void *)param_1[0x76]; local_40 < (void *)local_18[0x77];
local_40 = (void *)((long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa))) {
iVar1 = maria_rtree_key_cmp(*(int8 *)(local_38 + 0xc0),local_18[0x73],local_40,
(int)local_18[0xc6],local_20);
if (iVar1 == 0) {
local_48 = (long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa);
local_60 = local_38;
local_68 = local_40;
local_58 = (uint)*(ushort *)(local_38 + 0xaa) - *(int *)(*local_18 + 0x3e0);
lVar2 = _ma_row_pos_from_key(&local_68);
local_18[0x13] = lVar2;
memcpy((void *)local_18[0x40],local_40,(ulong)*(uint *)(local_18 + 0x42));
if (local_48 < (ulong)local_18[0x77]) {
local_18[0x76] = local_48;
}
else {
*(int1 *)((long)local_18 + 0x685) = 1;
}
return 0;
}
}
}
local_28 = *(long *)(*(long *)(*local_18 + 0x118) + (ulong)local_1c * 8);
if (local_28 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
local_c = 0xffffffff;
}
else {
local_c = maria_rtree_find_req(local_18,local_38,local_20,local_2c,local_28,0);
}
}
else {
local_c = maria_rtree_find_first(param_1,param_1 + 0x40,0x400);
}
return local_c;
}
|
|
12,327
|
testing::internal::JsonUnitTestResultPrinter::PrintJsonTestList(std::ostream*, std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>> const&)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
void JsonUnitTestResultPrinter::PrintJsonTestList(
std::ostream* stream, const std::vector<TestSuite*>& test_suites) {
const std::string kTestsuites = "testsuites";
const std::string kIndent = Indent(2);
*stream << "{\n";
int total_tests = 0;
for (auto test_suite : test_suites) {
total_tests += test_suite->total_test_count();
}
OutputJsonKey(stream, kTestsuites, "tests", total_tests, kIndent);
OutputJsonKey(stream, kTestsuites, "name", "AllTests", kIndent);
*stream << kIndent << "\"" << kTestsuites << "\": [\n";
for (size_t i = 0; i < test_suites.size(); ++i) {
if (i != 0) {
*stream << ",\n";
}
PrintJsonTestSuite(stream, *test_suites[i]);
}
*stream << "\n"
<< kIndent << "]\n"
<< "}\n";
}
|
O1
|
cpp
|
testing::internal::JsonUnitTestResultPrinter::PrintJsonTestList(std::ostream*, std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1695f(%rip), %rsi # 0x435b7
leaq 0x16962(%rip), %rdx # 0x435c1
leaq 0x48(%rsp), %rdi
callq 0x39504
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x28(%rsp), %rdi
movl $0x2, %esi
movl $0x20, %edx
callq 0x85e0
leaq 0x16a23(%rip), %rsi # 0x436b0
movl $0x2, %edx
movq %rbx, %rdi
callq 0x85b0
movq (%r14), %rax
movq 0x8(%r14), %rcx
xorl %ebp, %ebp
cmpq %rcx, %rax
je 0x2ccbf
movq (%rax), %rdx
movq 0x38(%rdx), %rsi
subq 0x30(%rdx), %rsi
shrq $0x3, %rsi
addl %esi, %ebp
addq $0x8, %rax
jmp 0x2cca3
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1594b(%rip), %rsi # 0x4261a
leaq 0x15949(%rip), %rdx # 0x4261f
leaq 0x8(%rsp), %rdi
callq 0x39504
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %r8
movq %rbx, %rdi
movl %ebp, %ecx
movl $0x1, %r9d
callq 0x294f2
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2cd16
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x167eb(%rip), %rsi # 0x43510
leaq 0x167e8(%rip), %rdx # 0x43514
callq 0x39504
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x168a9(%rip), %rsi # 0x435ea
leaq 0x168aa(%rip), %rdx # 0x435f2
leaq 0x68(%rsp), %rdi
callq 0x39504
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x68(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %rbx, %rdi
movl $0x1, %r9d
callq 0x292ea
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2cd8b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2cda2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r15
leaq 0x1692d(%rip), %rsi # 0x436eb
movl $0x1, %edx
movq %rax, %rdi
callq 0x85b0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r15, %rdi
callq 0x85b0
leaq 0x1689d(%rip), %rsi # 0x43681
movl $0x5, %edx
movq %rax, %rdi
callq 0x85b0
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x2ce3a
xorl %ebp, %ebp
leaq 0x168c2(%rip), %r15 # 0x436c5
testq %rbp, %rbp
je 0x2ce18
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x85b0
movq (%r14), %rax
movq (%rax,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x2c518
incq %rbp
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x3, %rax
cmpq %rax, %rbp
jb 0x2ce03
leaq 0x1649c(%rip), %rsi # 0x432dd
movl $0x1, %edx
movq %rbx, %rdi
callq 0x85b0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x85b0
movq %rax, %rbx
leaq 0x1681d(%rip), %rsi # 0x43687
movl $0x2, %edx
movq %rax, %rdi
callq 0x85b0
leaq 0x1686f(%rip), %rsi # 0x436ed
movl $0x2, %edx
movq %rbx, %rdi
callq 0x85b0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2cea2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ceb9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x84e0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2ceee
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x2ceee
jmp 0x2ceeb
jmp 0x2cf12
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2cf15
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x2cf15
jmp 0x2cf12
jmp 0x2cf12
movq %rax, %rbx
jmp 0x2cf2c
jmp 0x2cf12
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2cf2c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x2cf43
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
nop
|
_ZN7testing8internal25JsonUnitTestResultPrinter17PrintJsonTestListEPSoRKSt6vectorIPNS_9TestSuiteESaIS5_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+0B8h+var_60]
mov [r12-10h], r12
lea rsi, aTestsuites; "testsuites"
lea rdx, aTestsuites+0Ah; ""
lea rdi, [rsp+0B8h+var_70]
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 r13, [rsp+0B8h+var_80]
mov [r13-10h], r13
lea rdi, [rsp+0B8h+var_90]
mov esi, 2
mov edx, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
lea rsi, asc_436AE+2; "{\n"
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [r14]
mov rcx, [r14+8]
xor ebp, ebp
loc_2CCA3:
cmp rax, rcx
jz short loc_2CCBF
mov rdx, [rax]
mov rsi, [rdx+38h]
sub rsi, [rdx+30h]
shr rsi, 3
add ebp, esi
add rax, 8
jmp short loc_2CCA3
loc_2CCBF:
lea r15, [rsp+0B8h+var_A0]
mov [r15-10h], r15
lea rsi, aAlsoRunDisable+12h; "tests"
lea rdx, aAlsoRunDisable+17h; ""
lea rdi, [rsp+0B8h+var_B0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0B8h+var_70]
lea rdx, [rsp+0B8h+var_B0]
lea r8, [rsp+0B8h+var_90]
mov rdi, rbx
mov ecx, ebp
mov r9d, 1
call _ZN7testing8internal25JsonUnitTestResultPrinter13OutputJsonKeyEPSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_iSA_b; testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream *,std::string const&,std::string const&,int,std::string const&,bool)
mov rdi, [rsp+0B8h+var_B0]; void *
cmp rdi, r15
jz short loc_2CD16
mov rsi, [rsp+0B8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CD16:
lea rdi, [rsp+0B8h+var_B0]
mov [rdi], r15
lea rsi, aClassname+5; "name"
lea rdx, aClassname+9; ""
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 rbp, [rsp+0B8h+var_40]
mov [rbp-10h], rbp
lea rsi, aAlltests; "AllTests"
lea rdx, aAlltests+8; ""
lea rdi, [rsp+0B8h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0B8h+var_70]
lea rdx, [rsp+0B8h+var_B0]
lea rcx, [rsp+0B8h+var_50]
lea r8, [rsp+0B8h+var_90]
mov rdi, rbx
mov r9d, 1
call _ZN7testing8internal25JsonUnitTestResultPrinter13OutputJsonKeyEPSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_SA_SA_b; testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream *,std::string const&,std::string const&,std::string const&,std::string const&,bool)
mov rdi, [rsp+0B8h+var_50]; void *
cmp rdi, rbp
jz short loc_2CD8B
mov rsi, [rsp+0B8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CD8B:
mov rdi, [rsp+0B8h+var_B0]; void *
cmp rdi, r15
jz short loc_2CDA2
mov rsi, [rsp+0B8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CDA2:
mov rsi, [rsp+0B8h+var_90]
mov rdx, [rsp+0B8h+var_88]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aMessage+0Fh; "\""
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+0B8h+var_70]
mov rdx, [rsp+0B8h+var_68]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aTestsuite_1+0Ah; "\": [\n"
mov edx, 5
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 rax, [r14+8]
cmp rax, [r14]
jz short loc_2CE3A
xor ebp, ebp
lea r15, asc_436C4+1; ",\n"
loc_2CE03:
test rbp, rbp
jz short loc_2CE18
mov edx, 2
mov rdi, rbx
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_2CE18:
mov rax, [r14]
mov rsi, [rax+rbp*8]; std::ostream *
mov rdi, rbx; this
call _ZN7testing8internal25JsonUnitTestResultPrinter18PrintJsonTestSuiteEPSoRKNS_9TestSuiteE; testing::internal::JsonUnitTestResultPrinter::PrintJsonTestSuite(std::ostream *,testing::TestSuite const&)
inc rbp
mov rax, [r14+8]
sub rax, [r14]
sar rax, 3
cmp rbp, rax
jb short loc_2CE03
loc_2CE3A:
lea rsi, aSFromSSMsTotal+19h; "\n"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+0B8h+var_90]
mov rdx, [rsp+0B8h+var_88]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
lea rsi, asc_43687; "]\n"
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_436ED; "}\n"
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+0B8h+var_90]; void *
cmp rdi, r13
jz short loc_2CEA2
mov rsi, [rsp+0B8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CEA2:
mov rdi, [rsp+0B8h+var_70]; void *
cmp rdi, r12
jz short loc_2CEB9
mov rsi, [rsp+0B8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CEB9:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_60]; void *
cmp rdi, rbp
jz short loc_2CEEE
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2CEEE
jmp short loc_2CEEB
jmp short loc_2CF12
loc_2CEEB:
mov rbx, rax
loc_2CEEE:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_2CF15
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2CF15
jmp short loc_2CF12
jmp short loc_2CF12
mov rbx, rax
jmp short loc_2CF2C
jmp short $+2
loc_2CF12:
mov rbx, rax
loc_2CF15:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_2CF2C
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CF2C:
mov rdi, [rsp+arg_40]; void *
cmp rdi, r12
jz short loc_2CF43
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CF43:
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::JsonUnitTestResultPrinter::PrintJsonTestList(
testing::internal::JsonUnitTestResultPrinter *this,
long long *a2)
{
long long v2; // rax
int v3; // ebp
long long v4; // r15
long long v5; // rax
const testing::TestSuite *v6; // rdx
unsigned long long v7; // rbp
long long v8; // rbx
void *v9[2]; // [rsp+8h] [rbp-B0h] BYREF
_QWORD v10[2]; // [rsp+18h] [rbp-A0h] BYREF
void *v11; // [rsp+28h] [rbp-90h] BYREF
long long v12; // [rsp+30h] [rbp-88h]
_QWORD v13[2]; // [rsp+38h] [rbp-80h] BYREF
void *v14[2]; // [rsp+48h] [rbp-70h] BYREF
_QWORD v15[2]; // [rsp+58h] [rbp-60h] BYREF
void *v16[2]; // [rsp+68h] [rbp-50h] BYREF
_QWORD v17[8]; // [rsp+78h] [rbp-40h] BYREF
v14[0] = v15;
std::string::_M_construct<char const*>(v14, "testsuites", "");
v11 = v13;
std::string::_M_construct(&v11, 2LL, 32LL);
std::__ostream_insert<char,std::char_traits<char>>(this, "{\n", 2LL);
v2 = *a2;
v3 = 0;
while ( v2 != a2[1] )
{
v3 += (*(_QWORD *)(*(_QWORD *)v2 + 56LL) - *(_QWORD *)(*(_QWORD *)v2 + 48LL)) >> 3;
v2 += 8LL;
}
v9[0] = v10;
std::string::_M_construct<char const*>(v9, "tests", "");
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey((long long)this, (long long *)v14, v9, v3, &v11, 1);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
v9[0] = v10;
std::string::_M_construct<char const*>(v9, "name", "");
v16[0] = v17;
std::string::_M_construct<char const*>(v16, "AllTests", "");
testing::internal::JsonUnitTestResultPrinter::OutputJsonKey((long long)this, (long long *)v14, v9, v16, &v11, 1);
if ( v16[0] != v17 )
operator delete(v16[0], v17[0] + 1LL);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
v4 = std::__ostream_insert<char,std::char_traits<char>>(this, v11, v12);
std::__ostream_insert<char,std::char_traits<char>>(v4, "\"", 1LL);
v5 = std::__ostream_insert<char,std::char_traits<char>>(v4, v14[0], v14[1]);
std::__ostream_insert<char,std::char_traits<char>>(v5, "\": [\n", 5LL);
if ( a2[1] != *a2 )
{
v7 = 0LL;
do
{
if ( v7 )
std::__ostream_insert<char,std::char_traits<char>>(this, ",\n", 2LL);
testing::internal::JsonUnitTestResultPrinter::PrintJsonTestSuite(this, *(std::ostream **)(*a2 + 8 * v7++), v6);
}
while ( v7 < (a2[1] - *a2) >> 3 );
}
std::__ostream_insert<char,std::char_traits<char>>(this, "\n", 1LL);
v8 = std::__ostream_insert<char,std::char_traits<char>>(this, v11, v12);
std::__ostream_insert<char,std::char_traits<char>>(v8, "]\n", 2LL);
std::__ostream_insert<char,std::char_traits<char>>(v8, "}\n", 2LL);
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
if ( v14[0] != v15 )
operator delete(v14[0], v15[0] + 1LL);
}
|
PrintJsonTestList:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x58]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x1435b7]
LEA RDX,[0x1435c1]
LEA RDI,[RSP + 0x48]
CALL 0x00139504
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0012cc72:
LEA RDI,[RSP + 0x28]
MOV ESI,0x2
MOV EDX,0x20
CALL 0x001085e0
LAB_0012cc86:
LEA RSI,[0x1436b0]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x001085b0
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
XOR EBP,EBP
LAB_0012cca3:
CMP RAX,RCX
JZ 0x0012ccbf
MOV RDX,qword ptr [RAX]
MOV RSI,qword ptr [RDX + 0x38]
SUB RSI,qword ptr [RDX + 0x30]
SHR RSI,0x3
ADD EBP,ESI
ADD RAX,0x8
JMP 0x0012cca3
LAB_0012ccbf:
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0012ccc8:
LEA RSI,[0x14261a]
LEA RDX,[0x14261f]
LEA RDI,[RSP + 0x8]
CALL 0x00139504
LAB_0012cce0:
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
LEA R8,[RSP + 0x28]
MOV RDI,RBX
MOV ECX,EBP
MOV R9D,0x1
CALL 0x001294f2
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0012cd16
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_0012cd16:
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R15
LAB_0012cd1e:
LEA RSI,[0x143510]
LEA RDX,[0x143514]
CALL 0x00139504
LEA RBP,[RSP + 0x78]
MOV qword ptr [RBP + -0x10],RBP
LAB_0012cd3a:
LEA RSI,[0x1435ea]
LEA RDX,[0x1435f2]
LEA RDI,[RSP + 0x68]
CALL 0x00139504
LAB_0012cd52:
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
LEA RCX,[RSP + 0x68]
LEA R8,[RSP + 0x28]
MOV RDI,RBX
MOV R9D,0x1
CALL 0x001292ea
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,RBP
JZ 0x0012cd8b
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001084e0
LAB_0012cd8b:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0012cda2
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_0012cda2:
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_0012cdac:
MOV RDI,RBX
CALL 0x001085b0
MOV R15,RAX
LEA RSI,[0x1436eb]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001085b0
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
MOV RDI,R15
CALL 0x001085b0
LEA RSI,[0x143681]
MOV EDX,0x5
MOV RDI,RAX
CALL 0x001085b0
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [R14]
JZ 0x0012ce3a
XOR EBP,EBP
LEA R15,[0x1436c5]
LAB_0012ce03:
TEST RBP,RBP
JZ 0x0012ce18
LAB_0012ce08:
MOV EDX,0x2
MOV RDI,RBX
MOV RSI,R15
CALL 0x001085b0
LAB_0012ce18:
MOV RAX,qword ptr [R14]
MOV RSI,qword ptr [RAX + RBP*0x8]
MOV RDI,RBX
CALL 0x0012c518
INC RBP
MOV RAX,qword ptr [R14 + 0x8]
SUB RAX,qword ptr [R14]
SAR RAX,0x3
CMP RBP,RAX
JC 0x0012ce03
LAB_0012ce3a:
LEA RSI,[0x1432dd]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001085b0
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV RDI,RBX
CALL 0x001085b0
MOV RBX,RAX
LEA RSI,[0x143687]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001085b0
LEA RSI,[0x1436ed]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x001085b0
LAB_0012ce8b:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0012cea2
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001084e0
LAB_0012cea2:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R12
JZ 0x0012ceb9
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001084e0
LAB_0012ceb9:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::JsonUnitTestResultPrinter::PrintJsonTestList(std::ostream*,
std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*> > const&) */
void testing::internal::JsonUnitTestResultPrinter::PrintJsonTestList
(ostream *param_1,vector *param_2)
{
long *plVar1;
ostream *poVar2;
int iVar3;
ulong uVar4;
long *local_b0 [2];
long local_a0 [2];
long *local_90;
long local_88;
long local_80 [2];
long *local_70;
long local_68;
long local_60 [2];
long *local_50 [2];
long local_40 [2];
local_70 = local_60;
std::__cxx11::string::_M_construct<char_const*>(&local_70,"testsuites","");
/* try { // try from 0012cc72 to 0012cc85 has its CatchHandler @ 0012cf0b */
local_90 = local_80;
std::__cxx11::string::_M_construct((ulong)&local_90,'\x02');
/* try { // try from 0012cc86 to 0012cc99 has its CatchHandler @ 0012cf09 */
std::__ostream_insert<char,std::char_traits<char>>(param_1,"{\n",2);
iVar3 = 0;
for (plVar1 = *(long **)param_2; plVar1 != *(long **)(param_2 + 8); plVar1 = plVar1 + 1) {
iVar3 = iVar3 + (int)((ulong)(*(long *)(*plVar1 + 0x38) - *(long *)(*plVar1 + 0x30)) >> 3);
}
/* try { // try from 0012ccc8 to 0012ccdf has its CatchHandler @ 0012cf07 */
local_b0[0] = local_a0;
std::__cxx11::string::_M_construct<char_const*>(local_b0,"tests","");
/* try { // try from 0012cce0 to 0012ccfe has its CatchHandler @ 0012ceeb */
OutputJsonKey(param_1,(string *)&local_70,(string *)local_b0,iVar3,(string *)&local_90,true);
if (local_b0[0] != local_a0) {
operator_delete(local_b0[0],local_a0[0] + 1);
}
local_b0[0] = local_a0;
/* try { // try from 0012cd1e to 0012cd30 has its CatchHandler @ 0012cee9 */
std::__cxx11::string::_M_construct<char_const*>(local_b0,"name","");
/* try { // try from 0012cd3a to 0012cd51 has its CatchHandler @ 0012cee7 */
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>(local_50,"AllTests","");
/* try { // try from 0012cd52 to 0012cd73 has its CatchHandler @ 0012cecb */
OutputJsonKey(param_1,(string *)&local_70,(string *)local_b0,(string *)local_50,
(string *)&local_90,true);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (local_b0[0] != local_a0) {
operator_delete(local_b0[0],local_a0[0] + 1);
}
/* try { // try from 0012cdac to 0012cdf0 has its CatchHandler @ 0012cf10 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_90,local_88);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>(poVar2,(char *)local_70,local_68);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\": [\n",5);
if (*(long *)(param_2 + 8) != *(long *)param_2) {
uVar4 = 0;
do {
if (uVar4 != 0) {
/* try { // try from 0012ce08 to 0012ce26 has its CatchHandler @ 0012cf12 */
std::__ostream_insert<char,std::char_traits<char>>(param_1,",\n",2);
}
PrintJsonTestSuite(param_1,*(TestSuite **)(*(long *)param_2 + uVar4 * 8));
uVar4 = uVar4 + 1;
} while (uVar4 < (ulong)(*(long *)(param_2 + 8) - *(long *)param_2 >> 3));
}
/* try { // try from 0012ce3a to 0012ce8a has its CatchHandler @ 0012cf10 */
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\n",1);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_90,local_88);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]\n",2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"}\n",2);
if (local_90 != local_80) {
operator_delete(local_90,local_80[0] + 1);
}
if (local_70 != local_60) {
operator_delete(local_70,local_60[0] + 1);
}
return;
}
|
|
12,328
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
|
monkey531[P]llama/common/./json.hpp
|
void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0xb8c30
testb $0x1, %al
jne 0x1183d9
movq 0x8(%rsp), %rdi
callq 0x116c30
movq %rax, %rdi
movq (%rdi), %rax
leaq 0xb9530(%rip), %rsi # 0x1d18ff
movl $0x4, %edx
callq *0x8(%rax)
jmp 0x1183e9
movq 0x8(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
callq 0x118eb0
addq $0x28, %rsp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
movsd [rsp+28h+var_10], xmm0
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
movsd xmm0, [rsp+28h+var_10]; double
call _ZSt8isfinited; std::isfinite(double)
test al, 1
jnz short loc_1183D9
mov rdi, [rsp+28h+var_20]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
call qword ptr [rax+8]
jmp short loc_1183E9
loc_1183D9:
mov rdi, [rsp+28h+var_20]
movsd xmm0, [rsp+28h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEdSt17integral_constantIbLb1EE; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::dump_float(double,std::integral_constant<bool,true>)
loc_1183E9:
add rsp, 28h
retn
|
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
long long a1,
double a2)
{
long long v2; // rax
if ( std::isfinite(a2) )
return nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
a1,
a2);
v2 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
return (*(long long ( **)(long long, char *, long long))(*(_QWORD *)v2 + 8LL))(v2, "null", 4LL);
}
| |||
12,329
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
|
monkey531[P]llama/common/./json.hpp
|
void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x66f7d
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x541da(%rip), %rsi # 0xbb149
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0x671b7
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_66F7D
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_66F7D:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; this
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
|
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2));
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
|
dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x00166f7d
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x1bb149]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_00166f7d:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x001671b7
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,double param_1)
{
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x00166f7b. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x00166fa7. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
|
|
12,330
|
write_hook_for_undo_key_insert
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool write_hook_for_undo_key_insert(enum translog_record_type type,
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
struct st_msg_to_write_hook_for_undo_key *msg=
(struct st_msg_to_write_hook_for_undo_key *) hook_arg;
MARIA_SHARE *share= tbl_info->s;
if (msg->auto_increment > 0)
{
/*
Only reason to set it here is to have a mutex protect from checkpoint
reading at the same time (would see a corrupted value).
The purpose of the following code is to set auto_increment if the row
has a with auto_increment value higher than the current one. We also
want to be able to restore the old value, in case of rollback,
if no one else has tried to set the value.
The logic used is that we only restore the auto_increment value if
tbl_info->last_auto_increment == share->last_auto_increment
when it's time to do the rollback.
*/
DBUG_PRINT("info",("auto_inc: %lu new auto_inc: %lu",
(ulong)share->state.auto_increment,
(ulong)msg->auto_increment));
if (share->state.auto_increment < msg->auto_increment)
{
/* Remember the original value, in case of rollback */
tbl_info->last_auto_increment= share->last_auto_increment=
share->state.auto_increment;
share->state.auto_increment= msg->auto_increment;
}
else
{
/*
If the current value would have affected the original auto_increment
value, set it to an impossible value so that it's not restored on
rollback
*/
if (msg->auto_increment > share->last_auto_increment)
share->last_auto_increment= ~(ulonglong) 0;
}
}
return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg);
}
|
O0
|
c
|
write_hook_for_undo_key_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jbe 0x70690
jmp 0x7061b
jmp 0x7061d
movq -0x38(%rbp), %rax
movq 0xd8(%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x70668
movq -0x38(%rbp), %rax
movq 0xd8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x610(%rax)
movq -0x18(%rbp), %rax
movq %rcx, 0x3e8(%rax)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xd8(%rax)
jmp 0x7068e
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x610(%rcx), %rax
jbe 0x7068c
movq -0x38(%rbp), %rax
movq $-0x1, 0x610(%rax)
jmp 0x7068e
jmp 0x70690
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x70550
addq $0x40, %rsp
popq %rbp
retq
nop
|
write_hook_for_undo_key_insert:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
cmp qword ptr [rax+18h], 0
jbe short loc_70690
jmp short $+2
loc_7061B:
jmp short $+2
loc_7061D:
mov rax, [rbp+var_38]
mov rax, [rax+0D8h]
mov rcx, [rbp+var_30]
cmp rax, [rcx+18h]
jnb short loc_70668
mov rax, [rbp+var_38]
mov rcx, [rax+0D8h]
mov rax, [rbp+var_38]
mov [rax+610h], rcx
mov rax, [rbp+var_18]
mov [rax+3E8h], rcx
mov rax, [rbp+var_30]
mov rcx, [rax+18h]
mov rax, [rbp+var_38]
mov [rax+0D8h], rcx
jmp short loc_7068E
loc_70668:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov rcx, [rbp+var_38]
cmp rax, [rcx+610h]
jbe short loc_7068C
mov rax, [rbp+var_38]
mov qword ptr [rax+610h], 0FFFFFFFFFFFFFFFFh
loc_7068C:
jmp short $+2
loc_7068E:
jmp short $+2
loc_70690:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
call write_hook_for_undo_key
add rsp, 40h
pop rbp
retn
|
long long write_hook_for_undo_key_insert(unsigned int a1, long long a2, long long *a3, long long a4, long long a5)
{
long long v5; // rcx
long long v7; // [rsp+8h] [rbp-38h]
v7 = *a3;
if ( *(_QWORD *)(a5 + 24) )
{
if ( *(_QWORD *)(v7 + 216) >= *(_QWORD *)(a5 + 24) )
{
if ( *(_QWORD *)(a5 + 24) > *(_QWORD *)(v7 + 1552) )
*(_QWORD *)(v7 + 1552) = -1LL;
}
else
{
v5 = *(_QWORD *)(v7 + 216);
*(_QWORD *)(v7 + 1552) = v5;
a3[125] = v5;
*(_QWORD *)(v7 + 216) = *(_QWORD *)(a5 + 24);
}
}
return write_hook_for_undo_key(a1, a2, (long long)a3, a4, a5);
}
|
write_hook_for_undo_key_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x18],0x0
JBE 0x00170690
JMP 0x0017061b
LAB_0017061b:
JMP 0x0017061d
LAB_0017061d:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xd8]
MOV RCX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RCX + 0x18]
JNC 0x00170668
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0xd8]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x610],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x3e8],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0xd8],RCX
JMP 0x0017068e
LAB_00170668:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RCX + 0x610]
JBE 0x0017068c
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x610],-0x1
LAB_0017068c:
JMP 0x0017068e
LAB_0017068e:
JMP 0x00170690
LAB_00170690:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x00170550
ADD RSP,0x40
POP RBP
RET
|
void write_hook_for_undo_key_insert
(int4 param_1,int8 param_2,long *param_3,int8 param_4,long param_5)
{
long lVar1;
lVar1 = *param_3;
if (*(long *)(param_5 + 0x18) != 0) {
if (*(ulong *)(lVar1 + 0xd8) < *(ulong *)(param_5 + 0x18)) {
*(long *)(lVar1 + 0x610) = *(long *)(lVar1 + 0xd8);
param_3[0x7d] = *(long *)(lVar1 + 0xd8);
*(int8 *)(lVar1 + 0xd8) = *(int8 *)(param_5 + 0x18);
}
else if (*(ulong *)(lVar1 + 0x610) < *(ulong *)(param_5 + 0x18)) {
*(int8 *)(lVar1 + 0x610) = 0xffffffffffffffff;
}
}
write_hook_for_undo_key(param_1,param_2,param_3,param_4,param_5);
return;
}
|
|
12,331
|
mthd_stmt_get_param_metadata
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
my_bool mthd_stmt_get_param_metadata(MYSQL_STMT *stmt)
{
MYSQL_DATA *result;
if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0,
7 + ma_extended_type_info_rows(stmt->mysql))))
return(1);
free_rows(result);
return(0);
}
|
O0
|
c
|
mthd_stmt_get_param_metadata:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x5c370
movq -0x28(%rbp), %rdi
movl %eax, %edx
movq -0x20(%rbp), %rax
addl $0x7, %edx
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x5c34f
movb $0x1, -0x1(%rbp)
jmp 0x5c35c
movq -0x18(%rbp), %rdi
callq 0x48020
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mthd_stmt_get_param_metadata:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_extended_type_info_rows
mov rdi, [rbp+var_28]
mov edx, eax
mov rax, [rbp+var_20]
add edx, 7
xor ecx, ecx
mov esi, ecx
call rax
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_5C34F
mov [rbp+var_1], 1
jmp short loc_5C35C
loc_5C34F:
mov rdi, [rbp+var_18]
call free_rows
mov [rbp+var_1], 0
loc_5C35C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char mthd_stmt_get_param_metadata(long long a1)
{
int v1; // eax
long long v3; // [rsp+8h] [rbp-28h]
long long ( *v4)(long long, _QWORD, _QWORD); // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL);
v3 = *(_QWORD *)(a1 + 56);
v1 = ma_extended_type_info_rows(v3);
v5 = v4(v3, 0LL, (unsigned int)(v1 + 7));
if ( !v5 )
return 1;
free_rows(v5);
return 0;
}
|
mthd_stmt_get_param_metadata:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0015c370
MOV RDI,qword ptr [RBP + -0x28]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD EDX,0x7
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0015c34f
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015c35c
LAB_0015c34f:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00148020
MOV byte ptr [RBP + -0x1],0x0
LAB_0015c35c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
bool mthd_stmt_get_param_metadata(long param_1)
{
code *pcVar1;
int8 uVar2;
int iVar3;
long lVar4;
bool local_9;
pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x28);
uVar2 = *(int8 *)(param_1 + 0x38);
iVar3 = ma_extended_type_info_rows(*(int8 *)(param_1 + 0x38));
lVar4 = (*pcVar1)(uVar2,0,iVar3 + 7);
if (lVar4 != 0) {
free_rows(lVar4);
}
local_9 = lVar4 == 0;
return local_9;
}
|
|
12,332
|
testing::internal::CodePointToUtf8[abi:cxx11](unsigned int)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
std::string CodePointToUtf8(uint32_t code_point) {
if (code_point > kMaxCodePoint4) {
return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")";
}
char str[5]; // Big enough for the largest valid code point.
if (code_point <= kMaxCodePoint1) {
str[1] = '\0';
str[0] = static_cast<char>(code_point); // 0xxxxxxx
} else if (code_point <= kMaxCodePoint2) {
str[2] = '\0';
str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx
} else if (code_point <= kMaxCodePoint3) {
str[3] = '\0';
str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[0] = static_cast<char>(0xE0 | code_point); // 1110xxxx
} else { // code_point <= kMaxCodePoint4
str[4] = '\0';
str[3] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx
str[0] = static_cast<char>(0xF0 | code_point); // 11110xxx
}
return str;
}
|
O1
|
cpp
|
testing::internal::CodePointToUtf8[abi:cxx11](unsigned int):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
cmpl $0x200000, %esi # imm = 0x200000
jb 0x1f318
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x1f4c0
leaq 0x23a19(%rip), %rcx # 0x42cf8
movl $0x13, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8590
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1f356
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1f35d
cmpl $0x7f, %esi
ja 0x1f32c
movb $0x0, 0x9(%rsp)
movb %sil, 0x8(%rsp)
jmp 0x1f42b
cmpl $0x7ff, %esi # imm = 0x7FF
ja 0x1f3f8
movb $0x0, 0xa(%rsp)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x9(%rsp)
orb $-0x40, %al
jmp 0x1f427
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x23d9d(%rip), %rsi # 0x4311d
callq 0x8a50
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1f3a7
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1f3ad
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1f3db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f452
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x1f452
movl %esi, %ecx
shrl $0x6, %ecx
movl %esi, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movl %esi, %eax
shrl $0xc, %eax
andb $0x3f, %cl
orb $-0x80, %cl
cmpl $0xffff, %esi # imm = 0xFFFF
ja 0x1f45d
movb $0x0, 0xb(%rsp)
movb %dl, 0xa(%rsp)
movb %cl, 0x9(%rsp)
orb $-0x20, %al
movb %al, 0x8(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x8200
leaq (%rsp,%rax), %rdx
addq $0x8, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39504
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movb $0x0, 0xc(%rsp)
movb %dl, 0xb(%rsp)
movb %cl, 0xa(%rsp)
shrl $0x12, %esi
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x9(%rsp)
orb $-0x10, %sil
jmp 0x1f322
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1f49d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x1f49d
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f4b8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
|
_ZN7testing8internal15CodePointToUtf8B5cxx11Ej:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
cmp esi, 200000h
jb short loc_1F318
lea r14, [rsp+58h+var_30]
mov rdi, r14
call _ZN7testing8internal6String15FormatHexUInt32B5cxx11Ej; testing::internal::String::FormatHexUInt32(uint)
lea rcx, aInvalidUnicode; "(Invalid Unicode 0x"
mov r8d, 13h
mov rdi, r14
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r14, [rsp+58h+var_40]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_1F356
mov [rsp+58h+var_50], rdx
mov rdx, [rcx]
mov [rsp+58h+var_40], rdx
jmp short loc_1F35D
loc_1F318:
cmp esi, 7Fh
ja short loc_1F32C
mov byte ptr [rsp+58h+var_50+1], 0
loc_1F322:
mov byte ptr [rsp+58h+var_50], sil
jmp loc_1F42B
loc_1F32C:
cmp esi, 7FFh
ja loc_1F3F8
mov byte ptr [rsp+58h+var_50+2], 0
mov eax, esi
shr eax, 6
and sil, 3Fh
or sil, 80h
mov byte ptr [rsp+58h+var_50+1], sil
or al, 0C0h
jmp loc_1F427
loc_1F356:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_1F35D:
mov rdx, [rax+8]
lea rdi, [rsp+58h+var_50]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aTeardowntestsu+12h; ")"
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_1F3A7
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_1F3AD
loc_1F3A7:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_1F3AD:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r14
jz short loc_1F3DB
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F3DB:
lea rax, [rsp+58h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F452
mov rsi, [rsp+58h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F452
loc_1F3F8:
mov ecx, esi
shr ecx, 6
mov edx, esi
and dl, 3Fh
or dl, 80h
mov eax, esi
shr eax, 0Ch
and cl, 3Fh
or cl, 80h
cmp esi, 0FFFFh
ja short loc_1F45D
mov byte ptr [rsp+58h+var_50+3], 0
mov byte ptr [rsp+58h+var_50+2], dl
mov byte ptr [rsp+58h+var_50+1], cl
or al, 0E0h
loc_1F427:
mov byte ptr [rsp+58h+var_50], al
loc_1F42B:
lea rax, [rbx+10h]
mov [rbx], rax
lea r14, [rsp+58h+var_50]
mov rdi, r14
call _strlen
lea rdx, [rsp+rax+58h+var_58]
add rdx, 8
mov rdi, rbx
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_1F452:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
retn
loc_1F45D:
mov byte ptr [rsp+58h+var_50+4], 0
mov byte ptr [rsp+58h+var_50+3], dl
mov byte ptr [rsp+58h+var_50+2], cl
shr esi, 12h
and al, 3Fh
or al, 80h
mov byte ptr [rsp+58h+var_50+1], al
or sil, 0F0h
jmp loc_1F322
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_1F49D
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1F49D
mov rbx, rax
loc_1F49D:
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1F4B8
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1F4B8:
mov rdi, rbx
call __Unwind_Resume
|
CodePointToUtf8[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
CMP ESI,0x200000
JC 0x0011f318
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0011f4c0
LAB_0011f2d8:
LEA RCX,[0x142cf8]
MOV R8D,0x13
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00108590
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0011f356
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0011f35d
LAB_0011f318:
CMP ESI,0x7f
JA 0x0011f32c
MOV byte ptr [RSP + 0x9],0x0
LAB_0011f322:
MOV byte ptr [RSP + 0x8],SIL
JMP 0x0011f42b
LAB_0011f32c:
CMP ESI,0x7ff
JA 0x0011f3f8
MOV byte ptr [RSP + 0xa],0x0
MOV EAX,ESI
SHR EAX,0x6
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RSP + 0x9],SIL
OR AL,0xc0
JMP 0x0011f427
LAB_0011f356:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_0011f35d:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0011f379:
LEA RSI,[0x14311d]
CALL 0x00108a50
LAB_0011f385:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x0011f3a7
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x0011f3ad
LAB_0011f3a7:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0011f3ad:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x0011f3db
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_0011f3db:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011f452
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001084e0
JMP 0x0011f452
LAB_0011f3f8:
MOV ECX,ESI
SHR ECX,0x6
MOV EDX,ESI
AND DL,0x3f
OR DL,0x80
MOV EAX,ESI
SHR EAX,0xc
AND CL,0x3f
OR CL,0x80
CMP ESI,0xffff
JA 0x0011f45d
MOV byte ptr [RSP + 0xb],0x0
MOV byte ptr [RSP + 0xa],DL
MOV byte ptr [RSP + 0x9],CL
OR AL,0xe0
LAB_0011f427:
MOV byte ptr [RSP + 0x8],AL
LAB_0011f42b:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00108200
LEA RDX,[RSP + RAX*0x1]
ADD RDX,0x8
MOV RDI,RBX
MOV RSI,R14
CALL 0x00139504
LAB_0011f452:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_0011f45d:
MOV byte ptr [RSP + 0xc],0x0
MOV byte ptr [RSP + 0xb],DL
MOV byte ptr [RSP + 0xa],CL
SHR ESI,0x12
AND AL,0x3f
OR AL,0x80
MOV byte ptr [RSP + 0x9],AL
OR SIL,0xf0
JMP 0x0011f322
|
/* testing::internal::CodePointToUtf8[abi:cxx11](unsigned int) */
internal * __thiscall testing::internal::CodePointToUtf8_abi_cxx11_(internal *this,uint param_1)
{
long lVar1;
byte bVar2;
long *plVar3;
size_t sVar4;
int1 uVar5;
long *plVar6;
int1 uVar7;
long *local_50;
long local_48;
long local_40;
long lStack_38;
long *local_30 [2];
long local_20 [2];
if (0x1fffff < param_1) {
String::FormatHexUInt32_abi_cxx11_((uint)local_30);
/* try { // try from 0011f2d8 to 0011f2f0 has its CatchHandler @ 0011f49a */
plVar3 = (long *)std::__cxx11::string::replace((ulong)local_30,0,(char *)0x0,0x142cf8);
plVar6 = plVar3 + 2;
if ((long *)*plVar3 == plVar6) {
local_40 = *plVar6;
lStack_38 = plVar3[3];
local_50 = &local_40;
}
else {
local_40 = *plVar6;
local_50 = (long *)*plVar3;
}
local_48 = plVar3[1];
*plVar3 = (long)plVar6;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
/* try { // try from 0011f379 to 0011f384 has its CatchHandler @ 0011f47e */
plVar3 = (long *)std::__cxx11::string::append((char *)&local_50);
*(internal **)this = this + 0x10;
plVar6 = plVar3 + 2;
if ((long *)*plVar3 == plVar6) {
lVar1 = plVar3[3];
*(long *)(this + 0x10) = *plVar6;
*(long *)(this + 0x18) = lVar1;
}
else {
*(long **)this = (long *)*plVar3;
*(long *)(this + 0x10) = *plVar6;
}
*(long *)(this + 8) = plVar3[1];
*plVar3 = (long)plVar6;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
if (local_50 != &local_40) {
operator_delete(local_50,local_40 + 1);
}
if (local_30[0] == local_20) {
return this;
}
operator_delete(local_30[0],local_20[0] + 1);
return this;
}
if (param_1 < 0x80) {
local_50 = (long *)((ulong)local_50 & 0xffffffffffff0000);
LAB_0011f322:
local_50 = (long *)CONCAT71(local_50._1_7_,(char)param_1);
}
else {
uVar7 = (int1)param_1;
if (param_1 < 0x800) {
local_50._1_7_ = CONCAT61((int6)((ulong)local_50 >> 0x10),uVar7) & 0xffffffffff003f | 0x80;
bVar2 = (byte)(param_1 >> 6) | 0xc0;
}
else {
uVar5 = (int1)(param_1 >> 6);
bVar2 = (byte)(param_1 >> 0xc);
if (0xffff < param_1) {
local_50 = (long *)((ulong)(CONCAT61(CONCAT51(CONCAT41((int)((ulong)local_50 >> 0x20),uVar7)
,uVar5),bVar2) & 0xffffff003f3f3f | 0x808080)
<< 8);
param_1 = (uint)(byte)((byte)(param_1 >> 0x12) | 0xf0);
goto LAB_0011f322;
}
local_50._1_7_ =
CONCAT61(CONCAT51((int5)((ulong)local_50 >> 0x18),uVar7),uVar5) & 0xffffffff003f3f |
0x8080;
bVar2 = bVar2 | 0xe0;
}
local_50 = (long *)CONCAT71(local_50._1_7_,bVar2);
}
*(internal **)this = this + 0x10;
sVar4 = strlen((char *)&local_50);
std::__cxx11::string::_M_construct<char_const*>(this,&local_50,(long)&local_50 + sVar4);
return this;
}
|
||
12,333
|
mul_by_xy0_fp6x2
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/fp12_tower.c
|
static void mul_by_xy0_fp6x2(vec768fp6 ret, const vec384fp6 a,
const vec384fp6 b)
{
vec768x t0, t1;
vec384x aa, bb;
mul_fp2x2(t0, a[0], b[0]);
mul_fp2x2(t1, a[1], b[1]);
/* ret[0] = ((a1 + a2)*(b1 + 0) - a1*b1 - a2*0)*(u+1) + a0*b0
= (a1*0 + a2*b1)*(u+1) + a0*b0 */
mul_fp2x2(ret[1], a[2], b[1]); /* borrow ret[1] for a moment */
mul_by_u_plus_1_fp2x2(ret[0], ret[1]);
add_fp2x2(ret[0], ret[0], t0);
/* ret[1] = (a0 + a1)*(b0 + b1) - a0*b0 - a1*b1 + a2*0*(u+1)
= a0*b1 + a1*b0 + a2*0*(u+1) */
add_fp2(aa, a[0], a[1]);
add_fp2(bb, b[0], b[1]);
mul_fp2x2(ret[1], aa, bb);
sub_fp2x2(ret[1], ret[1], t0);
sub_fp2x2(ret[1], ret[1], t1);
/* ret[2] = (a0 + a2)*(b0 + 0) - a0*b0 - a2*0 + a1*b1
= a0*0 + a2*b0 + a1*b1 */
mul_fp2x2(ret[2], a[2], b[0]);
add_fp2x2(ret[2], ret[2], t1);
}
|
O3
|
c
|
mul_by_xy0_fp6x2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movq %rdx, %r15
movq %rdx, -0x30(%rbp)
movq %rsi, %r12
movq %rdi, %r14
leaq 0x24a8a(%rip), %rbx # 0x8cca0
leaq -0x110(%rbp), %rdi
movq %rbx, %rcx
callq 0x73e20
leaq 0x60(%r12), %rsi
movq %rsi, -0x48(%rbp)
movq %r12, %r13
movq %r12, -0x38(%rbp)
addq $0x60, %r15
movq %r15, -0x40(%rbp)
leaq -0x230(%rbp), %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x73e20
movl $0xc0, %esi
leaq (%r14,%rsi), %r12
addq %r13, %rsi
movq %rsi, -0x50(%rbp)
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x73e20
leaq 0x120(%r14), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x70b00
leaq 0x60(%r14), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x709e0
movq %r14, %rdi
movq %r14, %rsi
leaq -0x110(%rbp), %rdx
movq %rbx, %rcx
callq 0x709e0
leaq -0xb0(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq 0x709e0
leaq -0x170(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rcx
callq 0x6f720
leaq -0x290(%rbp), %r13
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rcx
callq 0x6f720
movq %r12, %rdi
leaq -0x170(%rbp), %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x73e20
movq %r12, %rdi
movq %r12, %rsi
leaq -0x110(%rbp), %rdx
movq %rbx, %rcx
callq 0x70b00
movq %r15, %rdi
movq %r15, %rsi
leaq -0xb0(%rbp), %rdx
movq %rbx, %rcx
callq 0x70b00
movq %r12, %rdi
movq %r12, %rsi
leaq -0x230(%rbp), %r13
movq %r13, %rdx
movq %rbx, %rcx
callq 0x70b00
leaq -0x1d0(%rbp), %r12
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x70b00
leaq 0x180(%r14), %r15
movq %r15, %rdi
movq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
callq 0x73e20
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x709e0
addq $0x1e0, %r14 # imm = 0x1E0
movq %r14, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x709e0
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mul_by_xy0_fp6x2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov r15, rdx
mov [rbp+var_30], rdx
mov r12, rsi
mov r14, rdi
lea rbx, BLS12_381_P
lea rdi, [rbp+var_110]
mov rcx, rbx
call mul_382x
lea rsi, [r12+60h]
mov [rbp+var_48], rsi
mov r13, r12
mov [rbp+var_38], r12
add r15, 60h ; '`'
mov [rbp+var_40], r15
lea rdi, [rbp+var_230]
mov rdx, r15
mov rcx, rbx
call mul_382x
mov esi, 0C0h
lea r12, [r14+rsi]
add rsi, r13
mov [rbp+var_50], rsi
mov rdi, r12
mov rdx, r15
mov rcx, rbx
call mul_382x
lea r15, [r14+120h]
mov rdi, r14
mov rsi, r12
mov rdx, r15
mov rcx, rbx
call _sub_mod_384x384
lea r13, [r14+60h]
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, rbx
call add_mod_384x384
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_110]
mov rcx, rbx
call add_mod_384x384
lea rdx, [rbp+var_B0]
mov rdi, r13
mov rsi, r13
mov rcx, rbx
call add_mod_384x384
lea rdi, [rbp+var_170]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
mov rcx, rbx
call add_mod_384x
lea r13, [rbp+var_290]
mov rdi, r13
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_40]
mov rcx, rbx
call add_mod_384x
mov rdi, r12
lea rsi, [rbp+var_170]
mov rdx, r13
mov rcx, rbx
call mul_382x
mov rdi, r12
mov rsi, r12
lea rdx, [rbp+var_110]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r15
mov rsi, r15
lea rdx, [rbp+var_B0]
mov rcx, rbx
call _sub_mod_384x384
mov rdi, r12
mov rsi, r12
lea r13, [rbp+var_230]
mov rdx, r13
mov rcx, rbx
call _sub_mod_384x384
lea r12, [rbp+var_1D0]
mov rdi, r15
mov rsi, r15
mov rdx, r12
mov rcx, rbx
call _sub_mod_384x384
lea r15, [r14+180h]
mov rdi, r15
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_30]
mov rcx, rbx
call mul_382x
mov rdi, r15
mov rsi, r15
mov rdx, r13
mov rcx, rbx
call add_mod_384x384
add r14, 1E0h
mov rdi, r14
mov rsi, r14
mov rdx, r12
mov rcx, rbx
call add_mod_384x384
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mul_by_xy0_fp6x2(long long a1, long long a2, long long a3)
{
long long v3; // r15
_BYTE v6[96]; // [rsp+0h] [rbp-290h] BYREF
_BYTE v7[96]; // [rsp+60h] [rbp-230h] BYREF
_BYTE v8[96]; // [rsp+C0h] [rbp-1D0h] BYREF
_BYTE v9[96]; // [rsp+120h] [rbp-170h] BYREF
_BYTE v10[96]; // [rsp+180h] [rbp-110h] BYREF
_BYTE v11[96]; // [rsp+1E0h] [rbp-B0h] BYREF
long long v12; // [rsp+240h] [rbp-50h]
long long v13; // [rsp+248h] [rbp-48h]
long long v14; // [rsp+250h] [rbp-40h]
long long v15; // [rsp+258h] [rbp-38h]
long long v16; // [rsp+260h] [rbp-30h]
v3 = a3;
v16 = a3;
mul_382x(v10, a2, a3, &BLS12_381_P);
v13 = a2 + 96;
v15 = a2;
v3 += 96LL;
v14 = v3;
mul_382x(v7, a2 + 96, v3, &BLS12_381_P);
v12 = a2 + 192;
mul_382x(a1 + 192, a2 + 192, v3, &BLS12_381_P);
sub_mod_384x384(a1, a1 + 192, a1 + 288, &BLS12_381_P);
add_mod_384x384(a1 + 96, a1 + 192, a1 + 288, &BLS12_381_P);
add_mod_384x384(a1, a1, v10, &BLS12_381_P);
add_mod_384x384(a1 + 96, a1 + 96, v11, &BLS12_381_P);
add_mod_384x(v9, v15, v13, &BLS12_381_P);
add_mod_384x(v6, v16, v14, &BLS12_381_P);
mul_382x(a1 + 192, v9, v6, &BLS12_381_P);
sub_mod_384x384(a1 + 192, a1 + 192, v10, &BLS12_381_P);
sub_mod_384x384(a1 + 288, a1 + 288, v11, &BLS12_381_P);
sub_mod_384x384(a1 + 192, a1 + 192, v7, &BLS12_381_P);
sub_mod_384x384(a1 + 288, a1 + 288, v8, &BLS12_381_P);
mul_382x(a1 + 384, v12, v16, &BLS12_381_P);
add_mod_384x384(a1 + 384, a1 + 384, v7, &BLS12_381_P);
return add_mod_384x384(a1 + 480, a1 + 480, v8, &BLS12_381_P);
}
|
mul_by_xy0_fp6x2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV R15,RDX
MOV qword ptr [RBP + -0x30],RDX
MOV R12,RSI
MOV R14,RDI
LEA RBX,[0x18cca0]
LEA RDI,[RBP + -0x110]
MOV RCX,RBX
CALL 0x00173e20
LEA RSI,[R12 + 0x60]
MOV qword ptr [RBP + -0x48],RSI
MOV R13,R12
MOV qword ptr [RBP + -0x38],R12
ADD R15,0x60
MOV qword ptr [RBP + -0x40],R15
LEA RDI,[RBP + -0x230]
MOV RDX,R15
MOV RCX,RBX
CALL 0x00173e20
MOV ESI,0xc0
LEA R12,[R14 + RSI*0x1]
ADD RSI,R13
MOV qword ptr [RBP + -0x50],RSI
MOV RDI,R12
MOV RDX,R15
MOV RCX,RBX
CALL 0x00173e20
LEA R15,[R14 + 0x120]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
MOV RCX,RBX
CALL 0x00170b00
LEA R13,[R14 + 0x60]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,RBX
CALL 0x001709e0
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x110]
MOV RCX,RBX
CALL 0x001709e0
LEA RDX,[RBP + -0xb0]
MOV RDI,R13
MOV RSI,R13
MOV RCX,RBX
CALL 0x001709e0
LEA RDI,[RBP + -0x170]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,RBX
CALL 0x0016f720
LEA R13,[RBP + -0x290]
MOV RDI,R13
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,RBX
CALL 0x0016f720
MOV RDI,R12
LEA RSI,[RBP + -0x170]
MOV RDX,R13
MOV RCX,RBX
CALL 0x00173e20
MOV RDI,R12
MOV RSI,R12
LEA RDX,[RBP + -0x110]
MOV RCX,RBX
CALL 0x00170b00
MOV RDI,R15
MOV RSI,R15
LEA RDX,[RBP + -0xb0]
MOV RCX,RBX
CALL 0x00170b00
MOV RDI,R12
MOV RSI,R12
LEA R13,[RBP + -0x230]
MOV RDX,R13
MOV RCX,RBX
CALL 0x00170b00
LEA R12,[RBP + -0x1d0]
MOV RDI,R15
MOV RSI,R15
MOV RDX,R12
MOV RCX,RBX
CALL 0x00170b00
LEA R15,[R14 + 0x180]
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,RBX
CALL 0x00173e20
MOV RDI,R15
MOV RSI,R15
MOV RDX,R13
MOV RCX,RBX
CALL 0x001709e0
ADD R14,0x1e0
MOV RDI,R14
MOV RSI,R14
MOV RDX,R12
MOV RCX,RBX
CALL 0x001709e0
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void mul_by_xy0_fp6x2(long param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
long lVar3;
int1 local_298 [96];
int1 local_238 [96];
int1 local_1d8 [96];
int1 local_178 [96];
int1 local_118 [96];
int1 local_b8 [96];
long local_58;
long local_50;
long local_48;
long local_40;
long local_38;
local_38 = param_3;
mul_382x(local_118,param_2,param_3,BLS12_381_P);
local_50 = param_2 + 0x60;
param_3 = param_3 + 0x60;
local_48 = param_3;
local_40 = param_2;
mul_382x(local_238,local_50,param_3,BLS12_381_P);
lVar3 = param_1 + 0xc0;
local_58 = param_2 + 0xc0;
mul_382x(lVar3,local_58,param_3,BLS12_381_P);
lVar2 = param_1 + 0x120;
sub_mod_384x384(param_1,lVar3,lVar2,BLS12_381_P);
lVar1 = param_1 + 0x60;
add_mod_384x384(lVar1,lVar3,lVar2,BLS12_381_P);
add_mod_384x384(param_1,param_1,local_118,BLS12_381_P);
add_mod_384x384(lVar1,lVar1,local_b8,BLS12_381_P);
add_mod_384x(local_178,local_40,local_50,BLS12_381_P);
add_mod_384x(local_298,local_38,local_48,BLS12_381_P);
mul_382x(lVar3,local_178,local_298,BLS12_381_P);
sub_mod_384x384(lVar3,lVar3,local_118,BLS12_381_P);
sub_mod_384x384(lVar2,lVar2,local_b8,BLS12_381_P);
sub_mod_384x384(lVar3,lVar3,local_238,BLS12_381_P);
sub_mod_384x384(lVar2,lVar2,local_1d8,BLS12_381_P);
lVar1 = param_1 + 0x180;
mul_382x(lVar1,local_58,local_38,BLS12_381_P);
add_mod_384x384(lVar1,lVar1,local_238,BLS12_381_P);
add_mod_384x384(param_1 + 0x1e0,param_1 + 0x1e0,local_1d8,BLS12_381_P);
return;
}
|
|
12,334
|
llama_data_read::read_kv_cache_meta(llama_context*, unsigned int, int)
|
monkey531[P]llama/src/llama-context.cpp
|
bool read_kv_cache_meta(struct llama_context * ctx, uint32_t cell_count, llama_seq_id dest_seq_id = -1) {
struct llama_kv_cache & kv_self = ctx->kv_self;
if (dest_seq_id != -1) {
// single sequence
llama_kv_cache_seq_rm(kv_self, dest_seq_id, -1, -1);
llama_ubatch batch = ctx->sbatch.reserve_ubatch(cell_count, /* has_embd */ false);
batch.n_tokens = cell_count;
batch.n_seq_tokens = cell_count;
batch.n_seqs = 1;
for (uint32_t i = 0; i < cell_count; ++i) {
llama_pos pos;
uint32_t n_seq_id;
read_to(&pos, sizeof(pos));
read_to(&n_seq_id, sizeof(n_seq_id));
if (n_seq_id != 0) {
LLAMA_LOG_ERROR("%s: invalid seq_id-agnostic kv cell\n", __func__);
return false;
}
batch.pos[i] = pos;
}
batch.n_seq_id[0] = 1;
batch.seq_id[0] = &dest_seq_id;
if (!llama_kv_cache_find_slot(kv_self, batch)) {
LLAMA_LOG_ERROR("%s: failed to find available cells in kv cache\n", __func__);
return false;
}
// DEBUG CHECK: kv_self.head should be our first cell, kv_self.head + cell_count - 1 should be our last cell (verify seq_id and pos values)
// Assume that this is one contiguous block of cells
GGML_ASSERT(kv_self.head + cell_count <= kv_self.size);
GGML_ASSERT(kv_self.cells[kv_self.head].pos == batch.pos[0]);
GGML_ASSERT(kv_self.cells[kv_self.head + cell_count - 1].pos == batch.pos[cell_count - 1]);
GGML_ASSERT(kv_self.cells[kv_self.head].has_seq_id(dest_seq_id));
GGML_ASSERT(kv_self.cells[kv_self.head + cell_count - 1].has_seq_id(dest_seq_id));
} else {
// whole KV cache restore
if (cell_count > kv_self.size) {
LLAMA_LOG_ERROR("%s: not enough cells in kv cache\n", __func__);
return false;
}
llama_kv_cache_clear(kv_self);
for (uint32_t i = 0; i < cell_count; ++i) {
llama_kv_cell & cell = kv_self.cells[i];
llama_pos pos;
uint32_t n_seq_id;
read_to(&pos, sizeof(pos));
read_to(&n_seq_id, sizeof(n_seq_id));
cell.pos = pos;
for (uint32_t j = 0; j < n_seq_id; ++j) {
llama_seq_id seq_id;
read_to(&seq_id, sizeof(seq_id));
if (seq_id < 0 || (uint32_t) seq_id >= llama_n_seq_max(ctx)) {
LLAMA_LOG_ERROR("%s: invalid seq_id, %d is out of range [0, %u)\n", __func__, seq_id, llama_n_seq_max(ctx));
return false;
}
cell.seq_id.insert(seq_id);
if (kv_self.recurrent) {
int32_t & tail = kv_self.cells[seq_id].tail;
if (tail != -1) {
LLAMA_LOG_ERROR("%s: duplicate tail for seq_id %d in cell %d and %d\n", __func__, seq_id, i, tail);
return false;
}
tail = i;
}
}
}
kv_self.head = 0;
kv_self.used = cell_count;
}
if (kv_self.recurrent) {
for (uint32_t i = 0; i < cell_count; ++i) {
uint32_t cell_id = kv_self.head + i;
// make sure the recurrent states will keep their restored state
kv_self.cells[cell_id].src = cell_id;
}
}
return true;
}
|
O3
|
cpp
|
llama_data_read::read_kv_cache_meta(llama_context*, unsigned int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r15
movl %ecx, 0x14(%rsp)
leaq 0x158(%rsi), %rdi
cmpl $-0x1, %ecx
je 0xa15e5
movq %rdi, 0x20(%rsp)
movl %ecx, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x6ab20
leaq 0x60(%r14), %rsi
movl %r12d, %r13d
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x6a260
movl %r12d, 0x4(%rbx)
movl %r12d, 0x8(%rbx)
movl $0x1, 0xc(%rbx)
movq %r12, 0x18(%rsp)
testl %r12d, %r12d
je 0xa14c4
xorl %r12d, %r12d
leaq 0xc(%rsp), %rbp
leaq 0x10(%rsp), %rbx
movq (%r15), %rax
movl $0x4, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq *0x8(%rax)
movq (%r15), %rax
movl $0x4, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq *0x8(%rax)
cmpl $0x0, 0x10(%rsp)
jne 0xa1618
movl 0xc(%rsp), %eax
movq 0x48(%rsp), %rcx
movl %eax, (%rcx,%r12,4)
incq %r12
cmpq %r12, %r13
jne 0xa1482
leaq 0x28(%rsp), %rsi
movq 0x28(%rsi), %rax
movl $0x1, (%rax)
movq 0x30(%rsi), %rax
leaq 0x14(%rsp), %rcx
movq %rcx, (%rax)
movq 0x20(%rsp), %rdi
callq 0x6a120
testb $0x1, %dl
je 0xa160f
movl 0x160(%r14), %eax
movq 0x18(%rsp), %r10
leal (%rax,%r10), %edx
cmpl 0x164(%r14), %edx
ja 0xa17ee
movq 0x178(%r14), %rcx
movq %rax, %rsi
shlq $0x6, %rsi
movl (%rcx,%rsi), %r8d
movq 0x48(%rsp), %rdi
cmpl (%rdi), %r8d
jne 0xa180a
decl %edx
shlq $0x6, %rdx
movl (%rcx,%rdx), %r8d
leal -0x1(%r10), %r9d
cmpl (%rdi,%r9,4), %r8d
jne 0xa1826
addq %rcx, %rsi
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0xa17d2
addq %rdx, %rcx
addq $0x18, %rsi
movl 0x14(%rsp), %edx
movq %rsi, %r8
xorl %r9d, %r9d
cmpl %edx, 0x20(%rdi)
setl %r9b
cmovgeq %rdi, %r8
movq 0x10(%rdi,%r9,8), %rdi
testq %rdi, %rdi
jne 0xa1565
cmpq %rsi, %r8
je 0xa17d2
cmpl 0x20(%r8), %edx
jl 0xa17d2
movq 0x20(%rcx), %rsi
testq %rsi, %rsi
je 0xa15c6
addq $0x18, %rcx
movq %rcx, %rdi
xorl %r8d, %r8d
cmpl %edx, 0x20(%rsi)
setl %r8b
cmovgeq %rsi, %rdi
movq 0x10(%rsi,%r8,8), %rsi
testq %rsi, %rsi
jne 0xa15a0
cmpq %rcx, %rdi
je 0xa15c6
cmpl 0x20(%rdi), %edx
jge 0xa1753
leaq 0x72dfb(%rip), %rdi # 0x1143c8
leaq 0x6edf0(%rip), %rdx # 0x1103c4
leaq 0x7381f(%rip), %rcx # 0x114dfa
movl $0x49b, %esi # imm = 0x49B
jmp 0xa1840
cmpl %r12d, 0x164(%r14)
jae 0xa1639
leaq 0x7384a(%rip), %rsi # 0x114e3f
leaq 0x736df(%rip), %rdx # 0x114cdb
xorl %ebp, %ebp
movl $0x4, %edi
xorl %eax, %eax
callq 0x67d20
jmp 0xa1780
leaq 0x736d8(%rip), %rsi # 0x114cee
jmp 0xa161f
leaq 0x73697(%rip), %rsi # 0x114cb6
leaq 0x736b5(%rip), %rdx # 0x114cdb
movl $0x4, %edi
xorl %eax, %eax
callq 0x67d20
xorl %ebp, %ebp
jmp 0xa1780
callq 0x64770
movq %r12, 0x18(%rsp)
testl %r12d, %r12d
je 0xa173a
movl 0x18(%rsp), %eax
movq %rax, 0x20(%rsp)
xorl %r12d, %r12d
leaq 0x28(%rsp), %rsi
leaq 0xc(%rsp), %r13
movq 0x178(%r14), %rbp
movq %r12, %rbx
shlq $0x6, %rbx
movq (%r15), %rax
movl $0x4, %edx
movq %r15, %rdi
callq *0x8(%rax)
movq (%r15), %rax
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
callq *0x8(%rax)
movl 0x28(%rsp), %eax
movl %eax, (%rbp,%rbx)
cmpl $0x0, 0xc(%rsp)
leaq 0x10(%rsp), %r13
je 0xa1722
addq %rbx, %rbp
addq $0x10, %rbp
xorl %ebx, %ebx
movq (%r15), %rax
movl $0x4, %edx
movq %r15, %rdi
movq %r13, %rsi
callq *0x8(%rax)
movl 0x10(%rsp), %ecx
movl 0x164(%r14), %r8d
testl %ecx, %ecx
js 0xa1791
cmpl %r8d, %ecx
jae 0xa1791
movq %rbp, %rdi
movq %r13, %rsi
callq 0x68370
cmpb $0x1, 0x15a(%r14)
jne 0xa171a
movslq 0x10(%rsp), %rcx
movq 0x178(%r14), %rax
movq %rcx, %rdx
shlq $0x6, %rdx
movl 0xc(%rax,%rdx), %r9d
cmpl $-0x1, %r9d
jne 0xa17b0
addq %rdx, %rax
addq $0xc, %rax
movl %r12d, (%rax)
incl %ebx
cmpl 0xc(%rsp), %ebx
jb 0xa16ac
incq %r12
cmpq 0x20(%rsp), %r12
leaq 0x28(%rsp), %rsi
leaq 0xc(%rsp), %r13
jne 0xa1662
movl $0x0, 0x160(%r14)
movq 0x18(%rsp), %r10
movl %r10d, 0x168(%r14)
xorl %eax, %eax
movb $0x1, %bpl
testl %r10d, %r10d
je 0xa1780
cmpb $0x0, 0x15a(%r14)
je 0xa1780
movq 0x178(%r14), %rcx
movl %r10d, %edx
movl %eax, %esi
shlq $0x6, %rsi
movl %eax, 0x8(%rcx,%rsi)
incl %eax
decq %rdx
jne 0xa176f
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x736c9(%rip), %rsi # 0x114e61
leaq 0x7353c(%rip), %rdx # 0x114cdb
movl $0x4, %edi
xorl %eax, %eax
callq 0x67d20
jmp 0xa1632
leaq 0x736da(%rip), %rsi # 0x114e91
leaq 0x7351d(%rip), %rdx # 0x114cdb
movl $0x4, %edi
movl %r12d, %r8d
xorl %eax, %eax
callq 0x67d20
jmp 0xa1632
leaq 0x72bef(%rip), %rdi # 0x1143c8
leaq 0x6ebe4(%rip), %rdx # 0x1103c4
leaq 0x735df(%rip), %rcx # 0x114dc6
movl $0x49a, %esi # imm = 0x49A
jmp 0xa1840
leaq 0x72bd3(%rip), %rdi # 0x1143c8
leaq 0x6ebc8(%rip), %rdx # 0x1103c4
leaq 0x7351b(%rip), %rcx # 0x114d1e
movl $0x497, %esi # imm = 0x497
jmp 0xa1840
leaq 0x72bb7(%rip), %rdi # 0x1143c8
leaq 0x6ebac(%rip), %rdx # 0x1103c4
leaq 0x73529(%rip), %rcx # 0x114d48
movl $0x498, %esi # imm = 0x498
jmp 0xa1840
leaq 0x72b9b(%rip), %rdi # 0x1143c8
leaq 0x6eb90(%rip), %rdx # 0x1103c4
leaq 0x7353d(%rip), %rcx # 0x114d78
movl $0x499, %esi # imm = 0x499
xorl %eax, %eax
callq 0x6af70
nop
|
_ZN15llama_data_read18read_kv_cache_metaEP13llama_contextji:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12d, edx
mov r14, rsi
mov r15, rdi
mov [rsp+98h+var_84], ecx
lea rdi, [rsi+158h]
cmp ecx, 0FFFFFFFFh
jz loc_A15E5
mov [rsp+98h+var_78], rdi
mov esi, ecx
mov edx, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
call __Z21llama_kv_cache_seq_rmR14llama_kv_cacheiii; llama_kv_cache_seq_rm(llama_kv_cache &,int,int,int)
lea rsi, [r14+60h]; unsigned __int64
mov r13d, r12d
lea rbx, [rsp+98h+var_70]
mov rdi, rbx; this
mov rdx, r13; bool
xor ecx, ecx
call __ZN12llama_sbatch14reserve_ubatchEmb; llama_sbatch::reserve_ubatch(ulong,bool)
mov [rbx+4], r12d
mov [rbx+8], r12d
mov dword ptr [rbx+0Ch], 1
mov [rsp+98h+var_80], r12
test r12d, r12d
jz short loc_A14C4
xor r12d, r12d
lea rbp, [rsp+98h+var_8C]
lea rbx, [rsp+98h+var_88]
loc_A1482:
mov rax, [r15]
mov edx, 4
mov rdi, r15
mov rsi, rbp
call qword ptr [rax+8]
mov rax, [r15]
mov edx, 4
mov rdi, r15
mov rsi, rbx
call qword ptr [rax+8]
cmp [rsp+98h+var_88], 0
jnz loc_A1618
mov eax, [rsp+98h+var_8C]
mov rcx, [rsp+98h+var_50]
mov [rcx+r12*4], eax
inc r12
cmp r13, r12
jnz short loc_A1482
loc_A14C4:
lea rsi, [rsp+98h+var_70]
mov rax, [rsi+28h]
mov dword ptr [rax], 1
mov rax, [rsi+30h]
lea rcx, [rsp+98h+var_84]
mov [rax], rcx
mov rdi, [rsp+98h+var_78]
call __Z24llama_kv_cache_find_slotR14llama_kv_cacheRK12llama_ubatch; llama_kv_cache_find_slot(llama_kv_cache &,llama_ubatch const&)
test dl, 1
jz loc_A160F
mov eax, [r14+160h]
mov r10, [rsp+98h+var_80]
lea edx, [rax+r10]
cmp edx, [r14+164h]
ja loc_A17EE
mov rcx, [r14+178h]
mov rsi, rax
shl rsi, 6
mov r8d, [rcx+rsi]
mov rdi, [rsp+98h+var_50]
cmp r8d, [rdi]
jnz loc_A180A
dec edx
shl rdx, 6
mov r8d, [rcx+rdx]
lea r9d, [r10-1]
cmp r8d, [rdi+r9*4]
jnz loc_A1826
add rsi, rcx
mov rdi, [rsi+20h]
test rdi, rdi
jz loc_A17D2
add rcx, rdx
add rsi, 18h
mov edx, [rsp+98h+var_84]
mov r8, rsi
loc_A1565:
xor r9d, r9d
cmp [rdi+20h], edx
setl r9b
cmovge r8, rdi
mov rdi, [rdi+r9*8+10h]
test rdi, rdi
jnz short loc_A1565
cmp r8, rsi
jz loc_A17D2
cmp edx, [r8+20h]
jl loc_A17D2
mov rsi, [rcx+20h]
test rsi, rsi
jz short loc_A15C6
add rcx, 18h
mov rdi, rcx
loc_A15A0:
xor r8d, r8d
cmp [rsi+20h], edx
setl r8b
cmovge rdi, rsi
mov rsi, [rsi+r8*8+10h]
test rsi, rsi
jnz short loc_A15A0
cmp rdi, rcx
jz short loc_A15C6
cmp edx, [rdi+20h]
jge loc_A1753
loc_A15C6:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKvSelfCellsKvS; "kv_self.cells[kv_self.head + cell_count"...
mov esi, 49Bh
jmp loc_A1840
loc_A15E5:
cmp [r14+164h], r12d
jnb short loc_A1639
lea rsi, aSNotEnoughCell; "%s: not enough cells in kv cache\n"
lea rdx, aReadKvCacheMet; "read_kv_cache_meta"
xor ebp, ebp
mov edi, 4
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
jmp loc_A1780
loc_A160F:
lea rsi, aSFailedToFindA; "%s: failed to find available cells in k"...
jmp short loc_A161F
loc_A1618:
lea rsi, aSInvalidSeqIdA; "%s: invalid seq_id-agnostic kv cell\n"
loc_A161F:
lea rdx, aReadKvCacheMet; "read_kv_cache_meta"
mov edi, 4
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
loc_A1632:
xor ebp, ebp
jmp loc_A1780
loc_A1639:
call __Z20llama_kv_cache_clearR14llama_kv_cache; llama_kv_cache_clear(llama_kv_cache &)
mov [rsp+98h+var_80], r12
test r12d, r12d
jz loc_A173A
mov eax, dword ptr [rsp+98h+var_80]
mov [rsp+98h+var_78], rax
xor r12d, r12d
lea rsi, [rsp+98h+var_70]
lea r13, [rsp+98h+var_8C]
loc_A1662:
mov rbp, [r14+178h]
mov rbx, r12
shl rbx, 6
mov rax, [r15]
mov edx, 4
mov rdi, r15
call qword ptr [rax+8]
mov rax, [r15]
mov edx, 4
mov rdi, r15
mov rsi, r13
call qword ptr [rax+8]
mov eax, [rsp+98h+var_70]
mov [rbp+rbx+0], eax
cmp [rsp+98h+var_8C], 0
lea r13, [rsp+98h+var_88]
jz short loc_A1722
add rbp, rbx
add rbp, 10h
xor ebx, ebx
loc_A16AC:
mov rax, [r15]
mov edx, 4
mov rdi, r15
mov rsi, r13
call qword ptr [rax+8]
mov ecx, [rsp+98h+var_88]
mov r8d, [r14+164h]
test ecx, ecx
js loc_A1791
cmp ecx, r8d
jnb loc_A1791
mov rdi, rbp
mov rsi, r13
call __ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueIRKiEESt4pairISt17_Rb_tree_iteratorIiEbEOT_; std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_insert_unique<int const&>(int const&)
cmp byte ptr [r14+15Ah], 1
jnz short loc_A171A
movsxd rcx, [rsp+98h+var_88]
mov rax, [r14+178h]
mov rdx, rcx
shl rdx, 6
mov r9d, [rax+rdx+0Ch]
cmp r9d, 0FFFFFFFFh
jnz loc_A17B0
add rax, rdx
add rax, 0Ch
mov [rax], r12d
loc_A171A:
inc ebx
cmp ebx, [rsp+98h+var_8C]
jb short loc_A16AC
loc_A1722:
inc r12
cmp r12, [rsp+98h+var_78]
lea rsi, [rsp+98h+var_70]
lea r13, [rsp+98h+var_8C]
jnz loc_A1662
loc_A173A:
mov dword ptr [r14+160h], 0
mov r10, [rsp+98h+var_80]
mov [r14+168h], r10d
xor eax, eax
loc_A1753:
mov bpl, 1
test r10d, r10d
jz short loc_A1780
cmp byte ptr [r14+15Ah], 0
jz short loc_A1780
mov rcx, [r14+178h]
mov edx, r10d
loc_A176F:
mov esi, eax
shl rsi, 6
mov [rcx+rsi+8], eax
inc eax
dec rdx
jnz short loc_A176F
loc_A1780:
mov eax, ebp
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A1791:
lea rsi, aSInvalidSeqIdD; "%s: invalid seq_id, %d is out of range "...
lea rdx, aReadKvCacheMet; "read_kv_cache_meta"
mov edi, 4
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
jmp loc_A1632
loc_A17B0:
lea rsi, aSDuplicateTail; "%s: duplicate tail for seq_id %d in cel"...
lea rdx, aReadKvCacheMet; "read_kv_cache_meta"
mov edi, 4
mov r8d, r12d
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
jmp loc_A1632
loc_A17D2:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKvSelfCellsKvS_0; "kv_self.cells[kv_self.head].has_seq_id("...
mov esi, 49Ah
jmp short loc_A1840
loc_A17EE:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKvSelfHeadCell; "kv_self.head + cell_count <= kv_self.si"...
mov esi, 497h
jmp short loc_A1840
loc_A180A:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKvSelfCellsKvS_1; "kv_self.cells[kv_self.head].pos == batc"...
mov esi, 498h
jmp short loc_A1840
loc_A1826:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKvSelfCellsKvS_2; "kv_self.cells[kv_self.head + cell_count"...
mov esi, 499h
loc_A1840:
xor eax, eax
call _ggml_abort
nop
|
long long llama_data_read::read_kv_cache_meta(
llama_data_read *this,
llama_context *a2,
unsigned int a3,
int a4,
int a5,
int a6)
{
unsigned int *v6; // rbp
long long v7; // r12
char *v10; // rdi
long long v11; // r13
long long v12; // r12
int v13; // ecx
int v14; // r8d
int v15; // r9d
char v16; // dl
long long v17; // rax
unsigned int v18; // r10d
long long v19; // rcx
unsigned long long v20; // rdx
long long v21; // rsi
long long v22; // rdi
long long v23; // rcx
long long v24; // rsi
long long v25; // r8
long long v26; // rsi
long long v27; // rcx
long long v28; // rdi
llama_context *v29; // rsi
unsigned int v30; // edx
const char *v31; // rsi
long long v32; // r12
int v33; // ebx
int v34; // r9d
unsigned int v35; // r8d
long long v36; // rax
long long v37; // rdx
int v38; // r9d
long long v39; // rcx
long long v40; // rdx
unsigned int v42; // [rsp+Ch] [rbp-8Ch] BYREF
int v43; // [rsp+10h] [rbp-88h] BYREF
int v44; // [rsp+14h] [rbp-84h] BYREF
long long v45; // [rsp+18h] [rbp-80h]
unsigned long long v46; // [rsp+20h] [rbp-78h]
_DWORD v47[8]; // [rsp+28h] [rbp-70h] BYREF
_DWORD *v48; // [rsp+48h] [rbp-50h]
_DWORD *v49; // [rsp+50h] [rbp-48h]
_QWORD *v50; // [rsp+58h] [rbp-40h]
v7 = a3;
v44 = a4;
v10 = (char *)a2 + 344;
if ( a4 != -1 )
{
v46 = (unsigned long long)a2 + 344;
llama_kv_cache_seq_rm(v10);
v11 = (unsigned int)v7;
llama_sbatch::reserve_ubatch((llama_sbatch *)v47, (unsigned long long)a2 + 96, v7);
v47[1] = v7;
v47[2] = v7;
v47[3] = 1;
v45 = v7;
if ( (_DWORD)v7 )
{
v12 = 0LL;
v6 = &v42;
while ( 1 )
{
(*(void ( **)(llama_data_read *, unsigned int *, long long))(*(_QWORD *)this + 8LL))(this, &v42, 4LL);
(*(void ( **)(llama_data_read *, int *, long long))(*(_QWORD *)this + 8LL))(this, &v43, 4LL);
if ( v43 )
break;
v48[v12++] = v42;
if ( v11 == v12 )
goto LABEL_6;
}
v31 = "%s: invalid seq_id-agnostic kv cell\n";
goto LABEL_29;
}
LABEL_6:
*v49 = 1;
*v50 = &v44;
llama_kv_cache_find_slot(v46, v47);
if ( (v16 & 1) == 0 )
{
v31 = "%s: failed to find available cells in kv cache\n";
LABEL_29:
llama_log_internal(4, (_DWORD)v31, (unsigned int)"read_kv_cache_meta", v13, v14, v15);
goto LABEL_30;
}
v17 = *((unsigned int *)a2 + 88);
v18 = v45;
if ( (unsigned int)(v17 + v45) > *((_DWORD *)a2 + 89) )
{
v29 = (llama_context *)(elf_gnu_hash_indexes + 647);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
1175LL,
"GGML_ASSERT(%s) failed",
"kv_self.head + cell_count <= kv_self.size");
return llama_data_read::read_kv_cache_data(
(llama_data_read *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
v29,
v30);
}
v19 = *((_QWORD *)a2 + 47);
if ( *(_DWORD *)(v19 + (v17 << 6)) != *v48 )
{
v29 = (llama_context *)(elf_gnu_hash_indexes + 648);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
1176LL,
"GGML_ASSERT(%s) failed",
"kv_self.cells[kv_self.head].pos == batch.pos[0]");
return llama_data_read::read_kv_cache_data(
(llama_data_read *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
v29,
v30);
}
v20 = (unsigned long long)(unsigned int)(v17 + v45 - 1) << 6;
if ( *(_DWORD *)(v19 + v20) != v48[(unsigned int)(v45 - 1)] )
{
v29 = (llama_context *)(elf_gnu_hash_indexes + 649);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
1177LL,
"GGML_ASSERT(%s) failed",
"kv_self.cells[kv_self.head + cell_count - 1].pos == batch.pos[cell_count - 1]");
return llama_data_read::read_kv_cache_data(
(llama_data_read *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
v29,
v30);
}
v21 = v19 + (v17 << 6);
v22 = *(_QWORD *)(v21 + 32);
if ( !v22 )
goto LABEL_50;
v23 = v20 + v19;
v24 = v21 + 24;
v25 = v24;
do
{
if ( *(_DWORD *)(v22 + 32) >= v44 )
v25 = v22;
v22 = *(_QWORD *)(v22 + 8LL * (*(_DWORD *)(v22 + 32) < v44) + 16);
}
while ( v22 );
if ( v25 == v24 || v44 < *(_DWORD *)(v25 + 32) )
{
LABEL_50:
v29 = (llama_context *)(elf_gnu_hash_indexes + 650);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
1178LL,
"GGML_ASSERT(%s) failed",
"kv_self.cells[kv_self.head].has_seq_id(dest_seq_id)");
return llama_data_read::read_kv_cache_data(
(llama_data_read *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
v29,
v30);
}
v26 = *(_QWORD *)(v23 + 32);
if ( !v26 )
goto LABEL_24;
v27 = v23 + 24;
v28 = v27;
do
{
if ( *(_DWORD *)(v26 + 32) >= v44 )
v28 = v26;
v26 = *(_QWORD *)(v26 + 8LL * (*(_DWORD *)(v26 + 32) < v44) + 16);
}
while ( v26 );
if ( v28 == v27 || v44 < *(_DWORD *)(v28 + 32) )
{
LABEL_24:
v29 = (llama_context *)(elf_gnu_hash_indexes + 651);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
1179LL,
"GGML_ASSERT(%s) failed",
"kv_self.cells[kv_self.head + cell_count - 1].has_seq_id(dest_seq_id)");
return llama_data_read::read_kv_cache_data(
(llama_data_read *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",
v29,
v30);
}
LABEL_43:
LOBYTE(v6) = 1;
if ( v18 && *((_BYTE *)a2 + 346) )
{
v39 = *((_QWORD *)a2 + 47);
v40 = v18;
do
{
*(_DWORD *)(v39 + ((unsigned long long)(unsigned int)v17 << 6) + 8) = v17;
LODWORD(v17) = v17 + 1;
--v40;
}
while ( v40 );
}
return (unsigned int)v6;
}
if ( *((_DWORD *)a2 + 89) < a3 )
{
LODWORD(v6) = 0;
llama_log_internal(
4,
(unsigned int)"%s: not enough cells in kv cache\n",
(unsigned int)"read_kv_cache_meta",
-1,
a5,
a6);
return (unsigned int)v6;
}
llama_kv_cache_clear(v10);
v45 = v7;
if ( !(_DWORD)v7 )
{
LABEL_42:
*((_DWORD *)a2 + 88) = 0;
v18 = v45;
*((_DWORD *)a2 + 90) = v45;
LODWORD(v17) = 0;
goto LABEL_43;
}
v46 = (unsigned int)v45;
v32 = 0LL;
while ( 1 )
{
v6 = (unsigned int *)*((_QWORD *)a2 + 47);
(*(void ( **)(llama_data_read *, _DWORD *, long long))(*(_QWORD *)this + 8LL))(this, v47, 4LL);
(*(void ( **)(llama_data_read *, unsigned int *, long long))(*(_QWORD *)this + 8LL))(this, &v42, 4LL);
v6[16 * v32] = v47[0];
if ( v42 )
break;
LABEL_41:
if ( ++v32 == v46 )
goto LABEL_42;
}
v6 += 16 * v32 + 4;
v33 = 0;
while ( 1 )
{
(*(void ( **)(llama_data_read *, int *, long long))(*(_QWORD *)this + 8LL))(this, &v43, 4LL);
v35 = *((_DWORD *)a2 + 89);
if ( v43 < 0 || v43 >= v35 )
{
llama_log_internal(
4,
(unsigned int)"%s: invalid seq_id, %d is out of range [0, %u)\n",
(unsigned int)"read_kv_cache_meta",
v43,
v35,
v34);
goto LABEL_30;
}
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::_M_insert_unique<int const&>(
v6,
&v43);
if ( *((_BYTE *)a2 + 346) == 1 )
break;
LABEL_40:
if ( ++v33 >= v42 )
goto LABEL_41;
}
v36 = *((_QWORD *)a2 + 47);
v37 = (long long)v43 << 6;
v38 = *(_DWORD *)(v36 + v37 + 12);
if ( v38 == -1 )
{
*(_DWORD *)(v37 + v36 + 12) = v32;
goto LABEL_40;
}
llama_log_internal(
4,
(unsigned int)"%s: duplicate tail for seq_id %d in cell %d and %d\n",
(unsigned int)"read_kv_cache_meta",
v43,
v32,
v38);
LABEL_30:
LODWORD(v6) = 0;
return (unsigned int)v6;
}
|
read_kv_cache_meta:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12D,EDX
MOV R14,RSI
MOV R15,RDI
MOV dword ptr [RSP + 0x14],ECX
LEA RDI,[RSI + 0x158]
CMP ECX,-0x1
JZ 0x001a15e5
MOV qword ptr [RSP + 0x20],RDI
MOV ESI,ECX
MOV EDX,0xffffffff
MOV ECX,0xffffffff
CALL 0x0016ab20
LEA RSI,[R14 + 0x60]
MOV R13D,R12D
LEA RBX,[RSP + 0x28]
MOV RDI,RBX
MOV RDX,R13
XOR ECX,ECX
CALL 0x0016a260
MOV dword ptr [RBX + 0x4],R12D
MOV dword ptr [RBX + 0x8],R12D
MOV dword ptr [RBX + 0xc],0x1
MOV qword ptr [RSP + 0x18],R12
TEST R12D,R12D
JZ 0x001a14c4
XOR R12D,R12D
LEA RBP,[RSP + 0xc]
LEA RBX,[RSP + 0x10]
LAB_001a1482:
MOV RAX,qword ptr [R15]
MOV EDX,0x4
MOV RDI,R15
MOV RSI,RBP
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R15]
MOV EDX,0x4
MOV RDI,R15
MOV RSI,RBX
CALL qword ptr [RAX + 0x8]
CMP dword ptr [RSP + 0x10],0x0
JNZ 0x001a1618
MOV EAX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RSP + 0x48]
MOV dword ptr [RCX + R12*0x4],EAX
INC R12
CMP R13,R12
JNZ 0x001a1482
LAB_001a14c4:
LEA RSI,[RSP + 0x28]
MOV RAX,qword ptr [RSI + 0x28]
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [RSI + 0x30]
LEA RCX,[RSP + 0x14]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0016a120
TEST DL,0x1
JZ 0x001a160f
MOV EAX,dword ptr [R14 + 0x160]
MOV R10,qword ptr [RSP + 0x18]
LEA EDX,[RAX + R10*0x1]
CMP EDX,dword ptr [R14 + 0x164]
JA 0x001a17ee
MOV RCX,qword ptr [R14 + 0x178]
MOV RSI,RAX
SHL RSI,0x6
MOV R8D,dword ptr [RCX + RSI*0x1]
MOV RDI,qword ptr [RSP + 0x48]
CMP R8D,dword ptr [RDI]
JNZ 0x001a180a
DEC EDX
SHL RDX,0x6
MOV R8D,dword ptr [RCX + RDX*0x1]
LEA R9D,[R10 + -0x1]
CMP R8D,dword ptr [RDI + R9*0x4]
JNZ 0x001a1826
ADD RSI,RCX
MOV RDI,qword ptr [RSI + 0x20]
TEST RDI,RDI
JZ 0x001a17d2
ADD RCX,RDX
ADD RSI,0x18
MOV EDX,dword ptr [RSP + 0x14]
MOV R8,RSI
LAB_001a1565:
XOR R9D,R9D
CMP dword ptr [RDI + 0x20],EDX
SETL R9B
CMOVGE R8,RDI
MOV RDI,qword ptr [RDI + R9*0x8 + 0x10]
TEST RDI,RDI
JNZ 0x001a1565
CMP R8,RSI
JZ 0x001a17d2
CMP EDX,dword ptr [R8 + 0x20]
JL 0x001a17d2
MOV RSI,qword ptr [RCX + 0x20]
TEST RSI,RSI
JZ 0x001a15c6
ADD RCX,0x18
MOV RDI,RCX
LAB_001a15a0:
XOR R8D,R8D
CMP dword ptr [RSI + 0x20],EDX
SETL R8B
CMOVGE RDI,RSI
MOV RSI,qword ptr [RSI + R8*0x8 + 0x10]
TEST RSI,RSI
JNZ 0x001a15a0
CMP RDI,RCX
JZ 0x001a15c6
CMP EDX,dword ptr [RDI + 0x20]
JGE 0x001a1753
LAB_001a15c6:
LEA RDI,[0x2143c8]
LEA RDX,[0x2103c4]
LEA RCX,[0x214dfa]
MOV ESI,0x49b
JMP 0x001a1840
LAB_001a15e5:
CMP dword ptr [R14 + 0x164],R12D
JNC 0x001a1639
LEA RSI,[0x214e3f]
LEA RDX,[0x214cdb]
XOR EBP,EBP
MOV EDI,0x4
XOR EAX,EAX
CALL 0x00167d20
JMP 0x001a1780
LAB_001a160f:
LEA RSI,[0x214cee]
JMP 0x001a161f
LAB_001a1618:
LEA RSI,[0x214cb6]
LAB_001a161f:
LEA RDX,[0x214cdb]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x00167d20
LAB_001a1632:
XOR EBP,EBP
JMP 0x001a1780
LAB_001a1639:
CALL 0x00164770
MOV qword ptr [RSP + 0x18],R12
TEST R12D,R12D
JZ 0x001a173a
MOV EAX,dword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
XOR R12D,R12D
LEA RSI,[RSP + 0x28]
LEA R13,[RSP + 0xc]
LAB_001a1662:
MOV RBP,qword ptr [R14 + 0x178]
MOV RBX,R12
SHL RBX,0x6
MOV RAX,qword ptr [R15]
MOV EDX,0x4
MOV RDI,R15
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R15]
MOV EDX,0x4
MOV RDI,R15
MOV RSI,R13
CALL qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RBP + RBX*0x1],EAX
CMP dword ptr [RSP + 0xc],0x0
LEA R13,[RSP + 0x10]
JZ 0x001a1722
ADD RBP,RBX
ADD RBP,0x10
XOR EBX,EBX
LAB_001a16ac:
MOV RAX,qword ptr [R15]
MOV EDX,0x4
MOV RDI,R15
MOV RSI,R13
CALL qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RSP + 0x10]
MOV R8D,dword ptr [R14 + 0x164]
TEST ECX,ECX
JS 0x001a1791
CMP ECX,R8D
JNC 0x001a1791
MOV RDI,RBP
MOV RSI,R13
CALL 0x00168370
CMP byte ptr [R14 + 0x15a],0x1
JNZ 0x001a171a
MOVSXD RCX,dword ptr [RSP + 0x10]
MOV RAX,qword ptr [R14 + 0x178]
MOV RDX,RCX
SHL RDX,0x6
MOV R9D,dword ptr [RAX + RDX*0x1 + 0xc]
CMP R9D,-0x1
JNZ 0x001a17b0
ADD RAX,RDX
ADD RAX,0xc
MOV dword ptr [RAX],R12D
LAB_001a171a:
INC EBX
CMP EBX,dword ptr [RSP + 0xc]
JC 0x001a16ac
LAB_001a1722:
INC R12
CMP R12,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x28]
LEA R13,[RSP + 0xc]
JNZ 0x001a1662
LAB_001a173a:
MOV dword ptr [R14 + 0x160],0x0
MOV R10,qword ptr [RSP + 0x18]
MOV dword ptr [R14 + 0x168],R10D
XOR EAX,EAX
LAB_001a1753:
MOV BPL,0x1
TEST R10D,R10D
JZ 0x001a1780
CMP byte ptr [R14 + 0x15a],0x0
JZ 0x001a1780
MOV RCX,qword ptr [R14 + 0x178]
MOV EDX,R10D
LAB_001a176f:
MOV ESI,EAX
SHL RSI,0x6
MOV dword ptr [RCX + RSI*0x1 + 0x8],EAX
INC EAX
DEC RDX
JNZ 0x001a176f
LAB_001a1780:
MOV EAX,EBP
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a1791:
LEA RSI,[0x214e61]
LEA RDX,[0x214cdb]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x00167d20
JMP 0x001a1632
LAB_001a17b0:
LEA RSI,[0x214e91]
LEA RDX,[0x214cdb]
MOV EDI,0x4
MOV R8D,R12D
XOR EAX,EAX
CALL 0x00167d20
JMP 0x001a1632
LAB_001a17d2:
LEA RDI,[0x2143c8]
LEA RDX,[0x2103c4]
LEA RCX,[0x214dc6]
MOV ESI,0x49a
JMP 0x001a1840
LAB_001a17ee:
LEA RDI,[0x2143c8]
LEA RDX,[0x2103c4]
LEA RCX,[0x214d1e]
MOV ESI,0x497
JMP 0x001a1840
LAB_001a180a:
LEA RDI,[0x2143c8]
LEA RDX,[0x2103c4]
LEA RCX,[0x214d48]
MOV ESI,0x498
JMP 0x001a1840
LAB_001a1826:
LEA RDI,[0x2143c8]
LEA RDX,[0x2103c4]
LEA RCX,[0x214d78]
MOV ESI,0x499
LAB_001a1840:
XOR EAX,EAX
CALL 0x0016af70
|
/* llama_data_read::read_kv_cache_meta(llama_context*, unsigned int, int) */
ulong __thiscall
llama_data_read::read_kv_cache_meta
(llama_data_read *this,llama_context *param_1,uint param_2,int param_3)
{
ulong uVar1;
long lVar2;
char *pcVar3;
uint uVar4;
ulong extraout_RDX;
long lVar5;
ulong uVar6;
uint uVar7;
_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>> *unaff_RBP;
long lVar8;
int8 uVar9;
long lVar10;
ulong uVar11;
uint local_8c;
uint local_88;
int local_84;
ulong local_80;
llama_kv_cache *local_78;
int4 local_70;
uint local_6c;
uint local_68;
int4 local_64;
int *local_50;
int4 *local_48;
long *local_40;
uVar1 = (ulong)param_2;
local_78 = (llama_kv_cache *)(param_1 + 0x158);
local_84 = param_3;
local_80 = uVar1;
if (param_3 == -1) {
if (*(uint *)(param_1 + 0x164) < param_2) {
uVar11 = 0;
llama_log_internal(4,"%s: not enough cells in kv cache\n","read_kv_cache_meta");
goto LAB_001a1780;
}
llama_kv_cache_clear(local_78);
if (param_2 != 0) {
uVar11 = 0;
local_78 = (llama_kv_cache *)uVar1;
do {
unaff_RBP = *(_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>> **)
(param_1 + 0x178);
(**(code **)(*(long *)this + 8))(this,&local_70,4);
(**(code **)(*(long *)this + 8))(this,&local_8c,4);
*(int4 *)(unaff_RBP + uVar11 * 0x40) = local_70;
if (local_8c != 0) {
unaff_RBP = unaff_RBP + uVar11 * 0x40 + 0x10;
uVar7 = 0;
do {
(**(code **)(*(long *)this + 8))(this,&local_88,4);
if (((int)local_88 < 0) || (*(uint *)(param_1 + 0x164) <= local_88)) {
llama_log_internal(4,"%s: invalid seq_id, %d is out of range [0, %u)\n",
"read_kv_cache_meta");
goto LAB_001a1632;
}
std::_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>>::
_M_insert_unique<int_const&>(unaff_RBP,(int *)&local_88);
if (param_1[0x15a] == (llama_context)0x1) {
lVar2 = (long)(int)local_88 * 0x40;
if (*(int *)(*(long *)(param_1 + 0x178) + 0xc + lVar2) != -1) {
llama_log_internal(4,"%s: duplicate tail for seq_id %d in cell %d and %d\n",
"read_kv_cache_meta",(long)(int)local_88,uVar11 & 0xffffffff);
goto LAB_001a1632;
}
*(int *)(*(long *)(param_1 + 0x178) + lVar2 + 0xc) = (int)uVar11;
}
uVar7 = uVar7 + 1;
} while (uVar7 < local_8c);
}
uVar11 = uVar11 + 1;
} while ((llama_kv_cache *)uVar11 != local_78);
}
*(int4 *)(param_1 + 0x160) = 0;
uVar7 = (uint)local_80;
*(uint *)(param_1 + 0x168) = uVar7;
uVar1 = 0;
LAB_001a1753:
uVar11 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
if ((uVar7 != 0) && (param_1[0x15a] != (llama_context)0x0)) {
lVar2 = *(long *)(param_1 + 0x178);
uVar6 = (ulong)uVar7;
do {
*(int *)(lVar2 + 8 + uVar1 * 0x40) = (int)uVar1;
uVar1 = (ulong)((int)uVar1 + 1);
uVar6 = uVar6 - 1;
} while (uVar6 != 0);
}
LAB_001a1780:
return uVar11 & 0xffffffff;
}
llama_kv_cache_seq_rm(local_78,param_3,-1,-1);
llama_sbatch::reserve_ubatch((ulong)&local_70,(bool)((char)param_1 + '`'));
local_64 = 1;
local_6c = param_2;
local_68 = param_2;
if (param_2 != 0) {
uVar11 = 0;
unaff_RBP = (_Rb_tree<int,int,std::_Identity<int>,std::less<int>,std::allocator<int>> *)
&local_8c;
do {
(**(code **)(*(long *)this + 8))(this,unaff_RBP,4);
(**(code **)(*(long *)this + 8))(this,&local_88,4);
if (local_88 != 0) {
pcVar3 = "%s: invalid seq_id-agnostic kv cell\n";
goto LAB_001a161f;
}
local_50[uVar11] = local_8c;
uVar11 = uVar11 + 1;
} while (uVar1 != uVar11);
}
*local_48 = 1;
*local_40 = (long)&local_84;
llama_kv_cache_find_slot(local_78,(llama_ubatch *)&local_70);
if ((extraout_RDX & 1) == 0) {
pcVar3 = "%s: failed to find available cells in kv cache\n";
LAB_001a161f:
llama_log_internal(4,pcVar3,"read_kv_cache_meta");
LAB_001a1632:
uVar11 = 0;
goto LAB_001a1780;
}
uVar1 = (ulong)*(uint *)(param_1 + 0x160);
uVar7 = (uint)local_80;
uVar4 = *(uint *)(param_1 + 0x160) + uVar7;
if (*(uint *)(param_1 + 0x164) < uVar4) {
pcVar3 = "kv_self.head + cell_count <= kv_self.size";
uVar9 = 0x497;
goto LAB_001a1840;
}
lVar2 = *(long *)(param_1 + 0x178);
if (*(int *)(lVar2 + uVar1 * 0x40) != *local_50) {
pcVar3 = "kv_self.cells[kv_self.head].pos == batch.pos[0]";
uVar9 = 0x498;
goto LAB_001a1840;
}
lVar5 = (ulong)(uVar4 - 1) * 0x40;
if (*(int *)(lVar2 + lVar5) != local_50[uVar7 - 1]) {
pcVar3 = "kv_self.cells[kv_self.head + cell_count - 1].pos == batch.pos[cell_count - 1]";
uVar9 = 0x499;
goto LAB_001a1840;
}
lVar8 = uVar1 * 0x40 + lVar2;
lVar10 = *(long *)(lVar8 + 0x20);
if (lVar10 != 0) {
lVar2 = lVar2 + lVar5;
lVar8 = lVar8 + 0x18;
lVar5 = lVar8;
do {
if (local_84 <= *(int *)(lVar10 + 0x20)) {
lVar5 = lVar10;
}
lVar10 = *(long *)(lVar10 + 0x10 + (ulong)(*(int *)(lVar10 + 0x20) < local_84) * 8);
} while (lVar10 != 0);
if ((lVar5 != lVar8) && (*(int *)(lVar5 + 0x20) <= local_84)) {
lVar5 = *(long *)(lVar2 + 0x20);
if (lVar5 != 0) {
lVar2 = lVar2 + 0x18;
lVar10 = lVar2;
do {
if (local_84 <= *(int *)(lVar5 + 0x20)) {
lVar10 = lVar5;
}
lVar5 = *(long *)(lVar5 + 0x10 + (ulong)(*(int *)(lVar5 + 0x20) < local_84) * 8);
} while (lVar5 != 0);
if ((lVar10 != lVar2) && (*(int *)(lVar10 + 0x20) <= local_84)) goto LAB_001a1753;
}
pcVar3 = "kv_self.cells[kv_self.head + cell_count - 1].has_seq_id(dest_seq_id)";
uVar9 = 0x49b;
goto LAB_001a1840;
}
}
pcVar3 = "kv_self.cells[kv_self.head].has_seq_id(dest_seq_id)";
uVar9 = 0x49a;
LAB_001a1840:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-context.cpp",uVar9
,"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
12,335
|
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
ng-log[P]ng-log/src/logging.cc
|
static string ShellEscape(const string& src) {
string result;
if (!src.empty() && // empty string needs quotes
src.find_first_not_of(kDontNeedShellEscapeChars) == string::npos) {
// only contains chars that don't need quotes; it's fine
result.assign(src);
} else if (src.find_first_of('\'') == string::npos) {
// no single quotes; just wrap it in single quotes
result.assign("'");
result.append(src);
result.append("'");
} else {
// needs double quote escaping
result.assign("\"");
for (size_t i = 0; i < src.size(); ++i) {
switch (src[i]) {
case '\\':
case '$':
case '"':
case '`':
result.append("\\");
}
result.append(src, i, 1);
}
result.append("\"");
}
return result;
}
|
O3
|
cpp
|
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rsi)
je 0x106ef
leaq 0x11e8a(%rip), %rsi # 0x22560
movl $0x47, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x78e0
cmpq $-0x1, %rax
je 0x107c2
movq %r14, %rdi
movl $0x27, %esi
xorl %edx, %edx
callq 0x76b0
movq 0x8(%rbx), %rdx
cmpq $-0x1, %rax
je 0x1078c
leaq 0x12eb3(%rip), %r15 # 0x235c6
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x7830
cmpq $0x0, 0x8(%r14)
je 0x107b5
movq %r12, (%rsp)
xorl %r12d, %r12d
movabsq $0x4400000000000005, %rbp # imm = 0x4400000000000005
leaq 0x12e7f(%rip), %r13 # 0x235c8
movq (%r14), %rax
movzbl (%rax,%r12), %eax
addl $-0x22, %eax
cmpl $0x3e, %eax
ja 0x1076a
btq %rax, %rbp
jae 0x1076a
movq %rbx, %rdi
movq %r13, %rsi
callq 0x79c0
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x7720
incq %r12
cmpq 0x8(%r14), %r12
jb 0x10749
movq (%rsp), %r12
jmp 0x107b5
leaq 0x11f1b(%rip), %r15 # 0x226ae
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x7830
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x7130
movq %rbx, %rdi
movq %r15, %rsi
callq 0x79c0
jmp 0x107cd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7290
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, (%rsp)
jmp 0x107e2
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x107fd
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8eac
movq %r14, %rdi
callq 0x7930
nop
|
_ZN5nglogL11ShellEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
cmp qword ptr [rsi+8], 0
jz short loc_106EF
lea rsi, _ZN5nglogL25kDontNeedShellEscapeCharsE; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
mov ecx, 47h ; 'G'
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_107C2
loc_106EF:
mov rdi, r14
mov esi, 27h ; '''
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov rdx, [rbx+8]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_1078C
lea r15, asc_235C6; "\""
mov r8d, 1
mov rdi, rbx
xor esi, esi
mov rcx, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
cmp qword ptr [r14+8], 0
jz loc_107B5
mov [rsp+38h+var_38], r12
xor r12d, r12d
mov rbp, 4400000000000005h
lea r13, asc_235C8; "\\"
loc_10749:
mov rax, [r14]
movzx eax, byte ptr [rax+r12]
add eax, 0FFFFFFDEh
cmp eax, 3Eh ; '>'
ja short loc_1076A
bt rbp, rax
jnb short loc_1076A
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_1076A:
mov ecx, 1
mov rdi, rbx
mov rsi, r14
mov rdx, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong)
inc r12
cmp r12, [r14+8]
jb short loc_10749
mov r12, [rsp+38h+var_38]
jmp short loc_107B5
loc_1078C:
lea r15, aDataNumCharsTo+59h; "'"
mov r8d, 1
mov rdi, rbx
xor esi, esi
mov rcx, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_107B5:
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_107CD
loc_107C2:
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_107CD:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov [rsp+0], r12
jmp short $+2
loc_107E2:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+0]
jz short loc_107FD
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_107FD:
mov rdi, r14
call __Unwind_Resume
|
long long nglog::ShellEscape(long long a1, _QWORD *a2)
{
long long v2; // rax
long long v3; // rdx
char *v4; // r15
unsigned long long v5; // r12
long long v6; // rbp
unsigned long long v7; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
if ( a2[1]
&& std::string::find_first_not_of(
a2,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_.=/:,@",
0LL,
71LL) == -1 )
{
return std::string::_M_assign(a1, a2);
}
v2 = std::string::find(a2, 39LL, 0LL);
v3 = *(_QWORD *)(a1 + 8);
if ( v2 == -1 )
{
v4 = "'";
std::string::_M_replace(a1, 0LL, v3, "'", 1LL);
std::string::_M_append(a1, *a2);
}
else
{
v4 = "\"";
std::string::_M_replace(a1, 0LL, v3, "\"", 1LL);
if ( a2[1] )
{
v5 = 0LL;
v6 = 0x4400000000000005LL;
do
{
v7 = (unsigned int)*(unsigned __int8 *)(*a2 + v5) - 34;
if ( (unsigned int)v7 <= 0x3E )
{
if ( _bittest64(&v6, v7) )
std::string::append(a1, "\\");
}
std::string::append(a1, a2, v5++, 1LL);
}
while ( v5 < a2[1] );
}
}
return std::string::append(a1, v4);
}
|
ShellEscape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],0x0
JZ 0x001106ef
LEA RSI,[0x122560]
MOV ECX,0x47
MOV RDI,R14
XOR EDX,EDX
CALL 0x001078e0
CMP RAX,-0x1
JZ 0x001107c2
LAB_001106ef:
MOV RDI,R14
MOV ESI,0x27
XOR EDX,EDX
CALL 0x001076b0
MOV RDX,qword ptr [RBX + 0x8]
CMP RAX,-0x1
JZ 0x0011078c
LAB_0011070c:
LEA R15,[0x1235c6]
MOV R8D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x00107830
CMP qword ptr [R14 + 0x8],0x0
JZ 0x001107b5
MOV qword ptr [RSP],R12
XOR R12D,R12D
MOV RBP,0x4400000000000005
LEA R13,[0x1235c8]
LAB_00110749:
MOV RAX,qword ptr [R14]
MOVZX EAX,byte ptr [RAX + R12*0x1]
ADD EAX,-0x22
CMP EAX,0x3e
JA 0x0011076a
BT RBP,RAX
JNC 0x0011076a
LAB_0011075f:
MOV RDI,RBX
MOV RSI,R13
CALL 0x001079c0
LAB_0011076a:
MOV ECX,0x1
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
CALL 0x00107720
INC R12
CMP R12,qword ptr [R14 + 0x8]
JC 0x00110749
MOV R12,qword ptr [RSP]
JMP 0x001107b5
LAB_0011078c:
LEA R15,[0x1226ae]
MOV R8D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x00107830
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x00107130
LAB_001107b5:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001079c0
JMP 0x001107cd
LAB_001107c2:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00107290
LAB_001107cd:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::ShellEscape(std::__cxx11::string const&) */
void __thiscall nglog::ShellEscape(nglog *this,string *param_1)
{
uint uVar1;
long lVar2;
ulong uVar3;
*(nglog **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (nglog)0x0;
if ((*(long *)(param_1 + 8) == 0) ||
(lVar2 = std::__cxx11::string::find_first_not_of((char *)param_1,0x122560,0), lVar2 != -1)) {
lVar2 = std::__cxx11::string::find((char)param_1,0x27);
if (lVar2 == -1) {
/* try { // try from 0011078c to 001107cc has its CatchHandler @ 001107dc */
std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x1226ae);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_1);
}
else {
/* try { // try from 0011070c to 00110725 has its CatchHandler @ 001107dc */
std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x1235c6);
if (*(long *)(param_1 + 8) != 0) {
uVar3 = 0;
do {
uVar1 = *(byte *)(*(long *)param_1 + uVar3) - 0x22;
if ((uVar1 < 0x3f) && ((0x4400000000000005U >> ((ulong)uVar1 & 0x3f) & 1) != 0)) {
/* try { // try from 0011075f to 0011077c has its CatchHandler @ 001107e2 */
std::__cxx11::string::append((char *)this);
}
std::__cxx11::string::append((string *)this,(ulong)param_1,uVar3);
uVar3 = uVar3 + 1;
} while (uVar3 < *(ulong *)(param_1 + 8));
}
}
std::__cxx11::string::append((char *)this);
}
else {
std::__cxx11::string::_M_assign((string *)this);
}
return;
}
|
|
12,336
|
my_xml_leave
|
eloqsql/strings/xml.c
|
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen)
{
char *e, *tag;
size_t glen;
char s[32];
char g[32];
int rc;
/* Find previous '/' or beginning */
for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--);
glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e);
tag= e[0] == '/' ? e + 1 : e;
if (str && (slen != glen || memcmp(str, tag, slen)))
{
mstr(s,str,sizeof(s)-1,slen);
if (glen)
{
mstr(g, tag, sizeof(g)-1, glen);
sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g);
}
else
sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s);
return MY_XML_ERROR;
}
if (p->flags & MY_XML_FLAG_RELATIVE_NAMES)
rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK;
else
rc= (p->leave_xml ?
p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) :
MY_XML_OK);
*e='\0';
p->attr.end= e;
return rc;
}
|
O0
|
c
|
my_xml_leave:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdx, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
movq -0x60(%rbp), %rdx
xorl %eax, %eax
cmpq 0x118(%rdx), %rcx
movb %al, -0x8d(%rbp)
jbe 0x8896f
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x8d(%rbp)
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0x8897b
jmp 0x8898b
jmp 0x8897d
movq -0x78(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x88943
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x889b6
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x889cf
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x889fa
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x88a05
movq -0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x88abd
movq -0x70(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x88a3e
movq -0x68(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x25140
cmpl $0x0, %eax
je 0x88abd
leaq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rcx
movl $0x1f, %edx
callq 0x89070
cmpq $0x0, -0x88(%rbp)
je 0x88a97
leaq -0x50(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rcx
movl $0x1f, %edx
callq 0x89070
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0x739e(%rip), %rsi # 0x8fe2c
movb $0x0, %al
callq 0x250b0
jmp 0x88ab1
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rdx
leaq 0x73a6(%rip), %rsi # 0x8fe50
movb $0x0, %al
callq 0x250b0
movl $0x1, -0x54(%rbp)
jmp 0x88b92
movq -0x60(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x88b12
movq -0x60(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x88afa
movq -0x60(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq *%rax
movl %eax, -0xa4(%rbp)
jmp 0x88b04
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0x88b04
movl -0xa4(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x88b73
movq -0x60(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0x88b5d
movq -0x60(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x60(%rbp), %rdi
movq -0x60(%rbp), %rcx
movq 0x118(%rcx), %rsi
movq -0x60(%rbp), %rcx
movq 0x120(%rcx), %rdx
movq -0x60(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rdx
callq *%rax
movl %eax, -0xa8(%rbp)
jmp 0x88b67
xorl %eax, %eax
movl %eax, -0xa8(%rbp)
jmp 0x88b67
movl -0xa8(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0x78(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x120(%rax)
movl -0x8c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xac(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x88bbc
movl -0xac(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x25340
nopw %cs:(%rax,%rax)
|
my_xml_leave:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
mov [rbp+var_70], rdx
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov [rbp+var_78], rax
loc_88943:
mov rcx, [rbp+var_78]
mov rdx, [rbp+var_60]
xor eax, eax
cmp rcx, [rdx+118h]
mov [rbp+var_8D], al
jbe short loc_8896F
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_8D], al
loc_8896F:
mov al, [rbp+var_8D]
test al, 1
jnz short loc_8897B
jmp short loc_8898B
loc_8897B:
jmp short $+2
loc_8897D:
mov rax, [rbp+var_78]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rax
jmp short loc_88943
loc_8898B:
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_889B6
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov rcx, [rbp+var_78]
sub rax, rcx
sub rax, 1
mov [rbp+var_98], rax
jmp short loc_889CF
loc_889B6:
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov rcx, [rbp+var_78]
sub rax, rcx
mov [rbp+var_98], rax
loc_889CF:
mov rax, [rbp+var_98]
mov [rbp+var_88], rax
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_889FA
mov rax, [rbp+var_78]
add rax, 1
mov [rbp+var_A0], rax
jmp short loc_88A05
loc_889FA:
mov rax, [rbp+var_78]
mov [rbp+var_A0], rax
loc_88A05:
mov rax, [rbp+var_A0]
mov [rbp+var_80], rax
cmp [rbp+var_68], 0
jz loc_88ABD
mov rax, [rbp+var_70]
cmp rax, [rbp+var_88]
jnz short loc_88A3E
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_70]
call _memcmp
cmp eax, 0
jz short loc_88ABD
loc_88A3E:
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_68]
mov rcx, [rbp+var_70]
mov edx, 1Fh
call mstr_0
cmp [rbp+var_88], 0
jz short loc_88A97
lea rdi, [rbp+var_50]
mov rsi, [rbp+var_80]
mov rcx, [rbp+var_88]
mov edx, 1Fh
call mstr_0
mov rdi, [rbp+var_60]
add rdi, 8
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_50]
lea rsi, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)"
mov al, 0
call _sprintf
jmp short loc_88AB1
loc_88A97:
mov rdi, [rbp+var_60]
add rdi, 8
lea rdx, [rbp+var_30]
lea rsi, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"...
mov al, 0
call _sprintf
loc_88AB1:
mov [rbp+var_54], 1
jmp loc_88B92
loc_88ABD:
mov rax, [rbp+var_60]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_88B12
mov rax, [rbp+var_60]
cmp qword ptr [rax+158h], 0
jz short loc_88AFA
mov rax, [rbp+var_60]
mov rax, [rax+158h]
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_68]
mov rdx, [rbp+var_70]
call rax
mov [rbp+var_A4], eax
jmp short loc_88B04
loc_88AFA:
xor eax, eax
mov [rbp+var_A4], eax
jmp short $+2
loc_88B04:
mov eax, [rbp+var_A4]
mov [rbp+var_8C], eax
jmp short loc_88B73
loc_88B12:
mov rax, [rbp+var_60]
cmp qword ptr [rax+158h], 0
jz short loc_88B5D
mov rax, [rbp+var_60]
mov rax, [rax+158h]
mov rdi, [rbp+var_60]
mov rcx, [rbp+var_60]
mov rsi, [rcx+118h]
mov rcx, [rbp+var_60]
mov rdx, [rcx+120h]
mov rcx, [rbp+var_60]
mov rcx, [rcx+118h]
sub rdx, rcx
call rax
mov [rbp+var_A8], eax
jmp short loc_88B67
loc_88B5D:
xor eax, eax
mov [rbp+var_A8], eax
jmp short $+2
loc_88B67:
mov eax, [rbp+var_A8]
mov [rbp+var_8C], eax
loc_88B73:
mov rax, [rbp+var_78]
mov byte ptr [rax], 0
mov rcx, [rbp+var_78]
mov rax, [rbp+var_60]
mov [rax+120h], rcx
mov eax, [rbp+var_8C]
mov [rbp+var_54], eax
loc_88B92:
mov eax, [rbp+var_54]
mov [rbp+var_AC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_88BBC
mov eax, [rbp+var_AC]
add rsp, 0B0h
pop rbp
retn
loc_88BBC:
call ___stack_chk_fail
|
long long my_xml_leave(long long a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+8h] [rbp-A8h]
unsigned int v5; // [rsp+Ch] [rbp-A4h]
_BYTE *v6; // [rsp+10h] [rbp-A0h]
long long v7; // [rsp+18h] [rbp-98h]
bool v8; // [rsp+23h] [rbp-8Dh]
unsigned int v9; // [rsp+24h] [rbp-8Ch]
_BYTE *i; // [rsp+38h] [rbp-78h]
char v13[32]; // [rsp+60h] [rbp-50h] BYREF
char v14[40]; // [rsp+80h] [rbp-30h] BYREF
unsigned long long v15; // [rsp+A8h] [rbp-8h]
v15 = __readfsqword(0x28u);
for ( i = *(_BYTE **)(a1 + 288); ; --i )
{
v8 = 0;
if ( (unsigned long long)i > *(_QWORD *)(a1 + 280) )
v8 = *i != 47;
if ( !v8 )
break;
}
if ( *i == 47 )
v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i - 1LL;
else
v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i;
if ( *i == 47 )
v6 = i + 1;
else
v6 = i;
if ( !a2 || a3 == v7 && !(unsigned int)memcmp(a2, v6, a3) )
{
if ( (*(_DWORD *)a1 & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 344) )
v5 = (*(long long ( **)(long long, long long, long long))(a1 + 344))(a1, a2, a3);
else
v5 = 0;
v9 = v5;
}
else
{
if ( *(_QWORD *)(a1 + 344) )
v4 = (*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 344))(
a1,
*(_QWORD *)(a1 + 280),
*(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280));
else
v4 = 0;
v9 = v4;
}
*i = 0;
*(_QWORD *)(a1 + 288) = i;
return v9;
}
else
{
mstr_0(v14, a2, 31LL, a3);
if ( v7 )
{
mstr_0(v13, v6, 31LL, v7);
sprintf(a1 + 8, "'</%s>' unexpected ('</%s>' wanted)", v14, v13);
}
else
{
sprintf(a1 + 8, "'</%s>' unexpected (END-OF-INPUT wanted)", v14);
}
return 1;
}
}
|
my_xml_leave:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
MOV qword ptr [RBP + -0x70],RDX
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV qword ptr [RBP + -0x78],RAX
LAB_00188943:
MOV RCX,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x118]
MOV byte ptr [RBP + -0x8d],AL
JBE 0x0018896f
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x8d],AL
LAB_0018896f:
MOV AL,byte ptr [RBP + -0x8d]
TEST AL,0x1
JNZ 0x0018897b
JMP 0x0018898b
LAB_0018897b:
JMP 0x0018897d
LAB_0018897d:
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x78],RAX
JMP 0x00188943
LAB_0018898b:
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001889b6
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x78]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001889cf
LAB_001889b6:
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x78]
SUB RAX,RCX
MOV qword ptr [RBP + -0x98],RAX
LAB_001889cf:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001889fa
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00188a05
LAB_001889fa:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0xa0],RAX
LAB_00188a05:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x80],RAX
CMP qword ptr [RBP + -0x68],0x0
JZ 0x00188abd
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x88]
JNZ 0x00188a3e
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x00125140
CMP EAX,0x0
JZ 0x00188abd
LAB_00188a3e:
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x70]
MOV EDX,0x1f
CALL 0x00189070
CMP qword ptr [RBP + -0x88],0x0
JZ 0x00188a97
LEA RDI,[RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x88]
MOV EDX,0x1f
CALL 0x00189070
MOV RDI,qword ptr [RBP + -0x60]
ADD RDI,0x8
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x50]
LEA RSI,[0x18fe2c]
MOV AL,0x0
CALL 0x001250b0
JMP 0x00188ab1
LAB_00188a97:
MOV RDI,qword ptr [RBP + -0x60]
ADD RDI,0x8
LEA RDX,[RBP + -0x30]
LEA RSI,[0x18fe50]
MOV AL,0x0
CALL 0x001250b0
LAB_00188ab1:
MOV dword ptr [RBP + -0x54],0x1
JMP 0x00188b92
LAB_00188abd:
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00188b12
MOV RAX,qword ptr [RBP + -0x60]
CMP qword ptr [RAX + 0x158],0x0
JZ 0x00188afa
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x158]
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x70]
CALL RAX
MOV dword ptr [RBP + -0xa4],EAX
JMP 0x00188b04
LAB_00188afa:
XOR EAX,EAX
MOV dword ptr [RBP + -0xa4],EAX
JMP 0x00188b04
LAB_00188b04:
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0x8c],EAX
JMP 0x00188b73
LAB_00188b12:
MOV RAX,qword ptr [RBP + -0x60]
CMP qword ptr [RAX + 0x158],0x0
JZ 0x00188b5d
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x158]
MOV RDI,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RCX + 0x118]
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RCX + 0x120]
MOV RCX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RCX + 0x118]
SUB RDX,RCX
CALL RAX
MOV dword ptr [RBP + -0xa8],EAX
JMP 0x00188b67
LAB_00188b5d:
XOR EAX,EAX
MOV dword ptr [RBP + -0xa8],EAX
JMP 0x00188b67
LAB_00188b67:
MOV EAX,dword ptr [RBP + -0xa8]
MOV dword ptr [RBP + -0x8c],EAX
LAB_00188b73:
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x120],RCX
MOV EAX,dword ptr [RBP + -0x8c]
MOV dword ptr [RBP + -0x54],EAX
LAB_00188b92:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0xac],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00188bbc
MOV EAX,dword ptr [RBP + -0xac]
ADD RSP,0xb0
POP RBP
RET
LAB_00188bbc:
CALL 0x00125340
|
int4 my_xml_leave(uint *param_1,void *param_2,size_t param_3)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
int4 local_b0;
int4 local_ac;
char *local_a8;
size_t local_a0;
int4 local_94;
char *local_80;
int4 local_5c;
int1 local_58 [32];
int1 local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_80 = *(char **)(param_1 + 0x48);
while( true ) {
bVar2 = false;
if (*(char **)(param_1 + 0x46) < local_80) {
bVar2 = *local_80 != '/';
}
if (!bVar2) break;
local_80 = local_80 + -1;
}
if (*local_80 == '/') {
local_a0 = (*(long *)(param_1 + 0x48) - (long)local_80) - 1;
}
else {
local_a0 = *(long *)(param_1 + 0x48) - (long)local_80;
}
if (*local_80 == '/') {
local_a8 = local_80 + 1;
}
else {
local_a8 = local_80;
}
if (param_2 == (void *)0x0) {
LAB_00188abd:
if ((*param_1 & 1) == 0) {
if (*(long *)(param_1 + 0x56) == 0) {
local_b0 = 0;
}
else {
local_b0 = (**(code **)(param_1 + 0x56))
(param_1,*(int8 *)(param_1 + 0x46),
*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46));
}
local_94 = local_b0;
}
else {
if (*(long *)(param_1 + 0x56) == 0) {
local_ac = 0;
}
else {
local_ac = (**(code **)(param_1 + 0x56))(param_1,param_2,param_3);
}
local_94 = local_ac;
}
*local_80 = '\0';
*(char **)(param_1 + 0x48) = local_80;
local_5c = local_94;
}
else {
if (param_3 == local_a0) {
iVar1 = memcmp(param_2,local_a8,param_3);
if (iVar1 == 0) goto LAB_00188abd;
}
mstr(local_38,param_2,0x1f,param_3);
if (local_a0 == 0) {
sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_38);
}
else {
mstr(local_58,local_a8,0x1f,local_a0);
sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (\'</%s>\' wanted)",local_38,local_58);
}
local_5c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_5c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,337
|
mbedtls_camellia_crypt_cbc
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/camellia.c
|
int mbedtls_camellia_crypt_cbc(mbedtls_camellia_context *ctx,
int mode,
size_t length,
unsigned char iv[16],
const unsigned char *input,
unsigned char *output)
{
int i;
unsigned char temp[16];
CAMELLIA_VALIDATE_RET(ctx != NULL);
CAMELLIA_VALIDATE_RET(mode == MBEDTLS_CAMELLIA_ENCRYPT ||
mode == MBEDTLS_CAMELLIA_DECRYPT);
CAMELLIA_VALIDATE_RET(iv != NULL);
CAMELLIA_VALIDATE_RET(length == 0 || input != NULL);
CAMELLIA_VALIDATE_RET(length == 0 || output != NULL);
if (length % 16) {
return MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH;
}
if (mode == MBEDTLS_CAMELLIA_DECRYPT) {
while (length > 0) {
memcpy(temp, input, 16);
mbedtls_camellia_crypt_ecb(ctx, mode, input, output);
for (i = 0; i < 16; i++) {
output[i] = (unsigned char) (output[i] ^ iv[i]);
}
memcpy(iv, temp, 16);
input += 16;
output += 16;
length -= 16;
}
} else {
while (length > 0) {
for (i = 0; i < 16; i++) {
output[i] = (unsigned char) (input[i] ^ iv[i]);
}
mbedtls_camellia_crypt_ecb(ctx, mode, output, output);
memcpy(iv, output, 16);
input += 16;
output += 16;
length -= 16;
}
}
return 0;
}
|
O3
|
c
|
mbedtls_camellia_crypt_cbc:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movl $0xffffffda, %eax # imm = 0xFFFFFFDA
testb $0xf, %r12b
jne 0x9eb52
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %r13
testl %esi, %esi
je 0x9eb0d
testq %r12, %r12
je 0x9eb50
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb (%r14,%rax), %cl
movb %cl, (%rbx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x9ead4
movq %r13, %rdi
movq %rbx, %rdx
movq %rbx, %rcx
callq 0x9e8cc
movups (%rbx), %xmm0
movups %xmm0, (%r15)
addq $0x10, %r14
addq $0x10, %rbx
addq $-0x10, %r12
jne 0x9ead2
jmp 0x9eb50
testq %r12, %r12
je 0x9eb50
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movq %r13, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9e8cc
xorl %eax, %eax
movb (%r15,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x9eb2a
movaps (%rsp), %xmm0
movups %xmm0, (%r15)
addq $0x10, %r14
addq $0x10, %rbx
addq $-0x10, %r12
jne 0x9eb12
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
mbedtls_camellia_crypt_cbc:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r12, rdx
mov eax, 0FFFFFFDAh
test r12b, 0Fh
jnz loc_9EB52
mov rbx, r9
mov r14, r8
mov r15, rcx
mov r13, rdi
test esi, esi
jz short loc_9EB0D
test r12, r12
jz short loc_9EB50
loc_9EAD2:
xor eax, eax
loc_9EAD4:
mov cl, [r15+rax]
xor cl, [r14+rax]
mov [rbx+rax], cl
inc rax
cmp rax, 10h
jnz short loc_9EAD4
mov rdi, r13
mov rdx, rbx
mov rcx, rbx
call mbedtls_camellia_crypt_ecb
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [r15], xmm0
add r14, 10h
add rbx, 10h
add r12, 0FFFFFFFFFFFFFFF0h
jnz short loc_9EAD2
jmp short loc_9EB50
loc_9EB0D:
test r12, r12
jz short loc_9EB50
loc_9EB12:
movups xmm0, xmmword ptr [r14]
movaps [rsp+38h+var_38], xmm0
mov rdi, r13
mov rdx, r14
mov rcx, rbx
call mbedtls_camellia_crypt_ecb
xor eax, eax
loc_9EB2A:
mov cl, [r15+rax]
xor [rbx+rax], cl
inc rax
cmp rax, 10h
jnz short loc_9EB2A
movaps xmm0, [rsp+38h+var_38]
movups xmmword ptr [r15], xmm0
add r14, 10h
add rbx, 10h
add r12, 0FFFFFFFFFFFFFFF0h
jnz short loc_9EB12
loc_9EB50:
xor eax, eax
loc_9EB52:
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long mbedtls_camellia_crypt_cbc(
int *a1,
long long a2,
long long a3,
_OWORD *a4,
unsigned int *a5,
unsigned int *a6)
{
long long v6; // r12
long long result; // rax
long long i; // rax
long long j; // rax
__int128 v13; // [rsp+0h] [rbp-38h]
v6 = a3;
result = 4294967258LL;
if ( (a3 & 0xF) == 0 )
{
if ( (_DWORD)a2 )
{
if ( a3 )
{
do
{
for ( i = 0LL; i != 16; ++i )
*((_BYTE *)a6 + i) = *((_BYTE *)a5 + i) ^ *((_BYTE *)a4 + i);
mbedtls_camellia_crypt_ecb(a1, a2, a6, a6);
*a4 = *(_OWORD *)a6;
a5 += 4;
a6 += 4;
v6 -= 16LL;
}
while ( v6 );
}
}
else if ( a3 )
{
do
{
v13 = *(_OWORD *)a5;
mbedtls_camellia_crypt_ecb(a1, a2, a5, a6);
for ( j = 0LL; j != 16; ++j )
*((_BYTE *)a6 + j) ^= *((_BYTE *)a4 + j);
*a4 = v13;
a5 += 4;
a6 += 4;
v6 -= 16LL;
}
while ( v6 );
}
return 0LL;
}
return result;
}
|
mbedtls_camellia_crypt_cbc:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,RDX
MOV EAX,0xffffffda
TEST R12B,0xf
JNZ 0x0019eb52
MOV RBX,R9
MOV R14,R8
MOV R15,RCX
MOV R13,RDI
TEST ESI,ESI
JZ 0x0019eb0d
TEST R12,R12
JZ 0x0019eb50
LAB_0019ead2:
XOR EAX,EAX
LAB_0019ead4:
MOV CL,byte ptr [R15 + RAX*0x1]
XOR CL,byte ptr [R14 + RAX*0x1]
MOV byte ptr [RBX + RAX*0x1],CL
INC RAX
CMP RAX,0x10
JNZ 0x0019ead4
MOV RDI,R13
MOV RDX,RBX
MOV RCX,RBX
CALL 0x0019e8cc
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [R15],XMM0
ADD R14,0x10
ADD RBX,0x10
ADD R12,-0x10
JNZ 0x0019ead2
JMP 0x0019eb50
LAB_0019eb0d:
TEST R12,R12
JZ 0x0019eb50
LAB_0019eb12:
MOVUPS XMM0,xmmword ptr [R14]
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,R13
MOV RDX,R14
MOV RCX,RBX
CALL 0x0019e8cc
XOR EAX,EAX
LAB_0019eb2a:
MOV CL,byte ptr [R15 + RAX*0x1]
XOR byte ptr [RBX + RAX*0x1],CL
INC RAX
CMP RAX,0x10
JNZ 0x0019eb2a
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [R15],XMM0
ADD R14,0x10
ADD RBX,0x10
ADD R12,-0x10
JNZ 0x0019eb12
LAB_0019eb50:
XOR EAX,EAX
LAB_0019eb52:
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int8
mbedtls_camellia_crypt_cbc
(int8 param_1,int param_2,ulong param_3,int8 *param_4,int8 *param_5,
int4 *param_6)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int8 uVar4;
int8 uVar5;
long lVar6;
uVar5 = 0xffffffda;
if ((param_3 & 0xf) == 0) {
if (param_2 == 0) {
if (param_3 != 0) {
do {
uVar5 = *param_5;
uVar4 = param_5[1];
mbedtls_camellia_crypt_ecb(param_1);
lVar6 = 0;
do {
*(byte *)((long)param_6 + lVar6) =
*(byte *)((long)param_6 + lVar6) ^ *(byte *)((long)param_4 + lVar6);
lVar6 = lVar6 + 1;
} while (lVar6 != 0x10);
*param_4 = uVar5;
param_4[1] = uVar4;
param_5 = param_5 + 2;
param_6 = param_6 + 4;
param_3 = param_3 - 0x10;
} while (param_3 != 0);
}
}
else if (param_3 != 0) {
do {
lVar6 = 0;
do {
*(byte *)((long)param_6 + lVar6) =
*(byte *)((long)param_4 + lVar6) ^ *(byte *)((long)param_5 + lVar6);
lVar6 = lVar6 + 1;
} while (lVar6 != 0x10);
mbedtls_camellia_crypt_ecb(param_1);
uVar1 = param_6[1];
uVar2 = param_6[2];
uVar3 = param_6[3];
*(int4 *)param_4 = *param_6;
*(int4 *)((long)param_4 + 4) = uVar1;
*(int4 *)(param_4 + 1) = uVar2;
*(int4 *)((long)param_4 + 0xc) = uVar3;
param_5 = param_5 + 2;
param_6 = param_6 + 4;
param_3 = param_3 - 0x10;
} while (param_3 != 0);
}
uVar5 = 0;
}
return uVar5;
}
|
|
12,338
|
js_cond_init
|
bluesky950520[P]quickjs/cutils.c
|
void js_cond_init(js_cond_t *cond) {
#if defined(__APPLE__) && defined(__MACH__)
if (pthread_cond_init(cond, NULL))
abort();
#else
pthread_condattr_t attr;
if (pthread_condattr_init(&attr))
abort();
if (pthread_condattr_setclock(&attr, CLOCK_MONOTONIC))
abort();
if (pthread_cond_init(cond, &attr))
abort();
if (pthread_condattr_destroy(&attr))
abort();
#endif
}
|
O0
|
c
|
js_cond_init:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0xc(%rsp), %rdi
callq 0xe750
cmpl $0x0, %eax
je 0x2727d
callq 0xe090
leaq 0xc(%rsp), %rdi
movl $0x1, %esi
callq 0xe510
cmpl $0x0, %eax
je 0x27296
callq 0xe090
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xe670
cmpl $0x0, %eax
je 0x272af
callq 0xe090
leaq 0xc(%rsp), %rdi
callq 0xe380
cmpl $0x0, %eax
je 0x272c3
callq 0xe090
addq $0x18, %rsp
retq
nopl (%rax,%rax)
|
js_cond_init:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
lea rdi, [rsp+18h+var_C]
call _pthread_condattr_init
cmp eax, 0
jz short loc_2727D
call _abort
loc_2727D:
lea rdi, [rsp+18h+var_C]
mov esi, 1
call _pthread_condattr_setclock
cmp eax, 0
jz short loc_27296
call _abort
loc_27296:
mov rdi, [rsp+18h+var_8]
lea rsi, [rsp+18h+var_C]
call _pthread_cond_init
cmp eax, 0
jz short loc_272AF
call _abort
loc_272AF:
lea rdi, [rsp+18h+var_C]
call _pthread_condattr_destroy
cmp eax, 0
jz short loc_272C3
call _abort
loc_272C3:
add rsp, 18h
retn
|
long long js_cond_init(long long a1)
{
long long result; // rax
_BYTE v2[4]; // [rsp+Ch] [rbp-Ch] BYREF
long long v3; // [rsp+10h] [rbp-8h]
v3 = a1;
if ( (unsigned int)pthread_condattr_init(v2) )
abort();
if ( (unsigned int)pthread_condattr_setclock(v2, 1LL) )
abort();
if ( (unsigned int)pthread_cond_init(v3, v2) )
abort();
result = pthread_condattr_destroy(v2);
if ( (_DWORD)result )
abort();
return result;
}
|
js_cond_init:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
LEA RDI,[RSP + 0xc]
CALL 0x0010e750
CMP EAX,0x0
JZ 0x0012727d
CALL 0x0010e090
LAB_0012727d:
LEA RDI,[RSP + 0xc]
MOV ESI,0x1
CALL 0x0010e510
CMP EAX,0x0
JZ 0x00127296
CALL 0x0010e090
LAB_00127296:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0xc]
CALL 0x0010e670
CMP EAX,0x0
JZ 0x001272af
CALL 0x0010e090
LAB_001272af:
LEA RDI,[RSP + 0xc]
CALL 0x0010e380
CMP EAX,0x0
JZ 0x001272c3
CALL 0x0010e090
LAB_001272c3:
ADD RSP,0x18
RET
|
void js_cond_init(pthread_cond_t *param_1)
{
int iVar1;
pthread_condattr_t local_c;
pthread_cond_t *local_8;
local_8 = param_1;
iVar1 = pthread_condattr_init(&local_c);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = pthread_condattr_setclock(&local_c,1);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = pthread_cond_init(local_8,&local_c);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
iVar1 = pthread_condattr_destroy(&local_c);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
abort();
}
return;
}
|
|
12,339
|
fmt::v10::appender fmt::v10::detail::write_escaped_cp<fmt::v10::appender, char>(fmt::v10::appender, fmt::v10::detail::find_escape_result<char> const&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape)
-> OutputIt {
auto c = static_cast<Char>(escape.cp);
switch (escape.cp) {
case '\n':
*out++ = static_cast<Char>('\\');
c = static_cast<Char>('n');
break;
case '\r':
*out++ = static_cast<Char>('\\');
c = static_cast<Char>('r');
break;
case '\t':
*out++ = static_cast<Char>('\\');
c = static_cast<Char>('t');
break;
case '"':
FMT_FALLTHROUGH;
case '\'':
FMT_FALLTHROUGH;
case '\\':
*out++ = static_cast<Char>('\\');
break;
default:
if (escape.cp < 0x100) {
return write_codepoint<2, Char>(out, 'x', escape.cp);
}
if (escape.cp < 0x10000) {
return write_codepoint<4, Char>(out, 'u', escape.cp);
}
if (escape.cp < 0x110000) {
return write_codepoint<8, Char>(out, 'U', escape.cp);
}
for (Char escape_char : basic_string_view<Char>(
escape.begin, to_unsigned(escape.end - escape.begin))) {
out = write_codepoint<2, Char>(out, 'x',
static_cast<uint32_t>(escape_char) & 0xFF);
}
return out;
}
*out++ = c;
return out;
}
|
O0
|
c
|
fmt::v10::appender fmt::v10::detail::write_escaped_cp<fmt::v10::appender, char>(fmt::v10::appender, fmt::v10::detail::find_escape_result<char> const&):
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movq %rsi, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movb 0x10(%rax), %al
movb %al, 0xaf(%rsp)
movq 0xb0(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x9, %eax
je 0xd15ab
jmp 0xd14d3
movl 0xc(%rsp), %eax
subl $0xa, %eax
je 0xd1519
jmp 0xd14de
movl 0xc(%rsp), %eax
subl $0xd, %eax
je 0xd1562
jmp 0xd14e9
movl 0xc(%rsp), %eax
subl $0x22, %eax
je 0xd15f4
jmp 0xd14f8
movl 0xc(%rsp), %eax
subl $0x27, %eax
je 0xd15f6
jmp 0xd1507
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0xd15f8
jmp 0xd162d
movb $0x5c, 0xae(%rsp)
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x24c00
movq %rax, 0xa0(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x24c20
movq %rax, %rdi
leaq 0xae(%rsp), %rsi
callq 0x24c30
movb $0x6e, 0xaf(%rsp)
jmp 0xd17d5
movb $0x5c, 0x9f(%rsp)
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x24c00
movq %rax, 0x90(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x24c20
movq %rax, %rdi
leaq 0x9f(%rsp), %rsi
callq 0x24c30
movb $0x72, 0xaf(%rsp)
jmp 0xd17d5
movb $0x5c, 0x8f(%rsp)
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x24c00
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x24c20
movq %rax, %rdi
leaq 0x8f(%rsp), %rsi
callq 0x24c30
movb $0x74, 0xaf(%rsp)
jmp 0xd17d5
jmp 0xd15f6
jmp 0xd15f8
movb $0x5c, 0x7f(%rsp)
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x24c00
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x24c20
movq %rax, %rdi
leaq 0x7f(%rsp), %rsi
callq 0x24c30
jmp 0xd17d5
movq 0xb0(%rsp), %rax
cmpl $0x100, 0x10(%rax) # imm = 0x100
jae 0xd1672
movq 0xb8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xb0(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x68(%rsp), %rdi
movl $0x78, %esi
callq 0xd1830
movq %rax, 0xc0(%rsp)
jmp 0xd1813
movq 0xb0(%rsp), %rax
cmpl $0x10000, 0x10(%rax) # imm = 0x10000
jae 0xd16b7
movq 0xb8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xb0(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x60(%rsp), %rdi
movl $0x75, %esi
callq 0xd1900
movq %rax, 0xc0(%rsp)
jmp 0xd1813
movq 0xb0(%rsp), %rax
cmpl $0x110000, 0x10(%rax) # imm = 0x110000
jae 0xd16fc
movq 0xb8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb0(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x58(%rsp), %rdi
movl $0x55, %esi
callq 0xd19d0
movq %rax, 0xc0(%rsp)
jmp 0xd1813
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0xb0(%rsp), %rax
movq (%rax), %rax
subq %rax, %rdi
callq 0x85590
movq (%rsp), %rsi
movq %rax, %rdx
leaq 0x40(%rsp), %rdi
callq 0x243f0
leaq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x7bdc0
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
callq 0x7bdd0
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0xd17c3
movq 0x38(%rsp), %rax
movb (%rax), %al
movb %al, 0x2f(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x18(%rsp)
movsbl 0x2f(%rsp), %edx
andl $0xff, %edx
movq 0x18(%rsp), %rdi
movl $0x78, %esi
callq 0xd1830
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0xd1763
movq 0xb8(%rsp), %rax
movq %rax, 0xc0(%rsp)
jmp 0xd1813
leaq 0xb8(%rsp), %rdi
xorl %esi, %esi
callq 0x24c00
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x24c20
movq %rax, %rdi
leaq 0xaf(%rsp), %rsi
callq 0xd0180
movq 0xb8(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN3fmt3v106detail16write_escaped_cpINS0_8appenderEcEET_S4_RKNS1_18find_escape_resultIT0_EE:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_18], rsi
mov rax, [rsp+0C8h+var_18]
mov al, [rax+10h]
mov [rsp+0C8h+var_19], al
mov rax, [rsp+0C8h+var_18]
mov eax, [rax+10h]
mov [rsp+0C8h+var_BC], eax
sub eax, 9
jz loc_D15AB
jmp short $+2
loc_D14D3:
mov eax, [rsp+0C8h+var_BC]
sub eax, 0Ah
jz short loc_D1519
jmp short $+2
loc_D14DE:
mov eax, [rsp+0C8h+var_BC]
sub eax, 0Dh
jz short loc_D1562
jmp short $+2
loc_D14E9:
mov eax, [rsp+0C8h+var_BC]
sub eax, 22h ; '"'
jz loc_D15F4
jmp short $+2
loc_D14F8:
mov eax, [rsp+0C8h+var_BC]
sub eax, 27h ; '''
jz loc_D15F6
jmp short $+2
loc_D1507:
mov eax, [rsp+0C8h+var_BC]
sub eax, 5Ch ; '\'
jz loc_D15F8
jmp loc_D162D
loc_D1519:
mov [rsp+0C8h+var_1A], 5Ch ; '\'
lea rdi, [rsp+0C8h+var_10]
xor esi, esi
call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int)
mov [rsp+0C8h+var_28], rax
lea rdi, [rsp+0C8h+var_28]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+0C8h+var_1A]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&)
mov [rsp+0C8h+var_19], 6Eh ; 'n'
jmp loc_D17D5
loc_D1562:
mov [rsp+0C8h+var_29], 5Ch ; '\'
lea rdi, [rsp+0C8h+var_10]
xor esi, esi
call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int)
mov [rsp+0C8h+var_38], rax
lea rdi, [rsp+0C8h+var_38]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+0C8h+var_29]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&)
mov [rsp+0C8h+var_19], 72h ; 'r'
jmp loc_D17D5
loc_D15AB:
mov [rsp+0C8h+var_39], 5Ch ; '\'
lea rdi, [rsp+0C8h+var_10]
xor esi, esi
call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int)
mov [rsp+0C8h+var_48], rax
lea rdi, [rsp+0C8h+var_48]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+0C8h+var_39]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&)
mov [rsp+0C8h+var_19], 74h ; 't'
jmp loc_D17D5
loc_D15F4:
jmp short $+2
loc_D15F6:
jmp short $+2
loc_D15F8:
mov [rsp+0C8h+var_49], 5Ch ; '\'
lea rdi, [rsp+0C8h+var_10]
xor esi, esi
call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int)
mov [rsp+0C8h+var_58], rax
lea rdi, [rsp+0C8h+var_58]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+0C8h+var_49]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&)
jmp loc_D17D5
loc_D162D:
mov rax, [rsp+0C8h+var_18]
cmp dword ptr [rax+10h], 100h
jnb short loc_D1672
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_60], rax
mov rax, [rsp+0C8h+var_18]
mov edx, [rax+10h]
mov rdi, [rsp+0C8h+var_60]
mov esi, 78h ; 'x'
call _ZN3fmt3v106detail15write_codepointILm2EcNS0_8appenderEEET1_S4_cj; fmt::v10::detail::write_codepoint<2ul,char,fmt::v10::appender>(fmt::v10::appender,char,uint)
mov [rsp+0C8h+var_8], rax
jmp loc_D1813
loc_D1672:
mov rax, [rsp+0C8h+var_18]
cmp dword ptr [rax+10h], 10000h
jnb short loc_D16B7
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_68], rax
mov rax, [rsp+0C8h+var_18]
mov edx, [rax+10h]
mov rdi, [rsp+0C8h+var_68]
mov esi, 75h ; 'u'
call _ZN3fmt3v106detail15write_codepointILm4EcNS0_8appenderEEET1_S4_cj; fmt::v10::detail::write_codepoint<4ul,char,fmt::v10::appender>(fmt::v10::appender,char,uint)
mov [rsp+0C8h+var_8], rax
jmp loc_D1813
loc_D16B7:
mov rax, [rsp+0C8h+var_18]
cmp dword ptr [rax+10h], 110000h
jnb short loc_D16FC
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_70], rax
mov rax, [rsp+0C8h+var_18]
mov edx, [rax+10h]
mov rdi, [rsp+0C8h+var_70]
mov esi, 55h ; 'U'
call _ZN3fmt3v106detail15write_codepointILm8EcNS0_8appenderEEET1_S4_cj; fmt::v10::detail::write_codepoint<8ul,char,fmt::v10::appender>(fmt::v10::appender,char,uint)
mov [rsp+0C8h+var_8], rax
jmp loc_D1813
loc_D16FC:
mov rax, [rsp+0C8h+var_18]
mov rax, [rax]
mov [rsp+0C8h+var_C8], rax
mov rax, [rsp+0C8h+var_18]
mov rdi, [rax+8]
mov rax, [rsp+0C8h+var_18]
mov rax, [rax]
sub rdi, rax
call _ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<long>(long)
mov rsi, [rsp+0C8h+var_C8]
mov rdx, rax
lea rdi, [rsp+0C8h+var_88]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
lea rax, [rsp+0C8h+var_88]
mov [rsp+0C8h+var_78], rax
mov rdi, [rsp+0C8h+var_78]
call _ZNK3fmt3v1017basic_string_viewIcE5beginEv; fmt::v10::basic_string_view<char>::begin(void)
mov [rsp+0C8h+var_90], rax
mov rdi, [rsp+0C8h+var_78]
call _ZNK3fmt3v1017basic_string_viewIcE3endEv; fmt::v10::basic_string_view<char>::end(void)
mov [rsp+0C8h+var_98], rax
loc_D1763:
mov rax, [rsp+0C8h+var_90]
cmp rax, [rsp+0C8h+var_98]
jz short loc_D17C3
mov rax, [rsp+0C8h+var_90]
mov al, [rax]
mov [rsp+0C8h+var_99], al
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_B0], rax
movsx edx, [rsp+0C8h+var_99]
and edx, 0FFh
mov rdi, [rsp+0C8h+var_B0]
mov esi, 78h ; 'x'
call _ZN3fmt3v106detail15write_codepointILm2EcNS0_8appenderEEET1_S4_cj; fmt::v10::detail::write_codepoint<2ul,char,fmt::v10::appender>(fmt::v10::appender,char,uint)
mov [rsp+0C8h+var_A8], rax
mov rax, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_10], rax
mov rax, [rsp+0C8h+var_90]
add rax, 1
mov [rsp+0C8h+var_90], rax
jmp short loc_D1763
loc_D17C3:
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_8], rax
jmp short loc_D1813
loc_D17D5:
lea rdi, [rsp+0C8h+var_10]
xor esi, esi
call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int)
mov [rsp+0C8h+var_B8], rax
lea rdi, [rsp+0C8h+var_B8]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+0C8h+var_19]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSERKc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char const&)
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_8], rax
loc_D1813:
mov rax, [rsp+0C8h+var_8]
add rsp, 0C8h
retn
|
long long fmt::v10::detail::write_escaped_cp<fmt::v10::appender,char>(long long a1, long long a2)
{
_QWORD *v2; // rax
_QWORD *v3; // rax
_QWORD *v4; // rax
_QWORD *v5; // rax
long long v6; // rax
long long *v7; // rax
long long v9; // [rsp+0h] [rbp-C8h]
int v10; // [rsp+Ch] [rbp-BCh]
_QWORD v11[2]; // [rsp+10h] [rbp-B8h] BYREF
long long v12; // [rsp+20h] [rbp-A8h]
unsigned __int8 v13; // [rsp+2Fh] [rbp-99h]
long long v14; // [rsp+30h] [rbp-98h]
unsigned __int8 *v15; // [rsp+38h] [rbp-90h]
_QWORD v16[2]; // [rsp+40h] [rbp-88h] BYREF
_QWORD *v17; // [rsp+50h] [rbp-78h]
long long v18; // [rsp+58h] [rbp-70h]
long long v19; // [rsp+60h] [rbp-68h]
long long v20; // [rsp+68h] [rbp-60h]
long long v21; // [rsp+70h] [rbp-58h] BYREF
char v22; // [rsp+7Fh] [rbp-49h] BYREF
long long v23; // [rsp+80h] [rbp-48h] BYREF
char v24; // [rsp+8Fh] [rbp-39h] BYREF
long long v25; // [rsp+90h] [rbp-38h] BYREF
char v26; // [rsp+9Fh] [rbp-29h] BYREF
long long v27; // [rsp+A0h] [rbp-28h] BYREF
char v28; // [rsp+AEh] [rbp-1Ah] BYREF
char v29; // [rsp+AFh] [rbp-19h] BYREF
long long v30; // [rsp+B0h] [rbp-18h]
long long v31; // [rsp+B8h] [rbp-10h] BYREF
v31 = a1;
v30 = a2;
v29 = *(_BYTE *)(a2 + 16);
v10 = *(_DWORD *)(a2 + 16);
switch ( v10 )
{
case 9:
v24 = 92;
v23 = fmt::v10::appender::operator++((long long)&v31);
v4 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v23);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v4, (long long)&v24);
v29 = 116;
goto LABEL_22;
case 10:
v28 = 92;
v27 = fmt::v10::appender::operator++((long long)&v31);
v2 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v27);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v2, (long long)&v28);
v29 = 110;
LABEL_22:
v11[0] = fmt::v10::appender::operator++((long long)&v31);
v7 = (long long *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)v11);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v7, &v29);
return v31;
case 13:
v26 = 92;
v25 = fmt::v10::appender::operator++((long long)&v31);
v3 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v25);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v3, (long long)&v26);
v29 = 114;
goto LABEL_22;
case 34:
case 39:
case 92:
v22 = 92;
v21 = fmt::v10::appender::operator++((long long)&v31);
v5 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v21);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v5, (long long)&v22);
goto LABEL_22;
}
if ( *(_DWORD *)(v30 + 16) >= 0x100u )
{
if ( *(_DWORD *)(v30 + 16) >= 0x10000u )
{
if ( *(_DWORD *)(v30 + 16) >= 0x110000u )
{
v9 = *(_QWORD *)v30;
v6 = fmt::v10::detail::to_unsigned<long>(*(_QWORD *)(v30 + 8) - *(_QWORD *)v30);
fmt::v10::basic_string_view<char>::basic_string_view(v16, v9, v6);
v17 = v16;
v15 = (unsigned __int8 *)fmt::v10::basic_string_view<char>::begin((long long)v16);
v14 = fmt::v10::basic_string_view<char>::end(v17);
while ( v15 != (unsigned __int8 *)v14 )
{
v13 = *v15;
v11[1] = v31;
v12 = fmt::v10::detail::write_codepoint<2ul,char,fmt::v10::appender>(v31, 120LL, v13);
v31 = v12;
++v15;
}
return v31;
}
else
{
v18 = v31;
return fmt::v10::detail::write_codepoint<8ul,char,fmt::v10::appender>(v31, 85LL, *(unsigned int *)(v30 + 16));
}
}
else
{
v19 = v31;
return fmt::v10::detail::write_codepoint<4ul,char,fmt::v10::appender>(v31, 117LL, *(unsigned int *)(v30 + 16));
}
}
else
{
v20 = v31;
return fmt::v10::detail::write_codepoint<2ul,char,fmt::v10::appender>(v31, 120LL, *(unsigned int *)(v30 + 16));
}
}
|
write_escaped_cp<fmt::v10::appender,char>:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV qword ptr [RSP + 0xb0],RSI
MOV RAX,qword ptr [RSP + 0xb0]
MOV AL,byte ptr [RAX + 0x10]
MOV byte ptr [RSP + 0xaf],AL
MOV RAX,qword ptr [RSP + 0xb0]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x9
JZ 0x001d15ab
JMP 0x001d14d3
LAB_001d14d3:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xa
JZ 0x001d1519
JMP 0x001d14de
LAB_001d14de:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0xd
JZ 0x001d1562
JMP 0x001d14e9
LAB_001d14e9:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x22
JZ 0x001d15f4
JMP 0x001d14f8
LAB_001d14f8:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x27
JZ 0x001d15f6
JMP 0x001d1507
LAB_001d1507:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x5c
JZ 0x001d15f8
JMP 0x001d162d
LAB_001d1519:
MOV byte ptr [RSP + 0xae],0x5c
LEA RDI,[RSP + 0xb8]
XOR ESI,ESI
CALL 0x00124c00
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0xa0]
CALL 0x00124c20
MOV RDI,RAX
LEA RSI,[RSP + 0xae]
CALL 0x00124c30
MOV byte ptr [RSP + 0xaf],0x6e
JMP 0x001d17d5
LAB_001d1562:
MOV byte ptr [RSP + 0x9f],0x5c
LEA RDI,[RSP + 0xb8]
XOR ESI,ESI
CALL 0x00124c00
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x90]
CALL 0x00124c20
MOV RDI,RAX
LEA RSI,[RSP + 0x9f]
CALL 0x00124c30
MOV byte ptr [RSP + 0xaf],0x72
JMP 0x001d17d5
LAB_001d15ab:
MOV byte ptr [RSP + 0x8f],0x5c
LEA RDI,[RSP + 0xb8]
XOR ESI,ESI
CALL 0x00124c00
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[RSP + 0x80]
CALL 0x00124c20
MOV RDI,RAX
LEA RSI,[RSP + 0x8f]
CALL 0x00124c30
MOV byte ptr [RSP + 0xaf],0x74
JMP 0x001d17d5
LAB_001d15f4:
JMP 0x001d15f6
LAB_001d15f6:
JMP 0x001d15f8
LAB_001d15f8:
MOV byte ptr [RSP + 0x7f],0x5c
LEA RDI,[RSP + 0xb8]
XOR ESI,ESI
CALL 0x00124c00
MOV qword ptr [RSP + 0x70],RAX
LEA RDI,[RSP + 0x70]
CALL 0x00124c20
MOV RDI,RAX
LEA RSI,[RSP + 0x7f]
CALL 0x00124c30
JMP 0x001d17d5
LAB_001d162d:
MOV RAX,qword ptr [RSP + 0xb0]
CMP dword ptr [RAX + 0x10],0x100
JNC 0x001d1672
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV EDX,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RSP + 0x68]
MOV ESI,0x78
CALL 0x001d1830
MOV qword ptr [RSP + 0xc0],RAX
JMP 0x001d1813
LAB_001d1672:
MOV RAX,qword ptr [RSP + 0xb0]
CMP dword ptr [RAX + 0x10],0x10000
JNC 0x001d16b7
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV EDX,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x75
CALL 0x001d1900
MOV qword ptr [RSP + 0xc0],RAX
JMP 0x001d1813
LAB_001d16b7:
MOV RAX,qword ptr [RSP + 0xb0]
CMP dword ptr [RAX + 0x10],0x110000
JNC 0x001d16fc
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV EDX,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,0x55
CALL 0x001d19d0
MOV qword ptr [RSP + 0xc0],RAX
JMP 0x001d1813
LAB_001d16fc:
MOV RAX,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RAX]
SUB RDI,RAX
CALL 0x00185590
MOV RSI,qword ptr [RSP]
MOV RDX,RAX
LEA RDI,[RSP + 0x40]
CALL 0x001243f0
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0017bdc0
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x0017bdd0
MOV qword ptr [RSP + 0x30],RAX
LAB_001d1763:
MOV RAX,qword ptr [RSP + 0x38]
CMP RAX,qword ptr [RSP + 0x30]
JZ 0x001d17c3
MOV RAX,qword ptr [RSP + 0x38]
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x2f],AL
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x18],RAX
MOVSX EDX,byte ptr [RSP + 0x2f]
AND EDX,0xff
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x78
CALL 0x001d1830
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,0x1
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001d1763
LAB_001d17c3:
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xc0],RAX
JMP 0x001d1813
LAB_001d17d5:
LEA RDI,[RSP + 0xb8]
XOR ESI,ESI
CALL 0x00124c00
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x10]
CALL 0x00124c20
MOV RDI,RAX
LEA RSI,[RSP + 0xaf]
CALL 0x001d0180
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xc0],RAX
LAB_001d1813:
MOV RAX,qword ptr [RSP + 0xc0]
ADD RSP,0xc8
RET
|
/* fmt::v10::appender fmt::v10::detail::write_escaped_cp<fmt::v10::appender,
char>(fmt::v10::appender, fmt::v10::detail::find_escape_result<char> const&) */
int8
fmt::v10::detail::write_escaped_cp<fmt::v10::appender,char>(int8 param_1,long *param_2)
{
int iVar1;
char *pcVar2;
back_insert_iterator<fmt::v10::detail::buffer<char>> *pbVar3;
int8 uVar4;
ulong uVar5;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int1 local_99;
int1 *local_98;
int1 *local_90;
basic_string_view<char> local_88 [16];
basic_string_view<char> *local_78;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
char local_49;
int8 local_48;
char local_39;
int8 local_38;
char local_29;
int8 local_28;
char local_1a;
char local_19;
long *local_18;
int8 local_10 [2];
local_19 = (char)param_2[2];
iVar1 = (int)param_2[2];
local_18 = param_2;
local_10[0] = param_1;
if (iVar1 == 9) {
local_39 = '\\';
local_48 = appender::operator++((appender *)local_10,0);
pbVar3 = (back_insert_iterator<fmt::v10::detail::buffer<char>> *)
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*
((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_48);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(pbVar3,&local_39);
local_19 = 't';
}
else if (iVar1 == 10) {
local_1a = '\\';
local_28 = appender::operator++((appender *)local_10,0);
pbVar3 = (back_insert_iterator<fmt::v10::detail::buffer<char>> *)
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*
((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_28);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(pbVar3,&local_1a);
local_19 = 'n';
}
else if (iVar1 == 0xd) {
local_29 = '\\';
local_38 = appender::operator++((appender *)local_10,0);
pbVar3 = (back_insert_iterator<fmt::v10::detail::buffer<char>> *)
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*
((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_38);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(pbVar3,&local_29);
local_19 = 'r';
}
else {
if (((iVar1 != 0x22) && (iVar1 != 0x27)) && (iVar1 != 0x5c)) {
if (*(uint *)(param_2 + 2) < 0x100) {
local_60 = param_1;
uVar4 = write_codepoint<2ul,char,fmt::v10::appender>(param_1,0x78,(int)param_2[2]);
return uVar4;
}
if (*(uint *)(param_2 + 2) < 0x10000) {
local_68 = param_1;
uVar4 = write_codepoint<4ul,char,fmt::v10::appender>(param_1,0x75,(int)param_2[2]);
return uVar4;
}
if (*(uint *)(param_2 + 2) < 0x110000) {
local_70 = param_1;
uVar4 = write_codepoint<8ul,char,fmt::v10::appender>(param_1,0x55,(int)param_2[2]);
return uVar4;
}
pcVar2 = (char *)*param_2;
uVar5 = to_unsigned<long>(param_2[1] - *param_2);
basic_string_view<char>::basic_string_view(local_88,pcVar2,uVar5);
local_78 = local_88;
local_90 = (int1 *)basic_string_view<char>::begin(local_78);
local_98 = (int1 *)basic_string_view<char>::end(local_78);
for (; local_90 != local_98; local_90 = local_90 + 1) {
local_99 = *local_90;
local_b0 = local_10[0];
local_a8 = write_codepoint<2ul,char,fmt::v10::appender>(local_10[0],0x78,local_99);
local_10[0] = local_a8;
}
return local_10[0];
}
local_49 = '\\';
local_58 = appender::operator++((appender *)local_10,0);
pbVar3 = (back_insert_iterator<fmt::v10::detail::buffer<char>> *)
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*
((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_58);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(pbVar3,&local_49);
}
local_b8 = appender::operator++((appender *)local_10,0);
pbVar3 = (back_insert_iterator<fmt::v10::detail::buffer<char>> *)
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*
((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_b8);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(pbVar3,&local_19);
return local_10[0];
}
|
|
12,340
|
common_log::add(ggml_log_level, char const*, __va_list_tag*)
|
monkey531[P]llama/common/log.cpp
|
void add(enum ggml_log_level level, const char * fmt, va_list args) {
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
// discard messages while the worker thread is paused
return;
}
auto & entry = entries[tail];
{
// cannot use args twice, so make a copy in case we need to expand the buffer
va_list args_copy;
va_copy(args_copy, args);
#if 1
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy);
}
#else
// hack for bolding arguments
std::stringstream ss;
for (int i = 0; fmt[i] != 0; i++) {
if (fmt[i] == '%') {
ss << LOG_COL_BOLD;
while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++];
ss << LOG_COL_DEFAULT;
if (fmt[i] == 0) break;
}
ss << fmt[i];
}
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}
entry.level = level;
entry.prefix = prefix;
entry.timestamp = 0;
if (timestamps) {
entry.timestamp = t_us() - t_start;
}
entry.is_end = false;
tail = (tail + 1) % entries.size();
if (tail == head) {
// expand the buffer
std::vector<common_log_entry> new_entries(2*entries.size());
size_t new_tail = 0;
do {
new_entries[new_tail] = std::move(entries[head]);
head = (head + 1) % entries.size();
new_tail = (new_tail + 1);
} while (head != tail);
head = 0;
tail = new_tail;
for (size_t i = tail; i < new_entries.size(); i++) {
new_entries[i].msg.resize(256);
}
entries = std::move(new_entries);
}
cv.notify_one();
}
|
O2
|
cpp
|
common_log::add(ggml_log_level, char const*, __va_list_tag*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x99a3e
cmpb $0x1, 0x6a(%rbx)
jne 0x994b1
movl %ebp, 0xc(%rsp)
movq 0x78(%rbx), %r13
imulq $0x30, 0x98(%rbx), %rbp
movq %r13, %r12
addq %rbp, %r12
movq 0x10(%r15), %rax
movq %rax, 0x20(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x10(%r13,%rbp), %rdi
movq 0x18(%r13,%rbp), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x25480
movslq %eax, %rsi
movq 0x18(%r13,%rbp), %rax
subq 0x10(%r13,%rbp), %rax
cmpq %rsi, %rax
ja 0x99367
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
incq %rsi
callq 0x5eeba
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
subq %rdi, %rsi
leaq 0x10(%rsp), %rcx
movq %r14, %rdx
callq 0x25480
movl 0xc(%rsp), %eax
movl %eax, (%r12)
movb 0x68(%rbx), %al
movb %al, 0x4(%r12)
andq $0x0, 0x8(%r12)
cmpb $0x1, 0x69(%rbx)
jne 0x99391
callq 0x99176
subq 0x70(%rbx), %rax
movq %rax, 0x8(%r12)
movb $0x0, 0x28(%r12)
movq 0x80(%rbx), %rax
movq 0x98(%rbx), %rcx
incq %rcx
subq 0x78(%rbx), %rax
pushq $0x30
popq %r15
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
cmpq 0x90(%rbx), %rdx
jne 0x994a8
addq %rsi, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x99f2e
leaq 0x78(%rbx), %r14
movq 0x78(%rbx), %rdi
movq 0x90(%rbx), %rdx
pushq $0x10
popq %r12
xorl %r13d, %r13d
imulq $0x30, %rdx, %rsi
addq %rdi, %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%r12), %rdi
addq $-0x10, %rdi
callq 0x99f80
movq 0x90(%rbx), %rcx
incq %rcx
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %rax
subq %rdi, %rax
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x90(%rbx)
incq %r13
addq $0x30, %r12
cmpq 0x98(%rbx), %rdx
jne 0x993fc
andq $0x0, 0x90(%rbx)
movq %r13, 0x98(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
cqto
idivq %r15
cmpq %rax, %r13
jae 0x99490
addq %r12, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x5eeba
incq %r13
addq $0x30, %r12
jmp 0x99463
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x9a05e
movq %r15, %rdi
callq 0x9974a
leaq 0x30(%rbx), %rdi
callq 0x24530
movq %rbx, %rdi
callq 0x247f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x994ca
movq %rax, %r14
jmp 0x994dc
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x9974a
movq %rbx, %rdi
callq 0x247f0
movq %r14, %rdi
callq 0x251e0
|
_ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp byte ptr [rbx+6Ah], 1
jnz loc_994B1
mov [rsp+58h+var_4C], ebp
mov r13, [rbx+78h]
imul rbp, [rbx+98h], 30h ; '0'
mov r12, r13
add r12, rbp
mov rax, [r15+10h]
mov [rsp+58h+var_38], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+58h+var_48], xmm0
mov rdi, [r13+rbp+10h]
mov rsi, [r13+rbp+18h]
sub rsi, rdi
mov rdx, r14
mov rcx, r15
call vsnprintf
movsxd rsi, eax
mov rax, [r13+rbp+18h]
sub rax, [r13+rbp+10h]
cmp rax, rsi
ja short loc_99367
lea rdi, ds:10h[rbp]
add rdi, r13
inc rsi
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rdi, [r12+10h]
mov rsi, [r12+18h]
sub rsi, rdi
lea rcx, [rsp+58h+var_48]
mov rdx, r14
call vsnprintf
loc_99367:
mov eax, [rsp+58h+var_4C]
mov [r12], eax
mov al, [rbx+68h]
mov [r12+4], al
and qword ptr [r12+8], 0
cmp byte ptr [rbx+69h], 1
jnz short loc_99391
call _ZL4t_usv; t_us(void)
sub rax, [rbx+70h]
mov [r12+8], rax
loc_99391:
mov byte ptr [r12+28h], 0
mov rax, [rbx+80h]
mov rcx, [rbx+98h]
inc rcx
sub rax, [rbx+78h]
push 30h ; '0'
pop r15
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+98h], rdx
cmp rdx, [rbx+90h]
jnz loc_994A8
add rsi, rsi
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_4D]
call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&)
lea r14, [rbx+78h]
mov rdi, [rbx+78h]
mov rdx, [rbx+90h]
push 10h
pop r12
xor r13d, r13d
loc_993FC:
imul rsi, rdx, 30h ; '0'
add rsi, rdi
mov rax, qword ptr [rsp+58h+var_48]
lea rdi, [rax+r12]
add rdi, 0FFFFFFFFFFFFFFF0h
call _ZN16common_log_entryaSEOS_; common_log_entry::operator=(common_log_entry&&)
mov rcx, [rbx+90h]
inc rcx
mov rdi, [rbx+78h]
mov rax, [rbx+80h]
sub rax, rdi
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+90h], rdx
inc r13
add r12, 30h ; '0'
cmp rdx, [rbx+98h]
jnz short loc_993FC
and qword ptr [rbx+90h], 0
mov [rbx+98h], r13
loc_99463:
mov rdi, qword ptr [rsp+58h+var_48]
mov rax, qword ptr [rsp+58h+var_48+8]
sub rax, rdi
cqo
idiv r15
cmp r13, rax
jnb short loc_99490
add rdi, r12
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
inc r13
add r12, 30h ; '0'
jmp short loc_99463
loc_99490:
lea r15, [rsp+58h+var_48]
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<common_log_entry>::_M_move_assign(std::vector<common_log_entry>&&,std::integral_constant<bool,true>)
mov rdi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_994A8:
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
loc_994B1:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_994CA:
mov r14, rax
jmp short loc_994DC
mov r14, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_994DC:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long common_log::add(long long a1, int a2, long long a3, __int128 *a4)
{
long long v7; // r13
long long v8; // rbp
long long v9; // r12
std::chrono::_V2::system_clock *v10; // rdi
unsigned long long v11; // rsi
unsigned long long v12; // rsi
unsigned long long v13; // rdx
long long v14; // rdi
unsigned long long v15; // rdx
long long v16; // r12
unsigned long long v17; // r13
char v19; // [rsp+Bh] [rbp-4Dh] BYREF
int v20; // [rsp+Ch] [rbp-4Ch]
__int128 v21; // [rsp+10h] [rbp-48h] BYREF
long long v22; // [rsp+20h] [rbp-38h]
std::mutex::lock((std::mutex *)a1);
if ( *(_BYTE *)(a1 + 106) == 1 )
{
v20 = a2;
v7 = *(_QWORD *)(a1 + 120);
v8 = 48LL * *(_QWORD *)(a1 + 152);
v9 = v8 + v7;
v22 = *((_QWORD *)a4 + 2);
v21 = *a4;
v10 = *(std::chrono::_V2::system_clock **)(v7 + v8 + 16);
v11 = (int)vsnprintf(v10, *(_QWORD *)(v7 + v8 + 24) - (_QWORD)v10, a3, a4);
if ( *(_QWORD *)(v7 + v8 + 24) - *(_QWORD *)(v7 + v8 + 16) <= v11 )
{
std::vector<char>::resize((_QWORD *)(v7 + v8 + 16), v11 + 1);
v10 = *(std::chrono::_V2::system_clock **)(v9 + 16);
vsnprintf(v10, *(_QWORD *)(v9 + 24) - (_QWORD)v10, a3, &v21);
}
*(_DWORD *)v9 = v20;
*(_BYTE *)(v9 + 4) = *(_BYTE *)(a1 + 104);
*(_QWORD *)(v9 + 8) = 0LL;
if ( *(_BYTE *)(a1 + 105) == 1 )
*(_QWORD *)(v9 + 8) = t_us(v10) - *(_QWORD *)(a1 + 112);
*(_BYTE *)(v9 + 40) = 0;
v12 = (*(_QWORD *)(a1 + 128) - *(_QWORD *)(a1 + 120)) / 48LL;
v13 = (*(_QWORD *)(a1 + 152) + 1LL) % v12;
*(_QWORD *)(a1 + 152) = v13;
if ( v13 == *(_QWORD *)(a1 + 144) )
{
std::vector<common_log_entry>::vector(&v21, 2 * v12, &v19);
v14 = *(_QWORD *)(a1 + 120);
v15 = *(_QWORD *)(a1 + 144);
v16 = 16LL;
v17 = 0LL;
do
{
common_log_entry::operator=(v21 + v16 - 16, v14 + 48 * v15);
v14 = *(_QWORD *)(a1 + 120);
v15 = (*(_QWORD *)(a1 + 144) + 1LL) % (unsigned long long)((*(_QWORD *)(a1 + 128) - v14) / 48);
*(_QWORD *)(a1 + 144) = v15;
++v17;
v16 += 48LL;
}
while ( v15 != *(_QWORD *)(a1 + 152) );
*(_QWORD *)(a1 + 144) = 0LL;
*(_QWORD *)(a1 + 152) = v17;
while ( v17 < (*((_QWORD *)&v21 + 1) - (_QWORD)v21) / 48LL )
{
std::vector<char>::resize((_QWORD *)(v16 + v21), 0x100uLL);
++v17;
v16 += 48LL;
}
std::vector<common_log_entry>::_M_move_assign(a1 + 120, &v21, (*((_QWORD *)&v21 + 1) - (_QWORD)v21) % 48LL);
std::vector<common_log_entry>::~vector(&v21);
}
std::condition_variable::notify_one((std::condition_variable *)(a1 + 48));
}
return pthread_mutex_unlock(a1);
}
|
add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00199a3e
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x001994b1
MOV dword ptr [RSP + 0xc],EBP
MOV R13,qword ptr [RBX + 0x78]
IMUL RBP,qword ptr [RBX + 0x98],0x30
MOV R12,R13
ADD R12,RBP
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x00125480
MOVSXD RSI,EAX
MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10]
CMP RAX,RSI
JA 0x00199367
LEA RDI,[0x10 + RBP*0x1]
ADD RDI,R13
INC RSI
LAB_00199348:
CALL 0x0015eeba
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [R12 + 0x18]
SUB RSI,RDI
LEA RCX,[RSP + 0x10]
MOV RDX,R14
CALL 0x00125480
LAB_00199367:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
MOV AL,byte ptr [RBX + 0x68]
MOV byte ptr [R12 + 0x4],AL
AND qword ptr [R12 + 0x8],0x0
CMP byte ptr [RBX + 0x69],0x1
JNZ 0x00199391
CALL 0x00199176
SUB RAX,qword ptr [RBX + 0x70]
MOV qword ptr [R12 + 0x8],RAX
LAB_00199391:
MOV byte ptr [R12 + 0x28],0x0
MOV RAX,qword ptr [RBX + 0x80]
MOV RCX,qword ptr [RBX + 0x98]
INC RCX
SUB RAX,qword ptr [RBX + 0x78]
PUSH 0x30
POP R15
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
CMP RDX,qword ptr [RBX + 0x90]
JNZ 0x001994a8
ADD RSI,RSI
LAB_001993d7:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xb]
CALL 0x00199f2e
LEA R14,[RBX + 0x78]
MOV RDI,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x90]
PUSH 0x10
POP R12
XOR R13D,R13D
LAB_001993fc:
IMUL RSI,RDX,0x30
ADD RSI,RDI
MOV RAX,qword ptr [RSP + 0x10]
LEA RDI,[RAX + R12*0x1]
ADD RDI,-0x10
CALL 0x00199f80
MOV RCX,qword ptr [RBX + 0x90]
INC RCX
MOV RDI,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x80]
SUB RAX,RDI
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x90],RDX
INC R13
ADD R12,0x30
CMP RDX,qword ptr [RBX + 0x98]
JNZ 0x001993fc
AND qword ptr [RBX + 0x90],0x0
MOV qword ptr [RBX + 0x98],R13
LAB_00199463:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RDI
CQO
IDIV R15
CMP R13,RAX
JNC 0x00199490
ADD RDI,R12
LAB_0019947d:
MOV ESI,0x100
CALL 0x0015eeba
LAB_00199487:
INC R13
ADD R12,0x30
JMP 0x00199463
LAB_00199490:
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x0019a05e
MOV RDI,R15
CALL 0x0019974a
LAB_001994a8:
LEA RDI,[RBX + 0x30]
CALL 0x00124530
LAB_001994b1:
MOV RDI,RBX
CALL 0x001247f0
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */
void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4)
{
char *__s;
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
int4 *puVar6;
allocator local_4d;
int4 local_4c;
long local_48;
long lStack_40;
long local_38;
std::mutex::lock((mutex *)this);
if (this[0x6a] == (common_log)0x1) {
lVar2 = *(long *)(this + 0x78);
lVar5 = *(long *)(this + 0x98) * 0x30;
puVar6 = (int4 *)(lVar2 + lVar5);
local_38 = param_4[2];
local_48 = *param_4;
lStack_40 = param_4[1];
__s = *(char **)(lVar2 + 0x10 + lVar5);
local_4c = param_2;
iVar1 = vsnprintf(__s,*(long *)(lVar2 + 0x18 + lVar5) - (long)__s,param_3,param_4);
if ((ulong)(*(long *)(lVar2 + 0x18 + lVar5) - *(long *)(lVar2 + 0x10 + lVar5)) <=
(ulong)(long)iVar1) {
/* try { // try from 00199348 to 0019934c has its CatchHandler @ 001994ca */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar5 + 0x10 + lVar2),(long)iVar1 + 1);
vsnprintf(*(char **)(puVar6 + 4),*(long *)(puVar6 + 6) - (long)*(char **)(puVar6 + 4),param_3,
&local_48);
}
*puVar6 = local_4c;
*(common_log *)(puVar6 + 1) = this[0x68];
*(int8 *)(puVar6 + 2) = 0;
if (this[0x69] == (common_log)0x1) {
lVar2 = t_us();
*(long *)(puVar6 + 2) = lVar2 - *(long *)(this + 0x70);
}
*(int1 *)(puVar6 + 10) = 0;
uVar3 = (*(long *)(this + 0x80) - *(long *)(this + 0x78)) / 0x30;
uVar4 = (*(long *)(this + 0x98) + 1U) % uVar3;
*(ulong *)(this + 0x98) = uVar4;
if (uVar4 == *(ulong *)(this + 0x90)) {
/* try { // try from 001993d7 to 001993e5 has its CatchHandler @ 001994c8 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,uVar3 * 2,
&local_4d);
lVar2 = *(long *)(this + 0x78);
uVar3 = *(ulong *)(this + 0x90);
lVar5 = 0x10;
uVar4 = 0;
do {
common_log_entry::operator=
((common_log_entry *)(local_48 + lVar5 + -0x10),
(common_log_entry *)(uVar3 * 0x30 + lVar2));
lVar2 = *(long *)(this + 0x78);
uVar3 = (*(long *)(this + 0x90) + 1U) % (ulong)((*(long *)(this + 0x80) - lVar2) / 0x30);
*(ulong *)(this + 0x90) = uVar3;
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
} while (uVar3 != *(ulong *)(this + 0x98));
*(int8 *)(this + 0x90) = 0;
*(ulong *)(this + 0x98) = uVar4;
while( true ) {
if ((ulong)((lStack_40 - local_48) / 0x30) <= uVar4) break;
/* try { // try from 0019947d to 00199486 has its CatchHandler @ 001994cf */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(local_48 + lVar5),0x100);
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
}
std::vector<common_log_entry,std::allocator<common_log_entry>>::_M_move_assign
(this + 0x78,(vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,
(lStack_40 - local_48) % 0x30);
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48);
}
std::condition_variable::notify_one();
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
12,341
|
common_log::add(ggml_log_level, char const*, __va_list_tag*)
|
monkey531[P]llama/common/log.cpp
|
void add(enum ggml_log_level level, const char * fmt, va_list args) {
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
// discard messages while the worker thread is paused
return;
}
auto & entry = entries[tail];
{
// cannot use args twice, so make a copy in case we need to expand the buffer
va_list args_copy;
va_copy(args_copy, args);
#if 1
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy);
}
#else
// hack for bolding arguments
std::stringstream ss;
for (int i = 0; fmt[i] != 0; i++) {
if (fmt[i] == '%') {
ss << LOG_COL_BOLD;
while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++];
ss << LOG_COL_DEFAULT;
if (fmt[i] == 0) break;
}
ss << fmt[i];
}
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}
entry.level = level;
entry.prefix = prefix;
entry.timestamp = 0;
if (timestamps) {
entry.timestamp = t_us() - t_start;
}
entry.is_end = false;
tail = (tail + 1) % entries.size();
if (tail == head) {
// expand the buffer
std::vector<common_log_entry> new_entries(2*entries.size());
size_t new_tail = 0;
do {
new_entries[new_tail] = std::move(entries[head]);
head = (head + 1) % entries.size();
new_tail = (new_tail + 1);
} while (head != tail);
head = 0;
tail = new_tail;
for (size_t i = tail; i < new_entries.size(); i++) {
new_entries[i].msg.resize(256);
}
entries = std::move(new_entries);
}
cv.notify_one();
}
|
O3
|
cpp
|
common_log::add(ggml_log_level, char const*, __va_list_tag*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1bee0
testl %eax, %eax
jne 0xcef86
cmpb $0x1, 0x6a(%rbx)
jne 0xcef6f
movl %ebp, 0xc(%rsp)
movq 0x78(%rbx), %r13
movq 0x98(%rbx), %rax
leaq (%rax,%rax,2), %rbp
shlq $0x4, %rbp
movq %r13, %r12
addq %rbp, %r12
movq 0x10(%r15), %rax
movq %rax, 0x40(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%r13,%rbp), %rdi
movq 0x18(%r13,%rbp), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x1c428
movslq %eax, %rsi
movq 0x18(%r13,%rbp), %rax
subq 0x10(%r13,%rbp), %rax
cmpq %rsi, %rax
ja 0xced6e
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
incq %rsi
callq 0x8151e
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
subq %rdi, %rsi
leaq 0x30(%rsp), %rcx
movq %r14, %rdx
callq 0x1c428
movl 0xc(%rsp), %eax
movl %eax, (%r12)
movb 0x68(%rbx), %al
movb %al, 0x4(%r12)
movq $0x0, 0x8(%r12)
cmpb $0x1, 0x69(%rbx)
jne 0xcedb6
callq 0x1b090
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
subq 0x70(%rbx), %rdx
movq %rdx, 0x8(%r12)
movb $0x0, 0x28(%r12)
movq 0x80(%rbx), %rsi
movq 0x98(%rbx), %rax
incq %rax
subq 0x78(%rbx), %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r14, %rsi
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
cmpq 0x90(%rbx), %rdx
jne 0xcef66
addq %rsi, %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %rbx, (%rsp)
callq 0xcf9f8
movq 0x78(%rbx), %rcx
movq 0x90(%rbx), %rdx
movl $0x10, %r12d
xorl %ebp, %ebp
xorl %r13d, %r13d
leaq (%rdx,%rdx,2), %rax
shlq $0x4, %rax
movq 0x10(%rsp), %r15
movq %r14, %rbx
leaq (%rcx,%rax), %r14
addq $0x10, %r14
movups -0x10(%r14), %xmm0
movups %xmm0, (%r15,%rbp)
leaq (%r15,%r12), %rdi
movq %r14, %rsi
callq 0xcfa76
movb 0x18(%r14), %al
movq %rbx, %r14
movq (%rsp), %rbx
movb %al, 0x28(%r15,%rbp)
movq 0x90(%rbx), %rax
incq %rax
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
sarq $0x4, %rdi
imulq %r14, %rdi
xorl %edx, %edx
divq %rdi
movq %rdx, 0x90(%rbx)
incq %r13
addq $0x30, %r12
addq $0x30, %rbp
cmpq 0x98(%rbx), %rdx
jne 0xcee28
movq $0x0, 0x90(%rbx)
movq %r13, 0x98(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
imulq %r14, %rdx
cmpq %rdx, %r13
jae 0xcef18
addq %r12, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x8151e
incq %r13
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, %rcx
subq %rdi, %rcx
sarq $0x4, %rcx
imulq %r14, %rcx
addq $0x30, %r12
cmpq %rcx, %r13
jb 0xceedc
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
movq %rdi, 0x78(%rbx)
movq %rax, 0x80(%rbx)
leaq 0x10(%rsp), %r14
movq 0x10(%r14), %rax
movq %rax, 0x88(%rbx)
leaq 0x30(%rsp), %rdi
movq %rcx, (%rdi)
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0xcf26e
movq %r14, %rdi
callq 0xcf26e
leaq 0x30(%rbx), %rdi
callq 0x1b500
movq %rbx, %rdi
callq 0x1b7b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x1b6f0
jmp 0xcef93
movq %rbx, (%rsp)
movq %rax, %r14
jmp 0xcefa5
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xcf26e
movq (%rsp), %rdi
callq 0x1b7b0
movq %r14, %rdi
callq 0x1c1e0
|
_ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz loc_CEF86
cmp byte ptr [rbx+6Ah], 1
jnz loc_CEF6F
mov [rsp+78h+var_6C], ebp
mov r13, [rbx+78h]
mov rax, [rbx+98h]
lea rbp, [rax+rax*2]
shl rbp, 4
mov r12, r13
add r12, rbp
mov rax, [r15+10h]
mov [rsp+78h+var_38], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+78h+var_48], xmm0
mov rdi, [r13+rbp+10h]
mov rsi, [r13+rbp+18h]
sub rsi, rdi
mov rdx, r14
mov rcx, r15
call vsnprintf
movsxd rsi, eax
mov rax, [r13+rbp+18h]
sub rax, [r13+rbp+10h]
cmp rax, rsi
ja short loc_CED6E
lea rdi, ds:10h[rbp]
add rdi, r13
inc rsi
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rdi, [r12+10h]; this
mov rsi, [r12+18h]
sub rsi, rdi
lea rcx, [rsp+78h+var_48]
mov rdx, r14
call vsnprintf
loc_CED6E:
mov eax, [rsp+78h+var_6C]
mov [r12], eax
mov al, [rbx+68h]
mov [r12+4], al
mov qword ptr [r12+8], 0
cmp byte ptr [rbx+69h], 1
jnz short loc_CEDB6
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
sub rdx, [rbx+70h]
mov [r12+8], rdx
loc_CEDB6:
mov byte ptr [r12+28h], 0
mov rsi, [rbx+80h]
mov rax, [rbx+98h]
inc rax
sub rsi, [rbx+78h]
sar rsi, 4
mov r14, 0AAAAAAAAAAAAAAABh
imul rsi, r14
xor edx, edx
div rsi
mov [rbx+98h], rdx
cmp rdx, [rbx+90h]
jnz loc_CEF66
add rsi, rsi
lea rdi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_48]
mov [rsp+78h+var_78], rbx
call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&)
mov rcx, [rbx+78h]
mov rdx, [rbx+90h]
mov r12d, 10h
xor ebp, ebp
xor r13d, r13d
loc_CEE28:
lea rax, [rdx+rdx*2]
shl rax, 4
mov r15, [rsp+78h+var_68]
mov rbx, r14
lea r14, [rcx+rax]
add r14, 10h
movups xmm0, xmmword ptr [r14-10h]
movups xmmword ptr [r15+rbp], xmm0
lea rdi, [r15+r12]
mov rsi, r14
call _ZNSt6vectorIcSaIcEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<char>::_M_move_assign(std::vector<char>&&,std::integral_constant<bool,true>)
mov al, [r14+18h]
mov r14, rbx
mov rbx, [rsp+78h+var_78]
mov [r15+rbp+28h], al
mov rax, [rbx+90h]
inc rax
mov rcx, [rbx+78h]
mov rsi, [rbx+80h]
mov rdi, rsi
sub rdi, rcx
sar rdi, 4
imul rdi, r14
xor edx, edx
div rdi
mov [rbx+90h], rdx
inc r13
add r12, 30h ; '0'
add rbp, 30h ; '0'
cmp rdx, [rbx+98h]
jnz loc_CEE28
mov qword ptr [rbx+90h], 0
mov [rbx+98h], r13
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
mov rdx, rax
sub rdx, rdi
sar rdx, 4
imul rdx, r14
cmp r13, rdx
jnb short loc_CEF18
loc_CEEDC:
add rdi, r12
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
inc r13
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
mov rcx, rax
sub rcx, rdi
sar rcx, 4
imul rcx, r14
add r12, 30h ; '0'
cmp r13, rcx
jb short loc_CEEDC
mov rcx, [rbx+78h]
mov rsi, [rbx+80h]
loc_CEF18:
mov rdx, [rbx+88h]
mov [rbx+78h], rdi
mov [rbx+80h], rax
lea r14, [rsp+78h+var_68]
mov rax, [r14+10h]
mov [rbx+88h], rax
lea rdi, [rsp+78h+var_48]
mov [rdi], rcx
mov [rdi+8], rsi
mov [rdi+10h], rdx
xorps xmm0, xmm0
movaps xmmword ptr [r14], xmm0
mov qword ptr [r14+10h], 0
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
mov rdi, r14
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_CEF66:
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
loc_CEF6F:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CEF86:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_CEF93
mov [rsp+78h+var_78], rbx
loc_CEF93:
mov r14, rax
jmp short loc_CEFA5
mov r14, rax
lea rdi, [rsp+78h+var_68]
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_CEFA5:
mov rdi, [rsp+78h+var_78]
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long common_log::add(long long a1, int a2, long long a3, __int128 *a4)
{
_QWORD *v6; // rbx
int v7; // eax
long long v8; // r13
long long v9; // rbp
long long v10; // r12
std::chrono::_V2::system_clock *v11; // rdi
unsigned long long v12; // rsi
unsigned long long v13; // r14
unsigned long long v14; // rsi
unsigned long long v15; // rdx
long long v16; // rcx
unsigned long long v17; // rdx
long long v18; // r12
long long v19; // rbp
unsigned long long v20; // r13
long long v21; // r15
unsigned long long v22; // rbx
long long v23; // r14
char v24; // al
long long v25; // rsi
__int128 v26; // kr00_16
long long v27; // rdx
_QWORD *v29; // [rsp+0h] [rbp-78h]
__int128 v31; // [rsp+10h] [rbp-68h] BYREF
long long v32; // [rsp+20h] [rbp-58h]
__int128 v33; // [rsp+30h] [rbp-48h] BYREF
long long v34; // [rsp+40h] [rbp-38h]
v6 = (_QWORD *)a1;
v7 = pthread_mutex_lock();
if ( v7 )
std::__throw_system_error(v7);
if ( *(_BYTE *)(a1 + 106) == 1 )
{
v8 = *(_QWORD *)(a1 + 120);
v9 = 48LL * *(_QWORD *)(a1 + 152);
v10 = v9 + v8;
v34 = *((_QWORD *)a4 + 2);
v33 = *a4;
v11 = *(std::chrono::_V2::system_clock **)(v8 + v9 + 16);
v12 = (int)vsnprintf(v11, *(_QWORD *)(v8 + v9 + 24) - (_QWORD)v11, a3, a4);
if ( *(_QWORD *)(v8 + v9 + 24) - *(_QWORD *)(v8 + v9 + 16) <= v12 )
{
std::vector<char>::resize((_QWORD *)(v8 + v9 + 16), v12 + 1);
v11 = *(std::chrono::_V2::system_clock **)(v10 + 16);
vsnprintf(v11, *(_QWORD *)(v10 + 24) - (_QWORD)v11, a3, &v33);
}
*(_DWORD *)v10 = a2;
*(_BYTE *)(v10 + 4) = *((_BYTE *)v6 + 104);
*(_QWORD *)(v10 + 8) = 0LL;
if ( *((_BYTE *)v6 + 105) == 1 )
*(_QWORD *)(v10 + 8) = std::chrono::_V2::system_clock::now(v11) / 1000LL - v6[14];
*(_BYTE *)(v10 + 40) = 0;
v13 = 0xAAAAAAAAAAAAAAABLL;
v14 = 0xAAAAAAAAAAAAAAABLL * ((long long)(v6[16] - v6[15]) >> 4);
v15 = (v6[19] + 1LL) % v14;
v6[19] = v15;
if ( v15 == v6[18] )
{
v29 = v6;
std::vector<common_log_entry>::vector(&v31, 2 * v14, &v33);
v16 = v6[15];
v17 = v6[18];
v18 = 16LL;
v19 = 0LL;
v20 = 0LL;
do
{
v21 = v31;
v22 = v13;
v23 = v16 + 48 * v17 + 16;
*(_OWORD *)(v31 + v19) = *(_OWORD *)(v16 + 48 * v17);
std::vector<char>::_M_move_assign(v21 + v18, v23);
v24 = *(_BYTE *)(v23 + 24);
v13 = v22;
v6 = v29;
*(_BYTE *)(v21 + v19 + 40) = v24;
v16 = v29[15];
v25 = v29[16];
v17 = (v29[18] + 1LL) % (v13 * ((v25 - v16) >> 4));
v29[18] = v17;
++v20;
v18 += 48LL;
v19 += 48LL;
}
while ( v17 != v29[19] );
v29[18] = 0LL;
v29[19] = v20;
v26 = v31;
if ( v20 < v13 * ((long long)(*((_QWORD *)&v31 + 1) - v31) >> 4) )
{
do
{
std::vector<char>::resize((_QWORD *)(v18 + v26), 0x100uLL);
++v20;
v18 += 48LL;
v26 = v31;
}
while ( v20 < v13 * ((long long)(*((_QWORD *)&v31 + 1) - v31) >> 4) );
v16 = v29[15];
v25 = v29[16];
}
v27 = v29[17];
*(_OWORD *)(v29 + 15) = v26;
v29[17] = v32;
*(_QWORD *)&v33 = v16;
*((_QWORD *)&v33 + 1) = v25;
v34 = v27;
v31 = 0LL;
v32 = 0LL;
std::vector<common_log_entry>::~vector(&v33);
std::vector<common_log_entry>::~vector(&v31);
}
std::condition_variable::notify_one((std::condition_variable *)(v6 + 6));
}
return pthread_mutex_unlock(v6);
}
|
add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x0011bee0
TEST EAX,EAX
JNZ 0x001cef86
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x001cef6f
MOV dword ptr [RSP + 0xc],EBP
MOV R13,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x98]
LEA RBP,[RAX + RAX*0x2]
SHL RBP,0x4
MOV R12,R13
ADD R12,RBP
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x40],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x0011c428
MOVSXD RSI,EAX
MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10]
CMP RAX,RSI
JA 0x001ced6e
LEA RDI,[0x10 + RBP*0x1]
ADD RDI,R13
INC RSI
LAB_001ced4f:
CALL 0x0018151e
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [R12 + 0x18]
SUB RSI,RDI
LEA RCX,[RSP + 0x30]
MOV RDX,R14
CALL 0x0011c428
LAB_001ced6e:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
MOV AL,byte ptr [RBX + 0x68]
MOV byte ptr [R12 + 0x4],AL
MOV qword ptr [R12 + 0x8],0x0
CMP byte ptr [RBX + 0x69],0x1
JNZ 0x001cedb6
CALL 0x0011b090
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
SUB RDX,qword ptr [RBX + 0x70]
MOV qword ptr [R12 + 0x8],RDX
LAB_001cedb6:
MOV byte ptr [R12 + 0x28],0x0
MOV RSI,qword ptr [RBX + 0x80]
MOV RAX,qword ptr [RBX + 0x98]
INC RAX
SUB RSI,qword ptr [RBX + 0x78]
SAR RSI,0x4
MOV R14,-0x5555555555555555
IMUL RSI,R14
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
CMP RDX,qword ptr [RBX + 0x90]
JNZ 0x001cef66
ADD RSI,RSI
LAB_001cedff:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
MOV qword ptr [RSP],RBX
CALL 0x001cf9f8
MOV RCX,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x90]
MOV R12D,0x10
XOR EBP,EBP
XOR R13D,R13D
LAB_001cee28:
LEA RAX,[RDX + RDX*0x2]
SHL RAX,0x4
MOV R15,qword ptr [RSP + 0x10]
MOV RBX,R14
LEA R14,[RCX + RAX*0x1]
ADD R14,0x10
MOVUPS XMM0,xmmword ptr [R14 + -0x10]
MOVUPS xmmword ptr [R15 + RBP*0x1],XMM0
LEA RDI,[R15 + R12*0x1]
MOV RSI,R14
CALL 0x001cfa76
MOV AL,byte ptr [R14 + 0x18]
MOV R14,RBX
MOV RBX,qword ptr [RSP]
MOV byte ptr [R15 + RBP*0x1 + 0x28],AL
MOV RAX,qword ptr [RBX + 0x90]
INC RAX
MOV RCX,qword ptr [RBX + 0x78]
MOV RSI,qword ptr [RBX + 0x80]
MOV RDI,RSI
SUB RDI,RCX
SAR RDI,0x4
IMUL RDI,R14
XOR EDX,EDX
DIV RDI
MOV qword ptr [RBX + 0x90],RDX
INC R13
ADD R12,0x30
ADD RBP,0x30
CMP RDX,qword ptr [RBX + 0x98]
JNZ 0x001cee28
MOV qword ptr [RBX + 0x90],0x0
MOV qword ptr [RBX + 0x98],R13
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,RAX
SUB RDX,RDI
SAR RDX,0x4
IMUL RDX,R14
CMP R13,RDX
JNC 0x001cef18
LAB_001ceedc:
ADD RDI,R12
LAB_001ceedf:
MOV ESI,0x100
CALL 0x0018151e
LAB_001ceee9:
INC R13
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,RAX
SUB RCX,RDI
SAR RCX,0x4
IMUL RCX,R14
ADD R12,0x30
CMP R13,RCX
JC 0x001ceedc
MOV RCX,qword ptr [RBX + 0x78]
MOV RSI,qword ptr [RBX + 0x80]
LAB_001cef18:
MOV RDX,qword ptr [RBX + 0x88]
MOV qword ptr [RBX + 0x78],RDI
MOV qword ptr [RBX + 0x80],RAX
LEA R14,[RSP + 0x10]
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RBX + 0x88],RAX
LEA RDI,[RSP + 0x30]
MOV qword ptr [RDI],RCX
MOV qword ptr [RDI + 0x8],RSI
MOV qword ptr [RDI + 0x10],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],0x0
CALL 0x001cf26e
MOV RDI,R14
CALL 0x001cf26e
LAB_001cef66:
LEA RDI,[RBX + 0x30]
CALL 0x0011b500
LAB_001cef6f:
MOV RDI,RBX
CALL 0x0011b7b0
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cef86:
MOV EDI,EAX
CALL 0x0011b6f0
|
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */
void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4)
{
int4 *puVar1;
char *__s;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int iVar5;
long lVar6;
ulong uVar7;
long lVar8;
long lVar9;
int4 *puVar10;
long lVar11;
ulong uVar12;
long local_68;
long lStack_60;
int8 local_58;
long local_48;
long lStack_40;
long local_38;
iVar5 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar5 == 0) {
if (this[0x6a] == (common_log)0x1) {
lVar6 = *(long *)(this + 0x78);
lVar8 = *(long *)(this + 0x98) * 0x30;
puVar10 = (int4 *)(lVar6 + lVar8);
local_38 = param_4[2];
local_48 = *param_4;
lStack_40 = param_4[1];
__s = *(char **)(lVar6 + 0x10 + lVar8);
iVar5 = vsnprintf(__s,*(long *)(lVar6 + 0x18 + lVar8) - (long)__s,param_3,param_4);
if ((ulong)(*(long *)(lVar6 + 0x18 + lVar8) - *(long *)(lVar6 + 0x10 + lVar8)) <=
(ulong)(long)iVar5) {
/* try { // try from 001ced4f to 001ced53 has its CatchHandler @ 001cef8f */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar8 + 0x10 + lVar6),(long)iVar5 + 1);
vsnprintf(*(char **)(puVar10 + 4),*(long *)(puVar10 + 6) - (long)*(char **)(puVar10 + 4),
param_3,&local_48);
}
*puVar10 = param_2;
*(common_log *)(puVar10 + 1) = this[0x68];
*(int8 *)(puVar10 + 2) = 0;
if (this[0x69] == (common_log)0x1) {
lVar6 = std::chrono::_V2::system_clock::now();
*(long *)(puVar10 + 2) = lVar6 / 1000 - *(long *)(this + 0x70);
}
*(int1 *)(puVar10 + 10) = 0;
lVar6 = *(long *)(this + 0x80) - *(long *)(this + 0x78) >> 4;
uVar7 = (*(long *)(this + 0x98) + 1U) % (ulong)(lVar6 * -0x5555555555555555);
*(ulong *)(this + 0x98) = uVar7;
if (uVar7 == *(ulong *)(this + 0x90)) {
/* try { // try from 001cedff to 001cee11 has its CatchHandler @ 001cef8d */
std::vector<common_log_entry,std::allocator<common_log_entry>>::vector
((ulong)&local_68,(allocator *)(lVar6 * 0x5555555555555556));
lVar6 = *(long *)(this + 0x78);
uVar7 = *(ulong *)(this + 0x90);
lVar11 = 0x10;
lVar8 = 0;
uVar12 = 0;
do {
lVar9 = local_68;
puVar10 = (int4 *)(lVar6 + uVar7 * 0x30);
uVar2 = puVar10[1];
uVar3 = puVar10[2];
uVar4 = puVar10[3];
puVar1 = (int4 *)(local_68 + lVar8);
*puVar1 = *puVar10;
puVar1[1] = uVar2;
puVar1[2] = uVar3;
puVar1[3] = uVar4;
std::vector<char,std::allocator<char>>::_M_move_assign(local_68 + lVar11,puVar10 + 4);
*(int1 *)(lVar9 + 0x28 + lVar8) = *(int1 *)(puVar10 + 10);
lVar6 = *(long *)(this + 0x78);
lVar9 = *(long *)(this + 0x80);
uVar7 = (*(long *)(this + 0x90) + 1U) %
(ulong)((lVar9 - lVar6 >> 4) * -0x5555555555555555);
*(ulong *)(this + 0x90) = uVar7;
uVar12 = uVar12 + 1;
lVar11 = lVar11 + 0x30;
lVar8 = lVar8 + 0x30;
} while (uVar7 != *(ulong *)(this + 0x98));
*(int8 *)(this + 0x90) = 0;
*(ulong *)(this + 0x98) = uVar12;
if (uVar12 < (ulong)((lStack_60 - local_68 >> 4) * -0x5555555555555555)) {
do {
/* try { // try from 001ceedf to 001ceee8 has its CatchHandler @ 001cef98 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(local_68 + lVar11),0x100);
uVar12 = uVar12 + 1;
lVar11 = lVar11 + 0x30;
} while (uVar12 < (ulong)((lStack_60 - local_68 >> 4) * -0x5555555555555555));
lVar6 = *(long *)(this + 0x78);
lVar9 = *(long *)(this + 0x80);
}
local_38 = *(long *)(this + 0x88);
*(long *)(this + 0x78) = local_68;
*(long *)(this + 0x80) = lStack_60;
*(int8 *)(this + 0x88) = local_58;
local_68 = 0;
lStack_60 = 0;
local_58 = 0;
local_48 = lVar6;
lStack_40 = lVar9;
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48);
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_68);
}
std::condition_variable::notify_one();
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar5);
}
|
|
12,342
|
common_log::set_file(char const*)
|
monkey531[P]llama/common/log.cpp
|
void set_file(const char * path) {
pause();
if (file) {
fclose(file);
}
if (path) {
file = fopen(path, "w");
} else {
file = nullptr;
}
resume();
}
|
O1
|
cpp
|
common_log::set_file(char const*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x9ce3e
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x9d24d
callq 0x19690
testq %r14, %r14
je 0x9d263
leaq 0x188f3(%rip), %rsi # 0xb5b4c
movq %r14, %rdi
callq 0x197d0
jmp 0x9d265
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9cec6
|
_ZN10common_log8set_fileEPKc:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
mov rdi, [rbx+60h]
test rdi, rdi
jz short loc_9D24D
call _fclose
loc_9D24D:
test r14, r14
jz short loc_9D263
lea rsi, aW; "w"
mov rdi, r14
call _fopen
jmp short loc_9D265
loc_9D263:
xor eax, eax
loc_9D265:
mov [rbx+60h], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN10common_log6resumeEv; common_log::resume(void)
|
long long common_log::set_file(common_log *this, const char *a2)
{
long long v3; // rdi
long long v4; // rax
common_log::pause(this);
v3 = *((_QWORD *)this + 12);
if ( v3 )
fclose(v3);
if ( a2 )
v4 = fopen(a2, "w");
else
v4 = 0LL;
*((_QWORD *)this + 12) = v4;
return common_log::resume(this);
}
|
set_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0019ce3e
MOV RDI,qword ptr [RBX + 0x60]
TEST RDI,RDI
JZ 0x0019d24d
CALL 0x00119690
LAB_0019d24d:
TEST R14,R14
JZ 0x0019d263
LEA RSI,[0x1b5b4c]
MOV RDI,R14
CALL 0x001197d0
JMP 0x0019d265
LAB_0019d263:
XOR EAX,EAX
LAB_0019d265:
MOV qword ptr [RBX + 0x60],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0019cec6
|
/* common_log::set_file(char const*) */
void __thiscall common_log::set_file(common_log *this,char *param_1)
{
FILE *pFVar1;
pause(this);
if (*(FILE **)(this + 0x60) != (FILE *)0x0) {
fclose(*(FILE **)(this + 0x60));
}
if (param_1 == (char *)0x0) {
pFVar1 = (FILE *)0x0;
}
else {
pFVar1 = fopen(param_1,"w");
}
*(FILE **)(this + 0x60) = pFVar1;
resume(this);
return;
}
|
|
12,343
|
alaya::Graph<float, unsigned int, alaya::SequentialStorage<unsigned int, unsigned int>>::save(std::basic_string_view<char, std::char_traits<char>>&) const
|
AlayaLite/include/executor/jobs/../../index/graph/graph.hpp
|
void save(std::string_view &filename) const {
static_assert(std::is_trivial<NodeIDType>::value && std::is_standard_layout<NodeIDType>::value,
"IDType must be a POD type");
std::ofstream writer(std::string(filename), std::ios::binary);
if (!writer.is_open()) {
throw std::runtime_error("Cannot open file " + std::string(filename));
}
int nep = eps_.size();
writer.write(reinterpret_cast<char *>(&nep), 4);
writer.write(const_cast<char *>(reinterpret_cast<const char *>(eps_.data())),
nep * sizeof(NodeIDType));
writer.write(const_cast<char *>(reinterpret_cast<const char *>(&max_nodes_)),
sizeof(NodeIDType));
writer.write(const_cast<char *>(reinterpret_cast<const char *>(&max_nbrs_)),
sizeof(NodeIDType));
data_storage_.save(writer);
// raw data
// include_raw_data = include_raw_data;
// writer.write(const_cast<char *>(reinterpret_cast<const char *>(&include_raw_data_)),
// sizeof(bool));
// if (include_raw_data_) {
// if (raw_data == nullptr) {
// throw std::runtime_error("raw_data is nullptr");
// }
// writer.write(const_cast<char *>(reinterpret_cast<const char *>(&dim)), sizeof(uint32_t));
// writer.write(const_cast<char *>(reinterpret_cast<const char *>(raw_data)),
// max_nodes_ * dim * sizeof(DataType));
// }
if (overlay_graph_) {
overlay_graph_->save(writer);
}
LOG_INFO("Graph Saving done in {}\n", filename);
}
|
O3
|
cpp
|
alaya::Graph<float, unsigned int, alaya::SequentialStorage<unsigned int, unsigned int>>::save(std::basic_string_view<char, std::char_traits<char>>&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2b0, %rsp # imm = 0x2B0
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rsi
leaq 0x38(%rsp), %r15
movq (%rbx), %rdx
addq %rsi, %rdx
movq %r15, -0x10(%r15)
leaq 0x28(%rsp), %rdi
callq 0x19014
leaq 0xb0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x4, %edx
callq 0x11170
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17a90
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
leaq 0x120(%rsp), %rdi
callq 0x11c40
testb %al, %al
je 0x17c85
movq 0x50(%r14), %rax
subq 0x48(%r14), %rax
shrq $0x2, %rax
leaq 0x4c(%rsp), %rsi
movl %eax, (%rsi)
leaq 0xb0(%rsp), %rdi
movl $0x4, %edx
callq 0x115f0
movq 0x48(%r14), %rsi
movslq 0x4c(%rsp), %rdx
shlq $0x2, %rdx
leaq 0xb0(%rsp), %rdi
callq 0x115f0
leaq 0xb0(%rsp), %rdi
movl $0x4, %edx
movq %r14, %rsi
callq 0x115f0
leaq 0x4(%r14), %rsi
leaq 0xb0(%rsp), %rdi
movl $0x4, %edx
callq 0x115f0
leaq 0x8(%r14), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x220ec
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x17b36
leaq 0xb0(%rsp), %rsi
callq 0x2217a
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x68036(%rip), %rsi # 0x7fb7c
leaq 0x6808b(%rip), %rdx # 0x7fbd8
leaq 0x50(%rsp), %rdi
callq 0x19014
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x676f0(%rip), %rsi # 0x7f25b
leaq 0x67713(%rip), %rdx # 0x7f285
leaq 0x70(%rsp), %rdi
callq 0x19014
leaq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x16f8a
movl $0xc4, 0x48(%rsp)
callq 0x2f72e
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0xa0(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x90(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, 0x18(%rsp)
leaq 0x67f7a(%rip), %rdx # 0x7fb53
leaq 0x28(%rsp), %r8
leaq 0x48(%rsp), %r9
movl $0x28, %ecx
movq %rax, %rdi
movl $0x2, %esi
callq 0x2222a
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17c0c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x17c26
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x17c3d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x9c2ec(%rip), %rax # 0xb3f30
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0xb8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0xb0(%rsp,%rcx)
callq 0x11740
leaq 0x1a8(%rsp), %rdi
callq 0x11810
addq $0x2b0, %rsp # imm = 0x2B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x114c0
movq %rax, %r14
movq 0x8(%rbx), %rsi
leaq 0x60(%rsp), %r12
movq (%rbx), %rdx
addq %rsi, %rdx
movq %r12, -0x10(%r12)
leaq 0x50(%rsp), %rdi
callq 0x19014
leaq 0x67e8a(%rip), %rsi # 0x7fb41
leaq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1a48d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x11340
xorl %ebp, %ebp
movq 0x9c2e9(%rip), %rsi # 0xb3fc8
movq 0x9c2ba(%rip), %rdx # 0xb3fa0
movq %r14, %rdi
callq 0x11720
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17d08
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x17d1f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x11120
testb %bpl, %bpl
jne 0x17d48
jmp 0x17dcf
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x17d48
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x17d48
movq %rax, %rbx
movq %r14, %rdi
callq 0x11a50
jmp 0x17dcf
movq %rax, %rbx
jmp 0x17d99
movq %rax, %rbx
jmp 0x17db3
jmp 0x17dcc
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17ddc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x17ddc
movq %rax, %rbx
jmp 0x17ddc
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17d99
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x17db3
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x17dcf
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x17dcf
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x11930
movq %rbx, %rdi
callq 0x11760
|
_ZNK5alaya5GraphIfjNS_17SequentialStorageIjjEEE4saveERSt17basic_string_viewIcSt11char_traitsIcEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 2B0h
mov rbx, rsi
mov r14, rdi
mov rsi, [rsi+8]
lea r15, [rsp+2D8h+var_2A0]
mov rdx, [rbx]
add rdx, rsi
mov [r15-10h], r15
lea rdi, [rsp+2D8h+var_2B0]
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+2D8h+var_228]
lea rsi, [rsp+2D8h+var_2B0]
mov edx, 4
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode)
mov rdi, [rsp+2D8h+var_2B0]; void *
cmp rdi, r15
jz short loc_17A90
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17A90:
lea rdi, [rsp+2D8h+var_1B8]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_17C85
mov rax, [r14+50h]
sub rax, [r14+48h]
shr rax, 2
lea rsi, [rsp+2D8h+var_28C]; char *
mov [rsi], eax
lea rdi, [rsp+2D8h+var_228]; this
mov edx, 4; __int64
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
mov rsi, [r14+48h]; char *
movsxd rdx, dword ptr [rsp+2D8h+var_28C]
shl rdx, 2; __int64
lea rdi, [rsp+2D8h+var_228]; this
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
lea rdi, [rsp+2D8h+var_228]; this
mov edx, 4; __int64
mov rsi, r14; char *
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
lea rsi, [r14+4]; char *
lea rdi, [rsp+2D8h+var_228]; this
mov edx, 4; __int64
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
lea rdi, [r14+8]; char *
lea rsi, [rsp+2D8h+var_228]; this
call _ZNK5alaya17SequentialStorageIjjE4saveERSt14basic_ofstreamIcSt11char_traitsIcEE; alaya::SequentialStorage<uint,uint>::save(std::ofstream &)
mov rdi, [r14+40h]; char *
test rdi, rdi
jz short loc_17B36
lea rsi, [rsp+2D8h+var_228]; this
call _ZNK5alaya12OverlayGraphIjjE4saveERSt14basic_ofstreamIcSt11char_traitsIcEE; alaya::OverlayGraph<uint,uint>::save(std::ofstream &)
loc_17B36:
lea r14, [rsp+2D8h+var_278]
mov [r14-10h], r14
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/AlayaL"...
lea rdx, aWorkspaceLlm4b_7+5Ch; ""
lea rdi, [rsp+2D8h+var_288]
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 r12, [rsp+2D8h+var_258]
mov [r12-10h], r12
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/AlayaL"...
lea rdx, aWorkspaceLlm4b_4+2Ah; ""
lea rdi, [rsp+2D8h+var_268]
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+2D8h+var_2B0]; this
lea rsi, [rsp+2D8h+var_288]
lea rdx, [rsp+2D8h+var_268]
call _Z17get_relative_pathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; get_relative_path(std::string const&,std::string const&)
mov [rsp+2D8h+var_290], 0C4h
call _ZN6spdlog18default_logger_rawEv; spdlog::default_logger_raw(void)
xorps xmm0, xmm0
movaps [rsp+2D8h+var_248], xmm0
mov [rsp+2D8h+var_238], 0
mov rcx, [rsp+2D8h+var_238]
mov [rsp+2D8h+var_2C8], rcx
movaps xmm0, [rsp+2D8h+var_248]
movups [rsp+2D8h+var_2D8], xmm0
mov [rsp+2D8h+var_2C0], rbx
lea rdx, aAlayaGraphSavi; "[Alaya] [{}:{}] Graph Saving done in {}"...
lea r8, [rsp+2D8h+var_2B0]
lea r9, [rsp+2D8h+var_290]
mov ecx, 28h ; '('
mov rdi, rax
mov esi, 2
call _ZN6spdlog6logger4log_IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRSt17basic_string_viewIcS5_EEEEvNS_10source_locENS_5level10level_enumEN3fmt3v1017basic_string_viewIcEEDpOT_; spdlog::logger::log_<std::string,int,std::string_view &>(spdlog::source_loc,spdlog::level::level_enum,fmt::v10::basic_string_view<char>,std::string,int,std::string_view &)
mov rdi, [rsp+2D8h+var_2B0]; void *
cmp rdi, r15
jz short loc_17C0C
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17C0C:
mov rdi, [rsp+2D8h+var_268]; void *
cmp rdi, r12
jz short loc_17C26
mov rsi, [rsp+2D8h+var_258]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17C26:
mov rdi, [rsp+2D8h+var_288]; void *
cmp rdi, r14
jz short loc_17C3D
mov rsi, [rsp+2D8h+var_278]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17C3D:
mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr
mov rcx, [rax]
mov rax, [rax+18h]
lea rdi, [rsp+2D8h+var_220]
mov [rdi-8], rcx
mov rcx, [rcx-18h]
mov [rsp+rcx+2D8h+var_228], rax
call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf()
lea rdi, [rsp+2D8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 2B0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_17C85:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rsi, [rbx+8]
lea r12, [rsp+2D8h+var_278]
mov rdx, [rbx]
add rdx, rsi
mov [r12-10h], r12
lea rdi, [rsp+2D8h+var_288]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aCannotOpenFile; "Cannot open file "
lea rdi, [rsp+2D8h+var_2B0]
lea rdx, [rsp+2D8h+var_288]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+2D8h+var_2B0]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
mov rdi, [rsp+2D8h+var_2B0]; void *
cmp rdi, r15
jz short loc_17D08
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17D08:
mov rdi, [rsp+2D8h+var_288]; void *
cmp rdi, r12
jz short loc_17D1F
mov rsi, [rsp+2D8h+var_278]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17D1F:
test bpl, bpl
jnz short loc_17D48
jmp loc_17DCF
mov rbx, rax
mov rdi, [rsp+2D8h+var_288]; void *
cmp rdi, r12
jz short loc_17D48
mov rsi, [rsp+2D8h+var_278]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_17D48
mov rbx, rax
loc_17D48:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_17DCF
mov rbx, rax
jmp short loc_17D99
mov rbx, rax
jmp short loc_17DB3
jmp short loc_17DCC
mov rbx, rax
mov rdi, [rsp+2D8h+var_2B0]; void *
cmp rdi, r15
jz short loc_17DDC
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_17DDC
mov rbx, rax
jmp short loc_17DDC
mov rbx, rax
mov rdi, [rsp+2D8h+var_2B0]; void *
cmp rdi, r15
jz short loc_17D99
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17D99:
mov rdi, [rsp+2D8h+var_268]; void *
cmp rdi, r12
jz short loc_17DB3
mov rsi, [rsp+2D8h+var_258]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17DB3:
mov rdi, [rsp+2D8h+var_288]; void *
cmp rdi, r14
jz short loc_17DCF
mov rsi, [rsp+2D8h+var_278]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_17DCF
loc_17DCC:
mov rbx, rax
loc_17DCF:
lea rdi, [rsp+2D8h+var_228]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
loc_17DDC:
mov rdi, rbx
call __Unwind_Resume
|
void alaya::Graph<float,unsigned int,alaya::SequentialStorage<unsigned int,unsigned int>>::save(
char *a1,
_QWORD *a2)
{
long long v3; // rsi
long long v4; // rdx
char *v5; // rdi
int v6; // eax
long long v7; // rax
void *exception; // r14
long long v9; // rsi
long long v10; // rdx
void *v11[2]; // [rsp+28h] [rbp-2B0h] BYREF
_QWORD v12[2]; // [rsp+38h] [rbp-2A0h] BYREF
int v13; // [rsp+48h] [rbp-290h] BYREF
char v14[4]; // [rsp+4Ch] [rbp-28Ch] BYREF
void *v15[2]; // [rsp+50h] [rbp-288h] BYREF
_QWORD v16[2]; // [rsp+60h] [rbp-278h] BYREF
void *v17; // [rsp+70h] [rbp-268h] BYREF
_QWORD v18[2]; // [rsp+80h] [rbp-258h] BYREF
__int128 v19; // [rsp+90h] [rbp-248h]
long long v20; // [rsp+A0h] [rbp-238h]
long long v21; // [rsp+B0h] [rbp-228h] BYREF
_BYTE v22[136]; // [rsp+120h] [rbp-1B8h] BYREF
_BYTE v23[304]; // [rsp+1A8h] [rbp-130h] BYREF
v3 = a2[1];
v4 = v3 + *a2;
v11[0] = v12;
std::string::_M_construct<char const*>(v11, v3, v4);
std::ofstream::basic_ofstream(&v21, v11, 4LL);
if ( v11[0] != v12 )
operator delete(v11[0], v12[0] + 1LL);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v22) )
{
exception = __cxa_allocate_exception(0x10uLL);
v9 = a2[1];
v10 = v9 + *a2;
v15[0] = v16;
std::string::_M_construct<char const*>(v15, v9, v10);
std::operator+<char>(v11, "Cannot open file ", v15);
std::runtime_error::runtime_error(exception, v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*(_DWORD *)v14 = (*((_QWORD *)a1 + 10) - *((_QWORD *)a1 + 9)) >> 2;
std::ostream::write((std::ostream *)&v21, v14, 4LL);
std::ostream::write((std::ostream *)&v21, *((const char **)a1 + 9), 4LL * *(int *)v14);
std::ostream::write((std::ostream *)&v21, a1, 4LL);
std::ostream::write((std::ostream *)&v21, a1 + 4, 4LL);
alaya::SequentialStorage<unsigned int,unsigned int>::save(a1 + 8, (std::ostream *)&v21);
v5 = (char *)*((_QWORD *)a1 + 8);
if ( v5 )
alaya::OverlayGraph<unsigned int,unsigned int>::save(v5, (std::ostream *)&v21);
v15[0] = v16;
std::string::_M_construct<char const*>(
v15,
"/workspace/llm4binary/github2025/AlayaLite/include/executor/jobs/../../index/graph/graph.hpp",
"");
v17 = v18;
std::string::_M_construct<char const*>(&v17, "/workspace/llm4binary/github2025/AlayaLite", "");
get_relative_path(v11);
v13 = 196;
v6 = spdlog::default_logger_raw((spdlog *)v11);
v19 = 0LL;
v20 = 0LL;
spdlog::logger::log_<std::string,int,std::string_view &>(
v6,
2,
(unsigned int)"[Alaya] [{}:{}] Graph Saving done in {}\n",
40,
(unsigned int)v11,
(unsigned int)&v13,
0,
0,
0,
(long long)a2);
if ( v11[0] != v12 )
operator delete(v11[0], v12[0] + 1LL);
if ( v17 != v18 )
operator delete(v17, v18[0] + 1LL);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
v7 = `VTT for'std::ofstream[3];
v21 = `VTT for'std::ofstream[0];
*(_QWORD *)(v22 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) + 96) = v7;
std::filebuf::~filebuf();
std::ios_base::~ios_base((std::ios_base *)v23);
}
|
save:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x2b0
MOV RBX,RSI
MOV R14,RDI
MOV RSI,qword ptr [RSI + 0x8]
LEA R15,[RSP + 0x38]
MOV RDX,qword ptr [RBX]
ADD RDX,RSI
MOV qword ptr [R15 + -0x10],R15
LAB_00117a58:
LEA RDI,[RSP + 0x28]
CALL 0x00119014
LAB_00117a62:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x28]
MOV EDX,0x4
CALL 0x00111170
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x00117a90
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00111120
LAB_00117a90:
LEA RDI,[RSP + 0x120]
CALL 0x00111c40
TEST AL,AL
JZ 0x00117c85
MOV RAX,qword ptr [R14 + 0x50]
SUB RAX,qword ptr [R14 + 0x48]
SHR RAX,0x2
LEA RSI,[RSP + 0x4c]
MOV dword ptr [RSI],EAX
LAB_00117ab8:
LEA RDI,[RSP + 0xb0]
MOV EDX,0x4
CALL 0x001115f0
MOV RSI,qword ptr [R14 + 0x48]
MOVSXD RDX,dword ptr [RSP + 0x4c]
SHL RDX,0x2
LEA RDI,[RSP + 0xb0]
CALL 0x001115f0
LEA RDI,[RSP + 0xb0]
MOV EDX,0x4
MOV RSI,R14
CALL 0x001115f0
LEA RSI,[R14 + 0x4]
LEA RDI,[RSP + 0xb0]
MOV EDX,0x4
CALL 0x001115f0
LEA RDI,[R14 + 0x8]
LEA RSI,[RSP + 0xb0]
CALL 0x001220ec
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JZ 0x00117b36
LEA RSI,[RSP + 0xb0]
CALL 0x0012217a
LAB_00117b36:
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + -0x10],R14
LAB_00117b3f:
LEA RSI,[0x17fb7c]
LEA RDX,[0x17fbd8]
LEA RDI,[RSP + 0x50]
CALL 0x00119014
LEA R12,[RSP + 0x80]
MOV qword ptr [R12 + -0x10],R12
LAB_00117b64:
LEA RSI,[0x17f25b]
LEA RDX,[0x17f285]
LEA RDI,[RSP + 0x70]
CALL 0x00119014
LAB_00117b7c:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x70]
CALL 0x00116f8a
MOV dword ptr [RSP + 0x48],0xc4
LAB_00117b98:
CALL 0x0012f72e
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOV qword ptr [RSP + 0xa0],0x0
MOV RCX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RCX
MOVAPS XMM0,xmmword ptr [RSP + 0x90]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x18],RBX
LEA RDX,[0x17fb53]
LEA R8,[RSP + 0x28]
LEA R9,[RSP + 0x48]
MOV ECX,0x28
MOV RDI,RAX
MOV ESI,0x2
CALL 0x0012222a
LAB_00117bf5:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x00117c0c
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00111120
LAB_00117c0c:
MOV RDI,qword ptr [RSP + 0x70]
CMP RDI,R12
JZ 0x00117c26
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x00111120
LAB_00117c26:
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R14
JZ 0x00117c3d
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x00111120
LAB_00117c3d:
MOV RAX,qword ptr [0x001b3f30]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RDI + -0x8],RCX
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RSP + RCX*0x1 + 0xb0],RAX
CALL 0x00111740
LEA RDI,[RSP + 0x1a8]
CALL 0x00111810
ADD RSP,0x2b0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00117c85:
MOV EDI,0x10
CALL 0x001114c0
MOV R14,RAX
MOV RSI,qword ptr [RBX + 0x8]
LEA R12,[RSP + 0x60]
MOV RDX,qword ptr [RBX]
ADD RDX,RSI
MOV qword ptr [R12 + -0x10],R12
LAB_00117ca6:
LEA RDI,[RSP + 0x50]
CALL 0x00119014
LAB_00117cb0:
LEA RSI,[0x17fb41]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x50]
CALL 0x0011a48d
MOV BPL,0x1
LAB_00117cc9:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x00111340
XOR EBP,EBP
MOV RSI,qword ptr [0x001b3fc8]
MOV RDX,qword ptr [0x001b3fa0]
MOV RDI,R14
CALL 0x00111720
|
/* alaya::Graph<float, unsigned int, alaya::SequentialStorage<unsigned int, unsigned int>
>::save(std::basic_string_view<char, std::char_traits<char> >&) const */
void __thiscall
alaya::Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>>::save
(Graph<float,unsigned_int,alaya::SequentialStorage<unsigned_int,unsigned_int>> *this,
basic_string_view *param_1)
{
char cVar1;
int8 uVar2;
runtime_error *this_00;
long *local_2b0 [2];
long local_2a0 [2];
int4 local_290;
int4 local_28c;
long *local_288 [2];
long local_278 [2];
long *local_268 [2];
long local_258 [2];
int8 local_248;
int8 uStack_240;
int8 local_238;
long local_228;
filebuf local_220 [240];
ios_base local_130 [264];
/* try { // try from 00117a58 to 00117a61 has its CatchHandler @ 00117d7a */
local_2b0[0] = local_2a0;
std::__cxx11::string::_M_construct<char_const*>
(local_2b0,*(long *)(param_1 + 8),*(long *)param_1 + *(long *)(param_1 + 8));
/* try { // try from 00117a62 to 00117a78 has its CatchHandler @ 00117d5e */
std::ofstream::ofstream((ofstream *)&local_228,local_2b0,4);
if (local_2b0[0] != local_2a0) {
operator_delete(local_2b0[0],local_2a0[0] + 1);
}
cVar1 = std::__basic_file<char>::is_open();
if (cVar1 != '\0') {
local_28c = (int4)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2);
/* try { // try from 00117ab8 to 00117b35 has its CatchHandler @ 00117dcc */
std::ostream::write((char *)&local_228,(long)&local_28c);
std::ostream::write((char *)&local_228,*(long *)(this + 0x48));
std::ostream::write((char *)&local_228,(long)this);
std::ostream::write((char *)&local_228,(long)(this + 4));
SequentialStorage<unsigned_int,unsigned_int>::save
((SequentialStorage<unsigned_int,unsigned_int> *)(this + 8),(ofstream *)&local_228);
if (*(OverlayGraph<unsigned_int,unsigned_int> **)(this + 0x40) !=
(OverlayGraph<unsigned_int,unsigned_int> *)0x0) {
OverlayGraph<unsigned_int,unsigned_int>::save
(*(OverlayGraph<unsigned_int,unsigned_int> **)(this + 0x40),(ofstream *)&local_228);
}
/* try { // try from 00117b3f to 00117b56 has its CatchHandler @ 00117d5c */
local_288[0] = local_278;
std::__cxx11::string::_M_construct<char_const*>
(local_288,
"/workspace/llm4binary/github2025/AlayaLite/include/executor/jobs/../../index/graph/graph.hpp"
,"");
/* try { // try from 00117b64 to 00117b7b has its CatchHandler @ 00117d57 */
local_268[0] = local_258;
std::__cxx11::string::_M_construct<char_const*>
(local_268,"/workspace/llm4binary/github2025/AlayaLite","");
/* try { // try from 00117b7c to 00117b8f has its CatchHandler @ 00117d52 */
get_relative_path((string *)local_2b0,(string *)local_288);
local_290 = 0xc4;
/* try { // try from 00117b98 to 00117bf4 has its CatchHandler @ 00117d7f */
uVar2 = spdlog::default_logger_raw();
local_248 = 0;
uStack_240 = 0;
local_238 = 0;
spdlog::logger::
log_<std::__cxx11::string,int,std::basic_string_view<char,std::char_traits<char>>&>
(uVar2,2,"[Alaya] [{}:{}] Graph Saving done in {}\n",0x28,local_2b0,&local_290,0,0,0,
param_1);
if (local_2b0[0] != local_2a0) {
operator_delete(local_2b0[0],local_2a0[0] + 1);
}
if (local_268[0] != local_258) {
operator_delete(local_268[0],local_258[0] + 1);
}
if (local_288[0] != local_278) {
operator_delete(local_288[0],local_278[0] + 1);
}
local_228 = *(long *)PTR_VTT_001b3f30;
*(int8 *)(local_220 + *(long *)(local_228 + -0x18) + -8) =
*(int8 *)(PTR_VTT_001b3f30 + 0x18);
std::filebuf::~filebuf(local_220);
std::ios_base::~ios_base(local_130);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
local_288[0] = local_278;
/* try { // try from 00117ca6 to 00117caf has its CatchHandler @ 00117d45 */
std::__cxx11::string::_M_construct<char_const*>
(local_288,*(long *)(param_1 + 8),*(long *)param_1 + *(long *)(param_1 + 8));
/* try { // try from 00117cb0 to 00117cc5 has its CatchHandler @ 00117d29 */
std::operator+((char *)local_2b0,(string *)"Cannot open file ");
/* try { // try from 00117cc9 to 00117ced has its CatchHandler @ 00117cee */
std::runtime_error::runtime_error(this_00,(string *)local_2b0);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001b3fc8,PTR__runtime_error_001b3fa0);
}
|
|
12,344
|
ggml_opt_step_adamw
|
monkey531[P]llama/ggml/src/ggml.c
|
struct ggml_tensor * ggml_opt_step_adamw(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * grad,
struct ggml_tensor * m,
struct ggml_tensor * v,
struct ggml_tensor * adamw_params) {
GGML_ASSERT(a->flags & GGML_TENSOR_FLAG_PARAM);
GGML_ASSERT(ggml_are_same_shape(a, grad));
GGML_ASSERT(ggml_are_same_shape(a, m));
GGML_ASSERT(ggml_are_same_shape(a, v));
GGML_ASSERT(adamw_params->type == GGML_TYPE_F32);
GGML_ASSERT(ggml_nelements(adamw_params) == 7);
struct ggml_tensor * result = ggml_view_tensor(ctx, a);
result->op = GGML_OP_OPT_STEP_ADAMW;
result->src[0] = a;
result->src[1] = grad;
result->src[2] = m;
result->src[3] = v;
result->src[4] = adamw_params;
return result;
}
|
O0
|
c
|
ggml_opt_step_adamw:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movq 0x28(%rsp), %rax
movl 0x94(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x53cd6
leaq 0x608fb(%rip), %rdi # 0xb45b7
movl $0x13fa, %esi # imm = 0x13FA
leaq 0x60939(%rip), %rdx # 0xb4601
leaq 0x61680(%rip), %rcx # 0xb534f
movb $0x0, %al
callq 0x46770
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x46720
testb $0x1, %al
jne 0x53d0a
leaq 0x608c7(%rip), %rdi # 0xb45b7
movl $0x13fb, %esi # imm = 0x13FB
leaq 0x60905(%rip), %rdx # 0xb4601
leaq 0x6166e(%rip), %rcx # 0xb5371
movb $0x0, %al
callq 0x46770
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x46720
testb $0x1, %al
jne 0x53d3e
leaq 0x60893(%rip), %rdi # 0xb45b7
movl $0x13fc, %esi # imm = 0x13FC
leaq 0x608d1(%rip), %rdx # 0xb4601
leaq 0x61657(%rip), %rcx # 0xb538e
movb $0x0, %al
callq 0x46770
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x46720
testb $0x1, %al
jne 0x53d72
leaq 0x6085f(%rip), %rdi # 0xb45b7
movl $0x13fd, %esi # imm = 0x13FD
leaq 0x6089d(%rip), %rdx # 0xb4601
leaq 0x6163d(%rip), %rcx # 0xb53a8
movb $0x0, %al
callq 0x46770
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
je 0x53d9d
leaq 0x60834(%rip), %rdi # 0xb45b7
movl $0x13fe, %esi # imm = 0x13FE
leaq 0x60872(%rip), %rdx # 0xb4601
leaq 0x6162c(%rip), %rcx # 0xb53c2
movb $0x0, %al
callq 0x46770
movq 0x8(%rsp), %rdi
callq 0x43db0
cmpq $0x7, %rax
je 0x53dce
leaq 0x60803(%rip), %rdi # 0xb45b7
movl $0x13ff, %esi # imm = 0x13FF
leaq 0x60841(%rip), %rdx # 0xb4601
leaq 0x6161f(%rip), %rcx # 0xb53e6
movb $0x0, %al
callq 0x46770
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x408e0
movq %rax, (%rsp)
movq (%rsp), %rax
movl $0x52, 0x50(%rax)
movq 0x28(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x20(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0xa8(%rax)
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0xb0(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0xb8(%rax)
movq (%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
ggml_opt_step_adamw:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_20], rcx
mov [rsp+38h+var_28], r8
mov [rsp+38h+var_30], r9
mov rax, [rsp+38h+var_10]
mov eax, [rax+94h]
and eax, 4
cmp eax, 0
jnz short loc_53CD6
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 13FAh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAFlagsGgmlTens; "a->flags & GGML_TENSOR_FLAG_PARAM"
mov al, 0
call _ggml_abort
loc_53CD6:
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
call _ggml_are_same_shape
test al, 1
jnz short loc_53D0A
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 13FBh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlAreSameSha_5; "ggml_are_same_shape(a, grad)"
mov al, 0
call _ggml_abort
loc_53D0A:
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_20]
call _ggml_are_same_shape
test al, 1
jnz short loc_53D3E
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 13FCh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlAreSameSha_6; "ggml_are_same_shape(a, m)"
mov al, 0
call _ggml_abort
loc_53D3E:
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_28]
call _ggml_are_same_shape
test al, 1
jnz short loc_53D72
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 13FDh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlAreSameSha_7; "ggml_are_same_shape(a, v)"
mov al, 0
call _ggml_abort
loc_53D72:
mov rax, [rsp+38h+var_30]
cmp dword ptr [rax], 0
jz short loc_53D9D
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 13FEh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAdamwParamsTyp; "adamw_params->type == GGML_TYPE_F32"
mov al, 0
call _ggml_abort
loc_53D9D:
mov rdi, [rsp+38h+var_30]
call _ggml_nelements
cmp rax, 7
jz short loc_53DCE
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 13FFh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA_6; "ggml_nelements(adamw_params) == 7"
mov al, 0
call _ggml_abort
loc_53DCE:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call _ggml_view_tensor
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_38]
mov dword ptr [rax+50h], 52h ; 'R'
mov rcx, [rsp+38h+var_10]
mov rax, [rsp+38h+var_38]
mov [rax+98h], rcx
mov rcx, [rsp+38h+var_18]
mov rax, [rsp+38h+var_38]
mov [rax+0A0h], rcx
mov rcx, [rsp+38h+var_20]
mov rax, [rsp+38h+var_38]
mov [rax+0A8h], rcx
mov rcx, [rsp+38h+var_28]
mov rax, [rsp+38h+var_38]
mov [rax+0B0h], rcx
mov rcx, [rsp+38h+var_30]
mov rax, [rsp+38h+var_38]
mov [rax+0B8h], rcx
mov rax, [rsp+38h+var_38]
add rsp, 38h
retn
|
_QWORD * ggml_opt_step_adamw(
long long a1,
long long a2,
_QWORD *a3,
_QWORD *a4,
_QWORD *a5,
_QWORD *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
double v14; // xmm4_8
double v15; // xmm5_8
_QWORD *result; // rax
if ( (*(_DWORD *)(a2 + 148) & 4) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
5114,
(long long)"GGML_ASSERT(%s) failed",
"a->flags & GGML_TENSOR_FLAG_PARAM");
if ( !ggml_are_same_shape((_QWORD *)a2, a3) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
5115,
(long long)"GGML_ASSERT(%s) failed",
"ggml_are_same_shape(a, grad)");
if ( !ggml_are_same_shape((_QWORD *)a2, a4) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
5116,
(long long)"GGML_ASSERT(%s) failed",
"ggml_are_same_shape(a, m)");
if ( !ggml_are_same_shape((_QWORD *)a2, a5) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
5117,
(long long)"GGML_ASSERT(%s) failed",
"ggml_are_same_shape(a, v)");
if ( *(_DWORD *)a6 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
5118,
(long long)"GGML_ASSERT(%s) failed",
"adamw_params->type == GGML_TYPE_F32");
if ( ggml_nelements(a6) != 7 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
5119,
(long long)"GGML_ASSERT(%s) failed",
"ggml_nelements(adamw_params) == 7");
result = ggml_view_tensor(a1, a2, a7, a8, a9, a10, v14, v15, a13, a14);
*((_DWORD *)result + 20) = 82;
result[19] = a2;
result[20] = a3;
result[21] = a4;
result[22] = a5;
result[23] = a6;
return result;
}
|
ggml_opt_step_adamw:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],R9
MOV RAX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RAX + 0x94]
AND EAX,0x4
CMP EAX,0x0
JNZ 0x00153cd6
LEA RDI,[0x1b45b7]
MOV ESI,0x13fa
LEA RDX,[0x1b4601]
LEA RCX,[0x1b534f]
MOV AL,0x0
CALL 0x00146770
LAB_00153cd6:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00146720
TEST AL,0x1
JNZ 0x00153d0a
LEA RDI,[0x1b45b7]
MOV ESI,0x13fb
LEA RDX,[0x1b4601]
LEA RCX,[0x1b5371]
MOV AL,0x0
CALL 0x00146770
LAB_00153d0a:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00146720
TEST AL,0x1
JNZ 0x00153d3e
LEA RDI,[0x1b45b7]
MOV ESI,0x13fc
LEA RDX,[0x1b4601]
LEA RCX,[0x1b538e]
MOV AL,0x0
CALL 0x00146770
LAB_00153d3e:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00146720
TEST AL,0x1
JNZ 0x00153d72
LEA RDI,[0x1b45b7]
MOV ESI,0x13fd
LEA RDX,[0x1b4601]
LEA RCX,[0x1b53a8]
MOV AL,0x0
CALL 0x00146770
LAB_00153d72:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX],0x0
JZ 0x00153d9d
LEA RDI,[0x1b45b7]
MOV ESI,0x13fe
LEA RDX,[0x1b4601]
LEA RCX,[0x1b53c2]
MOV AL,0x0
CALL 0x00146770
LAB_00153d9d:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00143db0
CMP RAX,0x7
JZ 0x00153dce
LEA RDI,[0x1b45b7]
MOV ESI,0x13ff
LEA RDX,[0x1b4601]
LEA RCX,[0x1b53e6]
MOV AL,0x0
CALL 0x00146770
LAB_00153dce:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001408e0
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x50],0x52
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0xa0],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0xa8],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0xb0],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0xb8],RCX
MOV RAX,qword ptr [RSP]
ADD RSP,0x38
RET
|
long ggml_opt_step_adamw(int8 param_1,long param_2,int8 param_3,int8 param_4,
int8 param_5,int *param_6)
{
ulong uVar1;
long lVar2;
if ((*(uint *)(param_2 + 0x94) & 4) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x13fa,
"GGML_ASSERT(%s) failed","a->flags & GGML_TENSOR_FLAG_PARAM");
}
uVar1 = ggml_are_same_shape(param_2,param_3);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x13fb,
"GGML_ASSERT(%s) failed","ggml_are_same_shape(a, grad)");
}
uVar1 = ggml_are_same_shape(param_2,param_4);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x13fc,
"GGML_ASSERT(%s) failed","ggml_are_same_shape(a, m)");
}
uVar1 = ggml_are_same_shape(param_2,param_5);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x13fd,
"GGML_ASSERT(%s) failed","ggml_are_same_shape(a, v)");
}
if (*param_6 != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x13fe,
"GGML_ASSERT(%s) failed","adamw_params->type == GGML_TYPE_F32");
}
lVar2 = ggml_nelements(param_6);
if (lVar2 != 7) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0x13ff,
"GGML_ASSERT(%s) failed","ggml_nelements(adamw_params) == 7");
}
lVar2 = ggml_view_tensor(param_1,param_2);
*(int4 *)(lVar2 + 0x50) = 0x52;
*(long *)(lVar2 + 0x98) = param_2;
*(int8 *)(lVar2 + 0xa0) = param_3;
*(int8 *)(lVar2 + 0xa8) = param_4;
*(int8 *)(lVar2 + 0xb0) = param_5;
*(int **)(lVar2 + 0xb8) = param_6;
return lVar2;
}
|
|
12,345
|
read_block_primary
|
eloqsql/mysys/mf_keycache.c
|
static void read_block_primary(SIMPLE_KEY_CACHE_CB *keycache,
BLOCK_LINK *block, uint read_length,
uint min_length)
{
size_t got_length;
/* On entry cache_lock is locked */
KEYCACHE_THREAD_TRACE("read_block_primary");
/*
This code is executed only by threads that submitted primary
requests. Until block->status contains BLOCK_READ, all other
request for the block become secondary requests. For a primary
request the block must be properly initialized.
*/
DBUG_ASSERT(((block->status & ~BLOCK_FOR_UPDATE) == BLOCK_IN_USE) ||
fail_block(block));
DBUG_ASSERT((block->length == 0) || fail_block(block));
DBUG_ASSERT((block->offset == keycache->key_cache_block_size) ||
fail_block(block));
DBUG_ASSERT((block->requests > 0) || fail_block(block));
KEYCACHE_DBUG_PRINT("read_block_primary",
("page to be read by primary request"));
keycache->global_cache_read++;
/* Page is not in buffer yet, is to be read from disk */
keycache_pthread_mutex_unlock(&keycache->cache_lock);
/*
Here other threads may step in and register as secondary readers.
They will register in block->wqueue[COND_FOR_REQUESTED].
*/
got_length= my_pread(block->hash_link->file, block->buffer,
read_length, block->hash_link->diskpos, MYF(0));
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
The block can now have been marked for free (in case of
FLUSH_RELEASE). Otherwise the state must be unchanged.
*/
DBUG_ASSERT(((block->status & ~(BLOCK_REASSIGNED |
BLOCK_FOR_UPDATE)) == BLOCK_IN_USE) ||
fail_block(block));
DBUG_ASSERT((block->length == 0) || fail_block(block));
DBUG_ASSERT((block->offset == keycache->key_cache_block_size) ||
fail_block(block));
DBUG_ASSERT((block->requests > 0) || fail_block(block));
if (got_length < min_length)
block->status|= BLOCK_ERROR;
else
{
block->status|= BLOCK_READ;
block->length= (uint)got_length;
/*
Do not set block->offset here. If this block is marked
BLOCK_CHANGED later, we want to flush only the modified part. So
only a writer may set block->offset down from
keycache->key_cache_block_size.
*/
}
KEYCACHE_DBUG_PRINT("read_block_primary",
("primary request: new page in cache"));
/* Signal that all pending requests for this page now can be processed */
release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]);
DBUG_ASSERT(keycache->can_be_used);
}
|
O0
|
c
|
read_block_primary:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
jmp 0xe40b8
jmp 0xe40ba
jmp 0xe40bc
jmp 0xe40be
jmp 0xe40c0
jmp 0xe40c2
jmp 0xe40c4
jmp 0xe40c6
jmp 0xe40c8
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x158(%rax)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe4040
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xf4660
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x700b8(%rip), %rsi # 0x1541ea
movl $0xa63, %edx # imm = 0xA63
callq 0xe3620
jmp 0xe413e
jmp 0xe4140
jmp 0xe4142
jmp 0xe4144
jmp 0xe4146
jmp 0xe4148
jmp 0xe414a
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %ecx
cmpq %rcx, %rax
jae 0xe4165
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x50(%rax)
jmp 0xe417f
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x50(%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4c(%rax)
jmp 0xe4181
jmp 0xe4183
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0xe5440
jmp 0xe4192
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
read_block_primary:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
jmp short $+2
loc_E40B8:
jmp short $+2
loc_E40BA:
jmp short $+2
loc_E40BC:
jmp short $+2
loc_E40BE:
jmp short $+2
loc_E40C0:
jmp short $+2
loc_E40C2:
jmp short $+2
loc_E40C4:
jmp short $+2
loc_E40C6:
jmp short $+2
loc_E40C8:
mov rax, [rbp+var_8]
mov rcx, [rax+158h]
add rcx, 1
mov [rax+158h], rcx
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_25
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov edi, [rax+18h]
mov rax, [rbp+var_10]
mov rsi, [rax+40h]
mov eax, [rbp+var_14]
mov edx, eax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rax+20h]
xor eax, eax
mov r8d, eax
call my_pread
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0A63h
call inline_mysql_mutex_lock_24
jmp short $+2
loc_E413E:
jmp short $+2
loc_E4140:
jmp short $+2
loc_E4142:
jmp short $+2
loc_E4144:
jmp short $+2
loc_E4146:
jmp short $+2
loc_E4148:
jmp short $+2
loc_E414A:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_18]
cmp rax, rcx
jnb short loc_E4165
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
or ecx, 1
mov [rax+50h], ecx
jmp short loc_E417F
loc_E4165:
mov rax, [rbp+var_10]
mov ecx, [rax+50h]
or ecx, 2
mov [rax+50h], ecx
mov rax, [rbp+var_20]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+4Ch], ecx
loc_E417F:
jmp short $+2
loc_E4181:
jmp short $+2
loc_E4183:
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
call release_whole_queue
jmp short $+2
loc_E4192:
add rsp, 20h
pop rbp
retn
|
long long read_block_primary(long long a1, long long a2, unsigned int a3, unsigned int a4)
{
unsigned long long v5; // [rsp+0h] [rbp-20h]
++*(_QWORD *)(a1 + 344);
inline_mysql_mutex_unlock_25(a1 + 192);
v5 = my_pread(
*(unsigned int *)(*(_QWORD *)(a2 + 32) + 24LL),
*(_QWORD *)(a2 + 64),
a3,
*(_QWORD *)(*(_QWORD *)(a2 + 32) + 32LL),
0LL);
inline_mysql_mutex_lock_24(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xA63u);
if ( v5 >= a4 )
{
*(_DWORD *)(a2 + 80) |= 2u;
*(_DWORD *)(a2 + 76) = v5;
}
else
{
*(_DWORD *)(a2 + 80) |= 1u;
}
return release_whole_queue(a2 + 40);
}
|
read_block_primary:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
JMP 0x001e40b8
LAB_001e40b8:
JMP 0x001e40ba
LAB_001e40ba:
JMP 0x001e40bc
LAB_001e40bc:
JMP 0x001e40be
LAB_001e40be:
JMP 0x001e40c0
LAB_001e40c0:
JMP 0x001e40c2
LAB_001e40c2:
JMP 0x001e40c4
LAB_001e40c4:
JMP 0x001e40c6
LAB_001e40c6:
JMP 0x001e40c8
LAB_001e40c8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x158]
ADD RCX,0x1
MOV qword ptr [RAX + 0x158],RCX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e4040
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x40]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RAX + 0x20]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001f4660
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x2541ea]
MOV EDX,0xa63
CALL 0x001e3620
JMP 0x001e413e
LAB_001e413e:
JMP 0x001e4140
LAB_001e4140:
JMP 0x001e4142
LAB_001e4142:
JMP 0x001e4144
LAB_001e4144:
JMP 0x001e4146
LAB_001e4146:
JMP 0x001e4148
LAB_001e4148:
JMP 0x001e414a
LAB_001e414a:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x18]
CMP RAX,RCX
JNC 0x001e4165
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x1
MOV dword ptr [RAX + 0x50],ECX
JMP 0x001e417f
LAB_001e4165:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x2
MOV dword ptr [RAX + 0x50],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4c],ECX
LAB_001e417f:
JMP 0x001e4181
LAB_001e4181:
JMP 0x001e4183
LAB_001e4183:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
CALL 0x001e5440
JMP 0x001e4192
LAB_001e4192:
ADD RSP,0x20
POP RBP
RET
|
void read_block_primary(long param_1,long param_2,int4 param_3,uint param_4)
{
ulong uVar1;
*(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1;
inline_mysql_mutex_unlock(param_1 + 0xc0);
uVar1 = my_pread(*(int4 *)(*(long *)(param_2 + 0x20) + 0x18),*(int8 *)(param_2 + 0x40)
,param_3,*(int8 *)(*(long *)(param_2 + 0x20) + 0x20),0);
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xa63);
if (uVar1 < param_4) {
*(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) | 1;
}
else {
*(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) | 2;
*(int *)(param_2 + 0x4c) = (int)uVar1;
}
release_whole_queue(param_2 + 0x28);
return;
}
|
|
12,346
|
my_convert_fix
|
eloqsql/strings/ctype.c
|
size_t
my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length,
CHARSET_INFO *from_cs, const char *from, size_t from_length,
size_t nchars,
MY_STRCOPY_STATUS *copy_status,
MY_STRCONV_STATUS *conv_status)
{
int cnvres;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb;
const uchar *from_end= (const uchar*) from + from_length;
uchar *to_end= (uchar*) to + to_length;
char *to_start= to;
DBUG_ASSERT(to_cs != &my_charset_bin);
DBUG_ASSERT(from_cs != &my_charset_bin);
copy_status->m_well_formed_error_pos= NULL;
conv_status->m_cannot_convert_error_pos= NULL;
for ( ; nchars; nchars--)
{
const char *from_prev= from;
if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0)
from+= cnvres;
else if (cnvres == MY_CS_ILSEQ)
{
if (!copy_status->m_well_formed_error_pos)
copy_status->m_well_formed_error_pos= from;
from++;
wc= '?';
}
else if (cnvres > MY_CS_TOOSMALL)
{
/*
A correct multibyte sequence detected
But it doesn't have Unicode mapping.
*/
if (!conv_status->m_cannot_convert_error_pos)
conv_status->m_cannot_convert_error_pos= from;
from+= (-cnvres);
wc= '?';
}
else
{
if ((uchar *) from >= from_end)
break; // End of line
// Incomplete byte sequence
if (!copy_status->m_well_formed_error_pos)
copy_status->m_well_formed_error_pos= from;
from++;
wc= '?';
}
outp:
if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0)
to+= cnvres;
else if (cnvres == MY_CS_ILUNI && wc != '?')
{
if (!conv_status->m_cannot_convert_error_pos)
conv_status->m_cannot_convert_error_pos= from_prev;
wc= '?';
goto outp;
}
else
{
from= from_prev;
break;
}
}
copy_status->m_source_end_pos= from;
return to - to_start;
}
|
O0
|
c
|
my_convert_fix:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
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 -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x7c984
jmp 0x7c986
jmp 0x7c988
movq 0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq 0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, 0x10(%rbp)
je 0x7cb0b
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x58(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x7c9e6
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x7ca8f
cmpl $0x0, -0x34(%rbp)
jne 0x7ca19
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x7ca03
movq -0x28(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x7ca8d
cmpl $-0x65, -0x34(%rbp)
jle 0x7ca51
movq 0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x7ca34
movq -0x28(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
xorl %ecx, %ecx
subl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x7ca8b
movq -0x28(%rbp), %rax
cmpq -0x58(%rbp), %rax
jb 0x7ca60
jmp 0x7cb0b
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x7ca77
movq -0x28(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x7ca8d
jmp 0x7ca8f
jmp 0x7ca91
movq -0x50(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x7cac2
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x7caf8
cmpl $0x0, -0x34(%rbp)
jne 0x7caee
cmpq $0x3f, -0x40(%rbp)
je 0x7caee
movq 0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x7cae4
movq -0x70(%rbp), %rcx
movq 0x20(%rbp), %rax
movq %rcx, (%rax)
movq $0x3f, -0x40(%rbp)
jmp 0x7ca91
movq -0x70(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x7cb0b
jmp 0x7cafa
movq 0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rbp)
jmp 0x7c99f
movq -0x28(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_convert_fix:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
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_20]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_10]
mov [rbp+var_68], rax
jmp short $+2
loc_7C984:
jmp short $+2
loc_7C986:
jmp short $+2
loc_7C988:
mov rax, [rbp+arg_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+arg_10]
mov qword ptr [rax], 0
loc_7C99F:
cmp [rbp+arg_0], 0
jz loc_7CB0B
mov rax, [rbp+var_28]
mov [rbp+var_70], rax
mov rax, [rbp+var_48]
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_58]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_7C9E6
mov ecx, [rbp+var_34]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_7CA8F
loc_7C9E6:
cmp [rbp+var_34], 0
jnz short loc_7CA19
mov rax, [rbp+arg_8]
cmp qword ptr [rax+8], 0
jnz short loc_7CA03
mov rcx, [rbp+var_28]
mov rax, [rbp+arg_8]
mov [rax+8], rcx
loc_7CA03:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_7CA8D
loc_7CA19:
cmp [rbp+var_34], 0FFFFFF9Bh
jle short loc_7CA51
mov rax, [rbp+arg_10]
cmp qword ptr [rax], 0
jnz short loc_7CA34
mov rcx, [rbp+var_28]
mov rax, [rbp+arg_10]
mov [rax], rcx
loc_7CA34:
xor ecx, ecx
sub ecx, [rbp+var_34]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_7CA8B
loc_7CA51:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_58]
jb short loc_7CA60
jmp loc_7CB0B
loc_7CA60:
mov rax, [rbp+arg_8]
cmp qword ptr [rax+8], 0
jnz short loc_7CA77
mov rcx, [rbp+var_28]
mov rax, [rbp+arg_8]
mov [rax+8], rcx
loc_7CA77:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
loc_7CA8B:
jmp short $+2
loc_7CA8D:
jmp short $+2
loc_7CA8F:
jmp short $+2
loc_7CA91:
mov rax, [rbp+var_50]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_60]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_7CAC2
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_7CAF8
loc_7CAC2:
cmp [rbp+var_34], 0
jnz short loc_7CAEE
cmp [rbp+var_40], 3Fh ; '?'
jz short loc_7CAEE
mov rax, [rbp+arg_10]
cmp qword ptr [rax], 0
jnz short loc_7CAE4
mov rcx, [rbp+var_70]
mov rax, [rbp+arg_10]
mov [rax], rcx
loc_7CAE4:
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_7CA91
loc_7CAEE:
mov rax, [rbp+var_70]
mov [rbp+var_28], rax
jmp short loc_7CB0B
loc_7CAF8:
jmp short $+2
loc_7CAFA:
mov rax, [rbp+arg_0]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+arg_0], rax
jmp loc_7C99F
loc_7CB0B:
mov rcx, [rbp+var_28]
mov rax, [rbp+arg_8]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_68]
sub rax, rcx
add rsp, 70h
pop rbp
retn
|
long long my_convert_fix(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
long long a6,
long long a7,
unsigned long long *a8,
unsigned long long *a9)
{
unsigned long long v10; // [rsp+0h] [rbp-70h]
long long v11; // [rsp+10h] [rbp-60h]
unsigned long long v12; // [rsp+18h] [rbp-58h]
long long ( *v13)(long long, long long, long long, long long); // [rsp+20h] [rbp-50h]
long long ( *v14)(long long, long long *, unsigned long long, unsigned long long); // [rsp+28h] [rbp-48h]
long long i; // [rsp+30h] [rbp-40h] BYREF
int v16; // [rsp+3Ch] [rbp-34h]
long long v17; // [rsp+40h] [rbp-30h]
unsigned long long v18; // [rsp+48h] [rbp-28h]
long long v19; // [rsp+50h] [rbp-20h]
long long v20; // [rsp+58h] [rbp-18h]
long long v21; // [rsp+60h] [rbp-10h]
long long v22; // [rsp+68h] [rbp-8h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v14 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a4 + 184) + 40LL);
v13 = *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL);
v12 = a6 + a5;
v11 = a3 + a2;
a8[1] = 0LL;
*a9 = 0LL;
LABEL_2:
if ( a7 )
{
v10 = v18;
v16 = v14(v19, &i, v18, v12);
if ( v16 > 0 )
{
v18 += v16;
goto LABEL_17;
}
if ( !v16 )
{
if ( !a8[1] )
a8[1] = v18;
++v18;
i = 63LL;
goto LABEL_17;
}
if ( v16 > -101 )
{
if ( !*a9 )
*a9 = v18;
v18 += -v16;
i = 63LL;
goto LABEL_17;
}
if ( v18 < v12 )
{
if ( !a8[1] )
a8[1] = v18;
++v18;
for ( i = 63LL; ; i = 63LL )
{
LABEL_17:
v16 = v13(v22, i, v21, v11);
if ( v16 > 0 )
{
v21 += v16;
--a7;
goto LABEL_2;
}
if ( v16 || i == 63 )
break;
if ( !*a9 )
*a9 = v10;
}
v18 = v10;
}
}
*a8 = v18;
return v21 - a2;
}
|
my_convert_fix:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
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 + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x68],RAX
JMP 0x0017c984
LAB_0017c984:
JMP 0x0017c986
LAB_0017c986:
JMP 0x0017c988
LAB_0017c988:
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RAX],0x0
LAB_0017c99f:
CMP qword ptr [RBP + 0x10],0x0
JZ 0x0017cb0b
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x0017c9e6
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0017ca8f
LAB_0017c9e6:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x0017ca19
MOV RAX,qword ptr [RBP + 0x18]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0017ca03
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RAX + 0x8],RCX
LAB_0017ca03:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x0017ca8d
LAB_0017ca19:
CMP dword ptr [RBP + -0x34],-0x65
JLE 0x0017ca51
MOV RAX,qword ptr [RBP + 0x20]
CMP qword ptr [RAX],0x0
JNZ 0x0017ca34
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RAX],RCX
LAB_0017ca34:
XOR ECX,ECX
SUB ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x0017ca8b
LAB_0017ca51:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x58]
JC 0x0017ca60
JMP 0x0017cb0b
LAB_0017ca60:
MOV RAX,qword ptr [RBP + 0x18]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0017ca77
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RAX + 0x8],RCX
LAB_0017ca77:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
LAB_0017ca8b:
JMP 0x0017ca8d
LAB_0017ca8d:
JMP 0x0017ca8f
LAB_0017ca8f:
JMP 0x0017ca91
LAB_0017ca91:
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x60]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x0017cac2
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017caf8
LAB_0017cac2:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x0017caee
CMP qword ptr [RBP + -0x40],0x3f
JZ 0x0017caee
MOV RAX,qword ptr [RBP + 0x20]
CMP qword ptr [RAX],0x0
JNZ 0x0017cae4
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RAX],RCX
LAB_0017cae4:
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x0017ca91
LAB_0017caee:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0017cb0b
LAB_0017caf8:
JMP 0x0017cafa
LAB_0017cafa:
MOV RAX,qword ptr [RBP + 0x10]
ADD RAX,-0x1
MOV qword ptr [RBP + 0x10],RAX
JMP 0x0017c99f
LAB_0017cb0b:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x68]
SUB RAX,RCX
ADD RSP,0x70
POP RBP
RET
|
long my_convert_fix(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6,
long param_7,ulong *param_8,ulong *param_9)
{
code *pcVar1;
code *pcVar2;
ulong uVar3;
ulong uVar4;
long local_48;
int local_3c;
long local_38;
ulong local_30;
long local_28;
long local_20;
long local_18;
long local_10;
pcVar1 = *(code **)(*(long *)(param_4 + 0xb8) + 0x28);
pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
param_8[1] = 0;
*param_9 = 0;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
for (; uVar3 = local_30, uVar4 = uVar3, param_7 != 0; param_7 = param_7 + -1) {
local_3c = (*pcVar1)(local_28,&local_48,local_30);
if (local_3c < 1) {
if (local_3c == 0) {
if (param_8[1] == 0) {
param_8[1] = local_30;
}
local_30 = local_30 + 1;
}
else if (local_3c < -100) {
uVar4 = local_30;
if (param_5 + param_6 <= local_30) break;
if (param_8[1] == 0) {
param_8[1] = local_30;
}
local_30 = local_30 + 1;
}
else {
if (*param_9 == 0) {
*param_9 = local_30;
}
local_30 = local_30 + (long)-local_3c;
}
local_48 = 0x3f;
}
else {
local_30 = local_30 + (long)local_3c;
}
while (local_3c = (*pcVar2)(local_10,local_48,local_18,param_2 + param_3), local_3c < 1) {
uVar4 = uVar3;
if ((local_3c != 0) || (local_48 == 0x3f)) goto LAB_0017cb0b;
if (*param_9 == 0) {
*param_9 = uVar3;
}
local_48 = 0x3f;
local_3c = 0;
}
local_18 = local_18 + local_3c;
}
LAB_0017cb0b:
local_30 = uVar4;
*param_8 = local_30;
return local_18 - param_2;
}
|
|
12,347
|
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;
}
|
O0
|
c
|
pvio_socket_has_data:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x73ff9
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x73fff
movb $0x0, -0x1(%rbp)
jmp 0x74063
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
leaq -0x31(%rbp), %rdx
callq 0x72fa0
movq -0x20(%rbp), %rax
movl (%rax), %edi
leaq -0x21(%rbp), %rsi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x389a0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movsbl -0x31(%rbp), %esi
callq 0x72fa0
cmpq $0x0, -0x30(%rbp)
jge 0x74054
movb $0x1, -0x1(%rbp)
jmp 0x74063
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
pvio_socket_has_data:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], 0
cmp [rbp+var_10], 0
jz short loc_73FF9
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_73FFF
loc_73FF9:
mov [rbp+var_1], 0
jmp short loc_74063
loc_73FFF:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
xor esi, esi
lea rdx, [rbp+var_31]
call pvio_socket_blocking
mov rax, [rbp+var_20]
mov edi, [rax]
lea rsi, [rbp+var_21]
mov edx, 1
mov ecx, 2
call _recv
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
xor eax, eax
mov edx, eax
movsx esi, [rbp+var_31]
call pvio_socket_blocking
cmp [rbp+var_30], 0
jge short loc_74054
mov [rbp+var_1], 1
jmp short loc_74063
loc_74054:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_1], 0
loc_74063:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char pvio_socket_has_data(unsigned int **a1, long long *a2)
{
char v3; // [rsp+Fh] [rbp-31h] BYREF
long long v4; // [rsp+10h] [rbp-30h]
char v5; // [rsp+1Fh] [rbp-21h] BYREF
unsigned int *v6; // [rsp+20h] [rbp-20h]
long long *v7; // [rsp+28h] [rbp-18h]
unsigned int **v8; // [rsp+30h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = 0LL;
if ( !a1 || !*v8 )
return 0;
v6 = *v8;
pvio_socket_blocking(v8, 0, &v3);
v4 = recv(*v6, &v5, 1LL, 2LL);
pvio_socket_blocking(v8, v3, 0LL);
if ( v4 < 0 )
return 1;
*v7 = v4;
return 0;
}
|
pvio_socket_has_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00173ff9
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00173fff
LAB_00173ff9:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00174063
LAB_00173fff:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
LEA RDX,[RBP + -0x31]
CALL 0x00172fa0
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBP + -0x21]
MOV EDX,0x1
MOV ECX,0x2
CALL 0x001389a0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV EDX,EAX
MOVSX ESI,byte ptr [RBP + -0x31]
CALL 0x00172fa0
CMP qword ptr [RBP + -0x30],0x0
JGE 0x00174054
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00174063
LAB_00174054:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_00174063:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 pvio_socket_has_data(long *param_1,long *param_2)
{
char local_39;
long local_38;
int1 local_29;
int *local_28;
long *local_20;
long *local_18;
int1 local_9;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_9 = 0;
}
else {
local_28 = (int *)*param_1;
local_20 = param_2;
local_18 = param_1;
pvio_socket_blocking(param_1,0,&local_39);
local_38 = recv(*local_28,&local_29,1,2);
pvio_socket_blocking(local_18,(int)local_39,0);
if (local_38 < 0) {
local_9 = 1;
}
else {
*local_20 = local_38;
local_9 = 0;
}
}
return local_9;
}
|
|
12,348
|
my_hash_iterate
|
eloqsql/mysys/hash.c
|
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
}
|
O0
|
c
|
my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x38b35
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x28(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0x38b28
movb $0x1, -0x1(%rbp)
jmp 0x38b39
jmp 0x38b2a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x38af6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
my_hash_iterate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_38AF6:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_38B35
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+28h]
mov edx, [rbp+var_28]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
mov rsi, [rbp+var_20]
call rax
cmp al, 0
jz short loc_38B28
mov [rbp+var_1], 1
jmp short loc_38B39
loc_38B28:
jmp short $+2
loc_38B2A:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_38AF6
loc_38B35:
mov [rbp+var_1], 0
loc_38B39:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
unsigned int i; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
v5 = *(_QWORD *)(a1 + 24);
for ( i = 0; i < v5; ++i )
{
if ( a2(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 40) + 8), a3) )
return 1;
}
return 0;
}
|
my_hash_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_00138af6:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x00138b35
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x28]
MOV EDX,dword ptr [RBP + -0x28]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x00138b28
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00138b39
LAB_00138b28:
JMP 0x00138b2a
LAB_00138b2a:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00138af6
LAB_00138b35:
MOV byte ptr [RBP + -0x1],0x0
LAB_00138b39:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
uint local_30;
uVar1 = *(int8 *)(param_1 + 0x18);
local_30 = 0;
while( true ) {
if ((uint)uVar1 <= local_30) {
return 0;
}
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_30 * 0x10 + 8),
param_3);
if (cVar2 != '\0') break;
local_30 = local_30 + 1;
}
return 1;
}
|
|
12,349
|
fmt::v10::basic_string_view<char>::compare(fmt::v10::basic_string_view<char>) const
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
|
FMT_CONSTEXPR_CHAR_TRAITS auto compare(basic_string_view other) const -> int {
size_t str_size = size_ < other.size_ ? size_ : other.size_;
int result = std::char_traits<Char>::compare(data_, other.data_, str_size);
if (result == 0)
result = size_ == other.size_ ? 0 : (size_ < other.size_ ? -1 : 1);
return result;
}
|
O0
|
c
|
fmt::v10::basic_string_view<char>::compare(fmt::v10::basic_string_view<char>) const:
subq $0x48, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rax), %rax
cmpq 0x40(%rsp), %rax
jae 0x497e8
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x497f2
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq (%rax), %rdi
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x2fc40
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x49860
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
cmpq 0x40(%rsp), %rax
jne 0x49836
xorl %eax, %eax
movl %eax, 0xc(%rsp)
jmp 0x49858
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x40(%rsp), %rsi
movl $0x1, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
|
_ZNK3fmt3v1017basic_string_viewIcE7compareES2_:
sub rsp, 48h
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_8], rdx
mov [rsp+48h+var_18], rdi
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_30], rax
mov rax, [rax+8]
cmp rax, [rsp+48h+var_8]
jnb short loc_497E8
mov rax, [rsp+48h+var_30]
mov rax, [rax+8]
mov [rsp+48h+var_38], rax
jmp short loc_497F2
loc_497E8:
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_38], rax
loc_497F2:
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_38]
mov [rsp+48h+var_20], rcx
mov rdi, [rax]
mov rsi, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_20]
call _ZNSt11char_traitsIcE7compareEPKcS2_m; std::char_traits<char>::compare(char const*,char const*,ulong)
mov [rsp+48h+var_24], eax
cmp [rsp+48h+var_24], 0
jnz short loc_49860
mov rax, [rsp+48h+var_30]
mov rax, [rax+8]
cmp rax, [rsp+48h+var_8]
jnz short loc_49836
xor eax, eax
mov [rsp+48h+var_3C], eax
jmp short loc_49858
loc_49836:
mov rax, [rsp+48h+var_30]
mov rdx, [rax+8]
mov rsi, [rsp+48h+var_8]
mov eax, 1
mov ecx, 0FFFFFFFFh
cmp rdx, rsi
cmovb eax, ecx
mov [rsp+48h+var_3C], eax
loc_49858:
mov eax, [rsp+48h+var_3C]
mov [rsp+48h+var_24], eax
loc_49860:
mov eax, [rsp+48h+var_24]
add rsp, 48h
retn
|
long long fmt::v10::basic_string_view<char>::compare(long long *a1, long long a2, unsigned long long a3)
{
unsigned int v3; // eax
long long v6; // [rsp+10h] [rbp-38h]
unsigned int v7; // [rsp+24h] [rbp-24h]
if ( a1[1] >= a3 )
v6 = a3;
else
v6 = a1[1];
v7 = std::char_traits<char>::compare(*a1, a2, v6);
if ( !v7 )
{
if ( a1[1] == a3 )
{
return 0;
}
else
{
v3 = 1;
if ( a1[1] < a3 )
return (unsigned int)-1;
return v3;
}
}
return v7;
}
|
compare:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RSP + 0x40]
JNC 0x001497e8
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001497f2
LAB_001497e8:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
LAB_001497f2:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x0012fc40
MOV dword ptr [RSP + 0x24],EAX
CMP dword ptr [RSP + 0x24],0x0
JNZ 0x00149860
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RSP + 0x40]
JNZ 0x00149836
XOR EAX,EAX
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00149858
LAB_00149836:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RSP + 0x40]
MOV EAX,0x1
MOV ECX,0xffffffff
CMP RDX,RSI
CMOVC EAX,ECX
MOV dword ptr [RSP + 0xc],EAX
LAB_00149858:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x24],EAX
LAB_00149860:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x48
RET
|
/* fmt::v10::basic_string_view<char>::compare(fmt::v10::basic_string_view<char>) const */
int fmt::v10::basic_string_view<char>::compare(int8 *param_1,char *param_2,ulong param_3)
{
int local_3c;
ulong local_38;
int local_24;
local_38 = param_3;
if ((ulong)param_1[1] < param_3) {
local_38 = param_1[1];
}
local_24 = std::char_traits<char>::compare((char *)*param_1,param_2,local_38);
if (local_24 == 0) {
if (param_1[1] == param_3) {
local_3c = 0;
}
else {
local_3c = 1;
if ((ulong)param_1[1] < param_3) {
local_3c = -1;
}
}
local_24 = local_3c;
}
return local_24;
}
|
|
12,350
|
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;
}
|
O3
|
c
|
my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0xb8(%rdi), %rax
callq *0xc0(%rax)
xorl %r12d, %r12d
cmpl $0x2, %eax
jl 0xe2afa
movl %eax, %eax
addq %rax, %r14
incq %r12
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jg 0xe2ad7
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
my_numchars_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rax, [rdi+0B8h]
call qword ptr [rax+0C0h]
xor r12d, r12d
cmp eax, 2
jl short loc_E2AFA
loc_E2AD7:
mov eax, eax
add r14, rax
inc r12
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 1
jg short loc_E2AD7
loc_E2AFA:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
int v5; // eax
long long v6; // r12
v5 = (*(long long (**)(void))(*(_QWORD *)(a1 + 184) + 192LL))();
v6 = 0LL;
if ( v5 >= 2 )
{
do
{
a2 += (unsigned int)v5;
++v6;
v5 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, a2, a3);
}
while ( v5 > 1 );
}
return v6;
}
|
my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0xb8]
CALL qword ptr [RAX + 0xc0]
XOR R12D,R12D
CMP EAX,0x2
JL 0x001e2afa
LAB_001e2ad7:
MOV EAX,EAX
ADD R14,RAX
INC R12
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JG 0x001e2ad7
LAB_001e2afa:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_numchars_utf16(long param_1,long param_2,int8 param_3)
{
uint uVar1;
long lVar2;
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))();
lVar2 = 0;
while (1 < (int)uVar1) {
param_2 = param_2 + (ulong)uVar1;
lVar2 = lVar2 + 1;
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
}
return lVar2;
}
|
|
12,351
|
cpu_get_num_math()
|
monkey531[P]llama/common/common.cpp
|
int32_t cpu_get_num_math() {
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
int n_cpu = sysconf(_SC_NPROCESSORS_ONLN);
if (n_cpu < 1) {
return cpu_get_num_physical_cores();
}
if (is_hybrid_cpu()) {
cpu_set_t affinity;
if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) {
int result = cpu_count_math_cpus(n_cpu);
pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity);
if (result > 0) {
return result;
}
}
}
#endif
return cpu_get_num_physical_cores();
}
|
O3
|
cpp
|
cpu_get_num_math():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp # imm = 0x100
movl $0x54, %edi
callq 0x194d0
movq %rax, %rbx
testl %ebx, %ebx
jle 0x4d37d
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
testw %dx, %dx
jns 0x4d3a6
callq 0x19690
movq %rax, %r14
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %rax, %rdi
callq 0x19e40
testl %eax, %eax
jne 0x4d3a6
xorl %r15d, %r15d
movq %rsp, %r12
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %r15d # imm = 0x3FF
ja 0x4d31f
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movl %r15d, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movl $0x80, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x19e00
testl %eax, %eax
jne 0x4d391
xorl %ecx, %ecx
movl $0x1a, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
andl $0xff000000, %eax # imm = 0xFF000000
xorl %ecx, %ecx
cmpl $0x20000000, %eax # imm = 0x20000000
setne %cl
addl %ecx, %ebp
addl %ecx, %r15d
incl %r15d
cmpl %ebx, %r15d
jl 0x4d2d7
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x19e00
testl %ebp, %ebp
jne 0x4d3ad
jmp 0x4d3a6
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4cefc
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x19e00
callq 0x4cefc
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_Z16cpu_get_num_mathv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 100h
mov edi, 54h ; 'T'
call _sysconf
mov rbx, rax
test ebx, ebx
jle loc_4D37D
mov eax, 7
xor ecx, ecx
mov rsi, rbx
cpuid
xchg rsi, rbx
test dx, dx
jns loc_4D3A6
call _pthread_self
mov r14, rax
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, rax
call _pthread_getaffinity_np
test eax, eax
jnz loc_4D3A6
xor r15d, r15d
mov r12, rsp
xor ebp, ebp
loc_4D2D7:
xorps xmm0, xmm0
movaps [rsp+128h+var_B8], xmm0
movaps [rsp+128h+var_C8], xmm0
movaps [rsp+128h+var_D8], xmm0
movaps [rsp+128h+var_E8], xmm0
movaps [rsp+128h+var_F8], xmm0
movaps [rsp+128h+var_108], xmm0
movaps [rsp+128h+var_118], xmm0
movaps [rsp+128h+var_128], xmm0
cmp r15d, 3FFh
ja short loc_4D31F
mov eax, 1
mov ecx, r15d
shl rax, cl
mov ecx, r15d
shr ecx, 6
or qword ptr [rsp+rcx*8+128h+var_128], rax
loc_4D31F:
mov esi, 80h
mov rdi, r14
mov rdx, r12
call _pthread_setaffinity_np
test eax, eax
jnz short loc_4D391
xor ecx, ecx
mov eax, 1Ah
mov rsi, rbx
cpuid
xchg rsi, rbx
and eax, 0FF000000h
xor ecx, ecx
cmp eax, 20000000h
setnz cl
add ebp, ecx
add r15d, ecx
inc r15d
cmp r15d, ebx
jl loc_4D2D7
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
test ebp, ebp
jnz short loc_4D3AD
jmp short loc_4D3A6
loc_4D37D:
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
loc_4D391:
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
loc_4D3A6:
call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
mov ebp, eax
loc_4D3AD:
mov eax, ebp
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long cpu_get_num_math(void)
{
long long v0; // rbx
long long v2; // rsi
long long v7; // rbx
long long v8; // rsi
long long v9; // rt0
long long v10; // r14
unsigned int v11; // r15d
unsigned int v12; // ebp
long long v13; // rcx
long long v14; // r8
long long v15; // r9
long long v17; // rsi
long long v22; // rcx
__int128 v24; // [rsp+0h] [rbp-128h] BYREF
__int128 v25; // [rsp+10h] [rbp-118h]
__int128 v26; // [rsp+20h] [rbp-108h]
__int128 v27; // [rsp+30h] [rbp-F8h]
__int128 v28; // [rsp+40h] [rbp-E8h]
__int128 v29; // [rsp+50h] [rbp-D8h]
__int128 v30; // [rsp+60h] [rbp-C8h]
__int128 v31; // [rsp+70h] [rbp-B8h]
_BYTE v32[168]; // [rsp+80h] [rbp-A8h] BYREF
v0 = sysconf(84LL);
if ( (int)v0 <= 0 )
return cpu_get_num_physical_cores();
_RAX = 7LL;
v2 = v0;
__asm { cpuid }
v9 = v2;
v8 = _RBX;
v7 = v9;
if ( (_RDX & 0x8000u) != 0LL )
{
v10 = pthread_self(84LL, v8, _RDX, _RCX);
if ( !(unsigned int)pthread_getaffinity_np(v10, 128LL, v32) )
{
v11 = 0;
v12 = 0;
do
{
v31 = 0LL;
v30 = 0LL;
v29 = 0LL;
v28 = 0LL;
v27 = 0LL;
v26 = 0LL;
v25 = 0LL;
v24 = 0LL;
if ( v11 <= 0x3FF )
*((_QWORD *)&v24 + (v11 >> 6)) |= 1LL << v11;
if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(
v10,
128LL,
&v24) )
{
pthread_setaffinity_np(
v10,
128LL,
v32,
v13,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
return (unsigned int)cpu_get_num_physical_cores();
}
_RAX = 26LL;
v17 = v7;
__asm { cpuid }
v7 = v17;
v22 = (_RAX & 0xFF000000) != 0x20000000;
v12 += v22;
v11 += v22 + 1;
}
while ( (int)v11 < (int)v17 );
pthread_setaffinity_np(
v10,
128LL,
v32,
v22,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
if ( v12 )
return v12;
}
}
return (unsigned int)cpu_get_num_physical_cores();
}
|
cpu_get_num_math:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x100
MOV EDI,0x54
CALL 0x001194d0
MOV RBX,RAX
TEST EBX,EBX
JLE 0x0014d37d
MOV EAX,0x7
XOR ECX,ECX
MOV RSI,RBX
CPUID
XCHG RBX,RSI
TEST DX,DX
JNS 0x0014d3a6
CALL 0x00119690
MOV R14,RAX
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,RAX
CALL 0x00119e40
TEST EAX,EAX
JNZ 0x0014d3a6
XOR R15D,R15D
MOV R12,RSP
XOR EBP,EBP
LAB_0014d2d7:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
CMP R15D,0x3ff
JA 0x0014d31f
MOV EAX,0x1
MOV ECX,R15D
SHL RAX,CL
MOV ECX,R15D
SHR ECX,0x6
OR qword ptr [RSP + RCX*0x8],RAX
LAB_0014d31f:
MOV ESI,0x80
MOV RDI,R14
MOV RDX,R12
CALL 0x00119e00
TEST EAX,EAX
JNZ 0x0014d391
XOR ECX,ECX
MOV EAX,0x1a
MOV RSI,RBX
CPUID
XCHG RBX,RSI
AND EAX,0xff000000
XOR ECX,ECX
CMP EAX,0x20000000
SETNZ CL
ADD EBP,ECX
ADD R15D,ECX
INC R15D
CMP R15D,EBX
JL 0x0014d2d7
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x00119e00
TEST EBP,EBP
JNZ 0x0014d3ad
JMP 0x0014d3a6
LAB_0014d37d:
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0014cefc
LAB_0014d391:
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x00119e00
LAB_0014d3a6:
CALL 0x0014cefc
MOV EBP,EAX
LAB_0014d3ad:
MOV EAX,EBP
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0014d33d) */
/* WARNING: Removing unreachable block (ram,0x0014d29c) */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_math() */
ulong cpu_get_num_math(void)
{
long lVar1;
uint *puVar2;
uint uVar3;
int iVar4;
long lVar5;
pthread_t __th;
ulong uVar6;
uint uVar7;
uint uVar8;
cpu_set_t local_128;
cpu_set_t local_a8;
lVar5 = sysconf(0x54);
if ((int)lVar5 < 1) {
uVar6 = cpu_get_num_physical_cores();
return uVar6;
}
lVar1 = cpuid_Extended_Feature_Enumeration_info(7);
if ((short)*(int4 *)(lVar1 + 8) < 0) {
__th = pthread_self();
iVar4 = pthread_getaffinity_np(__th,0x80,&local_a8);
if (iVar4 == 0) {
uVar8 = 0;
uVar7 = 0;
do {
local_128.__bits[0xe] = 0;
local_128.__bits[0xf] = 0;
local_128.__bits[0xc] = 0;
local_128.__bits[0xd] = 0;
local_128.__bits[10] = 0;
local_128.__bits[0xb] = 0;
local_128.__bits[8] = 0;
local_128.__bits[9] = 0;
local_128.__bits[6] = 0;
local_128.__bits[7] = 0;
local_128.__bits[4] = 0;
local_128.__bits[5] = 0;
local_128.__bits[2] = 0;
local_128.__bits[3] = 0;
local_128.__bits[0] = 0;
local_128.__bits[1] = 0;
if (uVar8 < 0x400) {
local_128.__bits[uVar8 >> 6] = local_128.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f);
}
iVar4 = pthread_setaffinity_np(__th,0x80,&local_128);
if (iVar4 != 0) {
pthread_setaffinity_np(__th,0x80,&local_a8);
goto LAB_0014d3a6;
}
puVar2 = (uint *)cpuid(0x1a);
uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000);
uVar7 = uVar7 + uVar3;
uVar8 = uVar8 + uVar3 + 1;
} while ((int)uVar8 < (int)lVar5);
pthread_setaffinity_np(__th,0x80,&local_a8);
if (uVar7 != 0) goto LAB_0014d3ad;
}
}
LAB_0014d3a6:
uVar7 = cpu_get_num_physical_cores();
LAB_0014d3ad:
return (ulong)uVar7;
}
|
|
12,352
|
llama_output_reserve(llama_context&, unsigned long)
|
monkey531[P]llama/src/llama-context.cpp
|
size_t llama_output_reserve(struct llama_context & lctx, size_t n_outputs) {
const auto & cparams = lctx.cparams;
const auto & hparams = lctx.model.hparams;
const auto & vocab = lctx.model.vocab;
const size_t n_outputs_max = std::max(n_outputs, (size_t) cparams.n_seq_max);
const auto n_batch = cparams.n_batch;
const auto n_vocab = vocab.n_tokens();
const auto n_embd = hparams.n_embd;
// TODO: use a per-batch flag for logits presence instead
const bool has_logits = !cparams.embeddings;
const bool has_embd = cparams.embeddings && (cparams.pooling_type == LLAMA_POOLING_TYPE_NONE);
const size_t logits_size = has_logits ? n_vocab*n_outputs_max : 0;
const size_t embd_size = has_embd ? n_embd*n_outputs_max : 0;
if (lctx.output_ids.empty()) {
// init, never resized afterwards
lctx.output_ids.resize(n_batch);
}
const size_t prev_size = lctx.buf_output ? ggml_backend_buffer_get_size(lctx.buf_output.get()) : 0;
const size_t new_size = (logits_size + embd_size) * sizeof(float);
// alloc only when more than the current capacity is required
// TODO: also consider shrinking the buffer
if (!lctx.buf_output || prev_size < new_size) {
if (lctx.buf_output) {
#ifndef NDEBUG
// This doesn't happen often, but may be annoying in some cases (like the HellaSwag benchmark)
LLAMA_LOG_INFO("%s: reallocating output buffer from size %.02f MiB to %.02f MiB\n", __func__, prev_size / 1024.0 / 1024.0, new_size / 1024.0 / 1024.0);
#endif
lctx.buf_output = nullptr;
lctx.logits = nullptr;
lctx.embd = nullptr;
}
auto * buft = ggml_backend_cpu_buffer_type();
// try to use the host buffer of the device where the output tensor is allocated for faster transfer to system memory
auto * output_dev = lctx.model.dev_output();
auto * output_dev_host_buft = output_dev ? ggml_backend_dev_host_buffer_type(output_dev) : nullptr;
if (output_dev_host_buft) {
buft = output_dev_host_buft;
}
lctx.buf_output.reset(ggml_backend_buft_alloc_buffer(buft, new_size));
if (lctx.buf_output == nullptr) {
LLAMA_LOG_ERROR("%s: failed to allocate output buffer of size %.2f MiB\n", __func__, new_size / (1024.0 * 1024.0));
return 0;
}
}
float * output_base = (float *) ggml_backend_buffer_get_base(lctx.buf_output.get());
lctx.logits = has_logits ? output_base : nullptr;
lctx.embd = has_embd ? output_base + logits_size : nullptr;
lctx.output_size = n_outputs_max;
lctx.logits_size = logits_size;
lctx.embd_size = embd_size;
// set all ids as invalid (negative)
std::fill(lctx.output_ids.begin(), lctx.output_ids.end(), -1);
ggml_backend_buffer_clear(lctx.buf_output.get(), 0);
lctx.n_outputs = 0;
return n_outputs_max;
}
|
O3
|
cpp
|
llama_output_reserve(llama_context&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
leaq 0x1920(%r15), %rdi
movl 0x14(%r14), %eax
cmpq %rsi, %rax
cmovaq %rax, %rbx
movl 0xc(%r14), %r12d
callq 0x699c0
movl 0x30(%r15), %ebp
movb 0x40(%r14), %cl
cmpl $0x0, 0x48(%r14)
sete %r13b
andb %cl, %r13b
movl %eax, %r15d
imulq %rbx, %r15
xorl %eax, %eax
movb %cl, 0xf(%rsp)
testb %cl, %cl
cmovneq %rax, %r15
imulq %rbx, %rbp
testb %r13b, %r13b
cmoveq %rax, %rbp
movq 0x318(%r14), %rax
cmpq 0x320(%r14), %rax
jne 0x9e313
leaq 0x318(%r14), %rdi
movq %r12, %rsi
callq 0x66bc0
leaq 0x300(%r14), %r12
movq 0x300(%r14), %rdi
testq %rdi, %rdi
movq %r12, 0x10(%rsp)
je 0x9e373
callq 0x69d40
movq (%r12), %rdi
leaq (%r15,%rbp), %r12
shlq $0x2, %r12
testq %rdi, %rdi
je 0x9e34a
cmpq %r12, %rax
jae 0x9e3d5
movb %r13b, 0xe(%rsp)
testq %rdi, %rdi
je 0x9e380
xorl %r13d, %r13d
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x6ac30
movq %r13, 0x310(%r14)
movq %r13, 0x348(%r14)
jmp 0x9e380
movb %r13b, 0xe(%rsp)
leaq (%r15,%rbp), %r12
shlq $0x2, %r12
callq 0x69310
movq %rax, %r13
movq (%r14), %rdi
callq 0x66260
testq %rax, %rax
je 0x9e39f
movq %rax, %rdi
callq 0x68b70
jmp 0x9e3a1
xorl %eax, %eax
testq %rax, %rax
cmovneq %rax, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x64ef0
movq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x6ac30
movq (%r13), %rdi
testq %rdi, %rdi
movb 0xe(%rsp), %r13b
je 0x9e45a
callq 0x69180
xorl %ecx, %ecx
cmpb $0x0, 0xf(%rsp)
leaq (%rax,%r15,4), %rdx
cmovneq %rcx, %rax
testb %r13b, %r13b
cmoveq %rcx, %rdx
movq %rax, 0x310(%r14)
movq %rdx, 0x348(%r14)
movq %rbx, 0x330(%r14)
movq %r15, 0x308(%r14)
movq %rbp, 0x340(%r14)
movq 0x318(%r14), %rdi
movq 0x320(%r14), %rdx
cmpq %rdx, %rdi
je 0x9e43f
subq %rdi, %rdx
addq $-0x4, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
movl $0xff, %esi
callq 0x66210
movq 0x300(%r14), %rdi
xorl %esi, %esi
callq 0x65a90
movl $0x0, 0x338(%r14)
jmp 0x9e49f
movq %r12, %xmm1
punpckldq 0x71bd9(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x71be1(%rip), %xmm1 # 0x110050
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x75f05(%rip), %xmm0 # 0x114388
leaq 0x76332(%rip), %rsi # 0x1147bc
leaq 0x76362(%rip), %rdx # 0x1147f3
movl $0x4, %edi
movb $0x1, %al
callq 0x67d20
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z20llama_output_reserveR13llama_contextm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
mov r15, [rdi]
lea rdi, [r15+1920h]; this
mov eax, [r14+14h]
cmp rax, rsi
cmova rbx, rax
mov r12d, [r14+0Ch]
call __ZNK11llama_vocab8n_tokensEv; llama_vocab::n_tokens(void)
mov ebp, [r15+30h]
mov cl, [r14+40h]
cmp dword ptr [r14+48h], 0
setz r13b
and r13b, cl
mov r15d, eax
imul r15, rbx
xor eax, eax
mov [rsp+48h+var_39], cl
test cl, cl
cmovnz r15, rax
imul rbp, rbx
test r13b, r13b
cmovz rbp, rax
mov rax, [r14+318h]
cmp rax, [r14+320h]
jnz short loc_9E313
lea rdi, [r14+318h]
mov rsi, r12
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
loc_9E313:
lea r12, [r14+300h]
mov rdi, [r14+300h]
test rdi, rdi
mov [rsp+48h+var_38], r12
jz short loc_9E373
call _ggml_backend_buffer_get_size
mov rdi, [r12]
lea r12, [r15+rbp]
shl r12, 2
test rdi, rdi
jz short loc_9E34A
cmp rax, r12
jnb loc_9E3D5
loc_9E34A:
mov [rsp+48h+var_3A], r13b
test rdi, rdi
jz short loc_9E380
xor r13d, r13d
mov rdi, [rsp+48h+var_38]
xor esi, esi
call __ZNSt15__uniq_ptr_implI19ggml_backend_buffer27ggml_backend_buffer_deleterE5resetEPS0_; std::__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter>::reset(ggml_backend_buffer*)
mov [r14+310h], r13
mov [r14+348h], r13
jmp short loc_9E380
loc_9E373:
mov [rsp+48h+var_3A], r13b
lea r12, [r15+rbp]
shl r12, 2
loc_9E380:
call _ggml_backend_cpu_buffer_type
mov r13, rax
mov rdi, [r14]; this
call __ZNK11llama_model10dev_outputEv; llama_model::dev_output(void)
test rax, rax
jz short loc_9E39F
mov rdi, rax
call _ggml_backend_dev_host_buffer_type
jmp short loc_9E3A1
loc_9E39F:
xor eax, eax
loc_9E3A1:
test rax, rax
cmovnz r13, rax
mov rdi, r13
mov rsi, r12
call _ggml_backend_buft_alloc_buffer
mov r13, [rsp+48h+var_38]
mov rdi, r13
mov rsi, rax
call __ZNSt15__uniq_ptr_implI19ggml_backend_buffer27ggml_backend_buffer_deleterE5resetEPS0_; std::__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter>::reset(ggml_backend_buffer*)
mov rdi, [r13+0]
test rdi, rdi
mov r13b, [rsp+48h+var_3A]
jz loc_9E45A
loc_9E3D5:
call _ggml_backend_buffer_get_base
xor ecx, ecx
cmp [rsp+48h+var_39], 0
lea rdx, [rax+r15*4]
cmovnz rax, rcx
test r13b, r13b
cmovz rdx, rcx
mov [r14+310h], rax
mov [r14+348h], rdx
mov [r14+330h], rbx
mov [r14+308h], r15
mov [r14+340h], rbp
mov rdi, [r14+318h]
mov rdx, [r14+320h]
cmp rdi, rdx
jz short loc_9E43F
sub rdx, rdi
add rdx, 0FFFFFFFFFFFFFFFCh
and rdx, 0FFFFFFFFFFFFFFFCh
add rdx, 4
mov esi, 0FFh
call _memset
loc_9E43F:
mov rdi, [r14+300h]
xor esi, esi
call _ggml_backend_buffer_clear
mov dword ptr [r14+338h], 0
jmp short loc_9E49F
loc_9E45A:
movq xmm1, r12
punpckldq xmm1, cs:xmmword_110040
subpd xmm1, cs:xmmword_110050
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
mulsd xmm0, cs:qword_114388
lea rsi, aSFailedToAlloc_2; "%s: failed to allocate output buffer of"...
lea rdx, aLlamaOutputRes; "llama_output_reserve"
mov edi, 4
mov al, 1
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
xor ebx, ebx
loc_9E49F:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long llama_output_reserve(llama_context *a1, unsigned long long a2)
{
unsigned long long v2; // rbx
long long v4; // r15
llama_vocab *v5; // rdi
long long v6; // r12
unsigned int v7; // eax
long long v8; // rbp
char v9; // cl
char v10; // r13
unsigned long long v11; // r15
unsigned long long v12; // rbp
long long v13; // rdi
unsigned long long size; // rax
long long v15; // rdi
unsigned long long v16; // r12
long long v17; // r13
long long v18; // rax
long long v19; // rax
long long v20; // rax
int v21; // ecx
int v22; // r8d
int v23; // r9d
long long base; // rax
long long v25; // rdx
long long v26; // rdi
long long v27; // rdx
char v29; // [rsp+Eh] [rbp-3Ah]
char v30; // [rsp+Fh] [rbp-39h]
_QWORD *v31; // [rsp+10h] [rbp-38h]
v2 = a2;
v4 = *(_QWORD *)a1;
v5 = (llama_vocab *)(*(_QWORD *)a1 + 6432LL);
if ( *((unsigned int *)a1 + 5) > a2 )
v2 = *((unsigned int *)a1 + 5);
v6 = *((unsigned int *)a1 + 3);
v7 = llama_vocab::n_tokens(v5);
v8 = *(unsigned int *)(v4 + 48);
v9 = *((_BYTE *)a1 + 64);
v10 = v9 & (*((_DWORD *)a1 + 18) == 0);
v11 = v2 * v7;
v30 = v9;
if ( v9 )
v11 = 0LL;
v12 = v2 * v8;
if ( !v10 )
v12 = 0LL;
if ( *((_QWORD *)a1 + 99) == *((_QWORD *)a1 + 100) )
std::vector<int>::resize((char *)a1 + 792, v6);
v13 = *((_QWORD *)a1 + 96);
v31 = (_QWORD *)((char *)a1 + 768);
if ( v13 )
{
size = ggml_backend_buffer_get_size(v13);
v15 = *((_QWORD *)a1 + 96);
v16 = 4 * (v11 + v12);
if ( v15 && size >= v16 )
goto LABEL_21;
v29 = v10;
if ( v15 )
{
std::__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter>::reset(v31, 0LL);
*((_QWORD *)a1 + 98) = 0LL;
*((_QWORD *)a1 + 105) = 0LL;
}
}
else
{
v29 = v10;
v16 = 4 * (v11 + v12);
}
v17 = ggml_backend_cpu_buffer_type();
v18 = llama_model::dev_output(*(llama_model **)a1);
if ( v18 )
v19 = ggml_backend_dev_host_buffer_type(v18);
else
v19 = 0LL;
if ( v19 )
v17 = v19;
v20 = ggml_backend_buft_alloc_buffer(v17, v16);
std::__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter>::reset(v31, v20);
v10 = v29;
if ( !*v31 )
{
llama_log_internal(
4,
(unsigned int)"%s: failed to allocate output buffer of size %.2f MiB\n",
(unsigned int)"llama_output_reserve",
v21,
v22,
v23);
return 0LL;
}
LABEL_21:
base = ggml_backend_buffer_get_base();
v25 = base + 4 * v11;
if ( v30 )
base = 0LL;
if ( !v10 )
v25 = 0LL;
*((_QWORD *)a1 + 98) = base;
*((_QWORD *)a1 + 105) = v25;
*((_QWORD *)a1 + 102) = v2;
*((_QWORD *)a1 + 97) = v11;
*((_QWORD *)a1 + 104) = v12;
v26 = *((_QWORD *)a1 + 99);
v27 = *((_QWORD *)a1 + 100);
if ( v26 != v27 )
memset(v26, 255LL, ((v27 - v26 - 4) & 0xFFFFFFFFFFFFFFFCLL) + 4);
ggml_backend_buffer_clear(*((_QWORD *)a1 + 96), 0LL);
*((_DWORD *)a1 + 206) = 0;
return v2;
}
|
llama_output_reserve:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RDI]
LEA RDI,[R15 + 0x1920]
MOV EAX,dword ptr [R14 + 0x14]
CMP RAX,RSI
CMOVA RBX,RAX
MOV R12D,dword ptr [R14 + 0xc]
CALL 0x001699c0
MOV EBP,dword ptr [R15 + 0x30]
MOV CL,byte ptr [R14 + 0x40]
CMP dword ptr [R14 + 0x48],0x0
SETZ R13B
AND R13B,CL
MOV R15D,EAX
IMUL R15,RBX
XOR EAX,EAX
MOV byte ptr [RSP + 0xf],CL
TEST CL,CL
CMOVNZ R15,RAX
IMUL RBP,RBX
TEST R13B,R13B
CMOVZ RBP,RAX
MOV RAX,qword ptr [R14 + 0x318]
CMP RAX,qword ptr [R14 + 0x320]
JNZ 0x0019e313
LEA RDI,[R14 + 0x318]
MOV RSI,R12
CALL 0x00166bc0
LAB_0019e313:
LEA R12,[R14 + 0x300]
MOV RDI,qword ptr [R14 + 0x300]
TEST RDI,RDI
MOV qword ptr [RSP + 0x10],R12
JZ 0x0019e373
CALL 0x00169d40
MOV RDI,qword ptr [R12]
LEA R12,[R15 + RBP*0x1]
SHL R12,0x2
TEST RDI,RDI
JZ 0x0019e34a
CMP RAX,R12
JNC 0x0019e3d5
LAB_0019e34a:
MOV byte ptr [RSP + 0xe],R13B
TEST RDI,RDI
JZ 0x0019e380
XOR R13D,R13D
MOV RDI,qword ptr [RSP + 0x10]
XOR ESI,ESI
CALL 0x0016ac30
MOV qword ptr [R14 + 0x310],R13
MOV qword ptr [R14 + 0x348],R13
JMP 0x0019e380
LAB_0019e373:
MOV byte ptr [RSP + 0xe],R13B
LEA R12,[R15 + RBP*0x1]
SHL R12,0x2
LAB_0019e380:
CALL 0x00169310
MOV R13,RAX
MOV RDI,qword ptr [R14]
CALL 0x00166260
TEST RAX,RAX
JZ 0x0019e39f
MOV RDI,RAX
CALL 0x00168b70
JMP 0x0019e3a1
LAB_0019e39f:
XOR EAX,EAX
LAB_0019e3a1:
TEST RAX,RAX
CMOVNZ R13,RAX
MOV RDI,R13
MOV RSI,R12
CALL 0x00164ef0
MOV R13,qword ptr [RSP + 0x10]
MOV RDI,R13
MOV RSI,RAX
CALL 0x0016ac30
MOV RDI,qword ptr [R13]
TEST RDI,RDI
MOV R13B,byte ptr [RSP + 0xe]
JZ 0x0019e45a
LAB_0019e3d5:
CALL 0x00169180
XOR ECX,ECX
CMP byte ptr [RSP + 0xf],0x0
LEA RDX,[RAX + R15*0x4]
CMOVNZ RAX,RCX
TEST R13B,R13B
CMOVZ RDX,RCX
MOV qword ptr [R14 + 0x310],RAX
MOV qword ptr [R14 + 0x348],RDX
MOV qword ptr [R14 + 0x330],RBX
MOV qword ptr [R14 + 0x308],R15
MOV qword ptr [R14 + 0x340],RBP
MOV RDI,qword ptr [R14 + 0x318]
MOV RDX,qword ptr [R14 + 0x320]
CMP RDI,RDX
JZ 0x0019e43f
SUB RDX,RDI
ADD RDX,-0x4
AND RDX,-0x4
ADD RDX,0x4
MOV ESI,0xff
CALL 0x00166210
LAB_0019e43f:
MOV RDI,qword ptr [R14 + 0x300]
XOR ESI,ESI
CALL 0x00165a90
MOV dword ptr [R14 + 0x338],0x0
JMP 0x0019e49f
LAB_0019e45a:
MOVQ XMM1,R12
PUNPCKLDQ XMM1,xmmword ptr [0x00210040]
SUBPD XMM1,xmmword ptr [0x00210050]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
MULSD XMM0,qword ptr [0x00214388]
LEA RSI,[0x2147bc]
LEA RDX,[0x2147f3]
MOV EDI,0x4
MOV AL,0x1
CALL 0x00167d20
XOR EBX,EBX
LAB_0019e49f:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* llama_output_reserve(llama_context&, unsigned long) */
ulong llama_output_reserve(llama_context *param_1,ulong param_2)
{
__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter> *this;
llama_context lVar1;
uint uVar2;
void *__s;
uint uVar3;
ulong uVar4;
long lVar5;
long lVar6;
ggml_backend_buffer *pgVar7;
long lVar8;
ulong uVar9;
byte bVar10;
long lVar11;
int1 auVar12 [16];
lVar8 = *(long *)param_1;
if (param_2 < *(uint *)(param_1 + 0x14)) {
param_2 = (ulong)*(uint *)(param_1 + 0x14);
}
uVar2 = *(uint *)(param_1 + 0xc);
uVar3 = llama_vocab::n_tokens((llama_vocab *)(lVar8 + 0x1920));
lVar1 = param_1[0x40];
bVar10 = *(int *)(param_1 + 0x48) == 0 & (byte)lVar1;
lVar11 = uVar3 * param_2;
if (lVar1 != (llama_context)0x0) {
lVar11 = 0;
}
lVar8 = *(uint *)(lVar8 + 0x30) * param_2;
if (bVar10 == 0) {
lVar8 = 0;
}
if (*(long *)(param_1 + 0x318) == *(long *)(param_1 + 800)) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(param_1 + 0x318),(ulong)uVar2);
}
this = (__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter> *)(param_1 + 0x300);
if (*(long *)(param_1 + 0x300) == 0) {
uVar9 = (lVar11 + lVar8) * 4;
}
else {
uVar4 = ggml_backend_buffer_get_size();
uVar9 = (lVar11 + lVar8) * 4;
if ((*(long *)this != 0) && (uVar9 <= uVar4)) goto LAB_0019e3d5;
if (*(long *)this != 0) {
std::__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter>::reset
(this,(ggml_backend_buffer *)0x0);
*(int8 *)(param_1 + 0x310) = 0;
*(int8 *)(param_1 + 0x348) = 0;
}
}
lVar5 = ggml_backend_cpu_buffer_type();
lVar6 = llama_model::dev_output(*(llama_model **)param_1);
if (lVar6 == 0) {
lVar6 = 0;
}
else {
lVar6 = ggml_backend_dev_host_buffer_type(lVar6);
}
if (lVar6 != 0) {
lVar5 = lVar6;
}
pgVar7 = (ggml_backend_buffer *)ggml_backend_buft_alloc_buffer(lVar5,uVar9);
std::__uniq_ptr_impl<ggml_backend_buffer,ggml_backend_buffer_deleter>::reset(this,pgVar7);
if (*(long *)this == 0) {
auVar12._8_4_ = (int)(uVar9 >> 0x20);
auVar12._0_8_ = uVar9;
auVar12._12_4_ = DAT_00210040._4_4_;
llama_log_internal(((auVar12._8_8_ - _UNK_00210058) +
((double)CONCAT44((int4)DAT_00210040,(int)uVar9) - _DAT_00210050)) *
_DAT_00214388,4,"%s: failed to allocate output buffer of size %.2f MiB\n",
"llama_output_reserve");
return 0;
}
LAB_0019e3d5:
lVar6 = ggml_backend_buffer_get_base();
lVar5 = lVar6;
if (lVar1 != (llama_context)0x0) {
lVar5 = 0;
}
lVar6 = lVar6 + lVar11 * 4;
if (bVar10 == 0) {
lVar6 = 0;
}
*(long *)(param_1 + 0x310) = lVar5;
*(long *)(param_1 + 0x348) = lVar6;
*(ulong *)(param_1 + 0x330) = param_2;
*(long *)(param_1 + 0x308) = lVar11;
*(long *)(param_1 + 0x340) = lVar8;
__s = *(void **)(param_1 + 0x318);
if (__s != *(void **)(param_1 + 800)) {
memset(__s,0xff,((long)*(void **)(param_1 + 800) + (-4 - (long)__s) & 0xfffffffffffffffcU) + 4);
}
ggml_backend_buffer_clear(*(int8 *)(param_1 + 0x300),0);
*(int4 *)(param_1 + 0x338) = 0;
return param_2;
}
|
|
12,353
|
(anonymous namespace)::ShowProfiler(mujoco::Simulate*, mjrRect_)
|
aimrt_mujoco_sim/_deps/mujoco-src/simulate/simulate.cc
|
void ShowProfiler(mj::Simulate* sim, mjrRect rect) {
mjrRect viewport = {
rect.left + rect.width - rect.width/4,
rect.bottom,
rect.width/4,
rect.height/4
};
mjr_figure(viewport, &sim->figtimer, &sim->platform_ui->mjr_context());
viewport.bottom += rect.height/4;
mjr_figure(viewport, &sim->figsize, &sim->platform_ui->mjr_context());
viewport.bottom += rect.height/4;
mjr_figure(viewport, &sim->figcost, &sim->platform_ui->mjr_context());
viewport.bottom += rect.height/4;
mjr_figure(viewport, &sim->figconstraint, &sim->platform_ui->mjr_context());
}
|
O0
|
cpp
|
(anonymous namespace)::ShowProfiler(mujoco::Simulate*, mjrRect_):
subq $0x98, %rsp
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movl 0x88(%rsp), %eax
addl 0x90(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x90(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x70(%rsp)
movl 0x8c(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x90(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, 0x78(%rsp)
movl 0x94(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, 0x7c(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rax
addq $0x1939e8, %rax # imm = 0x1939E8
movq %rax, 0x10(%rsp)
movq 0x80(%rsp), %rdi
addq $0x3e70d0, %rdi # imm = 0x3E70D0
callq 0x38aff0
movq %rax, %rdi
callq 0x3960f0
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x95070
movl 0x94(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
addl 0x74(%rsp), %eax
movl %eax, 0x74(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x80(%rsp), %rax
addq $0x25a17c, %rax # imm = 0x25A17C
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rdi
addq $0x3e70d0, %rdi # imm = 0x3E70D0
callq 0x38aff0
movq %rax, %rdi
callq 0x3960f0
movq 0x18(%rsp), %rdx
movq %rax, %rcx
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x95070
movl 0x94(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
addl 0x74(%rsp), %eax
movl %eax, 0x74(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rax
addq $0xcd254, %rax # imm = 0xCD254
movq %rax, 0x20(%rsp)
movq 0x80(%rsp), %rdi
addq $0x3e70d0, %rdi # imm = 0x3E70D0
callq 0x38aff0
movq %rax, %rdi
callq 0x3960f0
movq 0x20(%rsp), %rdx
movq %rax, %rcx
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x95070
movl 0x94(%rsp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
addl 0x74(%rsp), %eax
movl %eax, 0x74(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rax
addq $0x6ac0, %rax # imm = 0x6AC0
movq %rax, 0x28(%rsp)
movq 0x80(%rsp), %rdi
addq $0x3e70d0, %rdi # imm = 0x3E70D0
callq 0x38aff0
movq %rax, %rdi
callq 0x3960f0
movq 0x28(%rsp), %rdx
movq %rax, %rcx
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x95070
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN12_GLOBAL__N_112ShowProfilerEPN6mujoco8SimulateE8mjrRect_:
sub rsp, 98h
mov [rsp+98h+var_10], rsi
mov [rsp+98h+var_8], rdx
mov [rsp+98h+var_18], rdi
mov eax, dword ptr [rsp+98h+var_10]
add eax, dword ptr [rsp+98h+var_8]
mov [rsp+98h+var_8C], eax
mov eax, dword ptr [rsp+98h+var_8]
mov ecx, 4
cdq
idiv ecx
mov ecx, eax
mov eax, [rsp+98h+var_8C]
sub eax, ecx
mov dword ptr [rsp+98h+var_28], eax
mov eax, dword ptr [rsp+98h+var_10+4]
mov dword ptr [rsp+98h+var_28+4], eax
mov eax, dword ptr [rsp+98h+var_8]
mov ecx, 4
cdq
idiv ecx
mov dword ptr [rsp+98h+var_20], eax
mov eax, dword ptr [rsp+98h+var_8+4]
mov ecx, 4
cdq
idiv ecx
mov dword ptr [rsp+98h+var_20+4], eax
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_38], rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_30], rax
mov rax, [rsp+98h+var_18]
add rax, 1939E8h
mov [rsp+98h+var_88], rax
mov rdi, [rsp+98h+var_18]
add rdi, 3E70D0h
call _ZNKSt10unique_ptrIN6mujoco17PlatformUIAdapterESt14default_deleteIS1_EEptEv; std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(void)
mov rdi, rax; this
call _ZN6mujoco17PlatformUIAdapter11mjr_contextEv; mujoco::PlatformUIAdapter::mjr_context(void)
mov rdx, [rsp+98h+var_88]
mov rcx, rax
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_30]
call _mjr_figure
mov eax, dword ptr [rsp+98h+var_8+4]
mov ecx, 4
cdq
idiv ecx
add eax, dword ptr [rsp+98h+var_28+4]
mov dword ptr [rsp+98h+var_28+4], eax
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_48], rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_40], rax
mov rax, [rsp+98h+var_18]
add rax, 25A17Ch
mov [rsp+98h+var_80], rax
mov rdi, [rsp+98h+var_18]
add rdi, 3E70D0h
call _ZNKSt10unique_ptrIN6mujoco17PlatformUIAdapterESt14default_deleteIS1_EEptEv; std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(void)
mov rdi, rax; this
call _ZN6mujoco17PlatformUIAdapter11mjr_contextEv; mujoco::PlatformUIAdapter::mjr_context(void)
mov rdx, [rsp+98h+var_80]
mov rcx, rax
mov rdi, [rsp+98h+var_48]
mov rsi, [rsp+98h+var_40]
call _mjr_figure
mov eax, dword ptr [rsp+98h+var_8+4]
mov ecx, 4
cdq
idiv ecx
add eax, dword ptr [rsp+98h+var_28+4]
mov dword ptr [rsp+98h+var_28+4], eax
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_50], rax
mov rax, [rsp+98h+var_18]
add rax, 0CD254h
mov [rsp+98h+var_78], rax
mov rdi, [rsp+98h+var_18]
add rdi, 3E70D0h
call _ZNKSt10unique_ptrIN6mujoco17PlatformUIAdapterESt14default_deleteIS1_EEptEv; std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(void)
mov rdi, rax; this
call _ZN6mujoco17PlatformUIAdapter11mjr_contextEv; mujoco::PlatformUIAdapter::mjr_context(void)
mov rdx, [rsp+98h+var_78]
mov rcx, rax
mov rdi, [rsp+98h+var_58]
mov rsi, [rsp+98h+var_50]
call _mjr_figure
mov eax, dword ptr [rsp+98h+var_8+4]
mov ecx, 4
cdq
idiv ecx
add eax, dword ptr [rsp+98h+var_28+4]
mov dword ptr [rsp+98h+var_28+4], eax
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_68], rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_60], rax
mov rax, [rsp+98h+var_18]
add rax, 6AC0h
mov [rsp+98h+var_70], rax
mov rdi, [rsp+98h+var_18]
add rdi, 3E70D0h
call _ZNKSt10unique_ptrIN6mujoco17PlatformUIAdapterESt14default_deleteIS1_EEptEv; std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(void)
mov rdi, rax; this
call _ZN6mujoco17PlatformUIAdapter11mjr_contextEv; mujoco::PlatformUIAdapter::mjr_context(void)
mov rdx, [rsp+98h+var_70]
mov rcx, rax
mov rdi, [rsp+98h+var_68]
mov rsi, [rsp+98h+var_60]
call _mjr_figure
add rsp, 98h
retn
|
long long `anonymous namespace'::ShowProfiler(long long a1, long long a2, long long a3)
{
mujoco::PlatformUIAdapter *v3; // rax
long long v4; // rax
mujoco::PlatformUIAdapter *v5; // rax
long long v6; // rax
mujoco::PlatformUIAdapter *v7; // rax
long long v8; // rax
mujoco::PlatformUIAdapter *v9; // rax
long long v10; // rax
long long v12; // [rsp+70h] [rbp-28h]
long long v13; // [rsp+78h] [rbp-20h]
int v14; // [rsp+94h] [rbp-4h]
v14 = HIDWORD(a3);
LODWORD(v12) = a3 + a2 - (int)a3 / 4;
HIDWORD(v12) = HIDWORD(a2);
LODWORD(v13) = (int)a3 / 4;
HIDWORD(v13) = SHIDWORD(a3) / 4;
v3 = (mujoco::PlatformUIAdapter *)std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(a1 + 4092112);
v4 = mujoco::PlatformUIAdapter::mjr_context(v3);
mjr_figure(v12, v13, a1 + 1653224, v4);
HIDWORD(v12) = HIDWORD(a2) + v14 / 4;
v5 = (mujoco::PlatformUIAdapter *)std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(a1 + 4092112);
v6 = mujoco::PlatformUIAdapter::mjr_context(v5);
mjr_figure(v12, v13, a1 + 2466172, v6);
HIDWORD(v12) += v14 / 4;
v7 = (mujoco::PlatformUIAdapter *)std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(a1 + 4092112);
v8 = mujoco::PlatformUIAdapter::mjr_context(v7);
mjr_figure(v12, v13, a1 + 840276, v8);
HIDWORD(v12) += v14 / 4;
v9 = (mujoco::PlatformUIAdapter *)std::unique_ptr<mujoco::PlatformUIAdapter>::operator->(a1 + 4092112);
v10 = mujoco::PlatformUIAdapter::mjr_context(v9);
return mjr_figure(v12, v13, a1 + 27328, v10);
}
|
~new_allocator:
MOV qword ptr [RSP + -0x8],RDI
RET
|
/* __gnu_cxx::new_allocator<google::protobuf::DescriptorPool::Tables::CheckPoint>::~new_allocator()
*/
void __thiscall
__gnu_cxx::new_allocator<google::protobuf::DescriptorPool::Tables::CheckPoint>::~new_allocator
(new_allocator<google::protobuf::DescriptorPool::Tables::CheckPoint> *this)
{
return;
}
|
|
12,354
|
my_setwd
|
eloqsql/mysys/my_getwd.c
|
int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
}
|
O3
|
c
|
my_setwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0x3e39b
movq %r14, %rdi
cmpl $0x2f, %eax
jne 0x3e3a2
cmpb $0x0, 0x1(%r14)
movq %r14, %rdi
jne 0x3e3a2
leaq 0x4cb60(%rip), %rdi # 0x8af02
callq 0x334b0
movl %eax, %ebx
testl %eax, %eax
je 0x3e3e0
callq 0x33050
movq %rax, %r12
movl (%rax), %r13d
callq 0x3814e
movl %r13d, (%rax)
testb $0x10, %r15b
je 0x3e43d
movl (%r12), %ecx
movl $0x4, %esi
movl $0x11, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x34b43
jmp 0x3e43d
leaq 0x35be21(%rip), %rax # 0x39a208
movq (%rax), %rax
movq %r14, %rcx
movzbl (%rcx), %edx
cmpl $0x7e, %edx
jne 0x3e405
cmpb $0x2f, 0x1(%rcx)
jne 0x3e433
movq %rax, %rcx
testq %rax, %rax
jne 0x3e3ed
jmp 0x3e433
cmpl $0x2f, %edx
jne 0x3e433
leaq 0x35be0f(%rip), %r15 # 0x39a220
movl $0x1ff, %edx # imm = 0x1FF
movq %r15, %rdi
movq %r14, %rsi
callq 0x6cfe0
cmpb $0x2f, -0x1(%rax)
je 0x3e43d
subl %r15d, %eax
movw $0x2f, (%r15,%rax)
jmp 0x3e43d
leaq 0x35bde6(%rip), %rax # 0x39a220
movb $0x0, (%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_setwd:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_3E39B
mov rdi, r14
cmp eax, 2Fh ; '/'
jnz short loc_3E3A2
cmp byte ptr [r14+1], 0
mov rdi, r14
jnz short loc_3E3A2
loc_3E39B:
lea rdi, unk_8AF02
loc_3E3A2:
call _chdir
mov ebx, eax
test eax, eax
jz short loc_3E3E0
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r15b, 10h
jz short loc_3E43D
mov ecx, [r12]
mov esi, 4
mov edi, 11h
mov rdx, r14
xor eax, eax
call my_error
jmp short loc_3E43D
loc_3E3E0:
lea rax, home_dir
mov rax, [rax]
mov rcx, r14
loc_3E3ED:
movzx edx, byte ptr [rcx]
cmp edx, 7Eh ; '~'
jnz short loc_3E405
cmp byte ptr [rcx+1], 2Fh ; '/'
jnz short loc_3E433
mov rcx, rax
test rax, rax
jnz short loc_3E3ED
jmp short loc_3E433
loc_3E405:
cmp edx, 2Fh ; '/'
jnz short loc_3E433
lea r15, curr_dir
mov edx, 1FFh
mov rdi, r15
mov rsi, r14
call strmake
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_3E43D
sub eax, r15d
mov word ptr [r15+rax], 2Fh ; '/'
jmp short loc_3E43D
loc_3E433:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_3E43D:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_setwd(unsigned __int8 *a1, char a2)
{
unsigned __int8 *v2; // r14
unsigned int v3; // ebx
unsigned int *v4; // r12
unsigned int v5; // r13d
unsigned __int8 *v6; // rcx
int v7; // edx
long long v8; // rax
v2 = a1;
if ( !*a1 || *a1 == 47 && !a1[1] )
a1 = (unsigned __int8 *)&unk_8AF02;
v3 = chdir(a1);
if ( v3 )
{
v4 = (unsigned int *)__errno_location(a1);
v5 = *v4;
*(_DWORD *)my_thread_var() = v5;
if ( (a2 & 0x10) != 0 )
my_error(0x11u, 4LL, v2, *v4);
}
else
{
v6 = v2;
while ( 1 )
{
v7 = *v6;
if ( v7 != 126 )
break;
if ( v6[1] == 47 )
{
v6 = (unsigned __int8 *)home_dir;
if ( home_dir )
continue;
}
goto LABEL_16;
}
if ( v7 != 47 )
{
LABEL_16:
curr_dir[0] = 0;
return v3;
}
v8 = strmake(curr_dir, v2, 511LL);
if ( *(_BYTE *)(v8 - 1) != 47 )
*(_WORD *)&curr_dir[(unsigned int)v8 - (unsigned int)curr_dir] = 47;
}
return v3;
}
|
my_setwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0013e39b
MOV RDI,R14
CMP EAX,0x2f
JNZ 0x0013e3a2
CMP byte ptr [R14 + 0x1],0x0
MOV RDI,R14
JNZ 0x0013e3a2
LAB_0013e39b:
LEA RDI,[0x18af02]
LAB_0013e3a2:
CALL 0x001334b0
MOV EBX,EAX
TEST EAX,EAX
JZ 0x0013e3e0
CALL 0x00133050
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x0013814e
MOV dword ptr [RAX],R13D
TEST R15B,0x10
JZ 0x0013e43d
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x11
MOV RDX,R14
XOR EAX,EAX
CALL 0x00134b43
JMP 0x0013e43d
LAB_0013e3e0:
LEA RAX,[0x49a208]
MOV RAX,qword ptr [RAX]
MOV RCX,R14
LAB_0013e3ed:
MOVZX EDX,byte ptr [RCX]
CMP EDX,0x7e
JNZ 0x0013e405
CMP byte ptr [RCX + 0x1],0x2f
JNZ 0x0013e433
MOV RCX,RAX
TEST RAX,RAX
JNZ 0x0013e3ed
JMP 0x0013e433
LAB_0013e405:
CMP EDX,0x2f
JNZ 0x0013e433
LEA R15,[0x49a220]
MOV EDX,0x1ff
MOV RDI,R15
MOV RSI,R14
CALL 0x0016cfe0
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x0013e43d
SUB EAX,R15D
MOV word ptr [R15 + RAX*0x1],0x2f
JMP 0x0013e43d
LAB_0013e433:
LEA RAX,[0x49a220]
MOV byte ptr [RAX],0x0
LAB_0013e43d:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
long lVar5;
char *pcVar6;
if ((*param_1 == '\0') || ((pcVar6 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
pcVar6 = "/";
}
iVar2 = chdir(pcVar6);
pcVar6 = param_1;
if (iVar2 == 0) {
while (*pcVar6 == '~') {
if ((pcVar6[1] != '/') || (pcVar6 = home_dir, home_dir == (char *)0x0)) goto LAB_0013e433;
}
if (*pcVar6 == '/') {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) == '/') {
return 0;
}
*(int2 *)(&curr_dir + ((int)lVar5 - 0x49a220)) = 0x2f;
return 0;
}
LAB_0013e433:
curr_dir = 0;
}
else {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_2 & 0x10) != 0) {
my_error(0x11,4,param_1,*piVar3);
}
}
return iVar2;
}
|
|
12,355
|
init_partitioned_key_cache
|
eloqsql/mysys/mf_keycache.c
|
static
int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size)
{
int i;
size_t mem_per_cache;
size_t mem_decr;
int cnt;
SIMPLE_KEY_CACHE_CB *partition;
SIMPLE_KEY_CACHE_CB **partition_ptr;
uint partitions= keycache->partitions;
int blocks= 0;
DBUG_ENTER("partitioned_init_key_cache");
keycache->key_cache_block_size = key_cache_block_size;
if (keycache->key_cache_inited)
partition_ptr= keycache->partition_array;
else
{
if(!(partition_ptr=
(SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB *) *
partitions, MYF(MY_WME))))
DBUG_RETURN(-1);
bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions);
keycache->partition_array= partition_ptr;
}
mem_per_cache = use_mem / partitions;
mem_decr= mem_per_cache / 5;
for (i= 0; i < (int) partitions; i++)
{
my_bool key_cache_inited= keycache->key_cache_inited;
if (key_cache_inited)
partition= *partition_ptr;
else
{
if (!(partition=
(SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(MY_WME))))
continue;
partition->key_cache_inited= 0;
}
cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache,
division_limit, age_threshold,
changed_blocks_hash_size);
if (cnt <= 0)
{
end_simple_key_cache(partition, 1);
if (!key_cache_inited)
{
my_free(partition);
partition= 0;
}
if ((i == 0 && cnt < 0) || i > 0)
{
/*
Here we have two cases:
1. i == 0 and cnt < 0
cnt < 0 => mem_per_cache is not big enough to allocate minimal
number of key blocks in the key cache of the partition.
Decrease the the number of the partitions by 1 and start again.
2. i > 0
There is not enough memory for one of the succeeding partitions.
Just skip this partition decreasing the number of partitions in
the key cache by one.
Do not change the value of mem_per_cache in both cases.
*/
if (key_cache_inited)
{
my_free(partition);
partition= 0;
if(key_cache_inited)
memmove(partition_ptr, partition_ptr+1,
sizeof(partition_ptr)*(partitions-i-1));
}
if (!--partitions)
break;
}
else
{
/*
We come here when i == 0 && cnt == 0.
cnt == 0 => the memory allocator fails to allocate a block of
memory of the size mem_per_cache. Decrease the value of
mem_per_cache without changing the current number of partitions
and start again. Make sure that such a decrease may happen not
more than 5 times in total.
*/
if (use_mem <= mem_decr)
break;
use_mem-= mem_decr;
}
i--;
mem_per_cache= use_mem/partitions;
continue;
}
else
{
blocks+= cnt;
*partition_ptr++= partition;
}
}
keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array);
keycache->key_cache_mem_size= mem_per_cache * partitions;
for (i= 0; i < (int) partitions; i++)
keycache->partition_array[i]->hash_factor= partitions;
keycache->key_cache_inited= 1;
if (!partitions)
blocks= -1;
DBUG_RETURN(blocks);
}
|
O0
|
c
|
init_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0xecce0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0xecd34
leaq 0xba5651(%rip), %rax # 0xc92338
movl (%rax), %edi
movl -0x5c(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
movl $0x10, %edx
callq 0xfc090
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0xecd14
jmp 0xecd08
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xecf4b
movq -0x58(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x2a2a0
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl -0x5c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x5, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x40(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0xececa
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x61(%rbp)
cmpb $0x0, -0x61(%rbp)
je 0xecd85
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0xecdb3
leaq 0xba55ac(%rip), %rax # 0xc92338
movl (%rax), %edi
movl $0x170, %esi # imm = 0x170
movl $0x10, %edx
callq 0xfc090
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jne 0xecdac
jmp 0xecebc
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x38(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x2c(%rbp), %r9d
callq 0xeaa10
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jg 0xece9b
movq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0xebb30
cmpb $0x0, -0x61(%rbp)
jne 0xece00
movq -0x50(%rbp), %rdi
callq 0xfc410
movq $0x0, -0x50(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0xece0c
cmpl $0x0, -0x44(%rbp)
jl 0xece12
cmpl $0x0, -0x30(%rbp)
jle 0xece65
cmpb $0x0, -0x61(%rbp)
je 0xece53
movq -0x50(%rbp), %rdi
callq 0xfc410
movq $0x0, -0x50(%rbp)
cmpb $0x0, -0x61(%rbp)
je 0xece51
movq -0x58(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x8, %rsi
movl -0x5c(%rbp), %eax
subl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x2a140
jmp 0xece53
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, %eax
jne 0xece63
jmp 0xececa
jmp 0xece80
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0xece71
jmp 0xececa
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl -0x5c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x38(%rbp)
jmp 0xecebc
movl -0x44(%rbp), %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
jmp 0xecebc
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xecd5d
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %ecx
movl %ecx, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x38(%rbp), %rcx
movl -0x5c(%rbp), %eax
imulq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0xecf2f
movl -0x5c(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x164(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xecf03
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
cmpl $0x0, -0x5c(%rbp)
jne 0xecf43
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
jmp 0xecf45
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
init_partitioned_key_cache:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_2C], r9d
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
mov [rbp+var_5C], eax
mov [rbp+var_60], 0
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+18h], ecx
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_ECCE0
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_58], rax
jmp short loc_ECD34
loc_ECCE0:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov eax, [rbp+var_5C]
mov esi, eax
shl rsi, 3
mov edx, 10h
call my_malloc
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_ECD14
jmp short $+2
loc_ECD08:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_ECF4B
loc_ECD14:
mov rdi, [rbp+var_58]
mov eax, [rbp+var_5C]
mov edx, eax
shl rdx, 3
xor esi, esi
call _memset
mov rcx, [rbp+var_58]
mov rax, [rbp+var_10]
mov [rax+8], rcx
loc_ECD34:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_5C]
xor edx, edx
div rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov ecx, 5
xor edx, edx
div rcx
mov [rbp+var_40], rax
mov [rbp+var_30], 0
loc_ECD5D:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_5C]
jge loc_ECECA
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_61], al
cmp [rbp+var_61], 0
jz short loc_ECD85
mov rax, [rbp+var_58]
mov rax, [rax]
mov [rbp+var_50], rax
jmp short loc_ECDB3
loc_ECD85:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov esi, 170h
mov edx, 10h
call my_malloc
mov [rbp+var_50], rax
cmp rax, 0
jnz short loc_ECDAC
jmp loc_ECEBC
loc_ECDAC:
mov rax, [rbp+var_50]
mov byte ptr [rax], 0
loc_ECDB3:
mov rdi, [rbp+var_50]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_38]
mov ecx, [rbp+var_24]
mov r8d, [rbp+var_28]
mov r9d, [rbp+var_2C]
call init_simple_key_cache
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jg loc_ECE9B
mov rdi, [rbp+var_50]
mov esi, 1
call end_simple_key_cache
cmp [rbp+var_61], 0
jnz short loc_ECE00
mov rdi, [rbp+var_50]
call my_free
mov [rbp+var_50], 0
loc_ECE00:
cmp [rbp+var_30], 0
jnz short loc_ECE0C
cmp [rbp+var_44], 0
jl short loc_ECE12
loc_ECE0C:
cmp [rbp+var_30], 0
jle short loc_ECE65
loc_ECE12:
cmp [rbp+var_61], 0
jz short loc_ECE53
mov rdi, [rbp+var_50]
call my_free
mov [rbp+var_50], 0
cmp [rbp+var_61], 0
jz short loc_ECE51
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_58]
add rsi, 8
mov eax, [rbp+var_5C]
sub eax, [rbp+var_30]
sub eax, 1
mov eax, eax
mov edx, eax
shl rdx, 3
call _memmove
loc_ECE51:
jmp short $+2
loc_ECE53:
mov eax, [rbp+var_5C]
add eax, 0FFFFFFFFh
mov [rbp+var_5C], eax
cmp eax, 0
jnz short loc_ECE63
jmp short loc_ECECA
loc_ECE63:
jmp short loc_ECE80
loc_ECE65:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
ja short loc_ECE71
jmp short loc_ECECA
loc_ECE71:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
loc_ECE80:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
mov rax, [rbp+var_20]
mov ecx, [rbp+var_5C]
xor edx, edx
div rcx
mov [rbp+var_38], rax
jmp short loc_ECEBC
loc_ECE9B:
mov eax, [rbp+var_44]
add eax, [rbp+var_60]
mov [rbp+var_60], eax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_58]
mov rdx, rax
add rdx, 8
mov [rbp+var_58], rdx
mov [rax], rcx
jmp short $+2
loc_ECEBC:
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp loc_ECD5D
loc_ECECA:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
sar rax, 3
mov ecx, eax
mov [rbp+var_5C], ecx
mov rax, [rbp+var_10]
mov [rax+1Ch], ecx
mov rcx, [rbp+var_38]
mov eax, [rbp+var_5C]
imul rcx, rax
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov [rbp+var_30], 0
loc_ECF03:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_5C]
jge short loc_ECF2F
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rdx, [rbp+var_30]
mov rax, [rax+rdx*8]
mov [rax+164h], ecx
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_ECF03
loc_ECF2F:
mov rax, [rbp+var_10]
mov byte ptr [rax], 1
cmp [rbp+var_5C], 0
jnz short loc_ECF43
mov [rbp+var_60], 0FFFFFFFFh
loc_ECF43:
jmp short $+2
loc_ECF45:
mov eax, [rbp+var_60]
mov [rbp+var_4], eax
loc_ECF4B:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
|
long long init_partitioned_key_cache(
char *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
int inited; // eax
long long *v7; // rax
char v9; // [rsp+Fh] [rbp-61h]
unsigned int v10; // [rsp+10h] [rbp-60h]
unsigned int v11; // [rsp+14h] [rbp-5Ch]
unsigned int v12; // [rsp+14h] [rbp-5Ch]
long long *v13; // [rsp+18h] [rbp-58h]
_BYTE *v14; // [rsp+20h] [rbp-50h]
int v15; // [rsp+2Ch] [rbp-44h]
unsigned long long v16; // [rsp+30h] [rbp-40h]
unsigned long long v17; // [rsp+38h] [rbp-38h]
int i; // [rsp+40h] [rbp-30h]
int j; // [rsp+40h] [rbp-30h]
v11 = *((_DWORD *)a1 + 7);
v10 = 0;
*((_DWORD *)a1 + 6) = a2;
if ( *a1 )
{
v13 = (long long *)*((_QWORD *)a1 + 1);
}
else
{
v13 = (long long *)my_malloc(key_memory_KEY_CACHE, 8LL * v11, 16LL);
if ( !v13 )
return (unsigned int)-1;
memset(v13, 0LL, 8LL * v11);
*((_QWORD *)a1 + 1) = v13;
}
v17 = a3 / v11;
v16 = v17 / 5;
for ( i = 0; i < (int)v11; ++i )
{
v9 = *a1;
if ( *a1 )
{
v14 = (_BYTE *)*v13;
inited = init_simple_key_cache(*v13, a2, v17, a4, a5, a6);
}
else
{
v14 = (_BYTE *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL);
if ( !v14 )
continue;
*v14 = 0;
inited = init_simple_key_cache((long long)v14, a2, v17, a4, a5, a6);
}
v15 = inited;
if ( inited > 0 )
{
v10 += inited;
v7 = v13++;
*v7 = (long long)v14;
}
else
{
end_simple_key_cache((long long)v14, 1);
if ( !v9 )
{
my_free(v14);
v14 = 0LL;
}
if ( (i || v15 >= 0) && i <= 0 )
{
if ( a3 <= v16 )
break;
a3 -= v16;
}
else
{
if ( v9 )
{
my_free(v14);
memmove(v13, v13 + 1, 8LL * (v11 - i - 1));
}
if ( !--v11 )
break;
}
--i;
v17 = a3 / v11;
}
}
v12 = ((long long)v13 - *((_QWORD *)a1 + 1)) >> 3;
*((_DWORD *)a1 + 7) = v12;
*((_QWORD *)a1 + 2) = v12 * v17;
for ( j = 0; j < (int)v12; ++j )
*(_DWORD *)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL * j) + 356LL) = v12;
*a1 = 1;
if ( !v12 )
return (unsigned int)-1;
return v10;
}
|
init_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],R8D
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x5c],EAX
MOV dword ptr [RBP + -0x60],0x0
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],ECX
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x001ecce0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001ecd34
LAB_001ecce0:
LEA RAX,[0xd92338]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x5c]
MOV ESI,EAX
SHL RSI,0x3
MOV EDX,0x10
CALL 0x001fc090
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x001ecd14
JMP 0x001ecd08
LAB_001ecd08:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001ecf4b
LAB_001ecd14:
MOV RDI,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RBP + -0x5c]
MOV EDX,EAX
SHL RDX,0x3
XOR ESI,ESI
CALL 0x0012a2a0
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_001ecd34:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x5c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,0x5
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x30],0x0
LAB_001ecd5d:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x5c]
JGE 0x001ececa
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x61],AL
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001ecd85
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001ecdb3
LAB_001ecd85:
LEA RAX,[0xd92338]
MOV EDI,dword ptr [RAX]
MOV ESI,0x170
MOV EDX,0x10
CALL 0x001fc090
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JNZ 0x001ecdac
JMP 0x001ecebc
LAB_001ecdac:
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],0x0
LAB_001ecdb3:
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8D,dword ptr [RBP + -0x28]
MOV R9D,dword ptr [RBP + -0x2c]
CALL 0x001eaa10
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JG 0x001ece9b
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,0x1
CALL 0x001ebb30
CMP byte ptr [RBP + -0x61],0x0
JNZ 0x001ece00
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001fc410
MOV qword ptr [RBP + -0x50],0x0
LAB_001ece00:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x001ece0c
CMP dword ptr [RBP + -0x44],0x0
JL 0x001ece12
LAB_001ece0c:
CMP dword ptr [RBP + -0x30],0x0
JLE 0x001ece65
LAB_001ece12:
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001ece53
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001fc410
MOV qword ptr [RBP + -0x50],0x0
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001ece51
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x58]
ADD RSI,0x8
MOV EAX,dword ptr [RBP + -0x5c]
SUB EAX,dword ptr [RBP + -0x30]
SUB EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
SHL RDX,0x3
CALL 0x0012a140
LAB_001ece51:
JMP 0x001ece53
LAB_001ece53:
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x5c],EAX
CMP EAX,0x0
JNZ 0x001ece63
JMP 0x001ececa
LAB_001ece63:
JMP 0x001ece80
LAB_001ece65:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001ece71
JMP 0x001ececa
LAB_001ece71:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001ece80:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x5c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001ecebc
LAB_001ece9b:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x60],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RAX],RCX
JMP 0x001ecebc
LAB_001ecebc:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001ecd5d
LAB_001ececa:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
SAR RAX,0x3
MOV ECX,EAX
MOV dword ptr [RBP + -0x5c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x5c]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RBP + -0x30],0x0
LAB_001ecf03:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x5c]
JGE 0x001ecf2f
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RDX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + RDX*0x8]
MOV dword ptr [RAX + 0x164],ECX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001ecf03
LAB_001ecf2f:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x1
CMP dword ptr [RBP + -0x5c],0x0
JNZ 0x001ecf43
MOV dword ptr [RBP + -0x60],0xffffffff
LAB_001ecf43:
JMP 0x001ecf45
LAB_001ecf45:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x4],EAX
LAB_001ecf4b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int init_partitioned_key_cache
(char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5,
int4 param_6)
{
char cVar1;
int iVar2;
ulong uVar3;
int local_68;
uint local_64;
int8 *local_60;
int1 *local_58;
ulong local_40;
int local_38;
ulong local_28;
local_64 = *(uint *)(param_1 + 0x1c);
local_68 = 0;
*(int4 *)(param_1 + 0x18) = param_2;
if (*param_1 == '\0') {
local_60 = (int8 *)my_malloc(key_memory_KEY_CACHE,(ulong)local_64 << 3,0x10);
if (local_60 == (int8 *)0x0) {
return -1;
}
memset(local_60,0,(ulong)local_64 << 3);
*(int8 **)(param_1 + 8) = local_60;
}
else {
local_60 = *(int8 **)(param_1 + 8);
}
local_40 = param_3 / local_64;
uVar3 = local_40 / 5;
local_28 = param_3;
for (local_38 = 0; local_38 < (int)local_64; local_38 = local_38 + 1) {
cVar1 = *param_1;
if (cVar1 == '\0') {
local_58 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10);
if (local_58 != (int1 *)0x0) {
*local_58 = 0;
goto LAB_001ecdb3;
}
}
else {
local_58 = (int1 *)*local_60;
LAB_001ecdb3:
iVar2 = init_simple_key_cache(local_58,param_2,local_40,param_4,param_5,param_6);
if (iVar2 < 1) {
end_simple_key_cache(local_58,1);
if (cVar1 == '\0') {
my_free(local_58);
local_58 = (int1 *)0x0;
}
if (((local_38 == 0) && (iVar2 < 0)) || (0 < local_38)) {
if ((cVar1 != '\0') && (my_free(local_58), cVar1 != '\0')) {
memmove(local_60,local_60 + 1,(ulong)((local_64 - local_38) - 1) << 3);
}
local_64 = local_64 - 1;
if (local_64 == 0) break;
}
else {
if (local_28 <= uVar3) break;
local_28 = local_28 - uVar3;
}
local_38 = local_38 + -1;
local_40 = local_28 / local_64;
}
else {
local_68 = iVar2 + local_68;
*local_60 = local_58;
local_60 = local_60 + 1;
}
}
}
uVar3 = (long)local_60 - *(long *)(param_1 + 8) >> 3;
iVar2 = (int)uVar3;
*(int *)(param_1 + 0x1c) = iVar2;
*(ulong *)(param_1 + 0x10) = local_40 * (uVar3 & 0xffffffff);
for (local_38 = 0; local_38 < iVar2; local_38 = local_38 + 1) {
*(int *)(*(long *)(*(long *)(param_1 + 8) + (long)local_38 * 8) + 0x164) = iVar2;
}
*param_1 = '\x01';
if (iVar2 == 0) {
local_68 = -1;
}
return local_68;
}
|
|
12,356
|
my_init_mysys_psi_keys
|
eloqsql/mysys/my_init.c
|
void my_init_mysys_psi_keys()
{
const char* category= "mysys";
int count;
count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]);
mysql_mutex_register(category, all_mysys_mutexes, count);
count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]);
mysql_cond_register(category, all_mysys_conds, count);
count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]);
mysql_rwlock_register(category, all_mysys_rwlocks, count);
count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]);
mysql_thread_register(category, all_mysys_threads, count);
count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]);
mysql_file_register(category, all_mysys_files, count);
count= array_elements(all_mysys_stages);
mysql_stage_register(category, all_mysys_stages, count);
}
|
O0
|
c
|
my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x52380(%rip), %rax # 0x802bf
movq %rax, -0x8(%rbp)
movl $0x13, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1a7648(%rip), %rsi # 0x1d55a0
callq 0x2dff0
movl $0x7, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1a77fe(%rip), %rsi # 0x1d5770
callq 0x2e030
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1a7894(%rip), %rsi # 0x1d5820
callq 0x2e070
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1a789a(%rip), %rsi # 0x1d5840
callq 0x2e0b0
movl $0x2, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1a78a0(%rip), %rsi # 0x1d5860
callq 0x2e0f0
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0x1a75b6(%rip), %rsi # 0x1d5590
callq 0x2e130
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, aMysys; "mysys"
mov [rbp+var_8], rax
mov [rbp+var_C], 13h
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_mutexes
call inline_mysql_mutex_register
mov [rbp+var_C], 7
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_conds
call inline_mysql_cond_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_rwlocks
call inline_mysql_rwlock_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_threads
call inline_mysql_thread_register
mov [rbp+var_C], 2
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_files
call inline_mysql_file_register
mov [rbp+var_C], 1
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
lea rsi, all_mysys_stages
call inline_mysql_stage_register
add rsp, 10h
pop rbp
retn
|
long long my_init_mysys_psi_keys()
{
inline_mysql_mutex_register("mysys", &all_mysys_mutexes, 19LL);
inline_mysql_cond_register("mysys", &all_mysys_conds, 7LL);
inline_mysql_rwlock_register("mysys", &all_mysys_rwlocks, 1LL);
inline_mysql_thread_register("mysys", &all_mysys_threads, 1LL);
inline_mysql_file_register("mysys", &all_mysys_files, 2LL);
return inline_mysql_stage_register("mysys", &all_mysys_stages, 1LL);
}
|
my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x1802bf]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x13
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x2d55a0]
CALL 0x0012dff0
MOV dword ptr [RBP + -0xc],0x7
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x2d5770]
CALL 0x0012e030
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x2d5820]
CALL 0x0012e070
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x2d5840]
CALL 0x0012e0b0
MOV dword ptr [RBP + -0xc],0x2
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x2d5860]
CALL 0x0012e0f0
MOV dword ptr [RBP + -0xc],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
LEA RSI,[0x2d5590]
CALL 0x0012e130
ADD RSP,0x10
POP RBP
RET
|
void my_init_mysys_psi_keys(void)
{
inline_mysql_mutex_register("mysys",all_mysys_mutexes,0x13);
inline_mysql_cond_register("mysys",all_mysys_conds,7);
inline_mysql_rwlock_register("mysys",all_mysys_rwlocks,1);
inline_mysql_thread_register("mysys",all_mysys_threads,1);
inline_mysql_file_register("mysys",all_mysys_files,2);
inline_mysql_stage_register("mysys",&all_mysys_stages,1);
return;
}
|
|
12,357
|
blst_aggregate_in_g1
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/aggregate.c
|
BLST_ERROR blst_aggregate_in_g1(POINTonE1 *out, const POINTonE1 *in,
const unsigned char *zwire)
{
POINTonE1 P[1];
BLST_ERROR ret;
ret = POINTonE1_Deserialize_Z((POINTonE1_affine *)P, zwire);
if (ret != BLST_SUCCESS)
return ret;
if (vec_is_zero(P, sizeof(POINTonE1_affine))) {
if (in == NULL)
vec_zero(out, sizeof(*out));
return BLST_SUCCESS;
}
vec_copy(P->Z, BLS12_381_Rx.p, sizeof(P->Z));
if (!POINTonE1_in_G1(P))
return BLST_POINT_NOT_IN_GROUP;
if (in == NULL)
vec_copy(out, P, sizeof(P));
else
POINTonE1_dadd_affine(out, in, (POINTonE1_affine *)P);
return BLST_SUCCESS;
}
|
O0
|
c
|
blst_aggregate_in_g1:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0xb0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa9410
movl %eax, -0xb4(%rbp)
cmpl $0x0, -0xb4(%rbp)
je 0xb1e34
movl -0xb4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb1ed9
leaq -0xb0(%rbp), %rdi
movl $0x60, %esi
callq 0xa8cd0
cmpq $0x0, %rax
je 0xb1e69
cmpq $0x0, -0x18(%rbp)
jne 0xb1e60
movq -0x10(%rbp), %rdi
movl $0x90, %esi
callq 0xa87c0
movl $0x0, -0x4(%rbp)
jmp 0xb1ed9
leaq -0xb0(%rbp), %rdi
addq $0x60, %rdi
leaq 0x3662d(%rip), %rsi # 0xe84a8
movl $0x30, %edx
callq 0xa8ad0
leaq -0xb0(%rbp), %rdi
callq 0xab890
cmpq $0x0, %rax
jne 0xb1ea0
movl $0x3, -0x4(%rbp)
jmp 0xb1ed9
cmpq $0x0, -0x18(%rbp)
jne 0xb1ebe
movq -0x10(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x90, %edx
callq 0xa8ad0
jmp 0xb1ed2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xaa180
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
blst_aggregate_in_g1:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rdi, [rbp+var_B0]
mov rsi, [rbp+var_20]
call POINTonE1_Deserialize_Z
mov [rbp+var_B4], eax
cmp [rbp+var_B4], 0
jz short loc_B1E34
mov eax, [rbp+var_B4]
mov [rbp+var_4], eax
jmp loc_B1ED9
loc_B1E34:
lea rdi, [rbp+var_B0]
mov esi, 60h ; '`'
call vec_is_zero
cmp rax, 0
jz short loc_B1E69
cmp [rbp+var_18], 0
jnz short loc_B1E60
mov rdi, [rbp+var_10]
mov esi, 90h
call vec_zero
loc_B1E60:
mov [rbp+var_4], 0
jmp short loc_B1ED9
loc_B1E69:
lea rdi, [rbp+var_B0]
add rdi, 60h ; '`'
lea rsi, BLS12_381_Rx
mov edx, 30h ; '0'
call vec_copy
lea rdi, [rbp+var_B0]
call POINTonE1_in_G1
cmp rax, 0
jnz short loc_B1EA0
mov [rbp+var_4], 3
jmp short loc_B1ED9
loc_B1EA0:
cmp [rbp+var_18], 0
jnz short loc_B1EBE
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_B0]
mov edx, 90h
call vec_copy
jmp short loc_B1ED2
loc_B1EBE:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
lea rdx, [rbp+var_B0]
call POINTonE1_dadd_affine
loc_B1ED2:
mov [rbp+var_4], 0
loc_B1ED9:
mov eax, [rbp+var_4]
add rsp, 0C0h
pop rbp
retn
|
long long blst_aggregate_in_g1(long long a1, long long a2, char *a3)
{
unsigned int v4; // [rsp+Ch] [rbp-B4h]
_BYTE v5[96]; // [rsp+10h] [rbp-B0h] BYREF
_QWORD v6[7]; // [rsp+70h] [rbp-50h] BYREF
long long v7; // [rsp+A8h] [rbp-18h]
long long v8; // [rsp+B0h] [rbp-10h]
v8 = a1;
v7 = a2;
v6[6] = a3;
v4 = POINTonE1_Deserialize_Z((long long)v5, a3);
if ( v4 )
{
return v4;
}
else if ( vec_is_zero((long long)v5, 0x60uLL) )
{
if ( !v7 )
vec_zero(v8, 0x90uLL);
return 0;
}
else
{
vec_copy((long long)v6, (long long)&BLS12_381_Rx, 0x30uLL);
if ( POINTonE1_in_G1((long long)v5) )
{
if ( v7 )
POINTonE1_dadd_affine(v8, v7, (long long)v5);
else
vec_copy(v8, (long long)v5, 0x90uLL);
return 0;
}
else
{
return 3;
}
}
}
|
blst_aggregate_in_g1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LEA RDI,[RBP + -0xb0]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a9410
MOV dword ptr [RBP + -0xb4],EAX
CMP dword ptr [RBP + -0xb4],0x0
JZ 0x001b1e34
MOV EAX,dword ptr [RBP + -0xb4]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b1ed9
LAB_001b1e34:
LEA RDI,[RBP + -0xb0]
MOV ESI,0x60
CALL 0x001a8cd0
CMP RAX,0x0
JZ 0x001b1e69
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001b1e60
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x90
CALL 0x001a87c0
LAB_001b1e60:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b1ed9
LAB_001b1e69:
LEA RDI,[RBP + -0xb0]
ADD RDI,0x60
LEA RSI,[0x1e84a8]
MOV EDX,0x30
CALL 0x001a8ad0
LEA RDI,[RBP + -0xb0]
CALL 0x001ab890
CMP RAX,0x0
JNZ 0x001b1ea0
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001b1ed9
LAB_001b1ea0:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001b1ebe
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xb0]
MOV EDX,0x90
CALL 0x001a8ad0
JMP 0x001b1ed2
LAB_001b1ebe:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0xb0]
CALL 0x001aa180
LAB_001b1ed2:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b1ed9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xc0
POP RBP
RET
|
int blst_aggregate_in_g1(int8 param_1,long param_2,int8 param_3)
{
long lVar1;
int1 local_b8 [96];
int1 auStack_58 [48];
int8 local_28;
long local_20;
int8 local_18;
int local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_c = POINTonE1_Deserialize_Z(local_b8,param_3);
if (local_c == 0) {
lVar1 = vec_is_zero(local_b8,0x60);
if (lVar1 == 0) {
vec_copy(auStack_58,BLS12_381_Rx,0x30);
lVar1 = POINTonE1_in_G1(local_b8);
if (lVar1 == 0) {
local_c = 3;
}
else {
if (local_20 == 0) {
vec_copy(local_18,local_b8,0x90);
}
else {
POINTonE1_dadd_affine(local_18,local_20,local_b8);
}
local_c = 0;
}
}
else {
if (local_20 == 0) {
vec_zero(local_18,0x90);
}
local_c = 0;
}
}
return local_c;
}
|
|
12,358
|
stbi__resample_row_h_2(unsigned char*, unsigned char*, unsigned char*, int, int)
|
llama.cpp/examples/llava/../../common/stb_image.h
|
static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs)
{
// need to generate two samples horizontally for every one in input
int i;
stbi_uc *input = in_near;
if (w == 1) {
// if only one sample, can't do any interpolation
out[0] = out[1] = input[0];
return out;
}
out[0] = input[0];
out[1] = stbi__div4(input[0]*3 + input[1] + 2);
for (i=1; i < w-1; ++i) {
int n = 3*input[i]+2;
out[i*2+0] = stbi__div4(n+input[i-1]);
out[i*2+1] = stbi__div4(n+input[i+1]);
}
out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2);
out[i*2+1] = input[w-1];
STBI_NOTUSED(in_far);
STBI_NOTUSED(hs);
return out;
}
|
O3
|
c
|
stbi__resample_row_h_2(unsigned char*, unsigned char*, unsigned char*, int, int):
movq %rdi, %rax
movb (%rsi), %dl
cmpl $0x1, %ecx
jne 0x3454e
movb %dl, 0x1(%rax)
movb %dl, (%rax)
retq
movzbl %dl, %edx
movb %dl, (%rax)
movzwl %dx, %edx
leal (%rdx,%rdx,2), %edx
movzbl 0x1(%rsi), %edi
addl %edi, %edx
addl $0x2, %edx
shrl $0x2, %edx
movb %dl, 0x1(%rax)
leal -0x1(%rcx), %edx
movl $0x2, %edi
cmpl $0x3, %ecx
jl 0x345bd
movl %edx, %edi
decq %rdi
xorl %r8d, %r8d
movzbl 0x1(%rsi,%r8), %r9d
leal (%r9,%r9,2), %r9d
movzbl (%rsi,%r8), %r10d
addl %r9d, %r10d
addl $0x2, %r10d
shrl $0x2, %r10d
movb %r10b, 0x2(%rax,%r8,2)
movzbl 0x2(%rsi,%r8), %r10d
addl %r10d, %r9d
addl $0x2, %r9d
shrl $0x2, %r9d
movb %r9b, 0x3(%rax,%r8,2)
incq %r8
cmpq %r8, %rdi
jne 0x3457d
leal (%rdx,%rdx), %edi
movslq %ecx, %rcx
movzbl -0x2(%rsi,%rcx), %ecx
leal (%rcx,%rcx,2), %ecx
movslq %edx, %rdx
movzbl (%rsi,%rdx), %r8d
addl %r8d, %ecx
addl $0x2, %ecx
shrl $0x2, %ecx
movl %edi, %edi
movb %cl, (%rax,%rdi)
movb (%rsi,%rdx), %cl
movb %cl, 0x1(%rax,%rdi)
retq
|
_ZL22stbi__resample_row_h_2PhS_S_ii:
mov rax, rdi
mov dl, [rsi]
cmp ecx, 1
jnz short loc_3454E
mov [rax+1], dl
mov [rax], dl
retn
loc_3454E:
movzx edx, dl
mov [rax], dl
movzx edx, dx
lea edx, [rdx+rdx*2]
movzx edi, byte ptr [rsi+1]
add edx, edi
add edx, 2
shr edx, 2
mov [rax+1], dl
lea edx, [rcx-1]
mov edi, 2
cmp ecx, 3
jl short loc_345BD
mov edi, edx
dec rdi
xor r8d, r8d
loc_3457D:
movzx r9d, byte ptr [rsi+r8+1]
lea r9d, [r9+r9*2]
movzx r10d, byte ptr [rsi+r8]
add r10d, r9d
add r10d, 2
shr r10d, 2
mov [rax+r8*2+2], r10b
movzx r10d, byte ptr [rsi+r8+2]
add r9d, r10d
add r9d, 2
shr r9d, 2
mov [rax+r8*2+3], r9b
inc r8
cmp rdi, r8
jnz short loc_3457D
lea edi, [rdx+rdx]
loc_345BD:
movsxd rcx, ecx
movzx ecx, byte ptr [rsi+rcx-2]
lea ecx, [rcx+rcx*2]
movsxd rdx, edx
movzx r8d, byte ptr [rsi+rdx]
add ecx, r8d
add ecx, 2
shr ecx, 2
mov edi, edi
mov [rax+rdi], cl
mov cl, [rsi+rdx]
mov [rax+rdi+1], cl
retn
|
unsigned __int8 * stbi__resample_row_h_2(
unsigned __int8 *a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
int a4)
{
unsigned __int8 *result; // rax
unsigned __int8 v5; // dl
unsigned int v6; // edx
unsigned int v7; // edi
long long v8; // r8
int v9; // r9d
result = a1;
v5 = *a2;
if ( a4 == 1 )
{
a1[1] = v5;
*a1 = v5;
}
else
{
*a1 = v5;
a1[1] = (a2[1] + 3 * (unsigned int)v5 + 2) >> 2;
v6 = a4 - 1;
v7 = 2;
if ( a4 >= 3 )
{
v8 = 0LL;
do
{
v9 = 3 * a2[v8 + 1];
result[2 * v8 + 2] = (v9 + (unsigned int)a2[v8] + 2) >> 2;
result[2 * v8 + 3] = ((unsigned int)a2[v8 + 2] + v9 + 2) >> 2;
++v8;
}
while ( v6 - 1LL != v8 );
v7 = 2 * v6;
}
result[v7] = (a2[v6] + 3 * (unsigned int)a2[a4 - 2] + 2) >> 2;
result[v7 + 1] = a2[v6];
}
return result;
}
|
stbi__resample_row_h_2:
MOV RAX,RDI
MOV DL,byte ptr [RSI]
CMP ECX,0x1
JNZ 0x0013454e
MOV byte ptr [RAX + 0x1],DL
MOV byte ptr [RAX],DL
RET
LAB_0013454e:
MOVZX EDX,DL
MOV byte ptr [RAX],DL
MOVZX EDX,DX
LEA EDX,[RDX + RDX*0x2]
MOVZX EDI,byte ptr [RSI + 0x1]
ADD EDX,EDI
ADD EDX,0x2
SHR EDX,0x2
MOV byte ptr [RAX + 0x1],DL
LEA EDX,[RCX + -0x1]
MOV EDI,0x2
CMP ECX,0x3
JL 0x001345bd
MOV EDI,EDX
DEC RDI
XOR R8D,R8D
LAB_0013457d:
MOVZX R9D,byte ptr [RSI + R8*0x1 + 0x1]
LEA R9D,[R9 + R9*0x2]
MOVZX R10D,byte ptr [RSI + R8*0x1]
ADD R10D,R9D
ADD R10D,0x2
SHR R10D,0x2
MOV byte ptr [RAX + R8*0x2 + 0x2],R10B
MOVZX R10D,byte ptr [RSI + R8*0x1 + 0x2]
ADD R9D,R10D
ADD R9D,0x2
SHR R9D,0x2
MOV byte ptr [RAX + R8*0x2 + 0x3],R9B
INC R8
CMP RDI,R8
JNZ 0x0013457d
LEA EDI,[RDX + RDX*0x1]
LAB_001345bd:
MOVSXD RCX,ECX
MOVZX ECX,byte ptr [RSI + RCX*0x1 + -0x2]
LEA ECX,[RCX + RCX*0x2]
MOVSXD RDX,EDX
MOVZX R8D,byte ptr [RSI + RDX*0x1]
ADD ECX,R8D
ADD ECX,0x2
SHR ECX,0x2
MOV EDI,EDI
MOV byte ptr [RAX + RDI*0x1],CL
MOV CL,byte ptr [RSI + RDX*0x1]
MOV byte ptr [RAX + RDI*0x1 + 0x1],CL
RET
|
/* stbi__resample_row_h_2(unsigned char*, unsigned char*, unsigned char*, int, int) */
void stbi__resample_row_h_2(uchar *param_1,uchar *param_2,uchar *param_3,int param_4,int param_5)
{
byte bVar1;
uint uVar2;
uint uVar3;
long lVar4;
int iVar5;
bVar1 = *param_2;
if (param_4 == 1) {
param_1[1] = bVar1;
*param_1 = bVar1;
return;
}
*param_1 = bVar1;
param_1[1] = (uchar)((uint)(ushort)bVar1 + (uint)(ushort)bVar1 * 2 + (uint)param_2[1] + 2 >> 2);
uVar2 = param_4 - 1;
uVar3 = 2;
if (2 < param_4) {
lVar4 = 0;
do {
iVar5 = (uint)param_2[lVar4 + 1] + (uint)param_2[lVar4 + 1] * 2;
param_1[lVar4 * 2 + 2] = (uchar)((uint)param_2[lVar4] + iVar5 + 2 >> 2);
param_1[lVar4 * 2 + 3] = (uchar)(iVar5 + (uint)param_2[lVar4 + 2] + 2 >> 2);
lVar4 = lVar4 + 1;
} while ((ulong)uVar2 - 1 != lVar4);
uVar3 = uVar2 * 2;
}
param_1[uVar3] =
(uchar)((uint)param_2[(long)param_4 + -2] + (uint)param_2[(long)param_4 + -2] * 2 +
(uint)param_2[(int)uVar2] + 2 >> 2);
param_1[(ulong)uVar3 + 1] = param_2[(int)uVar2];
return;
}
|
|
12,359
|
js_function_proto_int32
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_function_proto_int32(JSContext *ctx,
JSValue this_val,
int magic)
{
JSFunctionBytecode *b = JS_GetFunctionBytecode(this_val);
if (b) {
int *field = (int *) ((char *)b + magic);
return js_int32(*field);
}
return JS_UNDEFINED;
}
|
O3
|
c
|
js_function_proto_int32:
movq %rdx, %rax
movl $0x3, %edx
cmpl $-0x1, %eax
jne 0x7378a
movzwl 0x6(%rsi), %edi
xorl %eax, %eax
cmpq $0x38, %rdi
ja 0x7378c
movabsq $0x110000000012000, %r8 # imm = 0x110000000012000
btq %rdi, %r8
jae 0x7378c
movq 0x30(%rsi), %rax
testq %rax, %rax
je 0x7378a
movslq %ecx, %rcx
movl (%rax,%rcx), %eax
xorl %edx, %edx
retq
xorl %eax, %eax
retq
|
js_function_proto_int32:
mov rax, rdx
mov edx, 3
cmp eax, 0FFFFFFFFh
jnz short loc_7378A
movzx edi, word ptr [rsi+6]
xor eax, eax
cmp rdi, 38h ; '8'
ja short locret_7378C
mov r8, 110000000012000h
bt r8, rdi
jnb short locret_7378C
mov rax, [rsi+30h]
test rax, rax
jz short loc_7378A
movsxd rcx, ecx
mov eax, [rax+rcx]
xor edx, edx
retn
loc_7378A:
xor eax, eax
locret_7378C:
retn
|
long long js_function_proto_int32(long long a1, long long a2, int a3, int a4)
{
unsigned long long v4; // rdi
long long result; // rax
long long v6; // r8
long long v7; // rax
if ( a3 != -1 )
return 0LL;
v4 = *(unsigned __int16 *)(a2 + 6);
result = 0LL;
if ( v4 <= 0x38 )
{
v6 = 0x110000000012000LL;
if ( _bittest64(&v6, v4) )
{
v7 = *(_QWORD *)(a2 + 48);
if ( v7 )
return *(unsigned int *)(v7 + a4);
return 0LL;
}
}
return result;
}
|
js_function_proto_int32:
MOV RAX,RDX
MOV EDX,0x3
CMP EAX,-0x1
JNZ 0x0017378a
MOVZX EDI,word ptr [RSI + 0x6]
XOR EAX,EAX
CMP RDI,0x38
JA 0x0017378c
MOV R8,0x110000000012000
BT R8,RDI
JNC 0x0017378c
MOV RAX,qword ptr [RSI + 0x30]
TEST RAX,RAX
JZ 0x0017378a
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x1]
XOR EDX,EDX
RET
LAB_0017378a:
XOR EAX,EAX
LAB_0017378c:
RET
|
int1 [16] js_function_proto_int32(int8 param_1,long param_2,int param_3,int param_4)
{
if ((((param_3 == -1) && ((ulong)*(ushort *)(param_2 + 6) < 0x39)) &&
((0x110000000012000U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) &&
(*(long *)(param_2 + 0x30) != 0)) {
return ZEXT416(*(uint *)(*(long *)(param_2 + 0x30) + (long)param_4));
}
return ZEXT816(3) << 0x40;
}
|
|
12,360
|
char* fmt::v11::detail::to_pointer<char>(fmt::v11::basic_appender<char>, unsigned long)
|
zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format.h
|
FMT_CONSTEXPR20 auto to_pointer(basic_appender<T> it, size_t n) -> T* {
buffer<T>& buf = get_container(it);
buf.try_reserve(buf.size() + n);
auto size = buf.size();
if (buf.capacity() < size + n) return nullptr;
buf.try_resize(size + n);
return buf.data() + size;
}
|
O0
|
c
|
char* fmt::v11::detail::to_pointer<char>(fmt::v11::basic_appender<char>, unsigned long):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xacae0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0xa6b40
movq (%rsp), %rdi
movq %rax, %rsi
addq 0x20(%rsp), %rsi
callq 0xaaed0
movq 0x18(%rsp), %rdi
callq 0xa6b40
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0xab620
movq 0x8(%rsp), %rcx
addq 0x20(%rsp), %rcx
cmpq %rcx, %rax
jae 0xac99e
movq $0x0, 0x30(%rsp)
jmp 0xac9c6
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq 0x20(%rsp), %rsi
callq 0xa6a30
movq 0x18(%rsp), %rdi
callq 0xa6ba0
addq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
|
_ZN3fmt3v116detail10to_pointerIcEEPT_NS0_14basic_appenderIS3_EEm:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_28]
call _ZN3fmt3v116detail13get_containerINS0_14basic_appenderIcEEEERNT_14container_typeES5_; fmt::v11::detail::get_container<fmt::v11::basic_appender<char>>(fmt::v11::basic_appender<char>::container_type)
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_38], rax
mov rdi, [rsp+38h+var_20]
call _ZNK3fmt3v116detail6bufferIcE4sizeEv; fmt::v11::detail::buffer<char>::size(void)
mov rdi, [rsp+38h+var_38]
mov rsi, rax
add rsi, [rsp+38h+var_18]
call _ZN3fmt3v116detail6bufferIcE11try_reserveEm; fmt::v11::detail::buffer<char>::try_reserve(ulong)
mov rdi, [rsp+38h+var_20]
call _ZNK3fmt3v116detail6bufferIcE4sizeEv; fmt::v11::detail::buffer<char>::size(void)
mov [rsp+38h+var_30], rax
mov rdi, [rsp+38h+var_20]
call _ZNK3fmt3v116detail6bufferIcE8capacityEv; fmt::v11::detail::buffer<char>::capacity(void)
mov rcx, [rsp+38h+var_30]
add rcx, [rsp+38h+var_18]
cmp rax, rcx
jnb short loc_AC99E
mov [rsp+38h+var_8], 0
jmp short loc_AC9C6
loc_AC99E:
mov rdi, [rsp+38h+var_20]
mov rsi, [rsp+38h+var_30]
add rsi, [rsp+38h+var_18]
call _ZN3fmt3v116detail6bufferIcE10try_resizeEm; fmt::v11::detail::buffer<char>::try_resize(ulong)
mov rdi, [rsp+38h+var_20]
call _ZN3fmt3v116detail6bufferIcE4dataEv; fmt::v11::detail::buffer<char>::data(void)
add rax, [rsp+38h+var_30]
mov [rsp+38h+var_8], rax
loc_AC9C6:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long fmt::v11::detail::to_pointer<char>(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+8h] [rbp-30h]
long long v5; // [rsp+18h] [rbp-20h]
v5 = fmt::v11::detail::get_container<fmt::v11::basic_appender<char>>(a1);
v2 = fmt::v11::detail::buffer<char>::size(v5);
fmt::v11::detail::buffer<char>::try_reserve(v5, a2 + v2);
v4 = fmt::v11::detail::buffer<char>::size(v5);
if ( fmt::v11::detail::buffer<char>::capacity(v5) < (unsigned long long)(a2 + v4) )
return 0LL;
fmt::v11::detail::buffer<char>::try_resize(v5, a2 + v4);
return v4 + fmt::v11::detail::buffer<char>::data(v5);
}
|
to_pointer<char>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001acae0
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001a6b40
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
ADD RSI,qword ptr [RSP + 0x20]
CALL 0x001aaed0
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001a6b40
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001ab620
MOV RCX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RSP + 0x20]
CMP RAX,RCX
JNC 0x001ac99e
MOV qword ptr [RSP + 0x30],0x0
JMP 0x001ac9c6
LAB_001ac99e:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,qword ptr [RSP + 0x20]
CALL 0x001a6a30
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001a6ba0
ADD RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
LAB_001ac9c6:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* char* fmt::v11::detail::to_pointer<char>(fmt::v11::basic_appender<char>, unsigned long) */
char * fmt::v11::detail::to_pointer<char>(int8 param_1,long param_2)
{
container_type *this;
long lVar1;
ulong uVar2;
long lVar3;
int8 local_8;
this = get_container<fmt::v11::basic_appender<char>>(param_1);
lVar1 = buffer<char>::size((buffer<char> *)this);
buffer<char>::try_reserve((buffer<char> *)this,lVar1 + param_2);
lVar1 = buffer<char>::size((buffer<char> *)this);
uVar2 = buffer<char>::capacity((buffer<char> *)this);
if (uVar2 < (ulong)(lVar1 + param_2)) {
local_8 = (char *)0x0;
}
else {
buffer<char>::try_resize((buffer<char> *)this,lVar1 + param_2);
lVar3 = buffer<char>::data((buffer<char> *)this);
local_8 = (char *)(lVar3 + lVar1);
}
return local_8;
}
|
|
12,361
|
mi_store_blob_length
|
eloqsql/storage/myisam/mi_dynrec.c
|
void _mi_store_blob_length(uchar *pos,uint pack_length,uint length)
{
switch (pack_length) {
case 1:
*pos= (uchar) length;
break;
case 2:
int2store(pos,length);
break;
case 3:
int3store(pos,length);
break;
case 4:
int4store(pos,length);
default:
break;
}
return;
}
|
O0
|
c
|
mi_store_blob_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0xced3a
movq -0x28(%rbp), %rax
leaq 0xbba43(%rip), %rcx # 0x18a70c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
jmp 0xced3c
jmp 0xcece1
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
jmp 0xced3c
jmp 0xcecfa
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x10(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0xced3c
jmp 0xced27
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0xced3a
jmp 0xced3c
popq %rbp
retq
nop
|
_mi_store_blob_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 3
ja short def_CECD0; jumptable 00000000000CECD0 default case
mov rax, [rbp+var_28]
lea rcx, jpt_CECD0
movsxd rax, ds:(jpt_CECD0 - 18A70Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CECD2:
mov eax, [rbp+var_10]; jumptable 00000000000CECD0 case 1
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
jmp short loc_CED3C
loc_CECDF:
jmp short $+2; jumptable 00000000000CECD0 case 2
loc_CECE1:
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov eax, [rbp+var_10]
mov cx, ax
mov rax, [rbp+var_18]
mov [rax], cx
jmp short loc_CED3C
loc_CECF8:
jmp short $+2; jumptable 00000000000CECD0 case 3
loc_CECFA:
mov eax, [rbp+var_10]
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
mov eax, [rbp+var_10]
shr eax, 8
mov cl, al
mov rax, [rbp+var_8]
mov [rax+1], cl
mov eax, [rbp+var_10]
shr eax, 10h
mov cl, al
mov rax, [rbp+var_8]
mov [rax+2], cl
jmp short loc_CED3C
loc_CED25:
jmp short $+2; jumptable 00000000000CECD0 case 4
loc_CED27:
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov ecx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax], ecx
jmp short $+2; jumptable 00000000000CECD0 default case
def_CECD0:
jmp short $+2; jumptable 00000000000CECD0 default case
loc_CED3C:
pop rbp
retn
|
unsigned long long mi_store_blob_length(_BYTE *a1, int a2, int a3)
{
unsigned long long result; // rax
result = (unsigned int)(a2 - 1);
switch ( a2 )
{
case 1:
result = (unsigned long long)a1;
*a1 = a3;
break;
case 2:
result = (unsigned long long)a1;
*(_WORD *)a1 = a3;
break;
case 3:
*(_WORD *)a1 = a3;
result = (unsigned long long)a1;
a1[2] = BYTE2(a3);
break;
case 4:
result = (unsigned long long)a1;
*(_DWORD *)a1 = a3;
break;
default:
return result;
}
return result;
}
|
_mi_store_blob_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x3
JA 0x001ced3a
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x28a70c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
JMP 0x001ced3c
caseD_2:
JMP 0x001cece1
LAB_001cece1:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX],CX
JMP 0x001ced3c
caseD_3:
JMP 0x001cecfa
LAB_001cecfa:
MOV EAX,dword ptr [RBP + -0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x10]
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],CL
JMP 0x001ced3c
caseD_4:
JMP 0x001ced27
LAB_001ced27:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
JMP 0x001ced3a
LAB_001ced3a:
JMP 0x001ced3c
default:
POP RBP
RET
|
void _mi_store_blob_length(int4 *param_1,int4 param_2,int4 param_3)
{
switch(param_2) {
case 1:
*(char *)param_1 = (char)param_3;
break;
case 2:
*(short *)param_1 = (short)param_3;
break;
case 3:
*(char *)param_1 = (char)param_3;
*(char *)((long)param_1 + 1) = (char)((uint)param_3 >> 8);
*(char *)((long)param_1 + 2) = (char)((uint)param_3 >> 0x10);
break;
case 4:
*param_1 = param_3;
}
return;
}
|
|
12,362
|
keygen
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/keygen.c
|
static void keygen(pow256 SK, const void *IKM, size_t IKM_len,
const void *salt, size_t salt_len,
const void *info, size_t info_len,
int version)
{
struct {
HMAC_SHA256_CTX ctx;
unsigned char PRK[32], OKM[48];
vec512 key;
} scratch;
unsigned char salt_prime[32] = "BLS-SIG-KEYGEN-SALT-";
if (IKM_len < 32 || (version > 4 && salt == NULL)) {
vec_zero(SK, sizeof(pow256));
return;
}
/*
* Vet |info| since some callers were caught to be sloppy, e.g.
* SWIG-4.0-generated Python wrapper...
*/
info_len = info==NULL ? 0 : info_len;
if (salt == NULL) {
salt = salt_prime;
salt_len = 20;
}
if (version == 4) {
/* salt = H(salt) */
sha256_init(&scratch.ctx.ctx);
sha256_update(&scratch.ctx.ctx, salt, salt_len);
sha256_final(salt_prime, &scratch.ctx.ctx);
salt = salt_prime;
salt_len = sizeof(salt_prime);
}
while (1) {
/* PRK = HKDF-Extract(salt, IKM || I2OSP(0, 1)) */
HKDF_Extract(scratch.PRK, salt, salt_len,
IKM, IKM_len, 1, &scratch.ctx);
/* OKM = HKDF-Expand(PRK, key_info || I2OSP(L, 2), L) */
HKDF_Expand(scratch.OKM, sizeof(scratch.OKM), scratch.PRK,
info, info_len, 1, &scratch.ctx);
/* SK = OS2IP(OKM) mod r */
vec_zero(scratch.key, sizeof(scratch.key));
limbs_from_be_bytes(scratch.key, scratch.OKM, sizeof(scratch.OKM));
redc_mont_256(scratch.key, scratch.key, BLS12_381_r, r0);
/*
* Given that mul_mont_sparse_256 has special boundary conditions
* it's appropriate to mention that redc_mont_256 output is fully
* reduced at this point. Because we started with 384-bit input,
* one with most significant half smaller than the modulus.
*/
mul_mont_sparse_256(scratch.key, scratch.key, BLS12_381_rRR,
BLS12_381_r, r0);
if (version < 4 || !vec_is_zero(scratch.key, sizeof(vec256)))
break;
/* salt = H(salt) */
sha256_init(&scratch.ctx.ctx);
sha256_update(&scratch.ctx.ctx, salt, salt_len);
sha256_final(salt_prime, &scratch.ctx.ctx);
salt = salt_prime;
salt_len = sizeof(salt_prime);
}
le_bytes_from_limbs(SK, scratch.key, sizeof(pow256));
/*
* scrub the stack just in case next callee inadvertently flashes
* a fragment across application boundary...
*/
vec_zero(&scratch, sizeof(scratch));
}
|
O0
|
c
|
keygen:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp # imm = 0x1E0
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
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 0x3fedf(%rip), %rax # 0xe6340
movq %rax, -0x1d0(%rbp)
movq 0x3fed9(%rip), %rax # 0xe6348
movq %rax, -0x1c8(%rbp)
movq 0x3fed3(%rip), %rax # 0xe6350
movq %rax, -0x1c0(%rbp)
movq 0x3fecd(%rip), %rax # 0xe6358
movq %rax, -0x1b8(%rbp)
cmpq $0x20, -0x18(%rbp)
jb 0xa64a6
cmpl $0x4, 0x18(%rbp)
jle 0xa64b9
cmpq $0x0, -0x20(%rbp)
jne 0xa64b9
movq -0x8(%rbp), %rdi
movl $0x20, %esi
callq 0xa7170
jmp 0xa6703
cmpq $0x0, -0x30(%rbp)
jne 0xa64cb
xorl %eax, %eax
movq %rax, -0x1d8(%rbp)
jmp 0xa64d6
movq 0x10(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, 0x10(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xa64fb
leaq -0x1d0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x14, -0x28(%rbp)
cmpl $0x4, 0x18(%rbp)
jne 0xa6547
leaq -0x1b0(%rbp), %rdi
callq 0xb5af0
leaq -0x1b0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb5b40
leaq -0x1d0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xb5cd0
leaq -0x1d0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x20, -0x28(%rbp)
jmp 0xa6549
leaq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq -0x1b0(%rbp), %rax
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0xb6680
leaq -0x1b0(%rbp), %rdi
addq $0x110, %rdi # imm = 0x110
leaq -0x1b0(%rbp), %rdx
addq $0xf0, %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
leaq -0x1b0(%rbp), %rax
movl $0x30, %esi
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0xb6730
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
movl $0x40, %esi
callq 0xa7170
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
leaq -0x1b0(%rbp), %rsi
addq $0x110, %rsi # imm = 0x110
movl $0x30, %edx
callq 0xb4d00
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
leaq -0x1b0(%rbp), %rsi
addq $0x140, %rsi # imm = 0x140
leaq 0x3f7e3(%rip), %rdx # 0xe5e00
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
callq 0xcb540
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
leaq -0x1b0(%rbp), %rsi
addq $0x140, %rsi # imm = 0x140
leaq 0x3fcc1(%rip), %rdx # 0xe6310
leaq 0x3f7aa(%rip), %rcx # 0xe5e00
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
callq 0xcb080
cmpl $0x4, 0x18(%rbp)
jl 0xa6689
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
movl $0x20, %esi
callq 0xa7680
cmpq $0x0, %rax
jne 0xa668b
jmp 0xa66d6
leaq -0x1b0(%rbp), %rdi
callq 0xb5af0
leaq -0x1b0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb5b40
leaq -0x1d0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xb5cd0
leaq -0x1d0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x20, -0x28(%rbp)
jmp 0xa6549
movq -0x8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
addq $0x140, %rsi # imm = 0x140
movl $0x20, %edx
callq 0xb43a0
leaq -0x1b0(%rbp), %rdi
movl $0x180, %esi # imm = 0x180
callq 0xa7170
addq $0x1e0, %rsp # imm = 0x1E0
popq %rbp
retq
nopl (%rax)
|
keygen:
push rbp
mov rbp, rsp
sub rsp, 1E0h
mov eax, [rbp+arg_8]
mov rax, [rbp+arg_0]
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, cs:qword_E6340
mov [rbp+var_1D0], rax
mov rax, cs:qword_E6348
mov [rbp+var_1C8], rax
mov rax, cs:qword_E6350
mov [rbp+var_1C0], rax
mov rax, cs:qword_E6358
mov [rbp+var_1B8], rax
cmp [rbp+var_18], 20h ; ' '
jb short loc_A64A6
cmp [rbp+arg_8], 4
jle short loc_A64B9
cmp [rbp+var_20], 0
jnz short loc_A64B9
loc_A64A6:
mov rdi, [rbp+var_8]
mov esi, 20h ; ' '
call vec_zero
jmp loc_A6703
loc_A64B9:
cmp [rbp+var_30], 0
jnz short loc_A64CB
xor eax, eax
mov [rbp+var_1D8], rax
jmp short loc_A64D6
loc_A64CB:
mov rax, [rbp+arg_0]
mov [rbp+var_1D8], rax
loc_A64D6:
mov rax, [rbp+var_1D8]
mov [rbp+arg_0], rax
cmp [rbp+var_20], 0
jnz short loc_A64FB
lea rax, [rbp+var_1D0]
mov [rbp+var_20], rax
mov [rbp+var_28], 14h
loc_A64FB:
cmp [rbp+arg_8], 4
jnz short loc_A6547
lea rdi, [rbp+var_1B0]
call sha256_init
lea rdi, [rbp+var_1B0]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call sha256_update
lea rdi, [rbp+var_1D0]
lea rsi, [rbp+var_1B0]
call sha256_final
lea rax, [rbp+var_1D0]
mov [rbp+var_20], rax
mov [rbp+var_28], 20h ; ' '
loc_A6547:
jmp short $+2
loc_A6549:
lea rdi, [rbp+var_1B0]
add rdi, 0F0h
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_10]
mov r8, [rbp+var_18]
lea rax, [rbp+var_1B0]
mov r9d, 1
mov [rsp+1E0h+var_1E0], rax
call HKDF_Extract
lea rdi, [rbp+var_1B0]
add rdi, 110h
lea rdx, [rbp+var_1B0]
add rdx, 0F0h
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
lea rax, [rbp+var_1B0]
mov esi, 30h ; '0'
mov r9d, 1
mov [rsp+1E0h+var_1E0], rax
call HKDF_Expand
lea rdi, [rbp+var_1B0]
add rdi, 140h
mov esi, 40h ; '@'
call vec_zero
lea rdi, [rbp+var_1B0]
add rdi, 140h
lea rsi, [rbp+var_1B0]
add rsi, 110h
mov edx, 30h ; '0'
call limbs_from_be_bytes
lea rdi, [rbp+var_1B0]
add rdi, 140h
lea rsi, [rbp+var_1B0]
add rsi, 140h
lea rdx, BLS12_381_r
mov rcx, 0FFFFFFFEFFFFFFFFh
call redc_mont_256
lea rdi, [rbp+var_1B0]
add rdi, 140h
lea rsi, [rbp+var_1B0]
add rsi, 140h
lea rdx, BLS12_381_rRR
lea rcx, BLS12_381_r
mov r8, 0FFFFFFFEFFFFFFFFh
call mul_mont_sparse_256
cmp [rbp+arg_8], 4
jl short loc_A6689
lea rdi, [rbp+var_1B0]
add rdi, 140h
mov esi, 20h ; ' '
call vec_is_zero
cmp rax, 0
jnz short loc_A668B
loc_A6689:
jmp short loc_A66D6
loc_A668B:
lea rdi, [rbp+var_1B0]
call sha256_init
lea rdi, [rbp+var_1B0]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call sha256_update
lea rdi, [rbp+var_1D0]
lea rsi, [rbp+var_1B0]
call sha256_final
lea rax, [rbp+var_1D0]
mov [rbp+var_20], rax
mov [rbp+var_28], 20h ; ' '
jmp loc_A6549
loc_A66D6:
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_1B0]
add rsi, 140h
mov edx, 20h ; ' '
call le_bytes_from_limbs
lea rdi, [rbp+var_1B0]
mov esi, 180h
call vec_zero
loc_A6703:
add rsp, 1E0h
pop rbp
retn
|
long long keygen(
long long a1,
long long a2,
unsigned long long a3,
_WORD *a4,
long long a5,
long long a6,
long long a7,
int a8)
{
int v9; // [rsp+8h] [rbp-1D8h]
_WORD v10[12]; // [rsp+10h] [rbp-1D0h] BYREF
long long v11; // [rsp+28h] [rbp-1B8h]
_BYTE v12[240]; // [rsp+30h] [rbp-1B0h] BYREF
_BYTE v13[32]; // [rsp+120h] [rbp-C0h] BYREF
_BYTE v14[48]; // [rsp+140h] [rbp-A0h] BYREF
_BYTE v15[64]; // [rsp+170h] [rbp-70h] BYREF
long long v16; // [rsp+1B0h] [rbp-30h]
long long v17; // [rsp+1B8h] [rbp-28h]
_WORD *v18; // [rsp+1C0h] [rbp-20h]
unsigned long long v19; // [rsp+1C8h] [rbp-18h]
long long v20; // [rsp+1D0h] [rbp-10h]
long long v21; // [rsp+1D8h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = a5;
v16 = a6;
strcpy((char *)v10, "BLS-SIG-KEYGEN-SALT-");
HIBYTE(v10[10]) = 0;
v10[11] = 0;
v11 = 0LL;
if ( a3 < 0x20 || a8 > 4 && !v18 )
return vec_zero(v21, 32LL);
if ( v16 )
v9 = a7;
else
v9 = 0;
if ( !v18 )
{
v18 = v10;
v17 = 20LL;
}
if ( a8 != 4 )
goto LABEL_12;
do
{
sha256_init(v12);
sha256_update(v12, v18, v17);
sha256_final(v10, v12);
v18 = v10;
v17 = 32LL;
LABEL_12:
HKDF_Extract((unsigned int)v13, (_DWORD)v18, v17, v20, v19, 1, (long long)v12);
HKDF_Expand((unsigned int)v14, 48, (unsigned int)v13, v16, v9, 1, (long long)v12);
vec_zero(v15, 64LL);
limbs_from_be_bytes(v15, v14, 48LL);
redc_mont_256(v15, v15, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
mul_mont_sparse_256(v15, v15, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
}
while ( a8 >= 4 && vec_is_zero(v15, 32LL) );
le_bytes_from_limbs(v21, v15, 32LL);
return vec_zero(v12, 384LL);
}
|
keygen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1e0
MOV EAX,dword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
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 [0x001e6340]
MOV qword ptr [RBP + -0x1d0],RAX
MOV RAX,qword ptr [0x001e6348]
MOV qword ptr [RBP + -0x1c8],RAX
MOV RAX,qword ptr [0x001e6350]
MOV qword ptr [RBP + -0x1c0],RAX
MOV RAX,qword ptr [0x001e6358]
MOV qword ptr [RBP + -0x1b8],RAX
CMP qword ptr [RBP + -0x18],0x20
JC 0x001a64a6
CMP dword ptr [RBP + 0x18],0x4
JLE 0x001a64b9
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001a64b9
LAB_001a64a6:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x20
CALL 0x001a7170
JMP 0x001a6703
LAB_001a64b9:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001a64cb
XOR EAX,EAX
MOV qword ptr [RBP + -0x1d8],RAX
JMP 0x001a64d6
LAB_001a64cb:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x1d8],RAX
LAB_001a64d6:
MOV RAX,qword ptr [RBP + -0x1d8]
MOV qword ptr [RBP + 0x10],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001a64fb
LEA RAX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x14
LAB_001a64fb:
CMP dword ptr [RBP + 0x18],0x4
JNZ 0x001a6547
LEA RDI,[RBP + -0x1b0]
CALL 0x001b5af0
LEA RDI,[RBP + -0x1b0]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b5b40
LEA RDI,[RBP + -0x1d0]
LEA RSI,[RBP + -0x1b0]
CALL 0x001b5cd0
LEA RAX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x20
LAB_001a6547:
JMP 0x001a6549
LAB_001a6549:
LEA RDI,[RBP + -0x1b0]
ADD RDI,0xf0
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RBP + -0x18]
LEA RAX,[RBP + -0x1b0]
MOV R9D,0x1
MOV qword ptr [RSP],RAX
CALL 0x001b6680
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x110
LEA RDX,[RBP + -0x1b0]
ADD RDX,0xf0
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
LEA RAX,[RBP + -0x1b0]
MOV ESI,0x30
MOV R9D,0x1
MOV qword ptr [RSP],RAX
CALL 0x001b6730
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
MOV ESI,0x40
CALL 0x001a7170
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x110
MOV EDX,0x30
CALL 0x001b4d00
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x140
LEA RDX,[0x1e5e00]
MOV RCX,-0x100000001
CALL 0x001cb540
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x140
LEA RDX,[0x1e6310]
LEA RCX,[0x1e5e00]
MOV R8,-0x100000001
CALL 0x001cb080
CMP dword ptr [RBP + 0x18],0x4
JL 0x001a6689
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
MOV ESI,0x20
CALL 0x001a7680
CMP RAX,0x0
JNZ 0x001a668b
LAB_001a6689:
JMP 0x001a66d6
LAB_001a668b:
LEA RDI,[RBP + -0x1b0]
CALL 0x001b5af0
LEA RDI,[RBP + -0x1b0]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b5b40
LEA RDI,[RBP + -0x1d0]
LEA RSI,[RBP + -0x1b0]
CALL 0x001b5cd0
LEA RAX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x20
JMP 0x001a6549
LAB_001a66d6:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x140
MOV EDX,0x20
CALL 0x001b43a0
LEA RDI,[RBP + -0x1b0]
MOV ESI,0x180
CALL 0x001a7170
LAB_001a6703:
ADD RSP,0x1e0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int keygen(EVP_PKEY_CTX *ctx,EVP_PKEY *pkey)
{
int iVar1;
long lVar2;
char *in_RCX;
ulong in_RDX;
int8 in_R8;
long in_R9;
int8 in_stack_00000008;
int in_stack_00000010;
int8 local_1e0;
char local_1d8 [8];
char local_1d0 [8];
int8 local_1c8;
int8 local_1c0;
int1 local_1b8 [240];
int1 auStack_c8 [32];
int1 auStack_a8 [48];
int1 auStack_78 [64];
long local_38;
int8 local_30;
char *local_28;
ulong local_20;
EVP_PKEY *local_18;
EVP_PKEY_CTX *local_10;
local_1d8 = (char [8])s_BLS_SIG_KEYGEN_SALT__001e6340._0_8_;
local_1d0 = (char [8])s_BLS_SIG_KEYGEN_SALT__001e6340._8_8_;
local_1c8 = ram0x001e6350;
local_1c0 = DAT_001e6358;
local_18 = pkey;
local_10 = ctx;
if ((in_RDX < 0x20) || ((4 < in_stack_00000010 && (in_RCX == (char *)0x0)))) {
iVar1 = vec_zero(ctx,0x20);
}
else {
if (in_R9 == 0) {
local_1e0 = 0;
}
else {
local_1e0 = in_stack_00000008;
}
local_30 = in_R8;
local_28 = in_RCX;
if (in_RCX == (char *)0x0) {
local_28 = local_1d8;
local_30 = 0x14;
}
local_38 = in_R9;
local_20 = in_RDX;
if (in_stack_00000010 == 4) {
sha256_init(local_1b8);
sha256_update(local_1b8,local_28,local_30);
sha256_final(local_1d8,local_1b8);
local_28 = local_1d8;
local_30 = 0x20;
}
while( true ) {
HKDF_Extract(auStack_c8,local_28,local_30,local_18,local_20,1,local_1b8);
HKDF_Expand(auStack_a8,0x30,auStack_c8,local_38,local_1e0,1,local_1b8);
vec_zero(auStack_78,0x40);
limbs_from_be_bytes(auStack_78,auStack_a8,0x30);
redc_mont_256(auStack_78,auStack_78,BLS12_381_r,0xfffffffeffffffff);
mul_mont_sparse_256(auStack_78,auStack_78,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff);
if ((in_stack_00000010 < 4) || (lVar2 = vec_is_zero(auStack_78,0x20), lVar2 == 0)) break;
sha256_init(local_1b8);
sha256_update(local_1b8,local_28,local_30);
sha256_final(local_1d8,local_1b8);
local_28 = local_1d8;
local_30 = 0x20;
}
le_bytes_from_limbs(local_10,auStack_78,0x20);
iVar1 = vec_zero(local_1b8,0x180);
}
return iVar1;
}
|
|
12,363
|
js_date_setYear
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_date_setYear(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setYear(y)
double y;
JSValue args[1];
if (JS_ThisTimeValue(ctx, &y, this_val) || JS_ToFloat64(ctx, &y, argv[0]))
return JS_EXCEPTION;
y = +y;
if (isnan(y))
return JS_SetThisTimeValue(ctx, this_val, y);
if (isfinite(y)) {
y = trunc(y);
if (y >= 0 && y < 100)
y += 1900;
}
args[0] = js_float64(y);
return set_date_field(ctx, this_val, 1, args, 0x011);
}
|
O1
|
c
|
js_date_setYear:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x55df8
movl $0x6, %r12d
testl %eax, %eax
jne 0x55baa
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x26a6d
testl %eax, %eax
je 0x55bc5
xorl %eax, %eax
xorl %r13d, %r13d
movl %eax, %eax
orq %r13, %rax
movq %r12, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x55c62
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x55c29
callq 0xe140
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x55c29
movsd 0x475d3(%rip), %xmm1 # 0x9d1e8
ucomisd %xmm0, %xmm1
jbe 0x55c29
addsd 0x475cd(%rip), %xmm0 # 0x9d1f0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
movq $0x7, 0x8(%r8)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
movl $0x11, %r9d
callq 0x55a0d
movq %rdx, %r12
andq %rax, %r13
jmp 0x55baf
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x56328
jmp 0x55c57
|
js_date_setYear:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+48h+var_40]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
mov r12d, 6
test eax, eax
jnz short loc_55BAA
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+48h+var_40]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_55BC5
loc_55BAA:
xor eax, eax
xor r13d, r13d
loc_55BAF:
mov eax, eax
or rax, r13
mov rdx, r12
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_55BC5:
mov r13, 0FFFFFFFF00000000h
movsd xmm0, [rsp+48h+var_40]
ucomisd xmm0, xmm0
jp loc_55C62
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_55C29
call _trunc
movsd [rsp+48h+var_40], xmm0
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_55C29
movsd xmm1, cs:qword_9D1E8
ucomisd xmm1, xmm0
jbe short loc_55C29
addsd xmm0, cs:qword_9D1F0
movsd [rsp+48h+var_40], xmm0
loc_55C29:
mov rax, [rsp+48h+var_40]
lea r8, [rsp+48h+var_38]
mov [r8], rax
mov qword ptr [r8+8], 7
mov rdi, r15
mov rsi, r14
mov rdx, rbx
mov ecx, 1
mov r9d, 11h
call set_date_field
loc_55C57:
mov r12, rdx
and r13, rax
jmp loc_55BAF
loc_55C62:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
jmp short loc_55C57
|
unsigned long long js_date_setYear(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v7; // rdx
long long v8; // rax
unsigned long long v9; // r13
double v11; // xmm0_8
double v12; // [rsp+8h] [rbp-40h] BYREF
double v13[7]; // [rsp+10h] [rbp-38h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, &v12, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, &v12, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
LODWORD(v8) = 0;
v9 = 0LL;
}
else
{
v11 = v12;
if ( (*(_QWORD *)&v12 & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL )
{
v11 = trunc(a1, &v12, v7);
v12 = v11;
if ( v11 >= 0.0 && v11 < 100.0 )
{
v11 = v11 + 1900.0;
v12 = v11;
}
}
v13[0] = v12;
*(_QWORD *)&v13[1] = 7LL;
v8 = set_date_field(a1, a2, a3, 1, (long long)v13, 0x11u, v11);
v9 = v8 & 0xFFFFFFFF00000000LL;
}
return v9 | (unsigned int)v8;
}
|
js_date_setYear:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x00155df8
MOV R12D,0x6
TEST EAX,EAX
JNZ 0x00155baa
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x00126a6d
TEST EAX,EAX
JZ 0x00155bc5
LAB_00155baa:
XOR EAX,EAX
XOR R13D,R13D
LAB_00155baf:
MOV EAX,EAX
OR RAX,R13
MOV RDX,R12
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00155bc5:
MOV R13,-0x100000000
MOVSD XMM0,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM0
JP 0x00155c62
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JG 0x00155c29
CALL 0x0010e140
MOVSD qword ptr [RSP + 0x8],XMM0
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x00155c29
MOVSD XMM1,qword ptr [0x0019d1e8]
UCOMISD XMM1,XMM0
JBE 0x00155c29
ADDSD XMM0,qword ptr [0x0019d1f0]
MOVSD qword ptr [RSP + 0x8],XMM0
LAB_00155c29:
MOV RAX,qword ptr [RSP + 0x8]
LEA R8,[RSP + 0x10]
MOV qword ptr [R8],RAX
MOV qword ptr [R8 + 0x8],0x7
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
MOV ECX,0x1
MOV R9D,0x11
CALL 0x00155a0d
LAB_00155c57:
MOV R12,RDX
AND R13,RAX
JMP 0x00155baf
LAB_00155c62:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00156328
JMP 0x00155c57
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setYear(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
double local_40;
double local_38 [2];
iVar1 = JS_ThisTimeValue(param_1,&local_40,param_2,param_3);
if (iVar1 == 0) {
iVar1 = JS_ToFloat64(param_1,&local_40,*param_5,param_5[1]);
if (iVar1 == 0) {
if (NAN(local_40)) {
auVar4 = JS_SetThisTimeValue(param_1,param_2,param_3);
}
else {
if ((ulong)ABS(local_40) < 0x7ff0000000000000) {
local_40 = trunc(local_40);
if ((0.0 <= local_40) && (local_40 < DAT_0019d1e8)) {
local_40 = local_40 + _DAT_0019d1f0;
}
}
local_38[0] = local_40;
local_38[1] = 3.45845952088873e-323;
auVar4 = set_date_field(param_1,param_2,param_3,1,local_38,0x11);
}
uVar2 = auVar4._0_8_ & 0xffffffff00000000;
goto LAB_00155baf;
}
}
auVar4 = ZEXT816(6) << 0x40;
uVar2 = 0;
LAB_00155baf:
auVar3._0_8_ = auVar4._0_8_ & 0xffffffff | uVar2;
auVar3._8_8_ = auVar4._8_8_;
return auVar3;
}
|
|
12,364
|
js_date_setYear
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_date_setYear(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setYear(y)
double y;
JSValue args[1];
if (JS_ThisTimeValue(ctx, &y, this_val) || JS_ToFloat64(ctx, &y, argv[0]))
return JS_EXCEPTION;
y = +y;
if (isnan(y))
return JS_SetThisTimeValue(ctx, this_val, y);
if (isfinite(y)) {
y = trunc(y);
if (y >= 0 && y < 100)
y += 1900;
}
args[0] = js_float64(y);
return set_date_field(ctx, this_val, 1, args, 0x011);
}
|
O3
|
c
|
js_date_setYear:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x58fc9
movl $0x6, %r12d
testl %eax, %eax
jne 0x58cf1
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2712e
testl %eax, %eax
je 0x58d0c
xorl %eax, %eax
xorl %r13d, %r13d
movl %eax, %eax
orq %r13, %rax
movq %r12, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x58d96
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x58d60
callq 0xe140
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x58d60
movsd 0x47466(%rip), %xmm1 # 0xa01b8
ucomisd %xmm0, %xmm1
jbe 0x58d60
addsd 0x47460(%rip), %xmm0 # 0xa01c0
leaq 0x10(%rsp), %r8
movsd %xmm0, (%r8)
movq $0x7, 0x8(%r8)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
movl $0x11, %r9d
callq 0x58b54
movq %rdx, %r12
andq %rax, %r13
jmp 0x58cf6
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x594bc
jmp 0x58d8b
|
js_date_setYear:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+48h+var_40]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
mov r12d, 6
test eax, eax
jnz short loc_58CF1
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+48h+var_40]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_58D0C
loc_58CF1:
xor eax, eax
xor r13d, r13d
loc_58CF6:
mov eax, eax
or rax, r13
mov rdx, r12
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_58D0C:
mov r13, 0FFFFFFFF00000000h
movsd xmm0, [rsp+48h+var_40]
ucomisd xmm0, xmm0
jp short loc_58D96
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_58D60
call _trunc
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_58D60
movsd xmm1, cs:qword_A01B8
ucomisd xmm1, xmm0
jbe short loc_58D60
addsd xmm0, cs:qword_A01C0
loc_58D60:
lea r8, [rsp+48h+var_38]
movsd qword ptr [r8], xmm0
mov qword ptr [r8+8], 7
mov rdi, r15
mov rsi, r14
mov rdx, rbx
mov ecx, 1
mov r9d, 11h
call set_date_field
loc_58D8B:
mov r12, rdx
and r13, rax
jmp loc_58CF6
loc_58D96:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
jmp short loc_58D8B
|
unsigned long long js_date_setYear(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v7; // rdx
long long v8; // rax
unsigned long long v9; // r13
double v11; // xmm0_8
double v12; // [rsp+8h] [rbp-40h] BYREF
double v13[7]; // [rsp+10h] [rbp-38h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, &v12, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, &v12, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
LODWORD(v8) = 0;
v9 = 0LL;
}
else
{
v11 = v12;
if ( (*(_QWORD *)&v12 & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL )
{
v11 = trunc(a1, &v12, v7);
if ( v11 >= 0.0 && v11 < 100.0 )
v11 = v11 + 1900.0;
}
v13[0] = v11;
*(_QWORD *)&v13[1] = 7LL;
v8 = set_date_field(a1, a2, a3, 1, (long long)v13, 0x11u, v11);
v9 = v8 & 0xFFFFFFFF00000000LL;
}
return v9 | (unsigned int)v8;
}
|
js_date_setYear:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x00158fc9
MOV R12D,0x6
TEST EAX,EAX
JNZ 0x00158cf1
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x0012712e
TEST EAX,EAX
JZ 0x00158d0c
LAB_00158cf1:
XOR EAX,EAX
XOR R13D,R13D
LAB_00158cf6:
MOV EAX,EAX
OR RAX,R13
MOV RDX,R12
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00158d0c:
MOV R13,-0x100000000
MOVSD XMM0,qword ptr [RSP + 0x8]
UCOMISD XMM0,XMM0
JP 0x00158d96
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JG 0x00158d60
CALL 0x0010e140
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x00158d60
MOVSD XMM1,qword ptr [0x001a01b8]
UCOMISD XMM1,XMM0
JBE 0x00158d60
ADDSD XMM0,qword ptr [0x001a01c0]
LAB_00158d60:
LEA R8,[RSP + 0x10]
MOVSD qword ptr [R8],XMM0
MOV qword ptr [R8 + 0x8],0x7
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
MOV ECX,0x1
MOV R9D,0x11
CALL 0x00158b54
LAB_00158d8b:
MOV R12,RDX
AND R13,RAX
JMP 0x00158cf6
LAB_00158d96:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001594bc
JMP 0x00158d8b
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setYear(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
double local_40;
double local_38 [2];
iVar1 = JS_ThisTimeValue(param_1,&local_40,param_2,param_3);
if (iVar1 == 0) {
iVar1 = JS_ToFloat64(param_1,&local_40,*param_5,param_5[1]);
if (iVar1 == 0) {
if (NAN(local_40)) {
auVar4 = JS_SetThisTimeValue(param_1,param_2,param_3);
}
else {
if ((ulong)ABS(local_40) < 0x7ff0000000000000) {
local_40 = trunc(local_40);
if ((0.0 <= local_40) && (local_40 < DAT_001a01b8)) {
local_40 = local_40 + _DAT_001a01c0;
}
}
local_38[1] = 3.45845952088873e-323;
local_38[0] = local_40;
auVar4 = set_date_field(param_1,param_2,param_3,1,local_38,0x11);
}
uVar2 = auVar4._0_8_ & 0xffffffff00000000;
goto LAB_00158cf6;
}
}
auVar4 = ZEXT816(6) << 0x40;
uVar2 = 0;
LAB_00158cf6:
auVar3._0_8_ = auVar4._0_8_ & 0xffffffff | uVar2;
auVar3._8_8_ = auVar4._8_8_;
return auVar3;
}
|
|
12,365
|
mi_ft_convert_to_ft2
|
eloqsql/storage/myisam/ft_update.c
|
uint _mi_ft_convert_to_ft2(MI_INFO *info, uint keynr, uchar *key)
{
my_off_t root;
DYNAMIC_ARRAY *da=info->ft1_to_ft2;
MI_KEYDEF *keyinfo=&info->s->ft2_keyinfo;
uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end;
uint length, key_length;
DBUG_ENTER("_mi_ft_convert_to_ft2");
/* we'll generate one pageful at once, and insert the rest one-by-one */
/* calculating the length of this page ...*/
length=(keyinfo->block_length-2) / keyinfo->keylength;
set_if_smaller(length, da->elements);
length=length * keyinfo->keylength;
get_key_full_length_rdonly(key_length, key);
while (_mi_ck_delete(info, keynr, key, key_length) == 0)
{
/*
nothing to do here.
_mi_ck_delete() will populate info->ft1_to_ft2 with deleted keys
*/
}
/* creating pageful of keys */
mi_putint(info->buff,length+2,0);
memcpy(info->buff+2, key_ptr, length);
info->buff_used=info->page_changed=1; /* info->buff is used */
if ((root= _mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR ||
_mi_write_keypage(info,keyinfo,root,DFLT_INIT_HITS,info->buff))
DBUG_RETURN(-1);
/* inserting the rest of key values */
end= (uchar*) dynamic_array_ptr(da, da->elements);
for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength)
if(_mi_ck_real_write_btree(info, keyinfo, key_ptr, 0, &root, SEARCH_SAME))
DBUG_RETURN(-1);
/* now, writing the word key entry */
ft_intXstore(key+key_length, - (int) da->elements);
_mi_dpointer(info, key+key_length+HA_FT_WLEN, root);
DBUG_RETURN(_mi_ck_real_write_btree(info,
info->s->keyinfo+keynr,
key, 0,
&info->s->state.key_root[keynr],
SEARCH_SAME));
}
|
O3
|
c
|
mi_ft_convert_to_ft2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movq (%rdi), %rcx
movq 0x88(%rdi), %rsi
movzwl 0x1b6(%rcx), %eax
addl $-0x2, %eax
movq %rcx, -0x48(%rbp)
movzwl 0x1ba(%rcx), %ecx
cltd
idivl %ecx
movl 0x8(%rsi), %edx
cmpl %edx, %eax
cmovbl %eax, %edx
movzbl (%rbx), %r12d
cmpl $0xff, %r12d
je 0x74881
incl %r12d
jmp 0x74891
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %r12d
addl $0x3, %r12d
movq -0x48(%rbp), %rax
addq $0x1a8, %rax # imm = 0x1A8
movq %rax, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq (%rsi), %r13
imull %ecx, %edx
movq %rdx, -0x30(%rbp)
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x74d11
testl %eax, %eax
je 0x748ad
movq -0x30(%rbp), %rdx
leal 0x2(%rdx), %eax
movq 0x100(%r14), %rcx
movb %al, 0x1(%rcx)
movq 0x100(%r14), %rcx
movb %ah, (%rcx)
movq 0x100(%r14), %rdi
addq $0x2, %rdi
movl %edx, %edx
movq %r13, %rsi
movq %rdx, -0x30(%rbp)
callq 0x29080
movw $0x101, 0x33c(%r14) # imm = 0x101
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movl $0x3, %edx
callq 0x83f36
movq %rax, %rcx
movq %rax, -0x50(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq $-0x1, %rcx
je 0x749fb
movq 0x100(%r14), %r8
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %rcx, -0x58(%rbp)
movq %rcx, %rdx
movl $0x3, %ecx
callq 0x83d84
testl %eax, %eax
je 0x74953
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x749fb
movq -0x58(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl 0x8(%rcx), %eax
movl 0x14(%rcx), %esi
imull %eax, %esi
addq (%rcx), %rsi
addq -0x30(%rbp), %r13
movq %rsi, -0x30(%rbp)
cmpq %rsi, %r13
jae 0x749b2
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
leaq -0x50(%rbp), %r8
movl $0x4, %r9d
callq 0x8837f
testl %eax, %eax
jne 0x74949
movq -0x48(%rbp), %rax
movzwl 0x1ba(%rax), %eax
addq %rax, %r13
cmpq -0x30(%rbp), %r13
jb 0x74974
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x50(%rbp), %rdx
negl %eax
movl %r12d, %ecx
bswapl %eax
leaq (%rbx,%rcx), %rsi
addq $0x4, %rsi
movl %eax, -0x4(%rsi)
movq %r14, %rdi
callq 0x853f7
movq (%r14), %rax
movl %r15d, %r8d
imulq $0x70, %r8, %rsi
addq 0x218(%rax), %rsi
shlq $0x3, %r8
addq 0x98(%rax), %r8
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x4, %r9d
callq 0x8837f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_mi_ft_convert_to_ft2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdx
mov r15d, esi
mov r14, rdi
mov rcx, [rdi]
mov rsi, [rdi+88h]
movzx eax, word ptr [rcx+1B6h]
add eax, 0FFFFFFFEh
mov [rbp+var_48], rcx
movzx ecx, word ptr [rcx+1BAh]
cdq
idiv ecx
mov edx, [rsi+8]
cmp eax, edx
cmovb edx, eax
movzx r12d, byte ptr [rbx]
cmp r12d, 0FFh
jz short loc_74881
inc r12d
jmp short loc_74891
loc_74881:
movzx eax, word ptr [rbx+1]
rol ax, 8
movzx r12d, ax
add r12d, 3
loc_74891:
mov rax, [rbp+var_48]
add rax, 1A8h
mov [rbp+var_38], rax
mov [rbp+var_40], rsi
mov r13, [rsi]
imul edx, ecx
mov [rbp+var_30], rdx
loc_748AD:
mov rdi, r14
mov esi, r15d
mov rdx, rbx
mov ecx, r12d
call _mi_ck_delete
test eax, eax
jz short loc_748AD
mov rdx, [rbp+var_30]
lea eax, [rdx+2]
mov rcx, [r14+100h]
mov [rcx+1], al
mov rcx, [r14+100h]
mov [rcx], ah
mov rdi, [r14+100h]
add rdi, 2
mov edx, edx
mov rsi, r13
mov [rbp+var_30], rdx
call _memcpy
mov word ptr [r14+33Ch], 101h
mov rdi, r14
mov rsi, [rbp+var_38]
mov edx, 3
call _mi_new
mov rcx, rax
mov [rbp+var_50], rax
mov eax, 0FFFFFFFFh
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz loc_749FB
mov r8, [r14+100h]
mov rdi, r14
mov rsi, [rbp+var_38]
mov [rbp+var_58], rcx
mov rdx, rcx
mov ecx, 3
call _mi_write_keypage
test eax, eax
jz short loc_74953
loc_74949:
mov eax, 0FFFFFFFFh
jmp loc_749FB
loc_74953:
mov rdx, [rbp+var_58]
mov rcx, [rbp+var_40]
mov eax, [rcx+8]
mov esi, [rcx+14h]
imul esi, eax
add rsi, [rcx]
add r13, [rbp+var_30]
mov [rbp+var_30], rsi
cmp r13, rsi
jnb short loc_749B2
loc_74974:
mov rdi, r14
mov rsi, [rbp+var_38]
mov rdx, r13
xor ecx, ecx
lea r8, [rbp+var_50]
mov r9d, 4
call _mi_ck_real_write_btree
test eax, eax
jnz short loc_74949
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+1BAh]
add r13, rax
cmp r13, [rbp+var_30]
jb short loc_74974
mov rax, [rbp+var_40]
mov eax, [rax+8]
mov rdx, [rbp+var_50]
loc_749B2:
neg eax
mov ecx, r12d
bswap eax
lea rsi, [rbx+rcx]
add rsi, 4
mov [rsi-4], eax
mov rdi, r14
call _mi_dpointer
mov rax, [r14]
mov r8d, r15d
imul rsi, r8, 70h ; 'p'
add rsi, [rax+218h]
shl r8, 3
add r8, [rax+98h]
mov rdi, r14
mov rdx, rbx
xor ecx, ecx
mov r9d, 4
call _mi_ck_real_write_btree
loc_749FB:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mi_ft_convert_to_ft2(long long *a1, unsigned int a2, unsigned __int8 *a3)
{
long long *v6; // rsi
int v7; // eax
int v8; // ecx
unsigned int v9; // eax
unsigned int v10; // edx
int v11; // r12d
unsigned int v12; // r12d
long long v13; // r13
unsigned int v14; // edx
__int16 v15; // ax
long long v16; // rdi
long long v17; // rcx
long long result; // rax
long long v19; // r8
long long v20; // rdx
int v21; // eax
unsigned long long v22; // r13
long long v23; // rsi
long long v24; // [rsp+8h] [rbp-58h]
long long v25; // [rsp+10h] [rbp-50h] BYREF
long long v26; // [rsp+18h] [rbp-48h]
long long *v27; // [rsp+20h] [rbp-40h]
long long v28; // [rsp+28h] [rbp-38h]
unsigned long long v29; // [rsp+30h] [rbp-30h]
v6 = (long long *)a1[17];
v7 = *(unsigned __int16 *)(*a1 + 438) - 2;
v26 = *a1;
v8 = *(unsigned __int16 *)(v26 + 442);
v9 = v7 / v8;
v10 = *((_DWORD *)v6 + 2);
if ( v9 < v10 )
v10 = v9;
v11 = *a3;
if ( v11 == 255 )
v12 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8) + 3;
else
v12 = v11 + 1;
v28 = v26 + 424;
v27 = v6;
v13 = *v6;
v29 = v8 * v10;
while ( !(unsigned int)mi_ck_delete(a1, a2, a3, v12) )
;
v14 = v29;
v15 = v29 + 2;
*(_BYTE *)(a1[32] + 1) = v29 + 2;
*(_BYTE *)a1[32] = HIBYTE(v15);
v16 = a1[32] + 2;
v29 = v14;
memcpy(v16, v13, v14);
*((_WORD *)a1 + 414) = 257;
v17 = mi_new(a1, v28, 3LL);
v25 = v17;
result = 0xFFFFFFFFLL;
if ( v17 != -1 )
{
v24 = v17;
if ( (unsigned int)mi_write_keypage(a1, v28, v17, 3LL, a1[32]) )
return 0xFFFFFFFFLL;
v20 = v24;
v21 = *((_DWORD *)v27 + 2);
v22 = v29 + v13;
v29 = *v27 + (unsigned int)(v21 * *((_DWORD *)v27 + 5));
if ( v22 < v29 )
{
while ( !(unsigned int)mi_ck_real_write_btree(a1, v28, v22, 0LL, &v25, 4LL) )
{
v22 += *(unsigned __int16 *)(v26 + 442);
if ( v22 >= v29 )
{
v21 = *((_DWORD *)v27 + 2);
v20 = v25;
goto LABEL_15;
}
}
return 0xFFFFFFFFLL;
}
LABEL_15:
v23 = (long long)&a3[v12 + 4];
*(_DWORD *)(v23 - 4) = _byteswap_ulong(-v21);
mi_dpointer(a1, v23, v20, v12, v19);
return mi_ck_real_write_btree(
a1,
*(_QWORD *)(*a1 + 536) + 112LL * a2,
a3,
0LL,
*(_QWORD *)(*a1 + 152) + 8LL * a2,
4LL);
}
return result;
}
|
_mi_ft_convert_to_ft2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDX
MOV R15D,ESI
MOV R14,RDI
MOV RCX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x88]
MOVZX EAX,word ptr [RCX + 0x1b6]
ADD EAX,-0x2
MOV qword ptr [RBP + -0x48],RCX
MOVZX ECX,word ptr [RCX + 0x1ba]
CDQ
IDIV ECX
MOV EDX,dword ptr [RSI + 0x8]
CMP EAX,EDX
CMOVC EDX,EAX
MOVZX R12D,byte ptr [RBX]
CMP R12D,0xff
JZ 0x00174881
INC R12D
JMP 0x00174891
LAB_00174881:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX R12D,AX
ADD R12D,0x3
LAB_00174891:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1a8
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x40],RSI
MOV R13,qword ptr [RSI]
IMUL EDX,ECX
MOV qword ptr [RBP + -0x30],RDX
LAB_001748ad:
MOV RDI,R14
MOV ESI,R15D
MOV RDX,RBX
MOV ECX,R12D
CALL 0x00174d11
TEST EAX,EAX
JZ 0x001748ad
MOV RDX,qword ptr [RBP + -0x30]
LEA EAX,[RDX + 0x2]
MOV RCX,qword ptr [R14 + 0x100]
MOV byte ptr [RCX + 0x1],AL
MOV RCX,qword ptr [R14 + 0x100]
MOV byte ptr [RCX],AH
MOV RDI,qword ptr [R14 + 0x100]
ADD RDI,0x2
MOV EDX,EDX
MOV RSI,R13
MOV qword ptr [RBP + -0x30],RDX
CALL 0x00129080
MOV word ptr [R14 + 0x33c],0x101
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x3
CALL 0x00183f36
MOV RCX,RAX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,0xffffffff
CMP RCX,-0x1
JZ 0x001749fb
MOV R8,qword ptr [R14 + 0x100]
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RCX
MOV RDX,RCX
MOV ECX,0x3
CALL 0x00183d84
TEST EAX,EAX
JZ 0x00174953
LAB_00174949:
MOV EAX,0xffffffff
JMP 0x001749fb
LAB_00174953:
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RCX + 0x8]
MOV ESI,dword ptr [RCX + 0x14]
IMUL ESI,EAX
ADD RSI,qword ptr [RCX]
ADD R13,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RSI
CMP R13,RSI
JNC 0x001749b2
LAB_00174974:
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R13
XOR ECX,ECX
LEA R8,[RBP + -0x50]
MOV R9D,0x4
CALL 0x0018837f
TEST EAX,EAX
JNZ 0x00174949
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x1ba]
ADD R13,RAX
CMP R13,qword ptr [RBP + -0x30]
JC 0x00174974
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x50]
LAB_001749b2:
NEG EAX
MOV ECX,R12D
BSWAP EAX
LEA RSI,[RBX + RCX*0x1]
ADD RSI,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV RDI,R14
CALL 0x001853f7
MOV RAX,qword ptr [R14]
MOV R8D,R15D
IMUL RSI,R8,0x70
ADD RSI,qword ptr [RAX + 0x218]
SHL R8,0x3
ADD R8,qword ptr [RAX + 0x98]
MOV RDI,R14
MOV RDX,RBX
XOR ECX,ECX
MOV R9D,0x4
CALL 0x0018837f
LAB_001749fb:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _mi_ft_convert_to_ft2(long *param_1,uint param_2,byte *param_3)
{
void *__src;
uint uVar1;
int iVar2;
uint uVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
ulong uVar7;
long local_58;
long local_50;
long *local_48;
long local_40;
ulong local_38;
local_50 = *param_1;
local_48 = (long *)param_1[0x11];
uVar1 = (int)(*(ushort *)(local_50 + 0x1b6) - 2) / (int)(uint)*(ushort *)(local_50 + 0x1ba);
uVar3 = *(uint *)(local_48 + 1);
if (uVar1 < *(uint *)(local_48 + 1)) {
uVar3 = uVar1;
}
if (*param_3 == 0xff) {
uVar1 = (ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) + 3;
}
else {
uVar1 = *param_3 + 1;
}
local_40 = local_50 + 0x1a8;
__src = (void *)*local_48;
local_38 = (ulong)(uVar3 * *(ushort *)(local_50 + 0x1ba));
do {
iVar2 = _mi_ck_delete(param_1,param_2,param_3,uVar1);
} while (iVar2 == 0);
iVar2 = (int)local_38 + 2;
*(char *)(param_1[0x20] + 1) = (char)iVar2;
*(char *)param_1[0x20] = (char)((uint)iVar2 >> 8);
local_38 = local_38 & 0xffffffff;
memcpy((void *)(param_1[0x20] + 2),__src,local_38);
*(int2 *)((long)param_1 + 0x33c) = 0x101;
lVar4 = _mi_new(param_1,local_40,3);
uVar5 = 0xffffffff;
if (lVar4 != -1) {
local_58 = lVar4;
iVar2 = _mi_write_keypage(param_1,local_40,lVar4,3,param_1[0x20]);
if (iVar2 == 0) {
iVar2 = (int)local_48[1];
uVar6 = (ulong)(uint)(*(int *)((long)local_48 + 0x14) * iVar2) + *local_48;
uVar7 = (long)__src + local_38;
local_38 = uVar6;
if (uVar7 < uVar6) {
do {
iVar2 = _mi_ck_real_write_btree(param_1,local_40,uVar7,0,&local_58,4);
if (iVar2 != 0) goto LAB_00174949;
uVar7 = uVar7 + *(ushort *)(local_50 + 0x1ba);
} while (uVar7 < local_38);
iVar2 = (int)local_48[1];
lVar4 = local_58;
}
uVar3 = -iVar2;
*(uint *)(param_3 + uVar1) =
uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | iVar2 * -0x1000000;
_mi_dpointer(param_1,(uint *)((long)(param_3 + uVar1) + 4),lVar4);
uVar5 = _mi_ck_real_write_btree
(param_1,(ulong)param_2 * 0x70 + *(long *)(*param_1 + 0x218),param_3,0,
(ulong)param_2 * 8 + *(long *)(*param_1 + 0x98),4);
}
else {
LAB_00174949:
uVar5 = 0xffffffff;
}
}
return uVar5;
}
|
|
12,366
|
real_open_cached_file
|
eloqsql/mysys/mf_cache.c
|
my_bool real_open_cached_file(IO_CACHE *cache)
{
char name_buff[FN_REFLEN];
int error=1;
DBUG_ENTER("real_open_cached_file");
if ((cache->file= create_temp_file(name_buff, cache->dir,
cache->prefix[0] ? cache->prefix : 0,
O_BINARY, MYF(MY_WME | MY_TEMPORARY))) >= 0)
{
error=0;
}
DBUG_RETURN(error);
}
|
O3
|
c
|
real_open_cached_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
movq 0xc8(%rdi), %rsi
leaq 0xd0(%rdi), %rax
xorl %edx, %edx
cmpb $0x0, 0xd0(%rdi)
cmovneq %rax, %rdx
leaq -0x210(%rbp), %rdi
movl $0x50, %r8d
xorl %ecx, %ecx
callq 0xa8cf8
movl %eax, 0xd4(%rbx)
movq %fs:0x28, %rcx
cmpq -0x10(%rbp), %rcx
jne 0xa8afb
shrl $0x1f, %eax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %rbp
retq
callq 0x29250
|
real_open_cached_file:
push rbp
mov rbp, rsp
push rbx
sub rsp, 208h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_10], rax
mov rsi, [rdi+0C8h]
lea rax, [rdi+0D0h]
xor edx, edx
cmp byte ptr [rdi+0D0h], 0
cmovnz rdx, rax
lea rdi, [rbp+var_210]
mov r8d, 50h ; 'P'
xor ecx, ecx
call create_temp_file
mov [rbx+0D4h], eax
mov rcx, fs:28h
cmp rcx, [rbp+var_10]
jnz short loc_A8AFB
shr eax, 1Fh
add rsp, 208h
pop rbx
pop rbp
retn
loc_A8AFB:
call ___stack_chk_fail
|
long long real_open_cached_file(long long a1)
{
long long v1; // rdx
unsigned int temp_file; // eax
_BYTE v4[512]; // [rsp+0h] [rbp-210h] BYREF
unsigned long long v5; // [rsp+200h] [rbp-10h]
v5 = __readfsqword(0x28u);
v1 = 0LL;
if ( *(_BYTE *)(a1 + 208) )
v1 = a1 + 208;
temp_file = create_temp_file(v4, *(_QWORD *)(a1 + 200), v1, 0LL, 80LL);
*(_DWORD *)(a1 + 212) = temp_file;
return temp_file >> 31;
}
|
real_open_cached_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x208
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV RSI,qword ptr [RDI + 0xc8]
LEA RAX,[RDI + 0xd0]
XOR EDX,EDX
CMP byte ptr [RDI + 0xd0],0x0
CMOVNZ RDX,RAX
LEA RDI,[RBP + -0x210]
MOV R8D,0x50
XOR ECX,ECX
CALL 0x001a8cf8
MOV dword ptr [RBX + 0xd4],EAX
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x10]
JNZ 0x001a8afb
SHR EAX,0x1f
ADD RSP,0x208
POP RBX
POP RBP
RET
LAB_001a8afb:
CALL 0x00129250
|
uint real_open_cached_file(long param_1)
{
uint uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_218 [512];
long local_18;
local_18 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = 0;
if (*(char *)(param_1 + 0xd0) != '\0') {
lVar2 = param_1 + 0xd0;
}
uVar1 = create_temp_file(local_218,*(int8 *)(param_1 + 200),lVar2,0,0x50);
*(uint *)(param_1 + 0xd4) = uVar1;
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
return uVar1 >> 0x1f;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,367
|
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR20 auto write_float(OutputIt out, T value,
format_specs<Char> specs, locale_ref loc)
-> OutputIt {
float_specs fspecs = parse_float_type_spec(specs);
fspecs.sign = specs.sign;
if (detail::signbit(value)) { // value < 0 is false for NaN so use signbit.
fspecs.sign = sign::minus;
value = -value;
} else if (fspecs.sign == sign::minus) {
fspecs.sign = sign::none;
}
if (!detail::isfinite(value))
return write_nonfinite(out, detail::isnan(value), specs, fspecs);
if (specs.align == align::numeric && fspecs.sign) {
auto it = reserve(out, 1);
*it++ = detail::sign<Char>(fspecs.sign);
out = base_iterator(out, it);
fspecs.sign = sign::none;
if (specs.width != 0) --specs.width;
}
memory_buffer buffer;
if (fspecs.format == float_format::hex) {
if (fspecs.sign) buffer.push_back(detail::sign<char>(fspecs.sign));
format_hexfloat(convert_float(value), specs.precision, fspecs, buffer);
return write_bytes<align::right>(out, {buffer.data(), buffer.size()},
specs);
}
int precision = specs.precision >= 0 || specs.type == presentation_type::none
? specs.precision
: 6;
if (fspecs.format == float_format::exp) {
if (precision == max_value<int>())
throw_format_error("number is too big");
else
++precision;
} else if (fspecs.format != float_format::fixed && precision == 0) {
precision = 1;
}
if (const_check(std::is_same<T, float>())) fspecs.binary32 = true;
int exp = format_float(convert_float(value), precision, fspecs, buffer);
fspecs.precision = precision;
auto f = big_decimal_fp{buffer.data(), static_cast<int>(buffer.size()), exp};
return write_float(out, f, specs, fspecs, loc);
}
|
O0
|
c
|
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref):
subq $0x368, %rsp # imm = 0x368
movq %rdi, 0x350(%rsp)
movq %rsi, 0x340(%rsp)
movq %rdx, 0x348(%rsp)
movq %rcx, 0x338(%rsp)
movss %xmm0, 0x334(%rsp)
leaq 0x340(%rsp), %rdi
callq 0x989b0
movq %rax, 0x32c(%rsp)
movw 0x349(%rsp), %ax
shrw $0x4, %ax
andw $0x7, %ax
movzbl %al, %ecx
movl 0x330(%rsp), %eax
andl $0xff, %ecx
shll $0x8, %ecx
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl %ecx, %eax
movl %eax, 0x330(%rsp)
movss 0x334(%rsp), %xmm0
movss %xmm0, 0x364(%rsp)
movss 0x364(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x92560
testb $0x1, %al
jne 0xa9bf0
jmp 0xa9c29
movl 0x330(%rsp), %eax
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl $0x100, %eax # imm = 0x100
movl %eax, 0x330(%rsp)
movss 0x334(%rsp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, 0x334(%rsp)
jmp 0xa9c58
movl 0x330(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xa9c56
movl 0x330(%rsp), %eax
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl $0x0, %eax
movl %eax, 0x330(%rsp)
jmp 0xa9c58
movss 0x334(%rsp), %xmm0
callq 0xaa240
testb $0x1, %al
jne 0xa9ce0
movq 0x350(%rsp), %rax
movq %rax, 0x320(%rsp)
movss 0x334(%rsp), %xmm0
callq 0xaa270
movq 0x340(%rsp), %rcx
movq %rcx, 0x310(%rsp)
movq 0x348(%rsp), %rcx
movq %rcx, 0x318(%rsp)
movq 0x320(%rsp), %rdi
movq 0x310(%rsp), %rdx
movq 0x318(%rsp), %rcx
movzbl %al, %esi
andl $0x1, %esi
leaq 0x32c(%rsp), %r8
callq 0x92330
movq %rax, 0x358(%rsp)
jmp 0xaa166
movw 0x349(%rsp), %ax
andw $0xf, %ax
movzbl %al, %eax
cmpl $0x4, %eax
jne 0xa9dfe
movl 0x330(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
cmpb $0x0, %al
je 0xa9dfe
leaq 0x350(%rsp), %rdi
movl $0x1, %esi
callq 0x8d9c0
movq (%rax), %rax
movq %rax, 0x308(%rsp)
movl 0x330(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movzbl %al, %edi
callq 0x92880
movb %al, 0x307(%rsp)
leaq 0x308(%rsp), %rdi
xorl %esi, %esi
callq 0x24320
movq %rax, 0x2f8(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0x24340
movq %rax, %rdi
leaq 0x307(%rsp), %rsi
callq 0x24350
movq 0x350(%rsp), %rax
movq %rax, 0x2e8(%rsp)
movq 0x308(%rsp), %rax
movq %rax, 0x2e0(%rsp)
movq 0x2e8(%rsp), %rdi
movq 0x2e0(%rsp), %rsi
callq 0x8daf0
movq %rax, 0x2f0(%rsp)
movq 0x2f0(%rsp), %rax
movq %rax, 0x350(%rsp)
movl 0x330(%rsp), %eax
andl $0xffff00ff, %eax # imm = 0xFFFF00FF
orl $0x0, %eax
movl %eax, 0x330(%rsp)
cmpl $0x0, 0x340(%rsp)
je 0xa9dfc
movl 0x340(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x340(%rsp)
jmp 0xa9dfe
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x14c90
movq 0x48(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x87c70
jmp 0xa9e24
leaq 0xc7(%rsp), %rdi
callq 0x14750
movl 0x330(%rsp), %eax
andl $0xff, %eax
cmpb $0x3, %al
jne 0xa9faa
movl 0x330(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
cmpb $0x0, %al
je 0xa9ed1
movzbl 0x331(%rsp), %edi
callq 0x92880
movb %al, 0xb3(%rsp)
leaq 0xc8(%rsp), %rdi
leaq 0xb3(%rsp), %rsi
callq 0x24380
jmp 0xa9e83
jmp 0xa9ed1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc7(%rsp), %rdi
callq 0x14750
jmp 0xaa176
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x87cd0
jmp 0xaa176
movss 0x334(%rsp), %xmm0
callq 0xaa6c0
movsd %xmm0, 0x40(%rsp)
jmp 0xa9ee7
movsd 0x40(%rsp), %xmm0
movl 0x344(%rsp), %edi
movq 0x32c(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0xaa290
jmp 0xa9f1b
movq 0x350(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0xc8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x23b10
movq 0x28(%rsp), %rdi
movq %rax, 0x30(%rsp)
callq 0x23b20
movq 0x30(%rsp), %rsi
movq %rax, %rdx
leaq 0x90(%rsp), %rdi
callq 0x23b30
movq 0xa0(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x340(%rsp), %rcx
callq 0x99190
movq %rax, 0x38(%rsp)
jmp 0xa9f8d
movq 0x38(%rsp), %rax
movq %rax, 0x358(%rsp)
movl $0x1, 0x8c(%rsp)
jmp 0xaa159
cmpl $0x0, 0x344(%rsp)
jge 0xa9fbe
cmpb $0x0, 0x348(%rsp)
jne 0xa9fcb
movl 0x344(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0xa9fd6
movl $0x6, %eax
movl %eax, 0x24(%rsp)
jmp 0xa9fd6
movl 0x24(%rsp), %eax
movl %eax, 0x88(%rsp)
movl 0x330(%rsp), %eax
andl $0xff, %eax
cmpb $0x1, %al
jne 0xaa02c
movl 0x88(%rsp), %eax
movl %eax, 0x20(%rsp)
callq 0x94350
movl %eax, %ecx
movl 0x20(%rsp), %eax
cmpl %ecx, %eax
jne 0xaa019
leaq 0x6608e(%rip), %rdi # 0x1100a0
callq 0x86600
jmp 0xaa019
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0xaa053
movl 0x330(%rsp), %eax
andl $0xff, %eax
cmpb $0x2, %al
je 0xaa051
cmpl $0x0, 0x88(%rsp)
jne 0xaa051
movl $0x1, 0x88(%rsp)
jmp 0xaa053
movb 0x332(%rsp), %al
orb $0x4, %al
movb %al, 0x332(%rsp)
movss 0x334(%rsp), %xmm0
callq 0xaa6c0
movsd %xmm0, 0x18(%rsp)
jmp 0xaa079
movsd 0x18(%rsp), %xmm0
movl 0x88(%rsp), %edi
movq 0x32c(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0xaa6e0
movl %eax, 0x14(%rsp)
jmp 0xaa0ab
movl 0x14(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x88(%rsp), %eax
movl %eax, 0x32c(%rsp)
leaq 0xc8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x23b10
movq (%rsp), %rdi
movq %rax, 0x68(%rsp)
callq 0x23b20
movl %eax, 0x70(%rsp)
movl 0x84(%rsp), %eax
movl %eax, 0x74(%rsp)
movq 0x350(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x32c(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x338(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %r8
leaq 0x68(%rsp), %rsi
leaq 0x340(%rsp), %rdx
callq 0x99650
movq %rax, 0x8(%rsp)
jmp 0xaa141
movq 0x8(%rsp), %rax
movq %rax, 0x358(%rsp)
movl $0x1, 0x8c(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x87cd0
movq 0x358(%rsp), %rax
addq $0x368, %rsp # imm = 0x368
retq
movq 0xb8(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN3fmt3v106detail11write_floatIcNS0_8appenderEfEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE:
sub rsp, 368h
mov [rsp+368h+var_18], rdi
mov [rsp+368h+var_28], rsi
mov [rsp+368h+var_20], rdx
mov [rsp+368h+var_30], rcx
movss [rsp+368h+var_34], xmm0
lea rdi, [rsp+368h+var_28]
call _ZN3fmt3v106detail21parse_float_type_specIcEENS1_11float_specsERKNS0_12format_specsIT_EE; fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&)
mov [rsp+368h+var_3C], rax
mov ax, word ptr [rsp+368h+var_20+1]
shr ax, 4
and ax, 7
movzx ecx, al
mov eax, dword ptr [rsp+368h+var_3C+4]
and ecx, 0FFh
shl ecx, 8
and eax, 0FFFF00FFh
or eax, ecx
mov dword ptr [rsp+368h+var_3C+4], eax
movss xmm0, [rsp+368h+var_34]
movss [rsp+368h+var_4], xmm0
movss xmm0, [rsp+368h+var_4]
cvtss2sd xmm0, xmm0; double
call _ZSt7signbitd; std::signbit(double)
test al, 1
jnz short loc_A9BF0
jmp short loc_A9C29
loc_A9BF0:
mov eax, dword ptr [rsp+368h+var_3C+4]
and eax, 0FFFF00FFh
or eax, 100h
mov dword ptr [rsp+368h+var_3C+4], eax
movss xmm0, [rsp+368h+var_34]
movd eax, xmm0
xor eax, 80000000h
movd xmm0, eax
movss [rsp+368h+var_34], xmm0
jmp short loc_A9C58
loc_A9C29:
mov eax, dword ptr [rsp+368h+var_3C+4]
shr eax, 8
and eax, 0FFh
movzx eax, al
cmp eax, 1
jnz short loc_A9C56
mov eax, dword ptr [rsp+368h+var_3C+4]
and eax, 0FFFF00FFh
or eax, 0
mov dword ptr [rsp+368h+var_3C+4], eax
loc_A9C56:
jmp short $+2
loc_A9C58:
movss xmm0, [rsp+368h+var_34]
call _ZN3fmt3v106detail8isfiniteIfTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_
test al, 1
jnz short loc_A9CE0
mov rax, [rsp+368h+var_18]
mov [rsp+368h+var_48], rax
movss xmm0, [rsp+368h+var_34]
call _ZN3fmt3v106detail5isnanIfEEbT_; fmt::v10::detail::isnan<float>(float)
mov rcx, [rsp+368h+var_28]
mov [rsp+368h+var_58], rcx
mov rcx, [rsp+368h+var_20]
mov [rsp+368h+var_50], rcx
mov rdi, [rsp+368h+var_48]
mov rdx, [rsp+368h+var_58]
mov rcx, [rsp+368h+var_50]
movzx esi, al
and esi, 1
lea r8, [rsp+368h+var_3C]
call _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT_EERKNS1_11float_specsE; fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(fmt::v10::appender,bool,fmt::v10::format_specs<char>,fmt::v10::detail::float_specs const&)
mov [rsp+368h+var_10], rax
jmp loc_AA166
loc_A9CE0:
mov ax, word ptr [rsp+368h+var_20+1]
and ax, 0Fh
movzx eax, al
cmp eax, 4
jnz loc_A9DFE
mov eax, dword ptr [rsp+368h+var_3C+4]
shr eax, 8
and eax, 0FFh
cmp al, 0
jz loc_A9DFE
lea rdi, [rsp+368h+var_18]
mov esi, 1
call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong)
mov rax, [rax]
mov [rsp+368h+var_60], rax
mov eax, dword ptr [rsp+368h+var_3C+4]
shr eax, 8
and eax, 0FFh
movzx edi, al
call _ZN3fmt3v106detail4signIcNS0_4sign4typeEEET_T0_; fmt::v10::detail::sign<char,fmt::v10::sign::type>(fmt::v10::sign::type)
mov [rsp+368h+var_61], al
lea rdi, [rsp+368h+var_60]
xor esi, esi
call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int)
mov [rsp+368h+var_70], rax
lea rdi, [rsp+368h+var_70]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+368h+var_61]
call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&)
mov rax, [rsp+368h+var_18]
mov [rsp+368h+var_80], rax
mov rax, [rsp+368h+var_60]
mov [rsp+368h+var_88], rax
mov rdi, [rsp+368h+var_80]
mov rsi, [rsp+368h+var_88]
call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender)
mov [rsp+368h+var_78], rax
mov rax, [rsp+368h+var_78]
mov [rsp+368h+var_18], rax
mov eax, dword ptr [rsp+368h+var_3C+4]
and eax, 0FFFF00FFh
or eax, 0
mov dword ptr [rsp+368h+var_3C+4], eax
cmp dword ptr [rsp+368h+var_28], 0
jz short loc_A9DFC
mov eax, dword ptr [rsp+368h+var_28]
add eax, 0FFFFFFFFh
mov dword ptr [rsp+368h+var_28], eax
loc_A9DFC:
jmp short $+2
loc_A9DFE:
lea rdi, [rsp+368h+var_2A1]
mov [rsp+368h+var_320], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+368h+var_320]; char *
lea rdi, [rsp+368h+var_2A0]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&)
jmp short $+2
loc_A9E24:
lea rdi, [rsp+368h+var_2A1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov eax, dword ptr [rsp+368h+var_3C+4]
and eax, 0FFh
cmp al, 3
jnz loc_A9FAA
mov eax, dword ptr [rsp+368h+var_3C+4]
shr eax, 8
and eax, 0FFh
cmp al, 0
jz short loc_A9ED1
movzx edi, byte ptr [rsp+368h+var_3C+5]
call _ZN3fmt3v106detail4signIcNS0_4sign4typeEEET_T0_; fmt::v10::detail::sign<char,fmt::v10::sign::type>(fmt::v10::sign::type)
mov [rsp+368h+var_2B5], al
lea rdi, [rsp+368h+var_2A0]
lea rsi, [rsp+368h+var_2B5]
call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&)
jmp short $+2
loc_A9E83:
jmp short loc_A9ED1
mov rcx, rax
mov eax, edx
mov [rsp+arg_B0], rcx
mov [rsp+arg_AC], eax
lea rdi, [rsp+arg_BF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_AA176
mov rcx, rax
mov eax, edx
mov [rsp+arg_B0], rcx
mov [rsp+arg_AC], eax
lea rdi, [rsp+arg_C0]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
jmp loc_AA176
loc_A9ED1:
movss xmm0, [rsp+368h+var_34]
call _ZN3fmt3v106detail13convert_floatIfEENSt11conditionalIXoosr3std7is_sameIT_fEE5valueeqcl8num_bitsIS4_EEclL_ZNS1_8num_bitsIdEEivEEEdS4_E4typeES4_
movsd [rsp+368h+var_328], xmm0
jmp short $+2
loc_A9EE7:
movsd xmm0, [rsp+368h+var_328]
mov edi, dword ptr [rsp+368h+var_28+4]
mov rax, [rsp+368h+var_3C]
mov [rsp+368h+var_2C0], rax
mov rsi, [rsp+368h+var_2C0]
lea rdx, [rsp+368h+var_2A0]
call _ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE
jmp short $+2
loc_A9F1B:
mov rax, [rsp+368h+var_18]
mov [rsp+368h+var_2C8], rax
lea rdi, [rsp+368h+var_2A0]
mov [rsp+368h+var_340], rdi
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, [rsp+368h+var_340]
mov [rsp+368h+var_338], rax
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov rsi, [rsp+368h+var_338]
mov rdx, rax
lea rdi, [rsp+368h+var_2D8]
call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong)
mov rdi, [rsp+368h+var_2C8]
mov rsi, [rsp+368h+var_2D8]
mov rdx, [rsp+368h+var_2D0]
lea rcx, [rsp+368h+var_28]
call _ZN3fmt3v106detail11write_bytesILNS0_5align4typeE2EcNS0_8appenderEEET1_S6_NS0_17basic_string_viewIcEERKNS0_12format_specsIT0_EE; fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)
mov [rsp+368h+var_330], rax
jmp short $+2
loc_A9F8D:
mov rax, [rsp+368h+var_330]
mov [rsp+368h+var_10], rax
mov [rsp+368h+var_2DC], 1
jmp loc_AA159
loc_A9FAA:
cmp dword ptr [rsp+368h+var_28+4], 0
jge short loc_A9FBE
cmp byte ptr [rsp+368h+var_20], 0
jnz short loc_A9FCB
loc_A9FBE:
mov eax, dword ptr [rsp+368h+var_28+4]
mov [rsp+368h+var_344], eax
jmp short loc_A9FD6
loc_A9FCB:
mov eax, 6
mov [rsp+368h+var_344], eax
jmp short $+2
loc_A9FD6:
mov eax, [rsp+368h+var_344]
mov [rsp+368h+var_2E0], eax
mov eax, dword ptr [rsp+368h+var_3C+4]
and eax, 0FFh
cmp al, 1
jnz short loc_AA02C
mov eax, [rsp+368h+var_2E0]
mov [rsp+368h+var_348], eax
call _ZN3fmt3v106detail9max_valueIiEET_v; fmt::v10::detail::max_value<int>(void)
mov ecx, eax
mov eax, [rsp+368h+var_348]
cmp eax, ecx
jnz short loc_AA019
lea rdi, aNumberIsTooBig; "number is too big"
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
jmp short $+2
loc_AA019:
mov eax, [rsp+368h+var_2E0]
add eax, 1
mov [rsp+368h+var_2E0], eax
jmp short loc_AA053
loc_AA02C:
mov eax, dword ptr [rsp+368h+var_3C+4]
and eax, 0FFh
cmp al, 2
jz short loc_AA051
cmp [rsp+368h+var_2E0], 0
jnz short loc_AA051
mov [rsp+368h+var_2E0], 1
loc_AA051:
jmp short $+2
loc_AA053:
mov al, byte ptr [rsp+368h+var_3C+6]
or al, 4
mov byte ptr [rsp+368h+var_3C+6], al
movss xmm0, [rsp+368h+var_34]
call _ZN3fmt3v106detail13convert_floatIfEENSt11conditionalIXoosr3std7is_sameIT_fEE5valueeqcl8num_bitsIS4_EEclL_ZNS1_8num_bitsIdEEivEEEdS4_E4typeES4_
movsd [rsp+368h+var_350], xmm0
jmp short $+2
loc_AA079:
movsd xmm0, [rsp+368h+var_350]
mov edi, [rsp+368h+var_2E0]
mov rax, [rsp+368h+var_3C]
mov [rsp+368h+var_2F0], rax
mov rsi, [rsp+368h+var_2F0]
lea rdx, [rsp+368h+var_2A0]
call _ZN3fmt3v106detail12format_floatIdEEiT_iNS1_11float_specsERNS1_6bufferIcEE; fmt::v10::detail::format_float<double>(double,int,fmt::v10::detail::float_specs,fmt::v10::detail::buffer<char> &)
mov [rsp+368h+var_354], eax
jmp short $+2
loc_AA0AB:
mov eax, [rsp+368h+var_354]
mov [rsp+368h+var_2E4], eax
mov eax, [rsp+368h+var_2E0]
mov dword ptr [rsp+368h+var_3C], eax
lea rdi, [rsp+368h+var_2A0]
mov [rsp+368h+var_368], rdi
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, [rsp+368h+var_368]
mov [rsp+368h+var_300], rax
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov [rsp+368h+var_2F8], eax
mov eax, [rsp+368h+var_2E4]
mov [rsp+368h+var_2F4], eax
mov rax, [rsp+368h+var_18]
mov [rsp+368h+var_308], rax
mov rax, [rsp+368h+var_3C]
mov [rsp+368h+var_310], rax
mov rax, [rsp+368h+var_30]
mov [rsp+368h+var_318], rax
mov rdi, [rsp+368h+var_308]
mov rcx, [rsp+368h+var_310]
mov r8, [rsp+368h+var_318]
lea rsi, [rsp+368h+var_300]
lea rdx, [rsp+368h+var_28]
call _ZN3fmt3v106detail11write_floatINS0_8appenderENS1_14big_decimal_fpEcEET_S5_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>(fmt::v10::appender,fmt::v10::detail::big_decimal_fp const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref)
mov [rsp+368h+var_360], rax
jmp short $+2
loc_AA141:
mov rax, [rsp+368h+var_360]
mov [rsp+368h+var_10], rax
mov [rsp+368h+var_2DC], 1
loc_AA159:
lea rdi, [rsp+368h+var_2A0]
call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer()
loc_AA166:
mov rax, [rsp+368h+var_10]
add rsp, 368h
retn
loc_AA176:
mov rdi, [rsp+arg_B0]
call __Unwind_Resume
|
long long fmt::v10::detail::write_float<char,fmt::v10::appender,float>(
long long a1,
const char *a2,
long long a3,
long long a4,
float a5)
{
long long v5; // rax
char v6; // al
_QWORD *v7; // rax
long long v8; // rax
const char *v9; // rsi
double v11; // [rsp+18h] [rbp-350h]
int v12; // [rsp+24h] [rbp-344h]
long long v13; // [rsp+30h] [rbp-338h]
double v14; // [rsp+40h] [rbp-328h]
long long v15; // [rsp+68h] [rbp-300h] BYREF
int v16; // [rsp+70h] [rbp-2F8h]
int v17; // [rsp+74h] [rbp-2F4h]
long long v18; // [rsp+78h] [rbp-2F0h]
int v19; // [rsp+84h] [rbp-2E4h]
unsigned int v20; // [rsp+88h] [rbp-2E0h]
int v21; // [rsp+8Ch] [rbp-2DCh]
long long v22[2]; // [rsp+90h] [rbp-2D8h] BYREF
long long v23; // [rsp+A0h] [rbp-2C8h]
long long v24; // [rsp+A8h] [rbp-2C0h]
char v25[20]; // [rsp+B3h] [rbp-2B5h] BYREF
char v26; // [rsp+C7h] [rbp-2A1h] BYREF
_QWORD v27[69]; // [rsp+C8h] [rbp-2A0h] BYREF
long long v28; // [rsp+2F0h] [rbp-78h]
long long v29; // [rsp+2F8h] [rbp-70h] BYREF
char v30; // [rsp+307h] [rbp-61h] BYREF
long long v31[3]; // [rsp+308h] [rbp-60h] BYREF
long long v32; // [rsp+320h] [rbp-48h]
long long v33; // [rsp+32Ch] [rbp-3Ch] BYREF
float v34; // [rsp+334h] [rbp-34h]
long long v35; // [rsp+338h] [rbp-30h]
const char *v36; // [rsp+340h] [rbp-28h] BYREF
long long v37; // [rsp+348h] [rbp-20h]
long long v38; // [rsp+350h] [rbp-18h] BYREF
long long v39; // [rsp+358h] [rbp-10h]
float v40; // [rsp+364h] [rbp-4h]
v38 = a1;
v36 = a2;
v37 = a3;
v35 = a4;
v34 = a5;
v5 = fmt::v10::detail::parse_float_type_spec<char>((long long)&v36, a2);
LODWORD(v33) = v5;
HIDWORD(v33) = (((*(_WORD *)((char *)&v37 + 1) >> 4) & 7) << 8) | HIDWORD(v5) & 0xFFFF00FF;
v40 = a5;
if ( std::signbit(a5) )
{
HIDWORD(v33) = HIDWORD(v33) & 0xFFFF00FF | 0x100;
LODWORD(v34) = _mm_cvtsi128_si32((__m128i)LODWORD(v34)) ^ 0x80000000;
}
else if ( BYTE5(v33) == 1 )
{
HIDWORD(v33) &= 0xFFFF00FF;
}
if ( (ZN3fmt3v106detail8isfiniteIfTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_(v34) & 1) != 0 )
{
if ( (BYTE1(v37) & 0xF) == 4 )
{
if ( BYTE5(v33) )
{
v31[0] = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v38);
v30 = fmt::v10::detail::sign<char,fmt::v10::sign::type>(BYTE5(v33));
v29 = fmt::v10::appender::operator++((long long)v31);
v7 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v29);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v7, (long long)&v30);
v27[68] = v38;
v27[67] = v31[0];
v28 = fmt::v10::detail::base_iterator<fmt::v10::appender>(v38, v31[0]);
v38 = v28;
HIDWORD(v33) &= 0xFFFF00FF;
if ( (_DWORD)v36 )
LODWORD(v36) = (_DWORD)v36 - 1;
}
}
std::allocator<char>::allocator();
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(v27, (long long)&v26);
std::allocator<char>::~allocator(&v26, &v26);
if ( BYTE4(v33) == 3 )
{
if ( BYTE5(v33) )
{
v25[0] = fmt::v10::detail::sign<char,fmt::v10::sign::type>(BYTE5(v33));
fmt::v10::detail::buffer<char>::push_back((long long)v27, v25);
}
v14 = fmt::v10::detail::convert_float<float>(v34);
v24 = v33;
ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE(
HIDWORD(v36),
v33,
v27,
v14);
v23 = v38;
v13 = fmt::v10::detail::buffer<char>::data((long long)v27);
v8 = fmt::v10::detail::buffer<char>::size((long long)v27);
fmt::v10::basic_string_view<char>::basic_string_view(v22, v13, v8);
v9 = (const char *)v22[0];
v39 = fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(
v23,
v22[0],
v22[1],
(long long)&v36);
v21 = 1;
}
else
{
if ( SHIDWORD(v36) < 0 && (_BYTE)v37 )
v12 = 6;
else
v12 = HIDWORD(v36);
v20 = v12;
if ( BYTE4(v33) == 1 )
{
if ( v20 == (unsigned int)fmt::v10::detail::max_value<int>((long long)&v26) )
fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", &v26);
++v20;
}
else if ( BYTE4(v33) != 2 && !v20 )
{
v20 = 1;
}
BYTE6(v33) |= 4u;
v11 = fmt::v10::detail::convert_float<float>(v34);
v18 = v33;
v19 = fmt::v10::detail::format_float<double>(v20, v33, v27, v11);
LODWORD(v33) = v20;
v15 = fmt::v10::detail::buffer<char>::data((long long)v27);
v16 = fmt::v10::detail::buffer<char>::size((long long)v27);
v17 = v19;
v9 = (const char *)&v15;
v39 = fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>(
v38,
&v15,
&v36,
v33,
v35);
v21 = 1;
}
fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer((long long)v27, v9);
}
else
{
v32 = v38;
v6 = fmt::v10::detail::isnan<float>(v34);
v31[1] = (long long)v36;
v31[2] = v37;
return fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(v32, v6 & 1, (long long)v36, v37, (long long)&v33);
}
return v39;
}
|
write_float<char,fmt::v10::appender,float>:
SUB RSP,0x368
MOV qword ptr [RSP + 0x350],RDI
MOV qword ptr [RSP + 0x340],RSI
MOV qword ptr [RSP + 0x348],RDX
MOV qword ptr [RSP + 0x338],RCX
MOVSS dword ptr [RSP + 0x334],XMM0
LEA RDI,[RSP + 0x340]
CALL 0x001989b0
MOV qword ptr [RSP + 0x32c],RAX
MOV AX,word ptr [RSP + 0x349]
SHR AX,0x4
AND AX,0x7
MOVZX ECX,AL
MOV EAX,dword ptr [RSP + 0x330]
AND ECX,0xff
SHL ECX,0x8
AND EAX,0xffff00ff
OR EAX,ECX
MOV dword ptr [RSP + 0x330],EAX
MOVSS XMM0,dword ptr [RSP + 0x334]
MOVSS dword ptr [RSP + 0x364],XMM0
MOVSS XMM0,dword ptr [RSP + 0x364]
CVTSS2SD XMM0,XMM0
CALL 0x00192560
TEST AL,0x1
JNZ 0x001a9bf0
JMP 0x001a9c29
LAB_001a9bf0:
MOV EAX,dword ptr [RSP + 0x330]
AND EAX,0xffff00ff
OR EAX,0x100
MOV dword ptr [RSP + 0x330],EAX
MOVSS XMM0,dword ptr [RSP + 0x334]
MOVD EAX,XMM0
XOR EAX,0x80000000
MOVD XMM0,EAX
MOVSS dword ptr [RSP + 0x334],XMM0
JMP 0x001a9c58
LAB_001a9c29:
MOV EAX,dword ptr [RSP + 0x330]
SHR EAX,0x8
AND EAX,0xff
MOVZX EAX,AL
CMP EAX,0x1
JNZ 0x001a9c56
MOV EAX,dword ptr [RSP + 0x330]
AND EAX,0xffff00ff
OR EAX,0x0
MOV dword ptr [RSP + 0x330],EAX
LAB_001a9c56:
JMP 0x001a9c58
LAB_001a9c58:
MOVSS XMM0,dword ptr [RSP + 0x334]
CALL 0x001aa240
TEST AL,0x1
JNZ 0x001a9ce0
MOV RAX,qword ptr [RSP + 0x350]
MOV qword ptr [RSP + 0x320],RAX
MOVSS XMM0,dword ptr [RSP + 0x334]
CALL 0x001aa270
MOV RCX,qword ptr [RSP + 0x340]
MOV qword ptr [RSP + 0x310],RCX
MOV RCX,qword ptr [RSP + 0x348]
MOV qword ptr [RSP + 0x318],RCX
MOV RDI,qword ptr [RSP + 0x320]
MOV RDX,qword ptr [RSP + 0x310]
MOV RCX,qword ptr [RSP + 0x318]
MOVZX ESI,AL
AND ESI,0x1
LEA R8,[RSP + 0x32c]
CALL 0x00192330
MOV qword ptr [RSP + 0x358],RAX
JMP 0x001aa166
LAB_001a9ce0:
MOV AX,word ptr [RSP + 0x349]
AND AX,0xf
MOVZX EAX,AL
CMP EAX,0x4
JNZ 0x001a9dfe
MOV EAX,dword ptr [RSP + 0x330]
SHR EAX,0x8
AND EAX,0xff
CMP AL,0x0
JZ 0x001a9dfe
LEA RDI,[RSP + 0x350]
MOV ESI,0x1
CALL 0x0018d9c0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x308],RAX
MOV EAX,dword ptr [RSP + 0x330]
SHR EAX,0x8
AND EAX,0xff
MOVZX EDI,AL
CALL 0x00192880
MOV byte ptr [RSP + 0x307],AL
LEA RDI,[RSP + 0x308]
XOR ESI,ESI
CALL 0x00124320
MOV qword ptr [RSP + 0x2f8],RAX
LEA RDI,[RSP + 0x2f8]
CALL 0x00124340
MOV RDI,RAX
LEA RSI,[RSP + 0x307]
CALL 0x00124350
MOV RAX,qword ptr [RSP + 0x350]
MOV qword ptr [RSP + 0x2e8],RAX
MOV RAX,qword ptr [RSP + 0x308]
MOV qword ptr [RSP + 0x2e0],RAX
MOV RDI,qword ptr [RSP + 0x2e8]
MOV RSI,qword ptr [RSP + 0x2e0]
CALL 0x0018daf0
MOV qword ptr [RSP + 0x2f0],RAX
MOV RAX,qword ptr [RSP + 0x2f0]
MOV qword ptr [RSP + 0x350],RAX
MOV EAX,dword ptr [RSP + 0x330]
AND EAX,0xffff00ff
OR EAX,0x0
MOV dword ptr [RSP + 0x330],EAX
CMP dword ptr [RSP + 0x340],0x0
JZ 0x001a9dfc
MOV EAX,dword ptr [RSP + 0x340]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x340],EAX
LAB_001a9dfc:
JMP 0x001a9dfe
LAB_001a9dfe:
LEA RDI,[RSP + 0xc7]
MOV qword ptr [RSP + 0x48],RDI
CALL 0x00114c90
MOV RSI,qword ptr [RSP + 0x48]
LAB_001a9e15:
LEA RDI,[RSP + 0xc8]
CALL 0x00187c70
JMP 0x001a9e24
LAB_001a9e24:
LEA RDI,[RSP + 0xc7]
CALL 0x00114750
MOV EAX,dword ptr [RSP + 0x330]
AND EAX,0xff
CMP AL,0x3
JNZ 0x001a9faa
MOV EAX,dword ptr [RSP + 0x330]
SHR EAX,0x8
AND EAX,0xff
CMP AL,0x0
JZ 0x001a9ed1
MOVZX EDI,byte ptr [RSP + 0x331]
CALL 0x00192880
MOV byte ptr [RSP + 0xb3],AL
LAB_001a9e6c:
LEA RDI,[RSP + 0xc8]
LEA RSI,[RSP + 0xb3]
CALL 0x00124380
JMP 0x001a9e83
LAB_001a9e83:
JMP 0x001a9ed1
LAB_001a9ed1:
MOVSS XMM0,dword ptr [RSP + 0x334]
CALL 0x001aa6c0
MOVSD qword ptr [RSP + 0x40],XMM0
JMP 0x001a9ee7
LAB_001a9ee7:
MOVSD XMM0,qword ptr [RSP + 0x40]
MOV EDI,dword ptr [RSP + 0x344]
MOV RAX,qword ptr [RSP + 0x32c]
MOV qword ptr [RSP + 0xa8],RAX
MOV RSI,qword ptr [RSP + 0xa8]
LEA RDX,[RSP + 0xc8]
CALL 0x001aa290
JMP 0x001a9f1b
LAB_001a9f1b:
MOV RAX,qword ptr [RSP + 0x350]
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0xc8]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00123b10
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x30],RAX
CALL 0x00123b20
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,RAX
LEA RDI,[RSP + 0x90]
CALL 0x00123b30
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
LEA RCX,[RSP + 0x340]
CALL 0x00199190
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001a9f8d
LAB_001a9f8d:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x358],RAX
MOV dword ptr [RSP + 0x8c],0x1
JMP 0x001aa159
LAB_001a9faa:
CMP dword ptr [RSP + 0x344],0x0
JGE 0x001a9fbe
CMP byte ptr [RSP + 0x348],0x0
JNZ 0x001a9fcb
LAB_001a9fbe:
MOV EAX,dword ptr [RSP + 0x344]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001a9fd6
LAB_001a9fcb:
MOV EAX,0x6
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001a9fd6
LAB_001a9fd6:
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x88],EAX
MOV EAX,dword ptr [RSP + 0x330]
AND EAX,0xff
CMP AL,0x1
JNZ 0x001aa02c
MOV EAX,dword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x20],EAX
CALL 0x00194350
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x20]
CMP EAX,ECX
JNZ 0x001aa019
LEA RDI,[0x2100a0]
CALL 0x00186600
LAB_001aa019:
MOV EAX,dword ptr [RSP + 0x88]
ADD EAX,0x1
MOV dword ptr [RSP + 0x88],EAX
JMP 0x001aa053
LAB_001aa02c:
MOV EAX,dword ptr [RSP + 0x330]
AND EAX,0xff
CMP AL,0x2
JZ 0x001aa051
CMP dword ptr [RSP + 0x88],0x0
JNZ 0x001aa051
MOV dword ptr [RSP + 0x88],0x1
LAB_001aa051:
JMP 0x001aa053
LAB_001aa053:
MOV AL,byte ptr [RSP + 0x332]
OR AL,0x4
MOV byte ptr [RSP + 0x332],AL
MOVSS XMM0,dword ptr [RSP + 0x334]
CALL 0x001aa6c0
MOVSD qword ptr [RSP + 0x18],XMM0
JMP 0x001aa079
LAB_001aa079:
MOVSD XMM0,qword ptr [RSP + 0x18]
MOV EDI,dword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x32c]
MOV qword ptr [RSP + 0x78],RAX
MOV RSI,qword ptr [RSP + 0x78]
LEA RDX,[RSP + 0xc8]
CALL 0x001aa6e0
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001aa0ab
LAB_001aa0ab:
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x84],EAX
MOV EAX,dword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x32c],EAX
LEA RDI,[RSP + 0xc8]
MOV qword ptr [RSP],RDI
CALL 0x00123b10
MOV RDI,qword ptr [RSP]
MOV qword ptr [RSP + 0x68],RAX
CALL 0x00123b20
MOV dword ptr [RSP + 0x70],EAX
MOV EAX,dword ptr [RSP + 0x84]
MOV dword ptr [RSP + 0x74],EAX
MOV RAX,qword ptr [RSP + 0x350]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x32c]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x338]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x58]
MOV R8,qword ptr [RSP + 0x50]
LEA RSI,[RSP + 0x68]
LEA RDX,[RSP + 0x340]
CALL 0x00199650
LAB_001aa13a:
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001aa141
LAB_001aa141:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x358],RAX
MOV dword ptr [RSP + 0x8c],0x1
LAB_001aa159:
LEA RDI,[RSP + 0xc8]
CALL 0x00187cd0
LAB_001aa166:
MOV RAX,qword ptr [RSP + 0x358]
ADD RSP,0x368
RET
|
/* fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender,
float>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref) */
int8 __thiscall
fmt::v10::detail::write_float<char,fmt::v10::appender,float>
(float param_1,detail *this,long param_3,int8 param_4,int8 param_5)
{
bool bVar1;
char cVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
int8 *puVar6;
back_insert_iterator<fmt::v10::detail::buffer<char>> *this_00;
char *pcVar7;
int local_344;
int8 local_300;
int4 local_2f8;
int local_2f4;
ulong local_2f0;
int local_2e4;
int local_2e0;
int4 local_2dc;
int8 local_2d8;
int8 local_2d0;
detail *local_2c8;
ulong local_2c0;
char local_2b5 [20];
allocator<char> local_2a1;
allocator local_2a0 [536];
int8 local_88;
detail *local_80;
detail *local_78;
int8 local_70;
char local_61;
int8 local_60;
long local_58;
int8 local_50;
detail *local_48;
int8 local_3c;
float local_34;
int8 local_30;
int8 local_28;
int8 local_20;
detail *local_18;
int8 local_10;
float local_4;
local_34 = param_1;
local_30 = param_5;
local_28 = param_3;
local_20 = param_4;
local_18 = this;
uVar4 = parse_float_type_spec<char>((format_specs *)&local_28);
local_3c._4_4_ = (uint)((ulong)uVar4 >> 0x20);
local_3c = CONCAT44(local_3c._4_4_ & 0xffff00ff | (uint)((byte)(local_20._1_2_ >> 4) & 7) << 8,
(int)uVar4);
local_4 = local_34;
uVar5 = std::signbit((double)local_34);
if ((uVar5 & 1) == 0) {
if ((local_3c._4_4_ >> 8 & 0xff) == 1) {
local_3c = local_3c & 0xffff00ffffffffff;
}
}
else {
local_3c = local_3c & 0xffff00ffffffffff | 0x10000000000;
local_34 = -local_34;
}
uVar5 = _ZN3fmt3v106detail8isfiniteIfTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_
();
if ((uVar5 & 1) == 0) {
local_48 = local_18;
bVar1 = isnan<float>(local_34);
local_58 = local_28;
local_50 = local_20;
local_10 = write_nonfinite<char,fmt::v10::appender>(local_48,bVar1,local_28,local_20,&local_3c);
}
else {
if ((((byte)((ulong)local_20 >> 8) & 0xf) == 4) && ((char)(local_3c >> 0x28) != '\0')) {
puVar6 = (int8 *)reserve<fmt::v10::appender>((appender *)&local_18,1);
local_60 = *puVar6;
local_61 = sign<char,fmt::v10::sign::type>(local_3c._4_4_ >> 8 & 0xff);
local_70 = appender::operator++((appender *)&local_60,0);
this_00 = (back_insert_iterator<fmt::v10::detail::buffer<char>> *)
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*
((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_70);
std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(this_00,&local_61);
local_80 = local_18;
local_88 = local_60;
local_78 = (detail *)base_iterator<fmt::v10::appender>(local_18,local_60);
local_3c = local_3c & 0xffff00ffffffffff;
local_18 = local_78;
if ((int)local_28 != 0) {
local_28 = CONCAT44(local_28._4_4_,(int)local_28 + -1);
}
}
std::allocator<char>::allocator();
/* try { // try from 001a9e15 to 001a9e21 has its CatchHandler @ 001a9e85 */
basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(local_2a0);
std::allocator<char>::~allocator(&local_2a1);
cVar2 = (char)(local_3c >> 0x20);
if (cVar2 == '\x03') {
cVar2 = (char)(local_3c >> 0x28);
if (cVar2 != '\0') {
local_2b5[0] = sign<char,fmt::v10::sign::type>(cVar2);
/* try { // try from 001a9e6c to 001aa139 has its CatchHandler @ 001a9eab */
buffer<char>::push_back((buffer<char> *)local_2a0,local_2b5);
}
uVar4 = convert_float<float>(local_34);
local_2c0 = local_3c;
_ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE
(uVar4,local_28._4_4_,local_3c,local_2a0);
local_2c8 = local_18;
pcVar7 = (char *)buffer<char>::data((buffer<char> *)local_2a0);
uVar5 = buffer<char>::size((buffer<char> *)local_2a0);
basic_string_view<char>::basic_string_view((basic_string_view<char> *)&local_2d8,pcVar7,uVar5)
;
local_10 = write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>
(local_2c8,local_2d8,local_2d0,&local_28);
}
else {
if ((local_28 < 0) && ((char)local_20 != '\0')) {
local_344 = 6;
}
else {
local_344 = local_28._4_4_;
}
local_2e0 = local_344;
if (cVar2 == '\x01') {
iVar3 = max_value<int>();
if (local_344 == iVar3) {
/* WARNING: Subroutine does not return */
throw_format_error("number is too big");
}
local_2e0 = local_2e0 + 1;
}
else if ((cVar2 != '\x02') && (local_344 == 0)) {
local_2e0 = 1;
}
local_3c = local_3c | 0x4000000000000;
uVar4 = convert_float<float>(local_34);
local_2f0 = local_3c;
local_2e4 = format_float<double>(uVar4,local_2e0,local_3c,local_2a0);
local_3c = CONCAT44(local_3c._4_4_,local_2e0);
local_300 = buffer<char>::data((buffer<char> *)local_2a0);
local_2f8 = buffer<char>::size((buffer<char> *)local_2a0);
local_2f4 = local_2e4;
local_10 = write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>
(local_18,&local_300,&local_28,local_3c,local_30);
}
local_2dc = 1;
basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer
((basic_memory_buffer<char,500ul,std::allocator<char>> *)local_2a0);
}
return local_10;
}
|
|
12,368
|
my_xml_error_pos
|
eloqsql/strings/xml.c
|
size_t my_xml_error_pos(MY_XML_PARSER *p)
{
const char *beg=p->beg;
const char *s;
for ( s=p->beg ; s<p->cur; s++)
{
if (s[0] == '\n')
beg=s;
}
return (size_t) (p->cur-beg);
}
|
O3
|
c
|
my_xml_error_pos:
movq 0x128(%rdi), %rcx
movq 0x130(%rdi), %rax
cmpq %rax, %rcx
jae 0x37a06
pushq %rbp
movq %rsp, %rbp
movq %rcx, %rdx
cmpb $0xa, (%rcx)
cmoveq %rcx, %rdx
incq %rcx
cmpq %rax, %rcx
jne 0x379f4
popq %rbp
jmp 0x37a09
movq %rcx, %rdx
subq %rdx, %rax
retq
|
my_xml_error_pos:
mov rcx, [rdi+128h]
mov rax, [rdi+130h]
cmp rcx, rax
jnb short loc_37A06
push rbp
mov rbp, rsp
mov rdx, rcx
loc_379F4:
cmp byte ptr [rcx], 0Ah
cmovz rdx, rcx
inc rcx
cmp rcx, rax
jnz short loc_379F4
pop rbp
jmp short loc_37A09
loc_37A06:
mov rdx, rcx
loc_37A09:
sub rax, rdx
retn
|
long long my_xml_error_pos(long long a1)
{
_BYTE *v1; // rcx
_BYTE *v2; // rax
_BYTE *v3; // rdx
v1 = *(_BYTE **)(a1 + 296);
v2 = *(_BYTE **)(a1 + 304);
if ( v1 >= v2 )
{
v3 = *(_BYTE **)(a1 + 296);
}
else
{
v3 = *(_BYTE **)(a1 + 296);
do
{
if ( *v1 == 10 )
v3 = v1;
++v1;
}
while ( v1 != v2 );
}
return v2 - v3;
}
|
my_xml_error_pos:
MOV RCX,qword ptr [RDI + 0x128]
MOV RAX,qword ptr [RDI + 0x130]
CMP RCX,RAX
JNC 0x00137a06
PUSH RBP
MOV RBP,RSP
MOV RDX,RCX
LAB_001379f4:
CMP byte ptr [RCX],0xa
CMOVZ RDX,RCX
INC RCX
CMP RCX,RAX
JNZ 0x001379f4
POP RBP
JMP 0x00137a09
LAB_00137a06:
MOV RDX,RCX
LAB_00137a09:
SUB RAX,RDX
RET
|
long my_xml_error_pos(long param_1)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
pcVar2 = *(char **)(param_1 + 0x128);
pcVar1 = *(char **)(param_1 + 0x130);
pcVar3 = pcVar2;
if (pcVar2 < pcVar1) {
do {
if (*pcVar2 == '\n') {
pcVar3 = pcVar2;
}
pcVar2 = pcVar2 + 1;
} while (pcVar2 != pcVar1);
}
return (long)pcVar1 - (long)pcVar3;
}
|
|
12,369
|
purge_user(PFS_thread*, PFS_user*)
|
eloqsql/storage/perfschema/pfs_user.cc
|
void purge_user(PFS_thread *thread, PFS_user *user)
{
LF_PINS *pins= get_user_hash_pins(thread);
if (unlikely(pins == NULL))
return;
PFS_user **entry;
entry= reinterpret_cast<PFS_user**>
(lf_hash_search(&user_hash, pins,
user->m_key.m_hash_key, user->m_key.m_key_length));
if (entry && (entry != MY_ERRPTR))
{
assert(*entry == user);
if (user->get_refcount() == 0)
{
lf_hash_delete(&user_hash, pins,
user->m_key.m_hash_key, user->m_key.m_key_length);
user->aggregate(false);
global_user_container.deallocate(user);
}
}
lf_hash_search_unpin(pins);
}
|
O3
|
cpp
|
purge_user(PFS_thread*, PFS_user*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x830(%rdi), %rdi
testq %rdi, %rdi
je 0x3ade4
movq %rbx, %rsi
callq 0x28049
popq %rbx
popq %r14
popq %rbp
retq
cmpb $0x1, 0x39547d(%rip) # 0x3d0268
jne 0x3addf
leaq 0x3953d4(%rip), %rdi # 0x3d01c8
callq 0x2ba28
movq %rax, 0x830(%r14)
testq %rax, %rax
je 0x3addf
movq %rax, %rdi
jmp 0x3add7
|
_Z10purge_userP10PFS_threadP8PFS_user:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi+830h]
test rdi, rdi
jz short loc_3ADE4
loc_3ADD7:
mov rsi, rbx
call _Z10purge_userP10PFS_threadP8PFS_user_cold_1; purge_user(PFS_thread *,PFS_user *) [clone]
loc_3ADDF:
pop rbx
pop r14
pop rbp
retn
loc_3ADE4:
cmp cs:_ZL16user_hash_inited, 1; user_hash_inited
jnz short loc_3ADDF
lea rdi, unk_3D01C8
call lf_pinbox_get_pins
mov [r14+830h], rax
test rax, rax
jz short loc_3ADDF
mov rdi, rax
jmp short loc_3ADD7
|
void purge_user(PFS_thread *a1, PFS_user *a2)
{
long long v3; // rdi
long long pins; // rax
v3 = *((_QWORD *)a1 + 262);
if ( v3 )
goto LABEL_2;
if ( user_hash_inited == 1 )
{
pins = lf_pinbox_get_pins((long long)&unk_3D01C8);
*((_QWORD *)a1 + 262) = pins;
if ( pins )
{
v3 = pins;
LABEL_2:
purge_user(v3, (long long)a2);
}
}
}
|
purge_user:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x830]
TEST RDI,RDI
JZ 0x0013ade4
LAB_0013add7:
MOV RSI,RBX
CALL 0x00128049
LAB_0013addf:
POP RBX
POP R14
POP RBP
RET
LAB_0013ade4:
CMP byte ptr [0x004d0268],0x1
JNZ 0x0013addf
LEA RDI,[0x4d01c8]
CALL 0x0012ba28
MOV qword ptr [R14 + 0x830],RAX
TEST RAX,RAX
JZ 0x0013addf
MOV RDI,RAX
JMP 0x0013add7
|
/* purge_user(PFS_thread*, PFS_user*) */
void purge_user(PFS_thread *param_1,PFS_user *param_2)
{
PFS_thread *pPVar1;
pPVar1 = *(PFS_thread **)(param_1 + 0x830);
if (pPVar1 == (PFS_thread *)0x0) {
if (user_hash_inited != '\x01') {
return;
}
pPVar1 = (PFS_thread *)lf_pinbox_get_pins(0x4d01c8);
*(PFS_thread **)(param_1 + 0x830) = pPVar1;
if (pPVar1 == (PFS_thread *)0x0) {
return;
}
}
purge_user(pPVar1,param_2);
return;
}
|
|
12,370
|
stbtt_GetGlyphHMetrics
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h
|
STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing)
{
stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34);
if (glyph_index < numOfLongHorMetrics) {
if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*glyph_index);
if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*glyph_index + 2);
} else {
if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1));
if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics));
}
}
|
O0
|
c
|
stbtt_GetGlyphHMetrics:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x24(%rax), %rax
addq %rax, %rdi
addq $0x22, %rdi
callq 0x58f30
movw %ax, -0x22(%rbp)
movl -0xc(%rbp), %eax
movzwl -0x22(%rbp), %ecx
cmpl %ecx, %eax
jge 0x5993e
cmpq $0x0, -0x18(%rbp)
je 0x59905
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x28(%rax), %rax
addq %rax, %rdi
movl -0xc(%rbp), %eax
shll $0x2, %eax
cltq
addq %rax, %rdi
callq 0x592c0
movswl %ax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x5993c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x28(%rax), %rax
addq %rax, %rdi
movl -0xc(%rbp), %eax
shll $0x2, %eax
cltq
addq %rax, %rdi
addq $0x2, %rdi
callq 0x592c0
movswl %ax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x599bb
cmpq $0x0, -0x18(%rbp)
je 0x59975
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x28(%rax), %rax
addq %rax, %rdi
movzwl -0x22(%rbp), %eax
subl $0x1, %eax
shll $0x2, %eax
cltq
addq %rax, %rdi
callq 0x592c0
movswl %ax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x599b9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x28(%rax), %rax
addq %rax, %rdi
movzwl -0x22(%rbp), %eax
shll $0x2, %eax
cltq
addq %rax, %rdi
movl -0xc(%rbp), %eax
movzwl -0x22(%rbp), %ecx
subl %ecx, %eax
shll %eax
cltq
addq %rax, %rdi
callq 0x592c0
movswl %ax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x599bb
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
stbtt_GetGlyphHMetrics:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+24h]
add rdi, rax
add rdi, 22h ; '"'
call ttUSHORT
mov [rbp+var_22], ax
mov eax, [rbp+var_C]
movzx ecx, [rbp+var_22]
cmp eax, ecx
jge short loc_5993E
cmp [rbp+var_18], 0
jz short loc_59905
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+28h]
add rdi, rax
mov eax, [rbp+var_C]
shl eax, 2
cdqe
add rdi, rax
call ttSHORT
movsx ecx, ax
mov rax, [rbp+var_18]
mov [rax], ecx
loc_59905:
cmp [rbp+var_20], 0
jz short loc_5993C
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+28h]
add rdi, rax
mov eax, [rbp+var_C]
shl eax, 2
cdqe
add rdi, rax
add rdi, 2
call ttSHORT
movsx ecx, ax
mov rax, [rbp+var_20]
mov [rax], ecx
loc_5993C:
jmp short loc_599BB
loc_5993E:
cmp [rbp+var_18], 0
jz short loc_59975
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+28h]
add rdi, rax
movzx eax, [rbp+var_22]
sub eax, 1
shl eax, 2
cdqe
add rdi, rax
call ttSHORT
movsx ecx, ax
mov rax, [rbp+var_18]
mov [rax], ecx
loc_59975:
cmp [rbp+var_20], 0
jz short loc_599B9
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+28h]
add rdi, rax
movzx eax, [rbp+var_22]
shl eax, 2
cdqe
add rdi, rax
mov eax, [rbp+var_C]
movzx ecx, [rbp+var_22]
sub eax, ecx
shl eax, 1
cdqe
add rdi, rax
call ttSHORT
movsx ecx, ax
mov rax, [rbp+var_20]
mov [rax], ecx
loc_599B9:
jmp short $+2
loc_599BB:
add rsp, 30h
pop rbp
retn
|
unsigned long long stbtt_GetGlyphHMetrics(long long a1, int a2, _DWORD *a3, _DWORD *a4)
{
unsigned long long result; // rax
int v5; // ecx
int v6; // ecx
int v7; // ecx
int v8; // ecx
unsigned __int16 v9; // [rsp+Eh] [rbp-22h]
v9 = ttUSHORT((unsigned __int8 *)(*(int *)(a1 + 36) + *(_QWORD *)(a1 + 8) + 34LL));
result = (unsigned int)a2;
if ( a2 >= v9 )
{
if ( a3 )
{
v7 = (__int16)ttSHORT((unsigned __int8 *)(4 * (v9 - 1) + *(int *)(a1 + 40) + *(_QWORD *)(a1 + 8)));
result = (unsigned long long)a3;
*a3 = v7;
}
if ( a4 )
{
v8 = (__int16)ttSHORT((unsigned __int8 *)(2 * (a2 - v9) + 4 * v9 + *(int *)(a1 + 40) + *(_QWORD *)(a1 + 8)));
result = (unsigned long long)a4;
*a4 = v8;
}
}
else
{
if ( a3 )
{
v5 = (__int16)ttSHORT((unsigned __int8 *)(4 * a2 + *(int *)(a1 + 40) + *(_QWORD *)(a1 + 8)));
result = (unsigned long long)a3;
*a3 = v5;
}
if ( a4 )
{
v6 = (__int16)ttSHORT((unsigned __int8 *)(4 * a2 + *(int *)(a1 + 40) + *(_QWORD *)(a1 + 8) + 2LL));
result = (unsigned long long)a4;
*a4 = v6;
}
}
return result;
}
|
stbtt_GetGlyphHMetrics:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x24]
ADD RDI,RAX
ADD RDI,0x22
CALL 0x00158f30
MOV word ptr [RBP + -0x22],AX
MOV EAX,dword ptr [RBP + -0xc]
MOVZX ECX,word ptr [RBP + -0x22]
CMP EAX,ECX
JGE 0x0015993e
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00159905
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x28]
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0xc]
SHL EAX,0x2
CDQE
ADD RDI,RAX
CALL 0x001592c0
MOVSX ECX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
LAB_00159905:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0015993c
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x28]
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0xc]
SHL EAX,0x2
CDQE
ADD RDI,RAX
ADD RDI,0x2
CALL 0x001592c0
MOVSX ECX,AX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
LAB_0015993c:
JMP 0x001599bb
LAB_0015993e:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00159975
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x28]
ADD RDI,RAX
MOVZX EAX,word ptr [RBP + -0x22]
SUB EAX,0x1
SHL EAX,0x2
CDQE
ADD RDI,RAX
CALL 0x001592c0
MOVSX ECX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
LAB_00159975:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001599b9
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x28]
ADD RDI,RAX
MOVZX EAX,word ptr [RBP + -0x22]
SHL EAX,0x2
CDQE
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0xc]
MOVZX ECX,word ptr [RBP + -0x22]
SUB EAX,ECX
SHL EAX,0x1
CDQE
ADD RDI,RAX
CALL 0x001592c0
MOVSX ECX,AX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
LAB_001599b9:
JMP 0x001599bb
LAB_001599bb:
ADD RSP,0x30
POP RBP
RET
|
void stbtt_GetGlyphHMetrics(long param_1,int param_2,int *param_3,int *param_4)
{
ushort uVar1;
short sVar2;
uVar1 = ttUSHORT(*(long *)(param_1 + 8) + (long)*(int *)(param_1 + 0x24) + 0x22);
if (param_2 < (int)(uint)uVar1) {
if (param_3 != (int *)0x0) {
sVar2 = ttSHORT(*(long *)(param_1 + 8) + (long)*(int *)(param_1 + 0x28) + (long)(param_2 << 2)
);
*param_3 = (int)sVar2;
}
if (param_4 != (int *)0x0) {
sVar2 = ttSHORT(*(long *)(param_1 + 8) + (long)*(int *)(param_1 + 0x28) + (long)(param_2 << 2)
+ 2);
*param_4 = (int)sVar2;
}
}
else {
if (param_3 != (int *)0x0) {
sVar2 = ttSHORT(*(long *)(param_1 + 8) + (long)*(int *)(param_1 + 0x28) +
(long)(int)((uVar1 - 1) * 4));
*param_3 = (int)sVar2;
}
if (param_4 != (int *)0x0) {
sVar2 = ttSHORT(*(long *)(param_1 + 8) + (long)*(int *)(param_1 + 0x28) +
(long)(int)((uint)uVar1 << 2) + (long)(int)((param_2 - (uint)uVar1) * 2));
*param_4 = (int)sVar2;
}
}
return;
}
|
|
12,371
|
map_find_record
|
bluesky950520[P]quickjs/quickjs.c
|
static JSMapRecord *map_find_record(JSContext *ctx, JSMapState *s,
JSValue key)
{
struct list_head *el;
JSMapRecord *mr;
uint32_t h;
h = map_hash_key(ctx, key) & (s->hash_size - 1);
list_for_each(el, &s->hash_table[h]) {
mr = list_entry(el, JSMapRecord, hash_link);
if (js_same_value_zero(ctx, mr->key, key))
return mr;
}
return NULL;
}
|
O1
|
c
|
map_find_record:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x4750b
movl 0x28(%r15), %ebp
decl %ebp
andl %eax, %ebp
movq 0x20(%r15), %rax
shlq $0x4, %rbp
movq 0x8(%rax,%rbp), %r13
addq %rbp, %rax
cmpq %rax, %r13
je 0x474f0
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
movq %r12, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq 0x3a341
testl %eax, %eax
jne 0x474f5
movq 0x8(%r13), %r13
movq 0x20(%r15), %rax
jmp 0x474c4
xorl %r13d, %r13d
jmp 0x474f9
addq $-0x20, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
map_find_record:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov rdi, rdx
mov rsi, rcx
call map_hash_key
mov ebp, [r15+28h]
dec ebp
and ebp, eax
mov rax, [r15+20h]
shl rbp, 4
mov r13, [rax+rbp+8]
loc_474C4:
add rax, rbp
cmp r13, rax
jz short loc_474F0
mov rsi, [r13+10h]
mov rdx, [r13+18h]
mov rdi, r12
mov rcx, r14
mov r8, rbx
call js_same_value_zero
test eax, eax
jnz short loc_474F5
mov r13, [r13+8]
mov rax, [r15+20h]
jmp short loc_474C4
loc_474F0:
xor r13d, r13d
jmp short loc_474F9
loc_474F5:
add r13, 0FFFFFFFFFFFFFFE0h
loc_474F9:
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long map_find_record(long long a1, long long a2, _DWORD *a3, long long a4, double a5, __m128d a6)
{
long long v8; // rbp
long long v9; // rax
long long v10; // rbp
long long v11; // r13
v8 = (unsigned int)map_hash_key(a3, a4) & (*(_DWORD *)(a2 + 40) - 1);
v9 = *(_QWORD *)(a2 + 32);
v10 = 16 * v8;
v11 = *(_QWORD *)(v9 + v10 + 8);
while ( 1 )
{
if ( v11 == v10 + v9 )
return 0LL;
if ( js_same_value_zero(a1, *(_DWORD **)(v11 + 16), *(_QWORD *)(v11 + 24), a3, a4, a5, a6) )
break;
v11 = *(_QWORD *)(v11 + 8);
v9 = *(_QWORD *)(a2 + 32);
}
return v11 - 32;
}
|
map_find_record:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV RDI,RDX
MOV RSI,RCX
CALL 0x0014750b
MOV EBP,dword ptr [R15 + 0x28]
DEC EBP
AND EBP,EAX
MOV RAX,qword ptr [R15 + 0x20]
SHL RBP,0x4
MOV R13,qword ptr [RAX + RBP*0x1 + 0x8]
LAB_001474c4:
ADD RAX,RBP
CMP R13,RAX
JZ 0x001474f0
MOV RSI,qword ptr [R13 + 0x10]
MOV RDX,qword ptr [R13 + 0x18]
MOV RDI,R12
MOV RCX,R14
MOV R8,RBX
CALL 0x0013a341
TEST EAX,EAX
JNZ 0x001474f5
MOV R13,qword ptr [R13 + 0x8]
MOV RAX,qword ptr [R15 + 0x20]
JMP 0x001474c4
LAB_001474f0:
XOR R13D,R13D
JMP 0x001474f9
LAB_001474f5:
ADD R13,-0x20
LAB_001474f9:
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long map_find_record(int8 param_1,long param_2,int8 param_3,int8 param_4)
{
uint uVar1;
int iVar2;
long lVar3;
long lVar4;
long lVar5;
uVar1 = map_hash_key(param_3,param_4);
lVar3 = *(long *)(param_2 + 0x20);
lVar4 = (ulong)(*(int *)(param_2 + 0x28) - 1U & uVar1) * 0x10;
lVar5 = *(long *)(lVar3 + 8 + lVar4);
while( true ) {
if (lVar5 == lVar3 + lVar4) {
return 0;
}
iVar2 = js_same_value_zero(param_1,*(int8 *)(lVar5 + 0x10),*(int8 *)(lVar5 + 0x18),
param_3,param_4);
if (iVar2 != 0) break;
lVar5 = *(long *)(lVar5 + 8);
lVar3 = *(long *)(param_2 + 0x20);
}
return lVar5 + -0x20;
}
|
|
12,372
|
map_find_record
|
bluesky950520[P]quickjs/quickjs.c
|
static JSMapRecord *map_find_record(JSContext *ctx, JSMapState *s,
JSValue key)
{
struct list_head *el;
JSMapRecord *mr;
uint32_t h;
h = map_hash_key(ctx, key) & (s->hash_size - 1);
list_for_each(el, &s->hash_table[h]) {
mr = list_entry(el, JSMapRecord, hash_link);
if (js_same_value_zero(ctx, mr->key, key))
return mr;
}
return NULL;
}
|
O2
|
c
|
map_find_record:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x3da58
movl 0x28(%r15), %ebp
decl %ebp
andl %eax, %ebp
movq 0x20(%r15), %rax
shlq $0x4, %rbp
leaq (%rax,%rbp), %r13
addq $0x8, %r13
movq (%r13), %r13
addq %rbp, %rax
cmpq %rax, %r13
je 0x3d877
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
movq %r12, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq 0x33456
testl %eax, %eax
jne 0x3d87b
addq $0x8, %r13
movq 0x20(%r15), %rax
jmp 0x3d847
xorl %eax, %eax
jmp 0x3d882
addq $-0x20, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
map_find_record:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov rdi, rdx
mov rsi, rcx
call map_hash_key
mov ebp, [r15+28h]
dec ebp
and ebp, eax
mov rax, [r15+20h]
shl rbp, 4
lea r13, [rax+rbp]
add r13, 8
loc_3D847:
mov r13, [r13+0]
add rax, rbp
cmp r13, rax
jz short loc_3D877
mov rsi, [r13+10h]
mov rdx, [r13+18h]
mov rdi, r12
mov rcx, r14
mov r8, rbx
call js_same_value_zero
test eax, eax
jnz short loc_3D87B
add r13, 8
mov rax, [r15+20h]
jmp short loc_3D847
loc_3D877:
xor eax, eax
jmp short loc_3D882
loc_3D87B:
add r13, 0FFFFFFFFFFFFFFE0h
mov rax, r13
loc_3D882:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long map_find_record(long long a1, long long a2, _DWORD *a3, long long a4, __m128d a5)
{
long long v7; // rbp
long long v8; // rax
long long v9; // rbp
long long *v10; // r13
long long v11; // r13
v7 = (unsigned int)map_hash_key(a3, a4) & (*(_DWORD *)(a2 + 40) - 1);
v8 = *(_QWORD *)(a2 + 32);
v9 = 16 * v7;
v10 = (long long *)(v8 + v9 + 8);
while ( 1 )
{
v11 = *v10;
if ( v11 == v9 + v8 )
return 0LL;
if ( (unsigned int)js_same_value_zero(a1, *(_DWORD **)(v11 + 16), *(_QWORD *)(v11 + 24), a3, a4, a5) )
break;
v10 = (long long *)(v11 + 8);
v8 = *(_QWORD *)(a2 + 32);
}
return v11 - 32;
}
|
map_find_record:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV RDI,RDX
MOV RSI,RCX
CALL 0x0013da58
MOV EBP,dword ptr [R15 + 0x28]
DEC EBP
AND EBP,EAX
MOV RAX,qword ptr [R15 + 0x20]
SHL RBP,0x4
LEA R13,[RAX + RBP*0x1]
ADD R13,0x8
LAB_0013d847:
MOV R13,qword ptr [R13]
ADD RAX,RBP
CMP R13,RAX
JZ 0x0013d877
MOV RSI,qword ptr [R13 + 0x10]
MOV RDX,qword ptr [R13 + 0x18]
MOV RDI,R12
MOV RCX,R14
MOV R8,RBX
CALL 0x00133456
TEST EAX,EAX
JNZ 0x0013d87b
ADD R13,0x8
MOV RAX,qword ptr [R15 + 0x20]
JMP 0x0013d847
LAB_0013d877:
XOR EAX,EAX
JMP 0x0013d882
LAB_0013d87b:
ADD R13,-0x20
MOV RAX,R13
LAB_0013d882:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long map_find_record(int8 param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
uint uVar2;
int iVar3;
long lVar4;
long lVar5;
uVar2 = map_hash_key(param_3,param_4);
lVar4 = *(long *)(param_2 + 0x20);
lVar5 = (ulong)(*(int *)(param_2 + 0x28) - 1U & uVar2) * 0x10;
lVar1 = lVar4 + lVar5;
while( true ) {
lVar1 = *(long *)(lVar1 + 8);
if (lVar1 == lVar4 + lVar5) {
return 0;
}
iVar3 = js_same_value_zero(param_1,*(int8 *)(lVar1 + 0x10),*(int8 *)(lVar1 + 0x18),
param_3,param_4);
if (iVar3 != 0) break;
lVar4 = *(long *)(param_2 + 0x20);
}
return lVar1 + -0x20;
}
|
|
12,373
|
hp_search_next
|
eloqsql/storage/heap/hp_hash.c
|
uchar *hp_search_next(HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key,
HASH_INFO *pos)
{
DBUG_ENTER("hp_search_next");
while ((pos= pos->next_key))
{
if (! hp_key_cmp(keyinfo, pos->ptr_to_rec, key))
{
info->current_hash_ptr=pos;
DBUG_RETURN (info->current_ptr= pos->ptr_to_rec);
}
}
my_errno=HA_ERR_KEY_NOT_FOUND;
DBUG_PRINT("exit",("Error: %d",my_errno));
info->current_hash_ptr=0;
DBUG_RETURN ((info->current_ptr= 0));
}
|
O0
|
c
|
hp_search_next:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x29e37
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x29930
cmpl $0x0, %eax
jne 0x29e35
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x8(%rcx)
movq %rax, -0x8(%rbp)
jmp 0x29e64
jmp 0x29de8
callq 0x31370
movl $0x78, (%rax)
jmp 0x29e44
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
|
hp_search_next:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
loc_29DE8:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_29E37
mov rdi, [rbp+var_18]
mov rax, [rbp+var_28]
mov rsi, [rax+8]
mov rdx, [rbp+var_20]
call hp_key_cmp
cmp eax, 0
jnz short loc_29E35
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov [rcx+8], rax
mov [rbp+var_8], rax
jmp short loc_29E64
loc_29E35:
jmp short loc_29DE8
loc_29E37:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
jmp short $+2
loc_29E44:
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+8], 0
mov [rbp+var_8], 0
loc_29E64:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long hp_search_next(long long a1, long long a2, unsigned __int16 *a3, _QWORD *a4)
{
long long v4; // rax
while ( 1 )
{
a4 = (_QWORD *)*a4;
if ( !a4 )
break;
if ( !(unsigned int)hp_key_cmp(a2, a4[1], a3) )
{
*(_QWORD *)(a1 + 16) = a4;
v4 = a4[1];
*(_QWORD *)(a1 + 8) = v4;
return v4;
}
}
*(_DWORD *)my_thread_var() = 120;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = 0LL;
return 0LL;
}
|
hp_search_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
LAB_00129de8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00129e37
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00129930
CMP EAX,0x0
JNZ 0x00129e35
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x8],RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00129e64
LAB_00129e35:
JMP 0x00129de8
LAB_00129e37:
CALL 0x00131370
MOV dword ptr [RAX],0x78
JMP 0x00129e44
LAB_00129e44:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],0x0
MOV qword ptr [RBP + -0x8],0x0
LAB_00129e64:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 hp_search_next(long param_1,int8 param_2,int8 param_3,long *param_4)
{
int8 uVar1;
int iVar2;
int4 *puVar3;
long *local_30;
local_30 = param_4;
do {
local_30 = (long *)*local_30;
if (local_30 == (long *)0x0) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x78;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 8) = 0;
return 0;
}
iVar2 = hp_key_cmp(param_2,local_30[1],param_3);
} while (iVar2 != 0);
*(long **)(param_1 + 0x10) = local_30;
uVar1 = local_30[1];
*(int8 *)(param_1 + 8) = uVar1;
return uVar1;
}
|
|
12,374
|
get_collation_name_alias
|
eloqsql/mysys/charset.c
|
static const char*
get_collation_name_alias(const char *name, char *buf, size_t bufsize, myf flags)
{
if (!strncasecmp(name, "utf8_", 5))
{
my_snprintf(buf, bufsize, "utf8mb%c_%s",
flags & MY_UTF8_IS_UTF8MB3 ? '3' : '4', name + 5);
return buf;
}
return NULL;
}
|
O0
|
c
|
get_collation_name_alias:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xbcf4a(%rip), %rsi # 0x16d3ed
movl $0x5, %edx
callq 0x60b80
cmpl $0x0, %eax
jne 0xb04f6
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
movl $0x34, %ecx
movl $0x33, %eax
cmpq $0x0, %rdx
cmovnel %eax, %ecx
movq -0x10(%rbp), %r8
addq $0x5, %r8
leaq 0xbcf0e(%rip), %rdx # 0x16d3f3
movb $0x0, %al
callq 0x147f90
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb04fe
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
get_collation_name_alias:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
call _strncasecmp
cmp eax, 0
jnz short loc_B04F6
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
and rdx, 400h
mov ecx, 34h ; '4'
mov eax, 33h ; '3'
cmp rdx, 0
cmovnz ecx, eax
mov r8, [rbp+var_10]
add r8, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
mov al, 0
call my_snprintf
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_B04FE
loc_B04F6:
mov [rbp+var_8], 0
loc_B04FE:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long get_collation_name_alias(long long a1, long long a2, int a3, __int16 a4)
{
int v4; // r9d
int v5; // ecx
if ( (unsigned int)strncasecmp(a1, "utf8_", 5LL) )
return 0LL;
v5 = 52;
if ( (a4 & 0x400) != 0 )
v5 = 51;
my_snprintf(a2, a3, (unsigned int)"utf8mb%c_%s", v5, a1 + 5, v4);
return a2;
}
|
get_collation_name_alias:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x26d3ed]
MOV EDX,0x5
CALL 0x00160b80
CMP EAX,0x0
JNZ 0x001b04f6
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
AND RDX,0x400
MOV ECX,0x34
MOV EAX,0x33
CMP RDX,0x0
CMOVNZ ECX,EAX
MOV R8,qword ptr [RBP + -0x10]
ADD R8,0x5
LEA RDX,[0x26d3f3]
MOV AL,0x0
CALL 0x00247f90
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001b04fe
LAB_001b04f6:
MOV qword ptr [RBP + -0x8],0x0
LAB_001b04fe:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8
get_collation_name_alias(char *param_1,int8 param_2,int8 param_3,ulong param_4)
{
int iVar1;
int8 uVar2;
int8 local_10;
iVar1 = strncasecmp(param_1,"utf8_",5);
if (iVar1 == 0) {
uVar2 = 0x34;
if ((param_4 & 0x400) != 0) {
uVar2 = 0x33;
}
my_snprintf(param_2,param_3,"utf8mb%c_%s",uVar2,param_1 + 5);
local_10 = param_2;
}
else {
local_10 = 0;
}
return local_10;
}
|
|
12,375
|
stmt_buffered_fetch
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static int stmt_buffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
if (!stmt->result_cursor)
{
*row= NULL;
stmt->state= MYSQL_STMT_FETCH_DONE;
return MYSQL_NO_DATA;
}
stmt->state= MYSQL_STMT_USER_FETCHING;
*row= (uchar *)stmt->result_cursor->data;
stmt->result_cursor= stmt->result_cursor->next;
return 0;
}
|
O3
|
c
|
stmt_buffered_fetch:
movq 0xe0(%rdi), %rax
testq %rax, %rax
je 0x9229f
pushq %rbp
movq %rsp, %rbp
movl $0x5, 0x50(%rdi)
movq 0x8(%rax), %rax
movq %rax, (%rsi)
movq 0xe0(%rdi), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rdi)
xorl %eax, %eax
popq %rbp
retq
movq $0x0, (%rsi)
movl $0x6, 0x50(%rdi)
movl $0x64, %eax
retq
|
stmt_buffered_fetch:
mov rax, [rdi+0E0h]
test rax, rax
jz short loc_9229F
push rbp
mov rbp, rsp
mov dword ptr [rdi+50h], 5
mov rax, [rax+8]
mov [rsi], rax
mov rax, [rdi+0E0h]
mov rax, [rax]
mov [rdi+0E0h], rax
xor eax, eax
pop rbp
retn
loc_9229F:
mov qword ptr [rsi], 0
mov dword ptr [rdi+50h], 6
mov eax, 64h ; 'd'
retn
|
long long stmt_buffered_fetch(long long a1, _QWORD *a2)
{
long long v2; // rax
v2 = *(_QWORD *)(a1 + 224);
if ( v2 )
{
*(_DWORD *)(a1 + 80) = 5;
*a2 = *(_QWORD *)(v2 + 8);
*(_QWORD *)(a1 + 224) = **(_QWORD **)(a1 + 224);
return 0LL;
}
else
{
*a2 = 0LL;
*(_DWORD *)(a1 + 80) = 6;
return 100LL;
}
}
|
stmt_buffered_fetch:
MOV RAX,qword ptr [RDI + 0xe0]
TEST RAX,RAX
JZ 0x0019229f
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RDI + 0x50],0x5
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSI],RAX
MOV RAX,qword ptr [RDI + 0xe0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xe0],RAX
XOR EAX,EAX
POP RBP
RET
LAB_0019229f:
MOV qword ptr [RSI],0x0
MOV dword ptr [RDI + 0x50],0x6
MOV EAX,0x64
RET
|
int8 stmt_buffered_fetch(long param_1,int8 *param_2)
{
if (*(long *)(param_1 + 0xe0) != 0) {
*(int4 *)(param_1 + 0x50) = 5;
*param_2 = *(int8 *)(*(long *)(param_1 + 0xe0) + 8);
*(int8 *)(param_1 + 0xe0) = **(int8 **)(param_1 + 0xe0);
return 0;
}
*param_2 = 0;
*(int4 *)(param_1 + 0x50) = 6;
return 100;
}
|
|
12,376
|
LefDefParser::defwSpecialNetOriginal(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
|
int
defwSpecialNetOriginal(const char *name)
{
defwFunc = DEFW_SNET; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwSpecialNetOptions())
return DEFW_BAD_ORDER;
fprintf(defwFile, "\n + ORIGINAL %s", name);
defwLines++;
return DEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::defwSpecialNetOriginal(char const*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x13728(%rip), %rax # 0x2b168
movl $0x32, (%rax)
leaq 0x1370b(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x17a5d
movl $0x1, 0x14(%rsp)
jmp 0x17aab
callq 0x174e0
cmpl $0x0, %eax
jne 0x17a71
movl $0x2, 0x14(%rsp)
jmp 0x17aab
leaq 0x136e0(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0xd00b(%rip), %rsi # 0x24a92
movb $0x0, %al
callq 0x10f0
leaq 0x136cb(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x136bf(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser22defwSpecialNetOriginalEPKc:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 32h ; '2'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_17A5D
mov [rsp+18h+var_4], 1
jmp short loc_17AAB
loc_17A5D:
call _ZN12LefDefParser21defwSpecialNetOptionsEv; LefDefParser::defwSpecialNetOptions(void)
cmp eax, 0
jnz short loc_17A71
mov [rsp+18h+var_4], 2
jmp short loc_17AAB
loc_17A71:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aOriginalS; "\n + ORIGINAL %s"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
mov [rsp+18h+var_4], 0
loc_17AAB:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::defwSpecialNetOriginal(LefDefParser *this, const char *a2)
{
LefDefParser::defwFunc = 50;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwSpecialNetOptions(this) )
{
fprintf(LefDefParser::defwFile, "\n + ORIGINAL %s", (const char *)this);
++LefDefParser::defwLines;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
defwSpecialNetOriginal:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x32
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x00117a5d
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00117aab
LAB_00117a5d:
CALL 0x001174e0
CMP EAX,0x0
JNZ 0x00117a71
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00117aab
LAB_00117a71:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x124a92]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x14],0x0
LAB_00117aab:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::defwSpecialNetOriginal(char const*) */
int4 LefDefParser::defwSpecialNetOriginal(char *param_1)
{
int iVar1;
int4 local_4;
defwFunc = 0x32;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else {
iVar1 = defwSpecialNetOptions();
if (iVar1 == 0) {
local_4 = 2;
}
else {
fprintf(defwFile,"\n + ORIGINAL %s",param_1);
defwLines = defwLines + 1;
local_4 = 0;
}
}
return local_4;
}
|
|
12,377
|
server_context::receive_multi_results(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&, std::function<void (std::vector<std::unique_ptr<server_task_result, std::default_delete<server_task_result>>, std::allocator<std::unique_ptr<server_task_result, std::default_delete<server_task_result>>>>&)> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>)> const&, std::function<bool ()> const&)
|
monkey531[P]llama/examples/server/server.cpp
|
void receive_multi_results(
const std::unordered_set<int> & id_tasks,
const std::function<void(std::vector<server_task_result_ptr>&)> & result_handler,
const std::function<void(json)> & error_handler,
const std::function<bool()> & is_connection_closed) {
std::vector<server_task_result_ptr> results(id_tasks.size());
for (int i = 0; i < (int)id_tasks.size(); i++) {
server_task_result_ptr result = queue_results.recv_with_timeout(id_tasks, HTTP_POLLING_SECONDS);
if (is_connection_closed()) {
cancel_tasks(id_tasks);
return;
}
if (result == nullptr) {
i--; // retry
continue;
}
if (result->is_error()) {
error_handler(result->to_json());
cancel_tasks(id_tasks);
return;
}
GGML_ASSERT(
dynamic_cast<server_task_result_cmpl_final*>(result.get()) != nullptr
|| dynamic_cast<server_task_result_embd*>(result.get()) != nullptr
|| dynamic_cast<server_task_result_rerank*>(result.get()) != nullptr
);
const size_t idx = result->get_index();
GGML_ASSERT(idx < results.size() && "index out of range");
results[idx] = std::move(result);
}
result_handler(results);
}
|
O2
|
cpp
|
server_context::receive_multi_results(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&, std::function<void (std::vector<std::unique_ptr<server_task_result, std::default_delete<server_task_result>>, std::allocator<std::unique_ptr<server_task_result, std::default_delete<server_task_result>>>>&)> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>)> const&, std::function<bool ()> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movq 0x18(%rsi), %rsi
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x79946
leaq 0x1578(%r13), %rbx
xorl %ebp, %ebp
cmpl 0x18(%r12), %ebp
jge 0x775ca
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0x79998
movq %r14, %rdi
callq 0x79ad2
testb %al, %al
jne 0x774ed
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7751b
movq (%rdi), %rax
callq *(%rax)
movq 0x8(%rsp), %r15
testb %al, %al
je 0x7751f
movq (%r15), %rax
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
movq %rdi, %r15
callq *0x18(%rax)
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x79bf8
movq %r15, %rdi
callq 0x3ec50
movq %r13, %rdi
movq %r12, %rsi
callq 0x79ae2
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7750b
movq (%rdi), %rax
callq *0x28(%rax)
testb %r15b, %r15b
je 0x775d9
incl %ebp
jmp 0x77485
decl %ebp
jmp 0x77514
testq %r15, %r15
je 0x775f2
movq %r15, %rdi
leaq 0xed8be(%rip), %rsi # 0x164df0
leaq 0xed95f(%rip), %rdx # 0x164e98
xorl %ecx, %ecx
callq 0x28ca0
testq %rax, %rax
jne 0x7757f
movq %r15, %rdi
leaq 0xed8a1(%rip), %rsi # 0x164df0
leaq 0xed95a(%rip), %rdx # 0x164eb0
xorl %ecx, %ecx
callq 0x28ca0
testq %rax, %rax
jne 0x7757f
movq %r15, %rdi
leaq 0xed884(%rip), %rsi # 0x164df0
leaq 0xed955(%rip), %rdx # 0x164ec8
xorl %ecx, %ecx
callq 0x28ca0
testq %rax, %rax
je 0x775f2
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
cltq
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x77613
movq 0x8(%rsp), %rdx
andq $0x0, 0x8(%rsp)
movq (%rcx,%rax,8), %rdi
movq %rdx, (%rcx,%rax,8)
movb $0x1, %r15b
testq %rdi, %rdi
je 0x774fb
movq (%rdi), %rax
callq *0x28(%rax)
jmp 0x774fb
leaq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x79c0c
leaq 0x20(%rsp), %rdi
callq 0x56732
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7b35c(%rip), %rdi # 0xf2955
leaq 0x7a762(%rip), %rdx # 0xf1d62
leaq 0x7e59b(%rip), %rcx # 0xf5ba2
movl $0x9df, %esi # imm = 0x9DF
xorl %eax, %eax
callq 0x292a0
leaq 0x7b33b(%rip), %rdi # 0xf2955
leaq 0x7a741(%rip), %rdx # 0xf1d62
leaq 0x7e648(%rip), %rcx # 0xf5c70
movl $0x9e1, %esi # imm = 0x9E1
xorl %eax, %eax
callq 0x292a0
jmp 0x7764b
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3ec50
jmp 0x77653
jmp 0x77650
jmp 0x77650
jmp 0x77650
movq %rax, %rbx
jmp 0x77663
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x77663
movq (%rdi), %rax
callq *0x28(%rax)
leaq 0x20(%rsp), %rdi
callq 0x56732
movq %rbx, %rdi
callq 0x293c0
nop
|
_ZN14server_context21receive_multi_resultsERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEERKSt8functionIFvRSt6vectorISt10unique_ptrI18server_task_resultSt14default_deleteISC_EESaISF_EEEERKS9_IFvN8nlohmann16json_abi_v3_11_310basic_jsonINSO_11ordered_mapESA_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNSO_14adl_serializerESA_IhSaIhEEvEEEERKS9_IFbvEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, r8
mov [rsp+78h+var_60], rcx
mov [rsp+78h+var_68], rdx
mov r12, rsi
mov r13, rdi
mov rsi, [rsi+18h]
lea rdi, [rsp+78h+var_58]
lea rdx, [rsp+78h+lpsrc]
call _ZNSt6vectorISt10unique_ptrI18server_task_resultSt14default_deleteIS1_EESaIS4_EEC2EmRKS5_; std::vector<std::unique_ptr<server_task_result>>::vector(ulong,std::allocator<std::unique_ptr<server_task_result>> const&)
lea rbx, [r13+1578h]
xor ebp, ebp
loc_77485:
cmp ebp, [r12+18h]
jge loc_775CA
lea rdi, [rsp+78h+lpsrc]
mov rsi, rbx
mov rdx, r12
push 1
pop rcx
call _ZN15server_response17recv_with_timeoutERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEi; server_response::recv_with_timeout(std::unordered_set<int> const&,int)
mov rdi, r14
call _ZNKSt8functionIFbvEEclEv; std::function<bool ()(void)>::operator()(void)
test al, al
jnz short loc_774ED
mov rdi, [rsp+78h+lpsrc]
test rdi, rdi
jz short loc_7751B
mov rax, [rdi]
call qword ptr [rax]
mov r15, [rsp+78h+lpsrc]
test al, al
jz short loc_7751F
mov rax, [r15]
lea rdi, [rsp+78h+var_40]
mov rsi, r15
mov r15, rdi
call qword ptr [rax+18h]
mov rdi, [rsp+78h+var_60]
mov rsi, r15
call _ZNKSt8functionIFvN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEEclESE_; std::function<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>)>::operator()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_774ED:
mov rdi, r13
mov rsi, r12
call _ZN14server_context12cancel_tasksERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE; server_context::cancel_tasks(std::unordered_set<int> const&)
xor r15d, r15d
loc_774FB:
mov rdi, [rsp+78h+lpsrc]
test rdi, rdi
jz short loc_7750B
mov rax, [rdi]
call qword ptr [rax+28h]
loc_7750B:
test r15b, r15b
jz loc_775D9
loc_77514:
inc ebp
jmp loc_77485
loc_7751B:
dec ebp
jmp short loc_77514
loc_7751F:
test r15, r15
jz loc_775F2
mov rdi, r15; lpsrc
lea rsi, _ZTI18server_task_result; lpstype
lea rdx, _ZTI29server_task_result_cmpl_final; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jnz short loc_7757F
mov rdi, r15; lpsrc
lea rsi, _ZTI18server_task_result; lpstype
lea rdx, _ZTI23server_task_result_embd; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jnz short loc_7757F
mov rdi, r15; lpsrc
lea rsi, _ZTI18server_task_result; lpstype
lea rdx, _ZTI25server_task_result_rerank; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz short loc_775F2
loc_7757F:
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+10h]
cdqe
mov rcx, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_50]
sub rdx, rcx
sar rdx, 3
cmp rdx, rax
jbe short loc_77613
mov rdx, [rsp+78h+lpsrc]
and [rsp+78h+lpsrc], 0
mov rdi, [rcx+rax*8]
mov [rcx+rax*8], rdx
mov r15b, 1
test rdi, rdi
jz loc_774FB
mov rax, [rdi]
call qword ptr [rax+28h]
jmp loc_774FB
loc_775CA:
lea rsi, [rsp+78h+var_58]
mov rdi, [rsp+78h+var_68]
call _ZNKSt8functionIFvRSt6vectorISt10unique_ptrI18server_task_resultSt14default_deleteIS2_EESaIS5_EEEEclES8_; std::function<void ()(std::vector<std::unique_ptr<server_task_result>> &)>::operator()(std::vector<std::unique_ptr<server_task_result>> &)
loc_775D9:
lea rdi, [rsp+78h+var_58]
call _ZNSt6vectorISt10unique_ptrI18server_task_resultSt14default_deleteIS1_EESaIS4_EED2Ev; std::vector<std::unique_ptr<server_task_result>>::~vector()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_775F2:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDynamicCastSer_4; "dynamic_cast<server_task_result_cmpl_fi"...
mov esi, 9DFh
xor eax, eax
call _ggml_abort
loc_77613:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdxResultsSize; "idx < results.size() && \"index out of "...
mov esi, 9E1h
xor eax, eax
call _ggml_abort
jmp short loc_7764B
mov rbx, rax
lea rdi, [rsp+78h+var_40]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_77653
jmp short loc_77650
jmp short loc_77650
jmp short loc_77650
loc_7764B:
mov rbx, rax
jmp short loc_77663
loc_77650:
mov rbx, rax
loc_77653:
mov rdi, [rsp+78h+lpsrc]
test rdi, rdi
jz short loc_77663
mov rax, [rdi]
call qword ptr [rax+28h]
loc_77663:
lea rdi, [rsp+78h+var_58]
call _ZNSt6vectorISt10unique_ptrI18server_task_resultSt14default_deleteIS1_EESaIS4_EED2Ev; std::vector<std::unique_ptr<server_task_result>>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long server_context::receive_multi_results(int a1, long long a2, long long a3, long long a4, long long a5)
{
int v7; // r8d
int v8; // r9d
int i; // ebp
int v10; // edx
int v11; // ecx
char v12; // al
void *v13; // r15
char v14; // r15
int v15; // eax
void *v16; // rdx
long long v17; // rdi
long long v19; // rbx
int v20; // [rsp+0h] [rbp-78h]
void *lpsrc; // [rsp+8h] [rbp-70h] BYREF
long long v22; // [rsp+10h] [rbp-68h]
long long v23; // [rsp+18h] [rbp-60h]
long long v24; // [rsp+20h] [rbp-58h] BYREF
long long v25; // [rsp+28h] [rbp-50h]
char v26; // [rsp+30h] [rbp-48h]
_BYTE v27[64]; // [rsp+38h] [rbp-40h] BYREF
v23 = a4;
v22 = a3;
std::vector<std::unique_ptr<server_task_result>>::vector(&v24, *(_QWORD *)(a2 + 24), &lpsrc);
for ( i = 0; i < *(_DWORD *)(a2 + 24); ++i )
{
server_response::recv_with_timeout(
(unsigned int)&lpsrc,
a1 + 5496,
a2,
1,
v7,
v8,
v20,
(_DWORD)lpsrc,
v22,
v23,
v24,
v25,
v26);
if ( (unsigned __int8)std::function<bool ()(void)>::operator()(a5) )
goto LABEL_7;
if ( !lpsrc )
{
--i;
continue;
}
v12 = (**(long long ( ***)(void *))lpsrc)(lpsrc);
v13 = lpsrc;
if ( v12 )
{
(*(void ( **)(_BYTE *, void *))(*(_QWORD *)lpsrc + 24LL))(v27, lpsrc);
std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>)>::operator()(
v23,
v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v27);
LABEL_7:
server_context::cancel_tasks(a1, a2, v10, v11, v7, v8, v20, (char)lpsrc, v22, v23, v24);
v14 = 0;
goto LABEL_8;
}
if ( !lpsrc
|| !__dynamic_cast(
lpsrc,
(const struct __class_type_info *)&`typeinfo for'server_task_result,
(const struct __class_type_info *)&`typeinfo for'server_task_result_cmpl_final,
0LL)
&& !__dynamic_cast(
v13,
(const struct __class_type_info *)&`typeinfo for'server_task_result,
(const struct __class_type_info *)&`typeinfo for'server_task_result_embd,
0LL)
&& !__dynamic_cast(
v13,
(const struct __class_type_info *)&`typeinfo for'server_task_result,
(const struct __class_type_info *)&`typeinfo for'server_task_result_rerank,
0LL) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp",
2527LL,
"GGML_ASSERT(%s) failed",
"dynamic_cast<server_task_result_cmpl_final*>(result.get()) != nullptr || dynamic_cast<server_task_result_embd*>("
"result.get()) != nullptr || dynamic_cast<server_task_result_rerank*>(result.get()) != nullptr");
LABEL_23:
v19 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp",
2529LL,
"GGML_ASSERT(%s) failed",
"idx < results.size() && \"index out of range\"");
std::vector<std::unique_ptr<server_task_result>>::~vector(&v24);
_Unwind_Resume(v19);
}
v15 = (*(long long ( **)(void *))(*(_QWORD *)v13 + 16LL))(v13);
if ( (v25 - v24) >> 3 <= (unsigned long long)v15 )
goto LABEL_23;
v16 = lpsrc;
lpsrc = 0LL;
v17 = *(_QWORD *)(v24 + 8LL * v15);
*(_QWORD *)(v24 + 8LL * v15) = v16;
v14 = 1;
if ( v17 )
(*(void ( **)(long long))(*(_QWORD *)v17 + 40LL))(v17);
LABEL_8:
if ( lpsrc )
(*(void ( **)(void *))(*(_QWORD *)lpsrc + 40LL))(lpsrc);
if ( !v14 )
return std::vector<std::unique_ptr<server_task_result>>::~vector(&v24);
}
std::function<void ()(std::vector<std::unique_ptr<server_task_result>> &)>::operator()(v22, &v24);
return std::vector<std::unique_ptr<server_task_result>>::~vector(&v24);
}
|
receive_multi_results:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,R8
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV R12,RSI
MOV R13,RDI
MOV RSI,qword ptr [RSI + 0x18]
LEA RDI,[RSP + 0x20]
LEA RDX,[RSP + 0x8]
CALL 0x00179946
LEA RBX,[R13 + 0x1578]
XOR EBP,EBP
LAB_00177485:
CMP EBP,dword ptr [R12 + 0x18]
JGE 0x001775ca
LAB_00177490:
LEA RDI,[RSP + 0x8]
MOV RSI,RBX
MOV RDX,R12
PUSH 0x1
POP RCX
CALL 0x00179998
LAB_001774a3:
MOV RDI,R14
CALL 0x00179ad2
TEST AL,AL
JNZ 0x001774ed
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0017751b
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX]
MOV R15,qword ptr [RSP + 0x8]
TEST AL,AL
JZ 0x0017751f
MOV RAX,qword ptr [R15]
LEA RDI,[RSP + 0x38]
MOV RSI,R15
MOV R15,RDI
CALL qword ptr [RAX + 0x18]
LAB_001774d8:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R15
CALL 0x00179bf8
MOV RDI,R15
CALL 0x0013ec50
LAB_001774ed:
MOV RDI,R13
MOV RSI,R12
CALL 0x00179ae2
LAB_001774f8:
XOR R15D,R15D
LAB_001774fb:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0017750b
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_0017750b:
TEST R15B,R15B
JZ 0x001775d9
LAB_00177514:
INC EBP
JMP 0x00177485
LAB_0017751b:
DEC EBP
JMP 0x00177514
LAB_0017751f:
TEST R15,R15
JZ 0x001775f2
MOV RDI,R15
LEA RSI,[0x264df0]
LEA RDX,[0x264e98]
XOR ECX,ECX
CALL 0x00128ca0
TEST RAX,RAX
JNZ 0x0017757f
MOV RDI,R15
LEA RSI,[0x264df0]
LEA RDX,[0x264eb0]
XOR ECX,ECX
CALL 0x00128ca0
TEST RAX,RAX
JNZ 0x0017757f
MOV RDI,R15
LEA RSI,[0x264df0]
LEA RDX,[0x264ec8]
XOR ECX,ECX
CALL 0x00128ca0
TEST RAX,RAX
JZ 0x001775f2
LAB_0017757f:
MOV RAX,qword ptr [R15]
LAB_00177582:
MOV RDI,R15
CALL qword ptr [RAX + 0x10]
LAB_00177588:
CDQE
MOV RCX,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
SUB RDX,RCX
SAR RDX,0x3
CMP RDX,RAX
JBE 0x00177613
MOV RDX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV RDI,qword ptr [RCX + RAX*0x8]
MOV qword ptr [RCX + RAX*0x8],RDX
MOV R15B,0x1
TEST RDI,RDI
JZ 0x001774fb
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
JMP 0x001774fb
LAB_001775ca:
LEA RSI,[RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00179c0c
LAB_001775d9:
LEA RDI,[RSP + 0x20]
CALL 0x00156732
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001775f2:
LEA RDI,[0x1f2955]
LEA RDX,[0x1f1d62]
LEA RCX,[0x1f5ba2]
MOV ESI,0x9df
XOR EAX,EAX
CALL 0x001292a0
LAB_00177613:
LEA RDI,[0x1f2955]
LEA RDX,[0x1f1d62]
LEA RCX,[0x1f5c70]
MOV ESI,0x9e1
XOR EAX,EAX
CALL 0x001292a0
|
/* server_context::receive_multi_results(std::unordered_set<int, std::hash<int>, std::equal_to<int>,
std::allocator<int> > const&, std::function<void (std::vector<std::unique_ptr<server_task_result,
std::default_delete<server_task_result> >, std::allocator<std::unique_ptr<server_task_result,
std::default_delete<server_task_result> > > >&)> const&, std::function<void
(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>)> const&, std::function<bool ()> const&) */
void __thiscall
server_context::receive_multi_results
(server_context *this,unordered_set *param_1,function *param_2,function *param_3,
function *param_4)
{
long *plVar1;
bool bVar2;
long *plVar3;
char cVar4;
int iVar5;
long lVar6;
ulong uVar7;
int iVar8;
long *local_70;
function<void(std::vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>&)>
*local_68;
function<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>)>
*local_60;
long local_58;
long local_50;
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_40 [16];
local_68 = (function<void(std::vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>&)>
*)param_2;
local_60 = (function<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>)>
*)param_3;
std::
vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>
::vector((vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>
*)&local_58,*(ulong *)(param_1 + 0x18),(allocator *)&local_70);
for (iVar8 = 0; iVar8 < *(int *)(param_1 + 0x18); iVar8 = iVar8 + 1) {
/* try { // try from 00177490 to 001774a2 has its CatchHandler @ 0017764b */
server_response::recv_with_timeout((unordered_set *)&local_70,(int)this + 0x1578);
/* try { // try from 001774a3 to 001774d7 has its CatchHandler @ 00177650 */
cVar4 = std::function<bool()>::operator()((function<bool()> *)param_4);
if (cVar4 == '\0') {
if (local_70 != (long *)0x0) {
cVar4 = (**(code **)*local_70)();
plVar3 = local_70;
if (cVar4 != '\0') {
(**(code **)(*local_70 + 0x18))(local_40,local_70);
/* try { // try from 001774d8 to 001774e4 has its CatchHandler @ 00177636 */
std::
function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>)>
::operator()(local_60,local_40);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_40);
goto LAB_001774ed;
}
if (local_70 == (long *)0x0) {
LAB_001775f2:
/* try { // try from 001775f2 to 00177612 has its CatchHandler @ 00177649 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp"
,0x9df,"GGML_ASSERT(%s) failed",
"dynamic_cast<server_task_result_cmpl_final*>(result.get()) != nullptr || dynamic_cast<server_task_result_embd*>(result.get()) != nullptr || dynamic_cast<server_task_result_rerank*>(result.get()) != nullptr"
);
}
lVar6 = __dynamic_cast(local_70,&server_task_result::typeinfo,
&server_task_result_cmpl_final::typeinfo,0);
if (lVar6 == 0) {
lVar6 = __dynamic_cast(plVar3,&server_task_result::typeinfo,
&server_task_result_embd::typeinfo,0);
if (lVar6 == 0) {
lVar6 = __dynamic_cast(plVar3,&server_task_result::typeinfo,
&server_task_result_rerank::typeinfo,0);
if (lVar6 == 0) goto LAB_001775f2;
}
}
/* try { // try from 00177582 to 00177587 has its CatchHandler @ 00177647 */
iVar5 = (**(code **)(*plVar3 + 0x10))(plVar3);
plVar3 = local_70;
uVar7 = (ulong)iVar5;
if ((ulong)(local_50 - local_58 >> 3) <= uVar7) {
/* try { // try from 00177613 to 00177633 has its CatchHandler @ 00177645 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp"
,0x9e1,"GGML_ASSERT(%s) failed",
"idx < results.size() && \"index out of range\"");
}
local_70 = (long *)0x0;
plVar1 = *(long **)(local_58 + uVar7 * 8);
*(long **)(local_58 + uVar7 * 8) = plVar3;
bVar2 = true;
if (plVar1 != (long *)0x0) {
(**(code **)(*plVar1 + 0x28))();
}
goto LAB_001774fb;
}
iVar8 = iVar8 + -1;
}
else {
LAB_001774ed:
/* try { // try from 001774ed to 001774f7 has its CatchHandler @ 00177650 */
cancel_tasks(this,param_1);
bVar2 = false;
LAB_001774fb:
if (local_70 != (long *)0x0) {
(**(code **)(*local_70 + 0x28))();
}
if (!bVar2) goto LAB_001775d9;
}
}
/* try { // try from 001775ca to 001775d8 has its CatchHandler @ 00177634 */
std::
function<void(std::vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>&)>
::operator()(local_68,(vector *)&local_58);
LAB_001775d9:
std::
vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>
::~vector((vector<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>,std::allocator<std::unique_ptr<server_task_result,std::default_delete<server_task_result>>>>
*)&local_58);
return;
}
|
|
12,378
|
stbi__bitcount
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
|
static int stbi__bitcount(unsigned int a)
{
a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2
a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4
a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
a = (a + (a >> 8)); // max 16 per 8 bits
a = (a + (a >> 16)); // max 32 per 8 bits
return a & 0xff;
}
|
O2
|
c
|
stbi__bitcount:
movl $0x55555555, %eax # imm = 0x55555555
movl %edi, %ecx
andl %eax, %ecx
shrl %edi
andl %eax, %edi
addl %ecx, %edi
movl $0x33333333, %eax # imm = 0x33333333
movl %edi, %ecx
andl %eax, %ecx
shrl $0x2, %edi
andl %eax, %edi
addl %ecx, %edi
movl %edi, %eax
shrl $0x4, %eax
addl %edi, %eax
andl $0xf0f0f0f, %eax # imm = 0xF0F0F0F
movl %eax, %ecx
shrl $0x8, %ecx
addl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
movzbl %al, %eax
retq
|
stbi__bitcount:
mov eax, 55555555h
mov ecx, edi
and ecx, eax
shr edi, 1
and edi, eax
add edi, ecx
mov eax, 33333333h
mov ecx, edi
and ecx, eax
shr edi, 2
and edi, eax
add edi, ecx
mov eax, edi
shr eax, 4
add eax, edi
and eax, 0F0F0F0Fh
mov ecx, eax
shr ecx, 8
add ecx, eax
mov eax, ecx
shr eax, 10h
add eax, ecx
movzx eax, al
retn
|
long long stbi__bitcount(unsigned int a1)
{
unsigned int v1; // edi
v1 = (((a1 & 0x55555555) + ((a1 >> 1) & 0x55555555)) & 0x33333333)
+ ((((a1 & 0x55555555) + ((a1 >> 1) & 0x55555555)) >> 2) & 0x33333333);
return (unsigned __int8)(((v1 + (v1 >> 4)) & 0xF)
+ ((unsigned __int16)((v1 + (v1 >> 4)) & 0xF0F) >> 8)
+ ((((v1 + (v1 >> 4)) & 0xF0F0F0F) + (((v1 + (v1 >> 4)) & 0xF0F0F0F) >> 8)) >> 16));
}
|
stbi__bitcount:
MOV EAX,0x55555555
MOV ECX,EDI
AND ECX,EAX
SHR EDI,0x1
AND EDI,EAX
ADD EDI,ECX
MOV EAX,0x33333333
MOV ECX,EDI
AND ECX,EAX
SHR EDI,0x2
AND EDI,EAX
ADD EDI,ECX
MOV EAX,EDI
SHR EAX,0x4
ADD EAX,EDI
AND EAX,0xf0f0f0f
MOV ECX,EAX
SHR ECX,0x8
ADD ECX,EAX
MOV EAX,ECX
SHR EAX,0x10
ADD EAX,ECX
MOVZX EAX,AL
RET
|
uint stbi__bitcount(uint param_1)
{
uint uVar1;
uVar1 = (param_1 >> 1 & 0x55555555) + (param_1 & 0x55555555);
uVar1 = (uVar1 >> 2 & 0x33333333) + (uVar1 & 0x33333333);
uVar1 = (uVar1 >> 4) + uVar1 & 0xf0f0f0f;
uVar1 = (uVar1 >> 8) + uVar1;
return (uVar1 >> 0x10) + uVar1 & 0xff;
}
|
|
12,379
|
my_hash_next
|
eloqsql/mysys/hash.c
|
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
uint idx;
if (*current_record != NO_RECORD)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next)
{
pos=data+idx;
if (!hashcmp(hash,pos,key,length))
{
*current_record= idx;
return pos->data;
}
}
*current_record= NO_RECORD;
}
return 0;
}
|
O3
|
c
|
my_hash_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movl (%rcx), %ebx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %rbx
je 0x29125
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, -0x30(%rbp)
movq 0x28(%rdi), %r13
shlq $0x4, %rbx
addq %r13, %rbx
movl (%rbx), %r14d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r14
je 0x2911b
movq %r14, %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rbx
movq 0x8(%r13,%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq 0x2901d
testl %eax, %eax
jne 0x290de
movq -0x30(%rbp), %rax
movl %r14d, (%rax)
movq 0x8(%rbx), %rax
jmp 0x29127
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_hash_next:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rdx
mov ebx, [rcx]
mov eax, 0FFFFFFFFh
cmp rbx, rax
jz short loc_29125
mov r15, rsi
mov r12, rdi
mov [rbp+var_30], rcx
mov r13, [rdi+28h]
shl rbx, 4
add rbx, r13
loc_290DE:
mov r14d, [rbx]
mov eax, 0FFFFFFFFh
cmp r14, rax
jz short loc_2911B
mov rax, r14
shl rax, 4
lea rbx, [rax+r13]
mov rsi, [r13+rax+8]
mov rdi, r12
mov rdx, r15
mov rcx, [rbp+var_38]
call hashcmp
test eax, eax
jnz short loc_290DE
mov rax, [rbp+var_30]
mov [rax], r14d
mov rax, [rbx+8]
jmp short loc_29127
loc_2911B:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0FFFFFFFFh
loc_29125:
xor eax, eax
loc_29127:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_hash_next(_QWORD *a1, long long a2, long long a3, _DWORD *a4)
{
long long v4; // rbx
long long v5; // r13
unsigned int *v6; // rbx
long long v7; // r14
v4 = (unsigned int)*a4;
if ( v4 != 0xFFFFFFFFLL )
{
v5 = a1[5];
v6 = (unsigned int *)(v5 + 16 * v4);
while ( 1 )
{
v7 = *v6;
if ( v7 == 0xFFFFFFFFLL )
break;
v6 = (unsigned int *)(16 * v7 + v5);
if ( !hashcmp(a1, *((_QWORD *)v6 + 1), a2, a3) )
{
*a4 = v7;
return *((_QWORD *)v6 + 1);
}
}
*a4 = -1;
}
return 0LL;
}
|
my_hash_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RDX
MOV EBX,dword ptr [RCX]
MOV EAX,0xffffffff
CMP RBX,RAX
JZ 0x00129125
MOV R15,RSI
MOV R12,RDI
MOV qword ptr [RBP + -0x30],RCX
MOV R13,qword ptr [RDI + 0x28]
SHL RBX,0x4
ADD RBX,R13
LAB_001290de:
MOV R14D,dword ptr [RBX]
MOV EAX,0xffffffff
CMP R14,RAX
JZ 0x0012911b
MOV RAX,R14
SHL RAX,0x4
LEA RBX,[RAX + R13*0x1]
MOV RSI,qword ptr [R13 + RAX*0x1 + 0x8]
MOV RDI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x0012901d
TEST EAX,EAX
JNZ 0x001290de
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],R14D
MOV RAX,qword ptr [RBX + 0x8]
JMP 0x00129127
LAB_0012911b:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0xffffffff
LAB_00129125:
XOR EAX,EAX
LAB_00129127:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4)
{
uint uVar1;
long lVar2;
int iVar3;
long lVar4;
int8 uVar5;
uint *puVar6;
if ((ulong)*param_4 == 0xffffffff) {
LAB_00129125:
uVar5 = 0;
}
else {
lVar2 = *(long *)(param_1 + 0x28);
puVar6 = (uint *)((ulong)*param_4 * 0x10 + lVar2);
do {
uVar1 = *puVar6;
if ((ulong)uVar1 == 0xffffffff) {
*param_4 = 0xffffffff;
goto LAB_00129125;
}
lVar4 = (ulong)uVar1 * 0x10;
puVar6 = (uint *)(lVar4 + lVar2);
iVar3 = hashcmp(param_1,*(int8 *)(lVar2 + 8 + lVar4),param_2,param_3);
} while (iVar3 != 0);
*param_4 = uVar1;
uVar5 = *(int8 *)(puVar6 + 2);
}
return uVar5;
}
|
|
12,380
|
init_slave_io_cache
|
eloqsql/mysys/mf_iocache.c
|
int init_slave_io_cache(IO_CACHE *master, IO_CACHE *slave)
{
uchar *slave_buf;
DBUG_ASSERT(master->type == READ_CACHE);
DBUG_ASSERT(!master->share);
DBUG_ASSERT(master->alloced_buffer);
if (!(slave_buf= (uchar*)my_malloc(PSI_INSTRUMENT_ME, master->alloced_buffer, MYF(0))))
{
return 1;
}
memcpy(slave, master, sizeof(IO_CACHE));
slave->buffer= slave_buf;
memcpy(slave->buffer, master->buffer, master->alloced_buffer);
slave->read_pos= slave->buffer + (master->read_pos - master->buffer);
slave->read_end= slave->buffer + (master->read_end - master->buffer);
if (master->next_file_user)
{
IO_CACHE *p;
for (p= master->next_file_user;
p->next_file_user !=master;
p= p->next_file_user)
{}
p->next_file_user= slave;
slave->next_file_user= master;
}
else
{
slave->next_file_user= master;
master->next_file_user= slave;
}
return 0;
}
|
O0
|
c
|
init_slave_io_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
jmp 0xe3532
jmp 0xe3534
jmp 0xe3536
jmp 0xe3538
jmp 0xe353a
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0xf9ff0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0xe3566
movl $0x1, -0x4(%rbp)
jmp 0xe3676
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x108, %edx # imm = 0x108
callq 0x2a0c0
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rdx
callq 0x2a0c0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x20(%rdx), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x20(%rdx), %rdx
subq %rdx, %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xd8(%rax)
je 0xe3651
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0xd8(%rax), %rax
cmpq -0x10(%rbp), %rax
je 0xe3631
jmp 0xe3620
movq -0x28(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xe360d
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xd8(%rax)
jmp 0xe366f
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
|
init_slave_io_cache:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
jmp short $+2
loc_E3532:
jmp short $+2
loc_E3534:
jmp short $+2
loc_E3536:
jmp short $+2
loc_E3538:
jmp short $+2
loc_E353A:
mov rax, [rbp+var_10]
mov rsi, [rax+100h]
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_E3566
mov [rbp+var_4], 1
jmp loc_E3676
loc_E3566:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_10]
mov edx, 108h
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax+20h], rcx
mov rax, [rbp+var_18]
mov rdi, [rax+20h]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
mov rax, [rbp+var_10]
mov rdx, [rax+100h]
call _memcpy
mov rax, [rbp+var_18]
mov rcx, [rax+20h]
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rdx, [rbp+var_10]
mov rdx, [rdx+20h]
sub rax, rdx
add rcx, rax
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+20h]
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rdx, [rbp+var_10]
mov rdx, [rdx+20h]
sub rax, rdx
add rcx, rax
mov rax, [rbp+var_18]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+0D8h], 0
jz short loc_E3651
mov rax, [rbp+var_10]
mov rax, [rax+0D8h]
mov [rbp+var_28], rax
loc_E360D:
mov rax, [rbp+var_28]
mov rax, [rax+0D8h]
cmp rax, [rbp+var_10]
jz short loc_E3631
jmp short $+2
loc_E3620:
mov rax, [rbp+var_28]
mov rax, [rax+0D8h]
mov [rbp+var_28], rax
jmp short loc_E360D
loc_E3631:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+0D8h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax+0D8h], rcx
jmp short loc_E366F
loc_E3651:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax+0D8h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0D8h], rcx
loc_E366F:
mov [rbp+var_4], 0
loc_E3676:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long init_slave_io_cache(_QWORD *a1, _QWORD *a2)
{
long long i; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
v4 = my_malloc(0LL, a1[32], 0LL);
if ( v4 )
{
memcpy(a2, a1, 264LL);
a2[4] = v4;
memcpy(a2[4], a1[4], a1[32]);
a2[2] = a1[2] - a1[4] + a2[4];
a2[3] = a1[3] - a1[4] + a2[4];
if ( a1[27] )
{
for ( i = a1[27]; *(_QWORD **)(i + 216) != a1; i = *(_QWORD *)(i + 216) )
;
*(_QWORD *)(i + 216) = a2;
a2[27] = a1;
}
else
{
a2[27] = a1;
a1[27] = a2;
}
return 0;
}
else
{
return 1;
}
}
|
init_slave_io_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
JMP 0x001e3532
LAB_001e3532:
JMP 0x001e3534
LAB_001e3534:
JMP 0x001e3536
LAB_001e3536:
JMP 0x001e3538
LAB_001e3538:
JMP 0x001e353a
LAB_001e353a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x100]
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f9ff0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x001e3566
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e3676
LAB_001e3566:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x108
CALL 0x0012a0c0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x100]
CALL 0x0012a0c0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x20]
SUB RAX,RDX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x20]
SUB RAX,RDX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0xd8],0x0
JZ 0x001e3651
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001e360d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x001e3631
JMP 0x001e3620
LAB_001e3620:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xd8]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001e360d
LAB_001e3631:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0xd8],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xd8],RCX
JMP 0x001e366f
LAB_001e3651:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xd8],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xd8],RCX
LAB_001e366f:
MOV dword ptr [RBP + -0x4],0x0
LAB_001e3676:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 init_slave_io_cache(void *param_1,void *param_2)
{
long lVar1;
int8 local_30;
int4 local_c;
lVar1 = my_malloc(0,*(int8 *)((long)param_1 + 0x100),0);
if (lVar1 == 0) {
local_c = 1;
}
else {
memcpy(param_2,param_1,0x108);
*(long *)((long)param_2 + 0x20) = lVar1;
memcpy(*(void **)((long)param_2 + 0x20),*(void **)((long)param_1 + 0x20),
*(size_t *)((long)param_1 + 0x100));
*(long *)((long)param_2 + 0x10) =
*(long *)((long)param_2 + 0x20) +
(*(long *)((long)param_1 + 0x10) - *(long *)((long)param_1 + 0x20));
*(long *)((long)param_2 + 0x18) =
*(long *)((long)param_2 + 0x20) +
(*(long *)((long)param_1 + 0x18) - *(long *)((long)param_1 + 0x20));
if (*(long *)((long)param_1 + 0xd8) == 0) {
*(void **)((long)param_2 + 0xd8) = param_1;
*(void **)((long)param_1 + 0xd8) = param_2;
}
else {
for (local_30 = *(long *)((long)param_1 + 0xd8); *(void **)(local_30 + 0xd8) != param_1;
local_30 = *(long *)(local_30 + 0xd8)) {
}
*(void **)(local_30 + 0xd8) = param_2;
*(void **)((long)param_2 + 0xd8) = param_1;
}
local_c = 0;
}
return local_c;
}
|
|
12,381
|
safe_lexcstrdup_root
|
eloqsql/mysys/my_alloc.c
|
LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
}
|
O3
|
c
|
safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x9d844
movq %rbx, %rdx
callq 0x9d7a9
jmp 0x9d84b
leaq 0x4271a(%rip), %rax # 0xdff65
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
|
safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_9D844
mov rdx, rbx
call strmake_root
jmp short loc_9D84B
loc_9D844:
lea rax, asc_DFF61+4; ""
loc_9D84B:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
|
char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
|
safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0019d844
MOV RDX,RBX
CALL 0x0019d7a9
JMP 0x0019d84b
LAB_0019d844:
LEA RAX,[0x1dff65]
LAB_0019d84b:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int *puVar1;
int1 auVar2 [16];
if (param_3 == 0) {
puVar1 = &DAT_001dff65;
}
else {
puVar1 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = puVar1;
return auVar2;
}
|
|
12,382
|
r3d_shader_load_screen_ssao
|
r3d/src/r3d_state.c
|
void r3d_shader_load_screen_ssao(void)
{
R3D.shader.screen.ssao.id = rlLoadShaderCode(
VS_COMMON_SCREEN, FS_SCREEN_SSAO
);
r3d_shader_get_location(screen.ssao, uTexDepth);
r3d_shader_get_location(screen.ssao, uTexNormal);
r3d_shader_get_location(screen.ssao, uTexKernel);
r3d_shader_get_location(screen.ssao, uTexNoise);
r3d_shader_get_location(screen.ssao, uMatInvProj);
r3d_shader_get_location(screen.ssao, uMatInvView);
r3d_shader_get_location(screen.ssao, uMatProj);
r3d_shader_get_location(screen.ssao, uMatView);
r3d_shader_get_location(screen.ssao, uResolution);
r3d_shader_get_location(screen.ssao, uNear);
r3d_shader_get_location(screen.ssao, uFar);
r3d_shader_get_location(screen.ssao, uRadius);
r3d_shader_get_location(screen.ssao, uBias);
r3d_shader_enable(screen.ssao);
r3d_shader_set_sampler2D_slot(screen.ssao, uTexDepth, 0);
r3d_shader_set_sampler2D_slot(screen.ssao, uTexNormal, 1);
r3d_shader_set_sampler1D_slot(screen.ssao, uTexKernel, 2);
r3d_shader_set_sampler2D_slot(screen.ssao, uTexNoise, 3);
r3d_shader_disable();
}
|
O3
|
c
|
r3d_shader_load_screen_ssao:
pushq %rbp
movq %rsp, %rbp
leaq 0x56601(%rip), %rdi # 0x119da0
leaq 0x5bd1a(%rip), %rsi # 0x11f4c0
callq 0x1e505
movl %eax, 0xed637(%rip) # 0x1b0de8
leaq 0x4ea11(%rip), %rsi # 0x1121c9
movl %eax, %edi
callq 0x1e95e
movl %eax, 0xed62b(%rip) # 0x1b0df0
movl 0xed61d(%rip), %edi # 0x1b0de8
leaq 0x4e6fa(%rip), %rsi # 0x111ecc
callq 0x1e95e
movl %eax, 0xed61b(%rip) # 0x1b0df8
movl 0xed605(%rip), %edi # 0x1b0de8
leaq 0x4e9e9(%rip), %rsi # 0x1121d3
callq 0x1e95e
movl %eax, 0xed60b(%rip) # 0x1b0e00
movl 0xed5ed(%rip), %edi # 0x1b0de8
leaq 0x4e77d(%rip), %rsi # 0x111f7f
callq 0x1e95e
movl %eax, 0xed5fb(%rip) # 0x1b0e08
movl 0xed5d5(%rip), %edi # 0x1b0de8
leaq 0x4e9c4(%rip), %rsi # 0x1121de
callq 0x1e95e
movl %eax, 0xed5e7(%rip) # 0x1b0e0c
movl 0xed5bd(%rip), %edi # 0x1b0de8
leaq 0x4e72b(%rip), %rsi # 0x111f5d
callq 0x1e95e
movl %eax, 0xed5d3(%rip) # 0x1b0e10
movl 0xed5a5(%rip), %edi # 0x1b0de8
leaq 0x4e601(%rip), %rsi # 0x111e4b
callq 0x1e95e
movl %eax, 0xed5bf(%rip) # 0x1b0e14
movl 0xed58d(%rip), %edi # 0x1b0de8
leaq 0x4e5f2(%rip), %rsi # 0x111e54
callq 0x1e95e
movl %eax, 0xed5ab(%rip) # 0x1b0e18
movl 0xed575(%rip), %edi # 0x1b0de8
leaq 0x4e970(%rip), %rsi # 0x1121ea
callq 0x1e95e
movl %eax, 0xed59f(%rip) # 0x1b0e24
movl 0xed55d(%rip), %edi # 0x1b0de8
leaq 0x4e964(%rip), %rsi # 0x1121f6
callq 0x1e95e
movl %eax, 0xed58f(%rip) # 0x1b0e2c
movl 0xed545(%rip), %edi # 0x1b0de8
leaq 0x4e91a(%rip), %rsi # 0x1121c4
callq 0x1e95e
movl %eax, 0xed57f(%rip) # 0x1b0e34
movl 0xed52d(%rip), %edi # 0x1b0de8
leaq 0x4e93a(%rip), %rsi # 0x1121fc
callq 0x1e95e
movl %eax, 0xed56f(%rip) # 0x1b0e3c
movl 0xed515(%rip), %edi # 0x1b0de8
leaq 0x4e92a(%rip), %rsi # 0x112204
callq 0x1e95e
movl %eax, 0xed55f(%rip) # 0x1b0e44
movl 0xed4fd(%rip), %edi # 0x1b0de8
callq 0x1bd8a
cmpl $0x0, 0xed4f5(%rip) # 0x1b0dec
je 0xc391f
movl $0x0, 0xed4e9(%rip) # 0x1b0dec
leaq 0xed4e2(%rip), %rsi # 0x1b0dec
movl 0xed4e0(%rip), %edi # 0x1b0df0
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e97a
cmpl $0x1, 0xed4ce(%rip) # 0x1b0df4
je 0xc394e
movl $0x1, 0xed4c2(%rip) # 0x1b0df4
leaq 0xed4bb(%rip), %rsi # 0x1b0df4
movl 0xed4b9(%rip), %edi # 0x1b0df8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e97a
cmpl $0x2, 0xed4a7(%rip) # 0x1b0dfc
je 0xc397d
movl $0x2, 0xed49b(%rip) # 0x1b0dfc
leaq 0xed494(%rip), %rsi # 0x1b0dfc
movl 0xed492(%rip), %edi # 0x1b0e00
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e97a
cmpl $0x3, 0xed480(%rip) # 0x1b0e04
je 0xc39ac
movl $0x3, 0xed474(%rip) # 0x1b0e04
leaq 0xed46d(%rip), %rsi # 0x1b0e04
movl 0xed46b(%rip), %edi # 0x1b0e08
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e97a
popq %rbp
jmp 0x1bd95
|
r3d_shader_load_screen_ssao:
push rbp
mov rbp, rsp
lea rdi, VS_COMMON_SCREEN; "#version 330 core\nconst vec2 a[3]=vec2"...
lea rsi, FS_SCREEN_SSAO; "#version 330 core\nnoperspective in vec"...
call rlLoadShaderCode
mov cs:dword_1B0DE8, eax
lea rsi, aUtexdepth; "uTexDepth"
mov edi, eax
call rlGetLocationUniform
mov cs:dword_1B0DF0, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUtexnormal; "uTexNormal"
call rlGetLocationUniform
mov cs:dword_1B0DF8, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUtexkernel; "uTexKernel"
call rlGetLocationUniform
mov cs:dword_1B0E00, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUtexnoise; "uTexNoise"
call rlGetLocationUniform
mov cs:dword_1B0E08, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUmatinvproj; "uMatInvProj"
call rlGetLocationUniform
mov cs:dword_1B0E0C, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUmatinvview; "uMatInvView"
call rlGetLocationUniform
mov cs:dword_1B0E10, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUmatproj; "uMatProj"
call rlGetLocationUniform
mov cs:dword_1B0E14, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUmatview; "uMatView"
call rlGetLocationUniform
mov cs:dword_1B0E18, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUresolution; "uResolution"
call rlGetLocationUniform
mov cs:dword_1B0E24, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUnear; "uNear"
call rlGetLocationUniform
mov cs:dword_1B0E2C, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUfar; "uFar"
call rlGetLocationUniform
mov cs:dword_1B0E34, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUradius; "uRadius"
call rlGetLocationUniform
mov cs:dword_1B0E3C, eax
mov edi, cs:dword_1B0DE8
lea rsi, aUbias; "uBias"
call rlGetLocationUniform
mov cs:dword_1B0E44, eax
mov edi, cs:dword_1B0DE8
call rlEnableShader
cmp cs:dword_1B0DEC, 0
jz short loc_C391F
mov cs:dword_1B0DEC, 0
lea rsi, dword_1B0DEC
mov edi, cs:dword_1B0DF0
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C391F:
cmp cs:dword_1B0DF4, 1
jz short loc_C394E
mov cs:dword_1B0DF4, 1
lea rsi, dword_1B0DF4
mov edi, cs:dword_1B0DF8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C394E:
cmp cs:dword_1B0DFC, 2
jz short loc_C397D
mov cs:dword_1B0DFC, 2
lea rsi, dword_1B0DFC
mov edi, cs:dword_1B0E00
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C397D:
cmp cs:dword_1B0E04, 3
jz short loc_C39AC
mov cs:dword_1B0E04, 3
lea rsi, dword_1B0E04
mov edi, cs:dword_1B0E08
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C39AC:
pop rbp
jmp rlDisableShader
|
long long r3d_shader_load_screen_ssao()
{
int v0; // r8d
int v1; // r9d
dword_1B0DE8 = rlLoadShaderCode(
(long long)"#version 330 core\n"
"const vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2"
" vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}",
(long long)"#version 330 core\n"
"noperspective in vec2 vTexCoord;uniform sampler2D uTexDepth;uniform sampler2D uTexNormal;uni"
"form sampler1D uTexKernel;uniform sampler2D uTexNoise;uniform mat4 uMatInvProj;uniform mat4 "
"uMatInvView;uniform mat4 uMatProj;uniform mat4 uMatView;uniform vec2 uResolution;uniform flo"
"at uNear;uniform float uFar;uniform float uRadius;uniform float uBias;out float a;vec3 GetPo"
"sitionFromDepth(float c){vec4 i=vec4(vTexCoord*2.0-1.0,c*2.0-1.0,1.0);vec4 x=uMatInvProj*i;x"
"/=x.w;return x.xyz;}vec3 DecodeOctahedral(vec2 d){vec2 e=d*2.0-1.0;vec3 k=vec3(e.xy,1.0-abs("
"e.x)-abs(e.y));if(k.z < 0.0){vec2 u=vec2(k.x >=0.0 ? 1.0 :-1.0,k.y >=0.0 ? 1.0 :-1.0);k.xy=("
"1.0-abs(k.yx))*u;}return normalize(mat3(uMatView)*k);}float LinearizeDepth(float c){float y="
"c*2.0-1.0;return(2.0*uNear*uFar)/(uFar+uNear-y*(uFar-uNear));}vec3 SampleKernel(int g,int h)"
"{float w=(float(g)+0.5)/float(h);return texture(uTexKernel,w).rgb;}void main(){float c=textu"
"re(uTexDepth,vTexCoord).r;vec3 n=GetPositionFromDepth(c);vec3 k=DecodeOctahedral(texture(uTe"
"xNormal,vTexCoord).rg);vec2 j=uResolution/16.0;vec3 o=normalize(texture(uTexNoise,vTexCoord*"
"j).xyz*2.0-1.0);vec3 v=normalize(o-k*dot(o,k));vec3 b=cross(k,v);mat3 TBN=mat3(v,b,k);const "
"int KERNEL_SIZE=32;float l=0.0;for(int f=0;f < KERNEL_SIZE;f++){vec3 r=TBN*SampleKernel(f,KE"
"RNEL_SIZE);float t=float(f)/float(KERNEL_SIZE);t=mix(0.1,1.0,t*t);r=n+r*uRadius*t;vec4 m=uMa"
"tProj*vec4(r,1.0);m.xyz/=m.w;m.xyz=m.xyz*0.5+0.5;if(m.x >=0.0 && m.x <=1.0 && m.y >=0.0 && m"
".y <=1.0){float q=texture(uTexDepth,m.xy).r;vec3 s=GetPositionFromDepth(q);float p=1.0-smoot"
"hstep(0.0,uRadius,abs(n.z-s.z));l+=(s.z >=r.z+uBias)? p : 0.0;}}a=1.0-(l/float(KERNEL_SIZE));}");
dword_1B0DF0 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uTexDepth");
dword_1B0DF8 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uTexNormal");
dword_1B0E00 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uTexKernel");
dword_1B0E08 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uTexNoise");
dword_1B0E0C = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uMatInvProj");
dword_1B0E10 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uMatInvView");
dword_1B0E14 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uMatProj");
dword_1B0E18 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uMatView");
dword_1B0E24 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uResolution");
dword_1B0E2C = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uNear");
dword_1B0E34 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uFar");
dword_1B0E3C = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uRadius");
dword_1B0E44 = rlGetLocationUniform((unsigned int)dword_1B0DE8, (long long)"uBias");
rlEnableShader((unsigned int)dword_1B0DE8);
if ( dword_1B0DEC )
{
dword_1B0DEC = 0;
rlSetUniform((unsigned int)dword_1B0DF0, (long long)&dword_1B0DEC, 4, 1u, v0, v1);
}
if ( dword_1B0DF4 != 1 )
{
dword_1B0DF4 = 1;
rlSetUniform((unsigned int)dword_1B0DF8, (long long)&dword_1B0DF4, 4, 1u, v0, v1);
}
if ( dword_1B0DFC != 2 )
{
dword_1B0DFC = 2;
rlSetUniform((unsigned int)dword_1B0E00, (long long)&dword_1B0DFC, 4, 1u, v0, v1);
}
if ( dword_1B0E04 != 3 )
{
dword_1B0E04 = 3;
rlSetUniform((unsigned int)dword_1B0E08, (long long)&dword_1B0E04, 4, 1u, v0, v1);
}
return rlDisableShader();
}
|
r3d_shader_load_screen_ssao:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x219da0]
LEA RSI,[0x21f4c0]
CALL 0x0011e505
MOV dword ptr [0x002b0de8],EAX
LEA RSI,[0x2121c9]
MOV EDI,EAX
CALL 0x0011e95e
MOV dword ptr [0x002b0df0],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x211ecc]
CALL 0x0011e95e
MOV dword ptr [0x002b0df8],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x2121d3]
CALL 0x0011e95e
MOV dword ptr [0x002b0e00],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x211f7f]
CALL 0x0011e95e
MOV dword ptr [0x002b0e08],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x2121de]
CALL 0x0011e95e
MOV dword ptr [0x002b0e0c],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x211f5d]
CALL 0x0011e95e
MOV dword ptr [0x002b0e10],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x211e4b]
CALL 0x0011e95e
MOV dword ptr [0x002b0e14],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x211e54]
CALL 0x0011e95e
MOV dword ptr [0x002b0e18],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x2121ea]
CALL 0x0011e95e
MOV dword ptr [0x002b0e24],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x2121f6]
CALL 0x0011e95e
MOV dword ptr [0x002b0e2c],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x2121c4]
CALL 0x0011e95e
MOV dword ptr [0x002b0e34],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x2121fc]
CALL 0x0011e95e
MOV dword ptr [0x002b0e3c],EAX
MOV EDI,dword ptr [0x002b0de8]
LEA RSI,[0x212204]
CALL 0x0011e95e
MOV dword ptr [0x002b0e44],EAX
MOV EDI,dword ptr [0x002b0de8]
CALL 0x0011bd8a
CMP dword ptr [0x002b0dec],0x0
JZ 0x001c391f
MOV dword ptr [0x002b0dec],0x0
LEA RSI,[0x2b0dec]
MOV EDI,dword ptr [0x002b0df0]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e97a
LAB_001c391f:
CMP dword ptr [0x002b0df4],0x1
JZ 0x001c394e
MOV dword ptr [0x002b0df4],0x1
LEA RSI,[0x2b0df4]
MOV EDI,dword ptr [0x002b0df8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e97a
LAB_001c394e:
CMP dword ptr [0x002b0dfc],0x2
JZ 0x001c397d
MOV dword ptr [0x002b0dfc],0x2
LEA RSI,[0x2b0dfc]
MOV EDI,dword ptr [0x002b0e00]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e97a
LAB_001c397d:
CMP dword ptr [0x002b0e04],0x3
JZ 0x001c39ac
MOV dword ptr [0x002b0e04],0x3
LEA RSI,[0x2b0e04]
MOV EDI,dword ptr [0x002b0e08]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e97a
LAB_001c39ac:
POP RBP
JMP 0x0011bd95
|
void r3d_shader_load_screen_ssao(void)
{
DAT_002b0de8 = rlLoadShaderCode("#version 330 core\nconst vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2 vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}"
,
"#version 330 core\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexDepth;uniform sampler2D uTexNormal;uniform sampler1D uTexKernel;uniform sampler2D uTexNoise;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;uniform mat4 uMatProj;uniform mat4 uMatView;uniform vec2 uResolution;uniform float uNear;uniform float uFar;uniform float uRadius;uniform float uBias;out float a;vec3 GetPositionFromDepth(float c){vec4 i=vec4(vTexCoord*2.0-1.0,c*2.0-1.0,1.0);vec4 x=uMatInvProj*i;x/=x.w;return x.xyz;}vec3 DecodeOctahedral(vec2 d){vec2 e=d*2.0-1.0;vec3 k=vec3(e.xy,1.0-abs(e.x)-abs(e.y));if(k.z < 0.0){vec2 u=vec2(k.x >=0.0 ? 1.0 :-1.0,k.y >=0.0 ? 1.0 :-1.0);k.xy=(1.0-abs(k.yx))*u;}return normalize(mat3(uMatView)*k);}float LinearizeDepth(float c){float y=c*2.0-1.0;return(2.0*uNear*uFar)/(uFar+uNear-y*(uFar-uNear));}vec3 SampleKernel(int g,int h){float w=(float(g)+0.5)/float(h);return texture(uTexKernel,w).rgb;}void main(){float c=texture(uTexDepth,vTexCoord).r;vec3 n=GetPositionFromDepth(c);vec3 k=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec2 j=uResolution/16.0;vec3 o=normalize(texture(uTexNoise,vTexCoord*j).xyz*2.0-1.0);vec3 v=normalize(o-k*dot(o,k));vec3 b=cross(k,v);mat3 TBN=mat3(v,b,k);const int KERNEL_SIZE=32;float l=0.0;for(int f=0;f < KERNEL_SIZE;f++){vec3 r=TBN*SampleKernel(f,KERNEL_SIZE);float t=float(f)/float(KERNEL_SIZE);t=mix(0.1,1.0,t*t);r=n+r*uRadius*t;vec4 m=uMatProj*vec4(r,1.0);m.xyz/=m.w;m.xyz=m.xyz*0.5+0.5;if(m.x >=0.0 && m.x <=1.0 && m.y >=0.0 && m.y <=1.0){float q=texture(uTexDepth,m.xy).r;vec3 s=GetPositionFromDepth(q);float p=1.0-smoothstep(0.0,uRadius,abs(n.z-s.z));l+=(s.z >=r.z+uBias)? p : 0.0;}}a=1.0-(l/float(KERNEL_SIZE));}"
);
DAT_002b0df0 = rlGetLocationUniform(DAT_002b0de8,"uTexDepth");
DAT_002b0df8 = rlGetLocationUniform(DAT_002b0de8,"uTexNormal");
DAT_002b0e00 = rlGetLocationUniform(DAT_002b0de8,"uTexKernel");
DAT_002b0e08 = rlGetLocationUniform(DAT_002b0de8,"uTexNoise");
DAT_002b0e0c = rlGetLocationUniform(DAT_002b0de8,"uMatInvProj");
DAT_002b0e10 = rlGetLocationUniform(DAT_002b0de8,"uMatInvView");
DAT_002b0e14 = rlGetLocationUniform(DAT_002b0de8,"uMatProj");
DAT_002b0e18 = rlGetLocationUniform(DAT_002b0de8,"uMatView");
DAT_002b0e24 = rlGetLocationUniform(DAT_002b0de8,"uResolution");
DAT_002b0e2c = rlGetLocationUniform(DAT_002b0de8,"uNear");
DAT_002b0e34 = rlGetLocationUniform(DAT_002b0de8,&DAT_002121c4);
DAT_002b0e3c = rlGetLocationUniform(DAT_002b0de8,"uRadius");
DAT_002b0e44 = rlGetLocationUniform(DAT_002b0de8,"uBias");
rlEnableShader(DAT_002b0de8);
if (DAT_002b0dec != 0) {
DAT_002b0dec = 0;
rlSetUniform(DAT_002b0df0,&DAT_002b0dec,4,1);
}
if (DAT_002b0df4 != 1) {
DAT_002b0df4 = 1;
rlSetUniform(DAT_002b0df8,&DAT_002b0df4,4,1);
}
if (DAT_002b0dfc != 2) {
DAT_002b0dfc = 2;
rlSetUniform(DAT_002b0e00,&DAT_002b0dfc,4,1);
}
if (DAT_002b0e04 != 3) {
DAT_002b0e04 = 3;
rlSetUniform(DAT_002b0e08,&DAT_002b0e04,4,1);
}
rlDisableShader();
return;
}
|
|
12,383
|
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/sampling.cpp
|
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const std::vector<int> & idxs, const llama_tokens & draft, bool grammar_first) {
GGML_ASSERT(idxs.size() == draft.size() + 1 && "idxs.size() must be draft.size() + 1");
std::vector<llama_token> result;
result.reserve(idxs.size());
size_t i = 0;
for (; i < draft.size(); i++) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
if (draft[i] != id) {
break;
}
}
if (i == draft.size()) {
const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first);
common_sampler_accept(gsmpl, id, true);
result.push_back(id);
}
return result;
}
|
O3
|
cpp
|
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
movq 0x8(%r8), %rax
subq (%r8), %rax
sarq $0x2, %rsi
sarq $0x2, %rax
incq %rax
cmpq %rax, %rsi
jne 0xcdfe3
movl %r9d, %ebp
movq %r8, %r13
movq %rcx, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0xcef20
movq 0x8(%r13), %rax
movzbl %bpl, %ebp
cmpq (%r13), %rax
je 0xcdf70
xorl %r15d, %r15d
movq (%r12), %rax
movl (%rax,%r15,4), %edx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %ecx
callq 0xcdd3c
movl %eax, 0x8(%rsp)
movq %r14, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xcdb83
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xcdf3d
movl 0x8(%rsp), %edx
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xcdf4e
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x711ee
movl 0x8(%rsp), %edx
movq (%r13), %rax
movq 0x8(%r13), %rcx
cmpl %edx, (%rax,%r15,4)
jne 0xcdf76
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rdx, %r15
jb 0xcdef9
jmp 0xcdf76
xorl %r15d, %r15d
movq %rax, %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r15
jne 0xcdfd1
movq (%r12), %rax
movl (%rax,%r15,4), %edx
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %ecx
callq 0xcdd3c
movl %eax, %ebp
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xcdb83
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xcdfc4
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xcdfd1
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x711ee
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27427(%rip), %rdi # 0xf5411
leaq 0x1822b(%rip), %rdx # 0xe621c
leaq 0x275a6(%rip), %rcx # 0xf559e
movl $0x155, %esi # imm = 0x155
xorl %eax, %eax
callq 0x1aea0
jmp 0xce008
jmp 0xce008
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xce01f
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1a8e0
movq %r14, %rdi
callq 0x1af90
|
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_38], rdx
mov r14, rsi
mov rsi, [rcx+8]
sub rsi, [rcx]
mov rax, [r8+8]
sub rax, [r8]
sar rsi, 2
sar rax, 2
inc rax
cmp rsi, rax
jnz loc_CDFE3
mov ebp, r9d
mov r13, r8
mov r12, rcx
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong)
mov rax, [r13+8]
movzx ebp, bpl
cmp rax, [r13+0]
jz short loc_CDF70
xor r15d, r15d
loc_CDEF9:
mov rax, [r12]
mov edx, [rax+r15*4]
mov rdi, r14
mov rsi, [rsp+48h+var_38]
mov ecx, ebp
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov [rsp+48h+var_40], eax
mov rdi, r14
mov esi, eax
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_CDF3D
mov edx, [rsp+48h+var_40]
mov [rsi], edx
add rsi, 4
mov [rbx+8], rsi
jmp short loc_CDF4E
loc_CDF3D:
mov rdi, rbx
lea rdx, [rsp+48h+var_40]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov edx, [rsp+48h+var_40]
loc_CDF4E:
mov rax, [r13+0]
mov rcx, [r13+8]
cmp [rax+r15*4], edx
jnz short loc_CDF76
inc r15
mov rdx, rcx
sub rdx, rax
sar rdx, 2
cmp r15, rdx
jb short loc_CDEF9
jmp short loc_CDF76
loc_CDF70:
xor r15d, r15d
mov rcx, rax
loc_CDF76:
sub rcx, rax
sar rcx, 2
cmp r15, rcx
jnz short loc_CDFD1
mov rax, [r12]
mov edx, [rax+r15*4]
mov rdi, r14
mov rsi, [rsp+48h+var_38]
mov ecx, ebp
call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool)
mov ebp, eax
mov [rsp+48h+var_3C], eax
mov rdi, r14
mov esi, eax
mov edx, 1
call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_CDFC4
mov [rsi], ebp
add rsi, 4
mov [rbx+8], rsi
jmp short loc_CDFD1
loc_CDFC4:
lea rdx, [rsp+48h+var_3C]
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_CDFD1:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CDFE3:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdxsSizeDraftS; "idxs.size() == draft.size() + 1 && \"id"...
mov esi, 155h
xor eax, eax
call _ggml_abort
jmp short loc_CE008
jmp short $+2
loc_CE008:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_CE01F
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CE01F:
mov rdi, r14
call __Unwind_Resume
|
long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
long long *a5,
unsigned __int8 a6)
{
long long v6; // rbx
long long v11; // rax
unsigned long long v12; // r15
_DWORD *v13; // rsi
unsigned int v14; // edx
long long v15; // rcx
unsigned int v16; // ebp
unsigned int *v17; // rsi
long long v19; // rax
long long v20; // r14
unsigned int v21; // [rsp+8h] [rbp-40h] BYREF
unsigned int v22; // [rsp+Ch] [rbp-3Ch] BYREF
long long v23; // [rsp+10h] [rbp-38h]
v23 = a3;
if ( (long long)(a4[1] - *a4) >> 2 != ((a5[1] - *a5) >> 2) + 1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
341LL,
"GGML_ASSERT(%s) failed",
"idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\"");
v20 = v19;
if ( *(_QWORD *)v6 )
operator delete(*(void **)v6, *(_QWORD *)(v6 + 16) - *(_QWORD *)v6);
_Unwind_Resume(v20);
}
*(_OWORD *)a1 = 0LL;
a1[2] = 0LL;
std::vector<int>::reserve();
v11 = a5[1];
if ( v11 == *a5 )
{
v12 = 0LL;
v15 = a5[1];
}
else
{
v12 = 0LL;
do
{
v21 = common_sampler_sample(a2, v23, *(_DWORD *)(*a4 + 4 * v12), a6);
common_sampler_accept(a2, v21, 1);
v13 = (_DWORD *)a1[1];
if ( v13 == (_DWORD *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v13, &v21);
v14 = v21;
}
else
{
v14 = v21;
*v13 = v21;
a1[1] = (long long)(v13 + 1);
}
v11 = *a5;
v15 = a5[1];
if ( *(_DWORD *)(*a5 + 4 * v12) != v14 )
break;
++v12;
}
while ( v12 < (v15 - v11) >> 2 );
}
if ( v12 == (v15 - v11) >> 2 )
{
v16 = common_sampler_sample(a2, v23, *(_DWORD *)(*a4 + 4 * v12), a6);
v22 = v16;
common_sampler_accept(a2, v16, 1);
v17 = (unsigned int *)a1[1];
if ( v17 == (unsigned int *)a1[2] )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v17, &v22);
}
else
{
*v17 = v16;
a1[1] = (long long)(v17 + 1);
}
}
return a1;
}
|
common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDX
MOV R14,RSI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
MOV RAX,qword ptr [R8 + 0x8]
SUB RAX,qword ptr [R8]
SAR RSI,0x2
SAR RAX,0x2
INC RAX
CMP RSI,RAX
JNZ 0x001cdfe3
MOV EBP,R9D
MOV R13,R8
MOV R12,RCX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LAB_001cdee3:
CALL 0x001cef20
MOV RAX,qword ptr [R13 + 0x8]
MOVZX EBP,BPL
CMP RAX,qword ptr [R13]
JZ 0x001cdf70
XOR R15D,R15D
LAB_001cdef9:
MOV RAX,qword ptr [R12]
MOV EDX,dword ptr [RAX + R15*0x4]
LAB_001cdf01:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV ECX,EBP
CALL 0x001cdd3c
MOV dword ptr [RSP + 0x8],EAX
MOV RDI,R14
MOV ESI,EAX
MOV EDX,0x1
CALL 0x001cdb83
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001cdf3d
MOV EDX,dword ptr [RSP + 0x8]
MOV dword ptr [RSI],EDX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001cdf4e
LAB_001cdf3d:
MOV RDI,RBX
LEA RDX,[RSP + 0x8]
CALL 0x001711ee
MOV EDX,dword ptr [RSP + 0x8]
LAB_001cdf4e:
MOV RAX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
CMP dword ptr [RAX + R15*0x4],EDX
JNZ 0x001cdf76
INC R15
MOV RDX,RCX
SUB RDX,RAX
SAR RDX,0x2
CMP R15,RDX
JC 0x001cdef9
JMP 0x001cdf76
LAB_001cdf70:
XOR R15D,R15D
MOV RCX,RAX
LAB_001cdf76:
SUB RCX,RAX
SAR RCX,0x2
CMP R15,RCX
JNZ 0x001cdfd1
MOV RAX,qword ptr [R12]
MOV EDX,dword ptr [RAX + R15*0x4]
LAB_001cdf8a:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x10]
MOV ECX,EBP
CALL 0x001cdd3c
MOV EBP,EAX
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,R14
MOV ESI,EAX
MOV EDX,0x1
CALL 0x001cdb83
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001cdfc4
MOV dword ptr [RSI],EBP
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001cdfd1
LAB_001cdfc4:
LEA RDX,[RSP + 0xc]
MOV RDI,RBX
CALL 0x001711ee
LAB_001cdfd1:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cdfe3:
LEA RDI,[0x1f5411]
LEA RDX,[0x1e621c]
LEA RCX,[0x1f559e]
MOV ESI,0x155
XOR EAX,EAX
CALL 0x0011aea0
|
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,vector *param_4,
bool param_5)
{
int *piVar1;
long *plVar2;
int iVar3;
long lVar4;
long lVar5;
ulong uVar6;
int7 in_register_00000081;
bool in_R9B;
int local_40;
int local_3c;
vector *local_38;
uVar6 = *(long *)(param_4 + 8) - *(long *)param_4 >> 2;
local_38 = param_3;
if (uVar6 == (*(long *)(CONCAT71(in_register_00000081,param_5) + 8) -
*(long *)CONCAT71(in_register_00000081,param_5) >> 2) + 1U) {
plVar2 = (long *)CONCAT71(in_register_00000081,param_5);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 001cdee3 to 001cdee7 has its CatchHandler @ 001ce004 */
std::vector<int,std::allocator<int>>::reserve((vector<int,std::allocator<int>> *)param_1,uVar6);
lVar4 = plVar2[1];
if (lVar4 == *plVar2) {
uVar6 = 0;
lVar5 = lVar4;
}
else {
uVar6 = 0;
do {
/* try { // try from 001cdf01 to 001cdf49 has its CatchHandler @ 001ce008 */
local_40 = common_sampler_sample
((common_sampler *)param_2,(llama_context *)local_38,
*(int *)(*(long *)param_4 + uVar6 * 4),in_R9B);
common_sampler_accept((common_sampler *)param_2,local_40,true);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_40);
}
else {
*piVar1 = local_40;
*(int **)(param_1 + 8) = piVar1 + 1;
}
lVar4 = *plVar2;
lVar5 = plVar2[1];
} while ((*(int *)(lVar4 + uVar6 * 4) == local_40) &&
(uVar6 = uVar6 + 1, uVar6 < (ulong)(lVar5 - lVar4 >> 2)));
}
if (uVar6 == lVar5 - lVar4 >> 2) {
/* try { // try from 001cdf8a to 001cdfd0 has its CatchHandler @ 001ce006 */
iVar3 = common_sampler_sample
((common_sampler *)param_2,(llama_context *)local_38,
*(int *)(*(long *)param_4 + uVar6 * 4),in_R9B);
local_3c = iVar3;
common_sampler_accept((common_sampler *)param_2,iVar3,true);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_3c);
}
else {
*piVar1 = iVar3;
*(int **)(param_1 + 8) = piVar1 + 1;
}
}
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0x155,
"GGML_ASSERT(%s) failed",
"idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\"");
}
|
|
12,384
|
ma_once_init_block_record
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool _ma_once_init_block_record(MARIA_SHARE *share, File data_file)
{
my_bool res;
pgcache_page_no_t last_page;
/*
First calculate the max file length with can have with a pointer of size
rec_reflength.
The 'rec_reflength - 1' is because one byte is used for row
position withing the page.
The /2 comes from _ma_transaction_recpos_to_keypos() where we use
the lowest bit to mark if there is a transid following the rownr.
*/
last_page= ((ulonglong) 1 << ((share->base.rec_reflength-1)*8))/2;
if (!last_page) /* Overflow; set max size */
last_page= ~(pgcache_page_no_t) 0;
res= _ma_bitmap_init(share, data_file, &last_page);
share->base.max_data_file_length= _ma_safe_mul(last_page + 1,
share->block_size);
#if SIZEOF_OFF_T == 4
set_if_smaller(share->base.max_data_file_length, INT_MAX32);
#endif
return res;
}
|
O3
|
c
|
ma_once_init_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x3e0(%rdi), %eax
leal -0x8(,%rax,8), %ecx
movl $0x1, %eax
shlq %cl, %rax
shrq %rax
xorl %edx, %edx
cmpl $0x1, %ecx
sbbq %rdx, %rdx
orq %rax, %rdx
leaq -0x20(%rbp), %r14
movq %rdx, (%r14)
movq %r14, %rdx
callq 0x3f240
movl %eax, %r15d
movq (%r14), %rdi
incq %rdi
movl 0x7bc(%rbx), %esi
callq 0x5403d
movq %rax, 0x368(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ma_once_init_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+3E0h]
lea ecx, ds:0FFFFFFFFFFFFFFF8h[rax*8]
mov eax, 1
shl rax, cl
shr rax, 1
xor edx, edx
cmp ecx, 1
sbb rdx, rdx
or rdx, rax
lea r14, [rbp+var_20]
mov [r14], rdx
mov rdx, r14
call _ma_bitmap_init
mov r15d, eax
mov rdi, [r14]
inc rdi
mov esi, [rbx+7BCh]
call _ma_safe_mul
mov [rbx+368h], rax
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ma_once_init_block_record(long long a1, int a2)
{
unsigned long long v2; // rax
unsigned int v3; // r15d
unsigned long long v5[4]; // [rsp+0h] [rbp-20h] BYREF
v5[0] = v2;
v5[0] = ((unsigned long long)(1LL << (8 * *(_BYTE *)(a1 + 992) - 8)) >> 1) | -(long long)(8 * *(_DWORD *)(a1 + 992) == 8);
v3 = ma_bitmap_init(a1, a2, v5);
*(_QWORD *)(a1 + 872) = ma_safe_mul(v5[0] + 1, *(unsigned int *)(a1 + 1980));
return v3;
}
|
_ma_once_init_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x3e0]
LEA ECX,[-0x8 + RAX*0x8]
MOV EAX,0x1
SHL RAX,CL
SHR RAX,0x1
XOR EDX,EDX
CMP ECX,0x1
SBB RDX,RDX
OR RDX,RAX
LEA R14,[RBP + -0x20]
MOV qword ptr [R14],RDX
MOV RDX,R14
CALL 0x0013f240
MOV R15D,EAX
MOV RDI,qword ptr [R14]
INC RDI
MOV ESI,dword ptr [RBX + 0x7bc]
CALL 0x0015403d
MOV qword ptr [RBX + 0x368],RAX
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 _ma_once_init_block_record(long param_1,int8 param_2)
{
int iVar1;
int4 uVar2;
int8 uVar3;
ulong local_28;
iVar1 = *(int *)(param_1 + 0x3e0) * 8 + -8;
local_28 = -(ulong)(iVar1 == 0) | (ulong)(1L << ((byte)iVar1 & 0x3f)) >> 1;
uVar2 = _ma_bitmap_init(param_1,param_2,&local_28);
uVar3 = _ma_safe_mul(local_28 + 1,*(int4 *)(param_1 + 0x7bc));
*(int8 *)(param_1 + 0x368) = uVar3;
return uVar2;
}
|
|
12,385
|
alloc_root
|
eloqsql/mysys/my_alloc.c
|
void *alloc_root(MEM_ROOT *mem_root, size_t length)
{
#if defined(HAVE_valgrind) && defined(EXTRA_DEBUG)
reg1 USED_MEM *next;
DBUG_ENTER("alloc_root");
DBUG_PRINT("enter",("root: %p", mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
DBUG_EXECUTE_IF("simulate_out_of_memory",
{
if (mem_root->error_handler)
(*mem_root->error_handler)();
DBUG_SET("-d,simulate_out_of_memory");
DBUG_RETURN((void*) 0); /* purecov: inspected */
});
length+=ALIGN_SIZE(sizeof(USED_MEM));
if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, length,
MYF(MY_WME | ME_FATAL |
MALLOC_FLAG(mem_root->block_size)))))
{
if (mem_root->error_handler)
(*mem_root->error_handler)();
DBUG_RETURN((uchar*) 0); /* purecov: inspected */
}
next->next= mem_root->used;
next->left= 0;
next->size= length;
mem_root->used= next;
DBUG_PRINT("exit",("ptr: %p", (((char*)next)+ALIGN_SIZE(sizeof(USED_MEM)))));
DBUG_RETURN((((uchar*) next)+ALIGN_SIZE(sizeof(USED_MEM))));
#else
size_t get_size, block_size;
uchar* point;
reg1 USED_MEM *next= 0;
reg2 USED_MEM **prev;
size_t original_length __attribute__((unused)) = length;
DBUG_ENTER("alloc_root");
DBUG_PRINT("enter",("root: %p", mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
DBUG_EXECUTE_IF("simulate_out_of_memory",
{
/* Avoid reusing an already allocated block */
if (mem_root->error_handler)
(*mem_root->error_handler)();
DBUG_SET("-d,simulate_out_of_memory");
DBUG_RETURN((void*) 0); /* purecov: inspected */
});
length= ALIGN_SIZE(length) + REDZONE_SIZE;
if ((*(prev= &mem_root->free)) != NULL)
{
if ((*prev)->left < length &&
mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP &&
(*prev)->left < ALLOC_MAX_BLOCK_TO_DROP)
{
next= *prev;
*prev= next->next; /* Remove block from list */
next->next= mem_root->used;
mem_root->used= next;
mem_root->first_block_usage= 0;
}
for (next= *prev ; next && next->left < length ; next= next->next)
prev= &next->next;
}
if (! next)
{ /* Time to alloc new block */
block_size= (mem_root->block_size & ~1) * (mem_root->block_num >> 2);
get_size= length+ALIGN_SIZE(sizeof(USED_MEM));
get_size= MY_MAX(get_size, block_size);
if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, get_size,
MYF(MY_WME | ME_FATAL |
MALLOC_FLAG(mem_root->
block_size)))))
{
if (mem_root->error_handler)
(*mem_root->error_handler)();
DBUG_RETURN((void*) 0); /* purecov: inspected */
}
mem_root->block_num++;
next->next= *prev;
next->size= get_size;
next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM));
*prev=next;
TRASH_MEM(next);
}
point= (uchar*) ((char*) next+ (next->size-next->left));
/*TODO: next part may be unneded due to mem_root->first_block_usage counter*/
if ((next->left-= length) < mem_root->min_malloc)
{ /* Full block */
*prev= next->next; /* Remove block from list */
next->next= mem_root->used;
mem_root->used= next;
mem_root->first_block_usage= 0;
}
point+= REDZONE_SIZE;
TRASH_ALLOC(point, original_length);
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN((void*) point);
#endif
}
|
O0
|
c
|
alloc_root:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x797a2
jmp 0x797a4
jmp 0x797a6
jmp 0x797a8
jmp 0x797aa
movq -0x18(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq $0x0, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, (%rax)
je 0x79892
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x79849
movq -0x10(%rbp), %rcx
movl 0x2c(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x2c(%rcx)
cmpl $0xa, %eax
jb 0x79849
movq -0x40(%rbp), %rax
movq (%rax), %rax
cmpq $0x1000, 0x8(%rax) # imm = 0x1000
jae 0x79849
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x49(%rbp)
je 0x79872
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x7987b
jmp 0x79890
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x79854
jmp 0x79892
cmpq $0x0, -0x38(%rbp)
jne 0x79995
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
andq $-0x2, %rax
movq -0x10(%rbp), %rcx
movl 0x28(%rcx), %ecx
shrl $0x2, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x798dd
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x798e5
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
andq $0x1, %rdx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpq $0x0, %rdx
cmovnel %ecx, %eax
orl $0x1010, %eax # imm = 0x1010
movl %eax, %eax
movl %eax, %edx
callq 0x7fad0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x7994b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x7993c
movq -0x10(%rbp), %rax
callq *0x30(%rax)
jmp 0x7993e
movq $0x0, -0x8(%rbp)
jmp 0x79a1d
movq -0x10(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
subq $0x18, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
jmp 0x7998f
jmp 0x79991
jmp 0x79993
jmp 0x79995
movq -0x38(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x38(%rbp), %rdx
subq 0x8(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rax
subq %rdx, %rax
movq %rax, 0x8(%rcx)
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x79a01
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x79a0b
jmp 0x79a0d
jmp 0x79a0f
jmp 0x79a11
jmp 0x79a13
jmp 0x79a15
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
alloc_root:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_38], 0
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
jmp short $+2
loc_797A2:
jmp short $+2
loc_797A4:
jmp short $+2
loc_797A6:
jmp short $+2
loc_797A8:
jmp short $+2
loc_797AA:
mov rax, [rbp+var_18]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, 0
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
cmp qword ptr [rax], 0
jz loc_79892
mov rax, [rbp+var_40]
mov rax, [rax]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jnb short loc_79849
mov rcx, [rbp+var_10]
mov eax, [rcx+2Ch]
mov edx, eax
add edx, 1
mov [rcx+2Ch], edx
cmp eax, 0Ah
jb short loc_79849
mov rax, [rbp+var_40]
mov rax, [rax]
cmp qword ptr [rax+8], 1000h
jnb short loc_79849
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rax]
mov rax, [rbp+var_40]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+2Ch], 0
loc_79849:
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rbp+var_38], rax
loc_79854:
xor eax, eax
cmp [rbp+var_38], 0
mov [rbp+var_49], al
jz short loc_79872
mov rax, [rbp+var_38]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
setb al
mov [rbp+var_49], al
loc_79872:
mov al, [rbp+var_49]
test al, 1
jnz short loc_7987B
jmp short loc_79890
loc_7987B:
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_38], rax
jmp short loc_79854
loc_79890:
jmp short $+2
loc_79892:
cmp [rbp+var_38], 0
jnz loc_79995
mov rax, [rbp+var_10]
mov rax, [rax+20h]
and rax, 0FFFFFFFFFFFFFFFEh
mov rcx, [rbp+var_10]
mov ecx, [rcx+28h]
shr ecx, 2
mov ecx, ecx
imul rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
add rax, 18h
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jbe short loc_798DD
mov rax, [rbp+var_20]
mov [rbp+var_58], rax
jmp short loc_798E5
loc_798DD:
mov rax, [rbp+var_28]
mov [rbp+var_58], rax
loc_798E5:
mov rax, [rbp+var_58]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov edi, [rax+38h]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rdx, [rax+20h]
and rdx, 1
xor eax, eax
mov ecx, 10000h
cmp rdx, 0
cmovnz eax, ecx
or eax, 1010h
mov eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_7994B
mov rax, [rbp+var_10]
cmp qword ptr [rax+30h], 0
jz short loc_7993C
mov rax, [rbp+var_10]
call qword ptr [rax+30h]
loc_7993C:
jmp short $+2
loc_7993E:
mov [rbp+var_8], 0
jmp loc_79A1D
loc_7994B:
mov rax, [rbp+var_10]
mov ecx, [rax+28h]
add ecx, 1
mov [rax+28h], ecx
mov rax, [rbp+var_40]
mov rcx, [rax]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_38]
mov [rax+10h], rcx
mov rcx, [rbp+var_20]
sub rcx, 18h
mov rax, [rbp+var_38]
mov [rax+8], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_40]
mov [rax], rcx
jmp short $+2
loc_7998F:
jmp short $+2
loc_79991:
jmp short $+2
loc_79993:
jmp short $+2
loc_79995:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_38]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_38]
sub rcx, [rdx+8]
add rax, rcx
mov [rbp+var_30], rax
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_38]
mov rax, [rcx+8]
sub rax, rdx
mov [rcx+8], rax
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jnb short loc_79A01
mov rax, [rbp+var_38]
mov rcx, [rax]
mov rax, [rbp+var_40]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+2Ch], 0
loc_79A01:
mov rax, [rbp+var_30]
mov [rbp+var_30], rax
jmp short $+2
loc_79A0B:
jmp short $+2
loc_79A0D:
jmp short $+2
loc_79A0F:
jmp short $+2
loc_79A11:
jmp short $+2
loc_79A13:
jmp short $+2
loc_79A15:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_79A1D:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
|
char * alloc_root(_QWORD **a1, long long a2)
{
unsigned int v2; // eax
long long v3; // rdi
int v4; // eax
unsigned long long v5; // rax
unsigned long long v7; // [rsp+8h] [rbp-58h]
bool v8; // [rsp+17h] [rbp-49h]
_QWORD *v9; // [rsp+20h] [rbp-40h]
_QWORD *i; // [rsp+28h] [rbp-38h]
_QWORD *v11; // [rsp+28h] [rbp-38h]
char *v12; // [rsp+30h] [rbp-30h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
i = 0LL;
v13 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v9 = a1;
if ( *a1 )
{
if ( (*a1)[1] < v13 )
{
v2 = *((_DWORD *)a1 + 11);
*((_DWORD *)a1 + 11) = v2 + 1;
if ( v2 >= 0xA && (*a1)[1] < 0x1000uLL )
{
v11 = *a1;
*a1 = (_QWORD *)**a1;
*v11 = a1[1];
a1[1] = v11;
*((_DWORD *)a1 + 11) = 0;
}
}
for ( i = *a1; ; i = (_QWORD *)*i )
{
v8 = 0;
if ( i )
v8 = i[1] < v13;
if ( !v8 )
break;
v9 = i;
}
}
if ( !i )
{
if ( v13 + 24 <= (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL) )
v7 = (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL);
else
v7 = v13 + 24;
v3 = *((unsigned int *)a1 + 14);
v4 = 0;
if ( ((unsigned long long)a1[4] & 1) != 0 )
v4 = 0x10000;
i = (_QWORD *)my_malloc(v3, v7, v4 | 0x1010u);
if ( !i )
{
if ( a1[6] )
((void (*)(void))a1[6])();
return 0LL;
}
++*((_DWORD *)a1 + 10);
*i = *v9;
i[2] = v7;
i[1] = v7 - 24;
*v9 = i;
}
v12 = (char *)i + i[2] - i[1];
v5 = i[1] - v13;
i[1] = v5;
if ( v5 < (unsigned long long)a1[3] )
{
*v9 = *i;
*i = a1[1];
a1[1] = i;
*((_DWORD *)a1 + 11) = 0;
}
return v12;
}
|
alloc_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001797a2
LAB_001797a2:
JMP 0x001797a4
LAB_001797a4:
JMP 0x001797a6
LAB_001797a6:
JMP 0x001797a8
LAB_001797a8:
JMP 0x001797aa
LAB_001797aa:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,0x0
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RAX],0x0
JZ 0x00179892
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00179849
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x2c]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x2c],EDX
CMP EAX,0xa
JC 0x00179849
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x8],0x1000
JNC 0x00179849
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],0x0
LAB_00179849:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
LAB_00179854:
XOR EAX,EAX
CMP qword ptr [RBP + -0x38],0x0
MOV byte ptr [RBP + -0x49],AL
JZ 0x00179872
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
SETC AL
MOV byte ptr [RBP + -0x49],AL
LAB_00179872:
MOV AL,byte ptr [RBP + -0x49]
TEST AL,0x1
JNZ 0x0017987b
JMP 0x00179890
LAB_0017987b:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00179854
LAB_00179890:
JMP 0x00179892
LAB_00179892:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00179995
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,-0x2
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x28]
SHR ECX,0x2
MOV ECX,ECX
IMUL RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001798dd
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001798e5
LAB_001798dd:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
LAB_001798e5:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x20]
AND RDX,0x1
XOR EAX,EAX
MOV ECX,0x10000
CMP RDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x1010
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0017fad0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x0017994b
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x0017993c
MOV RAX,qword ptr [RBP + -0x10]
CALL qword ptr [RAX + 0x30]
LAB_0017993c:
JMP 0x0017993e
LAB_0017993e:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00179a1d
LAB_0017994b:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x28]
ADD ECX,0x1
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x20]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
JMP 0x0017998f
LAB_0017998f:
JMP 0x00179991
LAB_00179991:
JMP 0x00179993
LAB_00179993:
JMP 0x00179995
LAB_00179995:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x38]
SUB RCX,qword ptr [RDX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,RDX
MOV qword ptr [RCX + 0x8],RAX
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JNC 0x00179a01
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],0x0
LAB_00179a01:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00179a0b
LAB_00179a0b:
JMP 0x00179a0d
LAB_00179a0d:
JMP 0x00179a0f
LAB_00179a0f:
JMP 0x00179a11
LAB_00179a11:
JMP 0x00179a13
LAB_00179a13:
JMP 0x00179a15
LAB_00179a15:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_00179a1d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
long alloc_root(long *param_1,long param_2)
{
long *plVar1;
long lVar2;
long lVar3;
long lVar4;
uint uVar5;
ulong uVar6;
bool bVar7;
ulong local_60;
long *local_48;
long *local_40;
local_40 = (long *)0x0;
uVar6 = param_2 + 7U & 0xfffffffffffffff8;
local_48 = param_1;
if (*param_1 != 0) {
if (((*(ulong *)(*param_1 + 8) < uVar6) &&
(uVar5 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar5 + 1,
9 < uVar5)) && (*(ulong *)(*param_1 + 8) < 0x1000)) {
plVar1 = (long *)*param_1;
*param_1 = *plVar1;
*plVar1 = param_1[1];
param_1[1] = (long)plVar1;
*(int4 *)((long)param_1 + 0x2c) = 0;
}
local_40 = (long *)*param_1;
while( true ) {
bVar7 = false;
if (local_40 != (long *)0x0) {
bVar7 = (ulong)local_40[1] < uVar6;
}
if (!bVar7) break;
local_48 = local_40;
local_40 = (long *)*local_40;
}
}
if (local_40 == (long *)0x0) {
local_60 = (param_1[4] & 0xfffffffffffffffeU) * (ulong)(*(uint *)(param_1 + 5) >> 2);
if (local_60 < uVar6 + 0x18) {
local_60 = uVar6 + 0x18;
}
uVar5 = 0;
if ((param_1[4] & 1U) != 0) {
uVar5 = 0x10000;
}
local_40 = (long *)my_malloc((int)param_1[7],local_60,uVar5 | 0x1010);
if (local_40 == (long *)0x0) {
if (param_1[6] != 0) {
(*(code *)param_1[6])();
}
return 0;
}
*(int *)(param_1 + 5) = (int)param_1[5] + 1;
*local_40 = *local_48;
local_40[2] = local_60;
local_40[1] = local_60 - 0x18;
*local_48 = (long)local_40;
}
lVar2 = local_40[2];
lVar3 = local_40[1];
lVar4 = local_40[1];
local_40[1] = lVar4 - uVar6;
if (lVar4 - uVar6 < (ulong)param_1[3]) {
*local_48 = *local_40;
*local_40 = param_1[1];
param_1[1] = (long)local_40;
*(int4 *)((long)param_1 + 0x2c) = 0;
}
return (long)local_40 + (lVar2 - lVar3);
}
|
|
12,386
|
ma_net_read
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
ulong ma_net_read(NET *net)
{
size_t len,complen;
#ifdef HAVE_COMPRESS
if (!net->compress)
{
#endif
len = ma_real_read (net,(size_t *)&complen);
if (len == MAX_PACKET_LENGTH)
{
/* multi packet read */
size_t length= 0;
ulong last_pos= net->where_b;
do
{
length+= len;
net->where_b+= (unsigned long)len;
len= ma_real_read(net, &complen);
} while (len == MAX_PACKET_LENGTH);
net->where_b= last_pos;
if (len != packet_error)
len+= length;
}
net->read_pos = net->buff + net->where_b;
if (len != packet_error)
net->read_pos[len]=0; /* Safeguard for mysql_use_result */
return (ulong)len;
#ifdef HAVE_COMPRESS
}
else
{
/*
compressed protocol:
--------------------------------------
packet_length 3
sequence_id 1
uncompressed_length 3
--------------------------------------
compressed data packet_length - 7
--------------------------------------
Another packet will follow if:
packet_length == MAX_PACKET_LENGTH
Last package will be identified by
- packet_length is zero (special case)
- packet_length < MAX_PACKET_LENGTH
*/
size_t packet_length,
buffer_length;
size_t current= 0, start= 0;
my_bool is_multi_packet= 0;
/* check if buffer is empty */
if (!net->remain_in_buf)
{
buffer_length= 0;
}
else
{
/* save position and restore \0 character */
buffer_length= net->buf_length;
current= net->buf_length - net->remain_in_buf;
start= current;
net->buff[net->buf_length - net->remain_in_buf]=net->save_char;
}
for (;;)
{
if (buffer_length - current >= 4)
{
uchar *pos= net->buff + current;
packet_length= uint3korr(pos);
/* check if we have last package (special case: zero length) */
if (!packet_length)
{
current+= 4; /* length + sequence_id,
no more data will follow */
break;
}
if (packet_length + 4 <= buffer_length - current)
{
if (!is_multi_packet)
{
current= current + packet_length + 4;
}
else
{
/* remove packet_header */
memmove(net->buff + current,
net->buff + current + 4,
buffer_length - current);
buffer_length-= 4;
current+= packet_length;
}
/* do we have last packet ? */
if (packet_length != MAX_PACKET_LENGTH)
{
is_multi_packet= 0;
break;
}
else
is_multi_packet= 1;
if (start)
{
memmove(net->buff, net->buff + start,
buffer_length - start);
/* decrease buflen*/
buffer_length-= start;
start= 0;
}
continue;
}
}
if (start)
{
memmove(net->buff, net->buff + start, buffer_length - start);
/* decrease buflen and current */
current -= start;
buffer_length-= start;
start= 0;
}
net->where_b=(unsigned long)buffer_length;
if ((packet_length = ma_real_read(net,(size_t *)&complen)) == packet_error)
return packet_error;
if (_mariadb_uncompress(net, (unsigned char*) net->buff + net->where_b, &packet_length, &complen))
{
net->error=2; /* caller will close socket */
net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_UNCOMPRESS, SQLSTATE_UNKNOWN, 0);
return packet_error;
}
buffer_length+= complen;
}
/* set values */
net->buf_length= (unsigned long)buffer_length;
net->remain_in_buf= (unsigned long)(buffer_length - current);
net->read_pos= net->buff + start + 4;
len= current - start - 4;
if (is_multi_packet)
len-= 4;
net->save_char= net->read_pos[len]; /* Must be saved */
net->read_pos[len]=0; /* Safeguard for mysql_use_result */
}
#endif
return (ulong)len;
}
|
O3
|
c
|
ma_net_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x84(%rdi)
je 0x35178
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x351d8
movq 0x8(%rbx), %rcx
movq 0x40(%rbx), %r15
movq %r15, %r14
subq %rax, %r14
movb 0x81(%rbx), %al
movb %al, (%rcx,%r14)
jmp 0x351de
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x3538a
movq 0x48(%rbx), %r15
cmpq $0xffffff, %rax # imm = 0xFFFFFF
jne 0x35350
xorl %r12d, %r12d
movl $0xffffff, %r13d # imm = 0xFFFFFF
leaq -0x38(%rbp), %r14
addq %r13, %r12
addq %r13, 0x48(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3538a
cmpq %r13, %rax
je 0x351a1
movq %r15, 0x48(%rbx)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq %r14, %rax
jne 0x3534d
addq 0x8(%rbx), %r15
movq %r15, 0x20(%rbx)
jmp 0x3536b
xorl %r15d, %r15d
xorl %r14d, %r14d
movb $0x1, %cl
leaq -0x38(%rbp), %r12
movq %r14, %rax
movq %rcx, -0x40(%rbp)
movq %rax, %r13
movq %r15, %rdx
subq %r14, %rdx
cmpq $0x4, %rdx
jb 0x35222
movq 0x8(%rbx), %rdi
movzwl (%rdi,%r14), %ecx
movzbl 0x2(%rdi,%r14), %eax
shll $0x10, %eax
orq %rcx, %rax
movq %rax, -0x30(%rbp)
je 0x35310
leaq 0x4(%rax), %rcx
cmpq %rdx, %rcx
jbe 0x35285
testq %r13, %r13
je 0x3523d
movq 0x8(%rbx), %rdi
leaq (%rdi,%r13), %rsi
subq %r13, %r15
movq %r15, %rdx
callq 0x13720
subq %r13, %r14
movq %r15, 0x48(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3538a
movq %rax, -0x30(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x35308
movq 0x8(%rbx), %rsi
addq 0x48(%rbx), %rsi
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
movq %r12, %rcx
callq 0x21bb5
testb %al, %al
jne 0x352e3
addq -0x38(%rbp), %r15
xorl %r13d, %r13d
jmp 0x351ee
testb $0x1, -0x40(%rbp)
je 0x35294
addq %rax, %r14
addq $0x4, %r14
jmp 0x352ab
addq %r14, %rdi
leaq 0x4(%rdi), %rsi
callq 0x13720
addq $-0x4, %r15
movq -0x30(%rbp), %rax
addq %rax, %r14
cmpq $0xffffff, %rax # imm = 0xFFFFFF
jne 0x3537d
xorl %eax, %eax
movl $0x0, %ecx
testq %r13, %r13
je 0x351e7
movq 0x8(%rbx), %rdi
leaq (%rdi,%r13), %rsi
subq %r13, %r15
movq %r15, %rdx
callq 0x13720
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x351e7
movb $0x2, 0x94(%rbx)
movq (%rbx), %r8
movq 0x40(%r8), %rdi
leaq 0x19a98(%rip), %rax # 0x4ed90
movq (%rax), %rdx
movl $0x1397, %esi # imm = 0x1397
xorl %ecx, %ecx
xorl %eax, %eax
callq *0x50(%r8)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x3536b
addq $0x4, %r14
movzbl -0x40(%rbp), %eax
shll $0x2, %eax
orq $-0x8, %rax
movq %r15, 0x40(%rbx)
subq %r14, %r15
movq %r15, 0x30(%rbx)
leaq (%rdi,%r13), %rcx
addq $0x4, %rcx
movq %rcx, 0x20(%rbx)
subq %r13, %r14
addq %rax, %r14
movb (%rcx,%r14), %al
movb %al, 0x81(%rbx)
movb $0x0, (%rcx,%r14)
jmp 0x3536b
addq %r12, %rax
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
addq 0x8(%rbx), %r15
movq %r15, 0x20(%rbx)
cmpq %r14, %rax
je 0x3536b
movb $0x0, (%r15,%rax)
movq %rax, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rdi
movq $-0x4, %rax
jmp 0x3531f
|
ma_net_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
cmp byte ptr [rdi+84h], 0
jz short loc_35178
mov rax, [rbx+30h]
test rax, rax
jz short loc_351D8
mov rcx, [rbx+8]
mov r15, [rbx+40h]
mov r14, r15
sub r14, rax
mov al, [rbx+81h]
mov [rcx+r14], al
jmp short loc_351DE
loc_35178:
lea rsi, [rbp+var_38]
mov rdi, rbx
call ma_real_read
mov r15, [rbx+48h]
cmp rax, 0FFFFFFh
jnz loc_35350
xor r12d, r12d
mov r13d, 0FFFFFFh
lea r14, [rbp+var_38]
loc_351A1:
add r12, r13
add [rbx+48h], r13
mov rdi, rbx
mov rsi, r14
call ma_real_read
cmp rax, r13
jz short loc_351A1
mov [rbx+48h], r15
mov r14d, 0FFFFFFFFh
cmp rax, r14
jnz loc_3534D
add r15, [rbx+8]
mov [rbx+20h], r15
jmp loc_3536B
loc_351D8:
xor r15d, r15d
xor r14d, r14d
loc_351DE:
mov cl, 1
lea r12, [rbp+var_38]
mov rax, r14
loc_351E7:
mov [rbp+var_40], rcx
mov r13, rax
loc_351EE:
mov rdx, r15
sub rdx, r14
cmp rdx, 4
jb short loc_35222
mov rdi, [rbx+8]
movzx ecx, word ptr [rdi+r14]
movzx eax, byte ptr [rdi+r14+2]
shl eax, 10h
or rax, rcx
mov [rbp+var_30], rax
jz loc_35310
lea rcx, [rax+4]
cmp rcx, rdx
jbe short loc_35285
loc_35222:
test r13, r13
jz short loc_3523D
mov rdi, [rbx+8]
lea rsi, [rdi+r13]
sub r15, r13
mov rdx, r15
call _memmove
sub r14, r13
loc_3523D:
mov [rbx+48h], r15
mov rdi, rbx
mov rsi, r12
call ma_real_read
mov [rbp+var_30], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz loc_35308
mov rsi, [rbx+8]
add rsi, [rbx+48h]
mov rdi, rbx
lea rdx, [rbp+var_30]
mov rcx, r12
call _mariadb_uncompress
test al, al
jnz short loc_352E3
add r15, [rbp+var_38]
xor r13d, r13d
jmp loc_351EE
loc_35285:
test byte ptr [rbp+var_40], 1
jz short loc_35294
add r14, rax
add r14, 4
jmp short loc_352AB
loc_35294:
add rdi, r14
lea rsi, [rdi+4]
call _memmove
add r15, 0FFFFFFFFFFFFFFFCh
mov rax, [rbp+var_30]
add r14, rax
loc_352AB:
cmp rax, 0FFFFFFh
jnz loc_3537D
xor eax, eax
mov ecx, 0
test r13, r13
jz loc_351E7
mov rdi, [rbx+8]
lea rsi, [rdi+r13]
sub r15, r13
mov rdx, r15
call _memmove
xor eax, eax
xor ecx, ecx
jmp loc_351E7
loc_352E3:
mov byte ptr [rbx+94h], 2
mov r8, [rbx]
mov rdi, [r8+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 1397h
xor ecx, ecx
xor eax, eax
call qword ptr [r8+50h]
loc_35308:
mov r14d, 0FFFFFFFFh
jmp short loc_3536B
loc_35310:
add r14, 4
movzx eax, byte ptr [rbp+var_40]
shl eax, 2
or rax, 0FFFFFFFFFFFFFFF8h
loc_3531F:
mov [rbx+40h], r15
sub r15, r14
mov [rbx+30h], r15
lea rcx, [rdi+r13]
add rcx, 4
mov [rbx+20h], rcx
sub r14, r13
add r14, rax
mov al, [rcx+r14]
mov [rbx+81h], al
mov byte ptr [rcx+r14], 0
jmp short loc_3536B
loc_3534D:
add rax, r12
loc_35350:
mov r14d, 0FFFFFFFFh
add r15, [rbx+8]
mov [rbx+20h], r15
cmp rax, r14
jz short loc_3536B
mov byte ptr [r15+rax], 0
mov r14, rax
loc_3536B:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3537D:
mov rdi, [rbx+8]
mov rax, 0FFFFFFFFFFFFFFFCh
jmp short loc_3531F
|
long long ma_net_read(long long a1)
{
long long v2; // rax
long long v3; // r15
long long v4; // r14
long long v5; // rax
long long v6; // r15
long long v7; // r12
long long v8; // rax
long long v9; // r14
char v10; // cl
long long v11; // rax
long long i; // r13
unsigned long long v13; // rdx
long long v14; // rdi
unsigned long long v15; // rax
unsigned long long v16; // rax
long long v17; // rcx
long long v18; // r15
char v20; // [rsp+0h] [rbp-40h]
long long v21; // [rsp+8h] [rbp-38h] BYREF
long long v22[6]; // [rsp+10h] [rbp-30h] BYREF
if ( *(_BYTE *)(a1 + 132) )
{
v2 = *(_QWORD *)(a1 + 48);
if ( v2 )
{
v3 = *(_QWORD *)(a1 + 64);
v4 = v3 - v2;
*(_BYTE *)(*(_QWORD *)(a1 + 8) + v3 - v2) = *(_BYTE *)(a1 + 129);
}
else
{
v3 = 0LL;
v4 = 0LL;
}
v10 = 1;
v11 = v4;
while ( 1 )
{
v20 = v10;
for ( i = v11; ; i = 0LL )
{
v13 = v3 - v4;
if ( (unsigned long long)(v3 - v4) >= 4 )
{
v14 = *(_QWORD *)(a1 + 8);
v15 = *(unsigned __int16 *)(v14 + v4) | (unsigned long long)(*(unsigned __int8 *)(v14 + v4 + 2) << 16);
v22[0] = v15;
if ( !v15 )
{
v4 += 4LL;
v16 = (4 * v20) | 0xFFFFFFFFFFFFFFF8LL;
goto LABEL_29;
}
if ( v15 + 4 <= v13 )
break;
}
if ( i )
{
v3 -= i;
memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3);
v4 -= i;
}
*(_QWORD *)(a1 + 72) = v3;
v22[0] = ma_real_read(a1, &v21);
if ( v22[0] == 0xFFFFFFFFLL )
return 0xFFFFFFFFLL;
if ( (unsigned __int8)mariadb_uncompress(a1, *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8), v22, &v21) )
{
*(_BYTE *)(a1 + 148) = 2;
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
5015LL,
SQLSTATE_UNKNOWN,
0LL);
return 0xFFFFFFFFLL;
}
v3 += v21;
}
if ( (v20 & 1) != 0 )
{
v4 += v15 + 4;
}
else
{
memmove(v4 + v14, v4 + v14 + 4, v13);
v3 -= 4LL;
v15 = v22[0];
v4 += v22[0];
}
if ( v15 != 0xFFFFFF )
break;
v11 = 0LL;
v10 = 0;
if ( i )
{
v3 -= i;
memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3);
v11 = 0LL;
v10 = 0;
}
}
v14 = *(_QWORD *)(a1 + 8);
v16 = -4LL;
LABEL_29:
*(_QWORD *)(a1 + 64) = v3;
*(_QWORD *)(a1 + 48) = v3 - v4;
v17 = v14 + i + 4;
*(_QWORD *)(a1 + 32) = v17;
v9 = v16 + v4 - i;
*(_BYTE *)(a1 + 129) = *(_BYTE *)(v17 + v9);
*(_BYTE *)(v17 + v9) = 0;
}
else
{
v5 = ma_real_read(a1, &v21);
v6 = *(_QWORD *)(a1 + 72);
if ( v5 == 0xFFFFFF )
{
v7 = 0LL;
do
{
v7 += 0xFFFFFFLL;
*(_QWORD *)(a1 + 72) += 0xFFFFFFLL;
v8 = ma_real_read(a1, &v21);
}
while ( v8 == 0xFFFFFF );
*(_QWORD *)(a1 + 72) = v6;
v9 = 0xFFFFFFFFLL;
if ( v8 == 0xFFFFFFFFLL )
{
*(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 8) + v6;
return v9;
}
v5 = v7 + v8;
}
v9 = 0xFFFFFFFFLL;
v18 = *(_QWORD *)(a1 + 8) + v6;
*(_QWORD *)(a1 + 32) = v18;
if ( v5 != 0xFFFFFFFFLL )
{
*(_BYTE *)(v18 + v5) = 0;
return v5;
}
}
return v9;
}
|
ma_net_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CMP byte ptr [RDI + 0x84],0x0
JZ 0x00135178
MOV RAX,qword ptr [RBX + 0x30]
TEST RAX,RAX
JZ 0x001351d8
MOV RCX,qword ptr [RBX + 0x8]
MOV R15,qword ptr [RBX + 0x40]
MOV R14,R15
SUB R14,RAX
MOV AL,byte ptr [RBX + 0x81]
MOV byte ptr [RCX + R14*0x1],AL
JMP 0x001351de
LAB_00135178:
LEA RSI,[RBP + -0x38]
MOV RDI,RBX
CALL 0x0013538a
MOV R15,qword ptr [RBX + 0x48]
CMP RAX,0xffffff
JNZ 0x00135350
XOR R12D,R12D
MOV R13D,0xffffff
LEA R14,[RBP + -0x38]
LAB_001351a1:
ADD R12,R13
ADD qword ptr [RBX + 0x48],R13
MOV RDI,RBX
MOV RSI,R14
CALL 0x0013538a
CMP RAX,R13
JZ 0x001351a1
MOV qword ptr [RBX + 0x48],R15
MOV R14D,0xffffffff
CMP RAX,R14
JNZ 0x0013534d
ADD R15,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x20],R15
JMP 0x0013536b
LAB_001351d8:
XOR R15D,R15D
XOR R14D,R14D
LAB_001351de:
MOV CL,0x1
LEA R12,[RBP + -0x38]
MOV RAX,R14
LAB_001351e7:
MOV qword ptr [RBP + -0x40],RCX
MOV R13,RAX
LAB_001351ee:
MOV RDX,R15
SUB RDX,R14
CMP RDX,0x4
JC 0x00135222
MOV RDI,qword ptr [RBX + 0x8]
MOVZX ECX,word ptr [RDI + R14*0x1]
MOVZX EAX,byte ptr [RDI + R14*0x1 + 0x2]
SHL EAX,0x10
OR RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JZ 0x00135310
LEA RCX,[RAX + 0x4]
CMP RCX,RDX
JBE 0x00135285
LAB_00135222:
TEST R13,R13
JZ 0x0013523d
MOV RDI,qword ptr [RBX + 0x8]
LEA RSI,[RDI + R13*0x1]
SUB R15,R13
MOV RDX,R15
CALL 0x00113720
SUB R14,R13
LAB_0013523d:
MOV qword ptr [RBX + 0x48],R15
MOV RDI,RBX
MOV RSI,R12
CALL 0x0013538a
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x00135308
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,qword ptr [RBX + 0x48]
MOV RDI,RBX
LEA RDX,[RBP + -0x30]
MOV RCX,R12
CALL 0x00121bb5
TEST AL,AL
JNZ 0x001352e3
ADD R15,qword ptr [RBP + -0x38]
XOR R13D,R13D
JMP 0x001351ee
LAB_00135285:
TEST byte ptr [RBP + -0x40],0x1
JZ 0x00135294
ADD R14,RAX
ADD R14,0x4
JMP 0x001352ab
LAB_00135294:
ADD RDI,R14
LEA RSI,[RDI + 0x4]
CALL 0x00113720
ADD R15,-0x4
MOV RAX,qword ptr [RBP + -0x30]
ADD R14,RAX
LAB_001352ab:
CMP RAX,0xffffff
JNZ 0x0013537d
XOR EAX,EAX
MOV ECX,0x0
TEST R13,R13
JZ 0x001351e7
MOV RDI,qword ptr [RBX + 0x8]
LEA RSI,[RDI + R13*0x1]
SUB R15,R13
MOV RDX,R15
CALL 0x00113720
XOR EAX,EAX
XOR ECX,ECX
JMP 0x001351e7
LAB_001352e3:
MOV byte ptr [RBX + 0x94],0x2
MOV R8,qword ptr [RBX]
MOV RDI,qword ptr [R8 + 0x40]
LEA RAX,[0x14ed90]
MOV RDX,qword ptr [RAX]
MOV ESI,0x1397
XOR ECX,ECX
XOR EAX,EAX
CALL qword ptr [R8 + 0x50]
LAB_00135308:
MOV R14D,0xffffffff
JMP 0x0013536b
LAB_00135310:
ADD R14,0x4
MOVZX EAX,byte ptr [RBP + -0x40]
SHL EAX,0x2
OR RAX,-0x8
LAB_0013531f:
MOV qword ptr [RBX + 0x40],R15
SUB R15,R14
MOV qword ptr [RBX + 0x30],R15
LEA RCX,[RDI + R13*0x1]
ADD RCX,0x4
MOV qword ptr [RBX + 0x20],RCX
SUB R14,R13
ADD R14,RAX
MOV AL,byte ptr [RCX + R14*0x1]
MOV byte ptr [RBX + 0x81],AL
MOV byte ptr [RCX + R14*0x1],0x0
JMP 0x0013536b
LAB_0013534d:
ADD RAX,R12
LAB_00135350:
MOV R14D,0xffffffff
ADD R15,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x20],R15
CMP RAX,R14
JZ 0x0013536b
MOV byte ptr [R15 + RAX*0x1],0x0
MOV R14,RAX
LAB_0013536b:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013537d:
MOV RDI,qword ptr [RBX + 0x8]
MOV RAX,-0x4
JMP 0x0013531f
|
long ma_net_read(long *param_1)
{
char cVar1;
ulong uVar2;
long lVar3;
long lVar4;
size_t __n;
long lVar5;
long lVar6;
size_t __n_00;
long local_40;
ulong local_38;
if (*(char *)((long)param_1 + 0x84) == '\0') {
lVar4 = ma_real_read(param_1,&local_40);
lVar6 = param_1[9];
if (lVar4 == 0xffffff) {
lVar3 = 0;
do {
lVar3 = lVar3 + 0xffffff;
param_1[9] = param_1[9] + 0xffffff;
lVar4 = ma_real_read(param_1,&local_40);
} while (lVar4 == 0xffffff);
param_1[9] = lVar6;
if (lVar4 == 0xffffffff) {
param_1[4] = lVar6 + param_1[1];
return 0xffffffff;
}
lVar4 = lVar4 + lVar3;
}
param_1[4] = lVar6 + param_1[1];
lVar3 = 0xffffffff;
if (lVar4 != 0xffffffff) {
*(int1 *)(lVar6 + param_1[1] + lVar4) = 0;
lVar3 = lVar4;
}
return lVar3;
}
if (param_1[6] == 0) {
__n_00 = 0;
lVar6 = 0;
}
else {
__n_00 = param_1[8];
lVar6 = __n_00 - param_1[6];
*(int1 *)(param_1[1] + lVar6) = *(int1 *)((long)param_1 + 0x81);
}
lVar3 = 1;
lVar4 = lVar6;
LAB_001351ee:
do {
lVar5 = lVar4;
__n = __n_00 - lVar6;
if (3 < __n) {
lVar4 = param_1[1];
local_38 = (ulong)CONCAT12(*(int1 *)(lVar4 + 2 + lVar6),*(int2 *)(lVar4 + lVar6));
if (local_38 == 0) {
lVar6 = lVar6 + 4;
uVar2 = lVar3 << 2 | 0xfffffffffffffff8;
LAB_0013531f:
param_1[8] = __n_00;
param_1[6] = __n_00 - lVar6;
lVar4 = lVar4 + lVar5 + 4;
param_1[4] = lVar4;
lVar6 = (lVar6 - lVar5) + uVar2;
*(int1 *)((long)param_1 + 0x81) = *(int1 *)(lVar4 + lVar6);
*(int1 *)(lVar4 + lVar6) = 0;
return lVar6;
}
if (local_38 + 4 <= __n) {
if (lVar3 == 0) {
memmove((void *)(lVar4 + lVar6),(void *)(lVar4 + lVar6 + 4),__n);
__n_00 = __n_00 - 4;
lVar6 = lVar6 + local_38;
}
else {
lVar6 = lVar6 + local_38 + 4;
}
if (local_38 != 0xffffff) {
lVar4 = param_1[1];
uVar2 = 0xfffffffffffffffc;
goto LAB_0013531f;
}
lVar3 = 0;
lVar4 = 0;
if (lVar5 != 0) {
__n_00 = __n_00 - lVar5;
memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00);
lVar3 = 0;
lVar4 = 0;
}
goto LAB_001351ee;
}
}
if (lVar5 != 0) {
__n_00 = __n_00 - lVar5;
memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00);
lVar6 = lVar6 - lVar5;
}
param_1[9] = __n_00;
local_38 = ma_real_read(param_1,&local_40);
if (local_38 == 0xffffffff) {
return 0xffffffff;
}
cVar1 = _mariadb_uncompress(param_1,param_1[1] + param_1[9],&local_38,&local_40);
if (cVar1 != '\0') {
*(int1 *)((long)param_1 + 0x94) = 2;
(**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x1397,SQLSTATE_UNKNOWN,0);
return 0xffffffff;
}
__n_00 = __n_00 + local_40;
lVar4 = 0;
} while( true );
}
|
|
12,387
|
pack_dirname
|
eloqsql/mysys/mf_pack.c
|
void pack_dirname(char * to, const char *from)
{
int cwd_err;
size_t d_length,length,UNINIT_VAR(buff_length);
char * start;
char buff[FN_REFLEN + 1];
DBUG_ENTER("pack_dirname");
(void) intern_filename(to,from); /* Change to intern name */
#ifdef FN_DEVCHAR
if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */
start++;
else
#endif
start=to;
if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0))))
{
buff_length= strlen(buff);
d_length= (size_t) (start-to);
if ((start == to ||
(buff_length == d_length && !memcmp(buff,start,d_length))) &&
*start != FN_LIBCHAR && *start)
{ /* Put current dir before */
bchange((uchar*) to, d_length, (uchar*) buff, buff_length, strlen(to)+1);
}
}
if ((d_length= cleanup_dirname(to,to)) != 0)
{
length=0;
if (home_dir)
{
length= strlen(home_dir);
if (home_dir[length-1] == FN_LIBCHAR)
length--; /* Don't test last '/' */
}
if (length > 1 && length < d_length)
{ /* test if /xx/yy -> ~/yy */
if (memcmp(to,home_dir,length) == 0 && to[length] == FN_LIBCHAR)
{
to[0]=FN_HOMELIB; /* Filename begins with ~ */
(void) strmov_overlapp(to+1,to+length);
}
}
if (! cwd_err)
{ /* Test if cwd is ~/... */
if (length > 1 && length < buff_length)
{
if (memcmp(buff,home_dir,length) == 0 && buff[length] == FN_LIBCHAR)
{
buff[0]=FN_HOMELIB;
(void) strmov_overlapp(buff+1,buff+length);
}
}
if (is_prefix(to,buff))
{
length= strlen(buff);
if (to[length])
(void) strmov_overlapp(to,to+length); /* Remove everything before */
else
{
to[0]= FN_CURLIB; /* Put ./ instead of cwd */
to[1]= FN_LIBCHAR;
to[2]= '\0';
}
}
}
}
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_VOID_RETURN;
}
|
O3
|
c
|
pack_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x2a565
leaq -0x240(%rbp), %rdi
movl $0x200, %esi # imm = 0x200
xorl %edx, %edx
callq 0x2af14
movl %eax, %r14d
testl %r14d, %r14d
je 0x2a43d
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a5fb
testq %rax, %rax
je 0x2a49b
movq %rax, %r15
movl %r14d, -0x244(%rbp)
leaq 0x33ba37(%rip), %rax # 0x365e08
movq (%rax), %r13
testq %r13, %r13
je 0x2a48c
movq %r13, %rdi
callq 0x24110
movq %rax, %r12
xorl %eax, %eax
cmpb $0x2f, -0x1(%r13,%r12)
sete %al
subq %rax, %r12
cmpq $0x2, %r12
setae %r14b
setb %al
cmpq %r15, %r12
setae %cl
orb %al, %cl
jne 0x2a492
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x242d0
movb $0x1, %r14b
testl %eax, %eax
jne 0x2a492
cmpb $0x2f, (%rbx,%r12)
jne 0x2a492
leaq (%rbx,%r12), %rsi
movb $0x7e, (%rbx)
leaq 0x1(%rbx), %rdi
callq 0x5b2c8
jmp 0x2a492
leaq -0x240(%rbp), %rdi
callq 0x24110
movq %rax, %r15
movzbl (%rbx), %eax
testl %eax, %eax
movq %r15, -0x250(%rbp)
je 0x2a3ac
cmpl $0x2f, %eax
je 0x2a3ac
movq %rbx, %rdi
callq 0x24110
leaq 0x1(%rax), %r8
leaq -0x240(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x2e010
jmp 0x2a3ac
xorl %r14d, %r14d
xorl %r12d, %r12d
cmpl $0x0, -0x244(%rbp)
je 0x2a4c0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2a560
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq -0x250(%rbp), %r12
setb %al
andb %al, %r14b
cmpb $0x1, %r14b
jne 0x2a516
leaq 0x33b92e(%rip), %rax # 0x365e08
movq (%rax), %rsi
leaq -0x240(%rbp), %rdi
movq %r12, %rdx
callq 0x242d0
testl %eax, %eax
jne 0x2a516
cmpb $0x2f, -0x240(%rbp,%r12)
jne 0x2a516
leaq (%r12,%rbp), %rsi
addq $-0x240, %rsi # imm = 0xFDC0
leaq -0x23f(%rbp), %rdi
movb $0x7e, -0x1(%rdi)
callq 0x5b2c8
leaq -0x240(%rbp), %rsi
movq %rbx, %rdi
callq 0x58c48
testl %eax, %eax
je 0x2a49b
leaq -0x240(%rbp), %rdi
callq 0x24110
cmpb $0x0, (%rbx,%rax)
je 0x2a552
addq %rbx, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5b2c8
jmp 0x2a49b
movw $0x2f2e, (%rbx) # imm = 0x2F2E
movb $0x0, 0x2(%rbx)
jmp 0x2a49b
callq 0x24320
|
pack_dirname:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call intern_filename
lea rdi, [rbp+var_240]
mov esi, 200h
xor edx, edx
call my_getwd
mov r14d, eax
test r14d, r14d
jz loc_2A43D
loc_2A3AC:
mov rdi, rbx
mov rsi, rbx
call cleanup_dirname
test rax, rax
jz loc_2A49B
mov r15, rax
mov [rbp+var_244], r14d
lea rax, home_dir
mov r13, [rax]
test r13, r13
jz loc_2A48C
mov rdi, r13
call _strlen
mov r12, rax
xor eax, eax
cmp byte ptr [r13+r12-1], 2Fh ; '/'
setz al
sub r12, rax
cmp r12, 2
setnb r14b
setb al
cmp r12, r15
setnb cl
or cl, al
jnz loc_2A492
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call _bcmp
mov r14b, 1
test eax, eax
jnz short loc_2A492
cmp byte ptr [rbx+r12], 2Fh ; '/'
jnz short loc_2A492
lea rsi, [rbx+r12]
mov byte ptr [rbx], 7Eh ; '~'
lea rdi, [rbx+1]
call strmov_overlapp
jmp short loc_2A492
loc_2A43D:
lea rdi, [rbp+var_240]
call _strlen
mov r15, rax
movzx eax, byte ptr [rbx]
test eax, eax
mov [rbp+var_250], r15
jz loc_2A3AC
cmp eax, 2Fh ; '/'
jz loc_2A3AC
mov rdi, rbx
call _strlen
lea r8, [rax+1]
lea rdx, [rbp+var_240]
mov rdi, rbx
xor esi, esi
mov rcx, r15
call bchange
jmp loc_2A3AC
loc_2A48C:
xor r14d, r14d
xor r12d, r12d
loc_2A492:
cmp [rbp+var_244], 0
jz short loc_2A4C0
loc_2A49B:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_2A560
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2A4C0:
cmp r12, [rbp+var_250]
setb al
and r14b, al
cmp r14b, 1
jnz short loc_2A516
lea rax, home_dir
mov rsi, [rax]
lea rdi, [rbp+var_240]
mov rdx, r12
call _bcmp
test eax, eax
jnz short loc_2A516
cmp [rbp+r12+var_240], 2Fh ; '/'
jnz short loc_2A516
lea rsi, [r12+rbp]
add rsi, 0FFFFFFFFFFFFFDC0h
lea rdi, [rbp+var_23F]
mov byte ptr [rdi-1], 7Eh ; '~'
call strmov_overlapp
loc_2A516:
lea rsi, [rbp+var_240]
mov rdi, rbx
call is_prefix
test eax, eax
jz loc_2A49B
lea rdi, [rbp+var_240]
call _strlen
cmp byte ptr [rbx+rax], 0
jz short loc_2A552
add rax, rbx
mov rdi, rbx
mov rsi, rax
call strmov_overlapp
jmp loc_2A49B
loc_2A552:
mov word ptr [rbx], 2F2Eh
mov byte ptr [rbx+2], 0
jmp loc_2A49B
loc_2A560:
call ___stack_chk_fail
|
unsigned long long pack_dirname(char *a1, long long a2)
{
int v2; // r14d
long long v3; // rax
unsigned long long v4; // r15
long long v5; // r13
long long v6; // rax
unsigned long long v7; // r12
bool v8; // r14
long long v9; // r15
long long v10; // rax
long long v12; // rax
unsigned long long v13; // [rsp+0h] [rbp-250h]
int v14; // [rsp+Ch] [rbp-244h]
char v15; // [rsp+10h] [rbp-240h] BYREF
_BYTE v16[527]; // [rsp+11h] [rbp-23Fh] BYREF
unsigned long long v17; // [rsp+220h] [rbp-30h]
v17 = __readfsqword(0x28u);
intern_filename(a1, a2);
v2 = my_getwd(&v15, 512LL, 0LL);
if ( !v2 )
{
v9 = strlen(&v15);
v13 = v9;
if ( *a1 )
{
if ( *a1 != 47 )
{
v10 = strlen(a1);
bchange(a1, 0LL, &v15, v9, v10 + 1);
}
}
}
v3 = cleanup_dirname(a1, a1);
if ( v3 )
{
v4 = v3;
v14 = v2;
v5 = home_dir;
if ( home_dir )
{
v6 = strlen(home_dir);
v7 = v6 - (*(_BYTE *)(v5 + v6 - 1) == 47);
v8 = v7 >= 2;
if ( v7 >= 2 && v7 < v4 )
{
v8 = 1;
if ( !(unsigned int)bcmp(a1, v5, v7) && a1[v7] == 47 )
{
*a1 = 126;
strmov_overlapp(a1 + 1, &a1[v7]);
}
}
}
else
{
v8 = 0;
v7 = 0LL;
}
if ( !v14 )
{
if ( v7 < v13 && v8 && !(unsigned int)bcmp(&v15, home_dir, v7) && v16[v7 - 1] == 47 )
{
v15 = 126;
strmov_overlapp(v16, &v16[v7 - 1]);
}
if ( (unsigned int)is_prefix(a1, &v15) )
{
v12 = strlen(&v15);
if ( a1[v12] )
strmov_overlapp(a1, &a1[v12]);
else
strcpy(a1, "./");
}
}
}
return __readfsqword(0x28u);
}
|
pack_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0012a565
LEA RDI,[RBP + -0x240]
MOV ESI,0x200
XOR EDX,EDX
CALL 0x0012af14
MOV R14D,EAX
TEST R14D,R14D
JZ 0x0012a43d
LAB_0012a3ac:
MOV RDI,RBX
MOV RSI,RBX
CALL 0x0012a5fb
TEST RAX,RAX
JZ 0x0012a49b
MOV R15,RAX
MOV dword ptr [RBP + -0x244],R14D
LEA RAX,[0x465e08]
MOV R13,qword ptr [RAX]
TEST R13,R13
JZ 0x0012a48c
MOV RDI,R13
CALL 0x00124110
MOV R12,RAX
XOR EAX,EAX
CMP byte ptr [R13 + R12*0x1 + -0x1],0x2f
SETZ AL
SUB R12,RAX
CMP R12,0x2
SETNC R14B
SETC AL
CMP R12,R15
SETNC CL
OR CL,AL
JNZ 0x0012a492
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x001242d0
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x0012a492
CMP byte ptr [RBX + R12*0x1],0x2f
JNZ 0x0012a492
LEA RSI,[RBX + R12*0x1]
MOV byte ptr [RBX],0x7e
LEA RDI,[RBX + 0x1]
CALL 0x0015b2c8
JMP 0x0012a492
LAB_0012a43d:
LEA RDI,[RBP + -0x240]
CALL 0x00124110
MOV R15,RAX
MOVZX EAX,byte ptr [RBX]
TEST EAX,EAX
MOV qword ptr [RBP + -0x250],R15
JZ 0x0012a3ac
CMP EAX,0x2f
JZ 0x0012a3ac
MOV RDI,RBX
CALL 0x00124110
LEA R8,[RAX + 0x1]
LEA RDX,[RBP + -0x240]
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x0012e010
JMP 0x0012a3ac
LAB_0012a48c:
XOR R14D,R14D
XOR R12D,R12D
LAB_0012a492:
CMP dword ptr [RBP + -0x244],0x0
JZ 0x0012a4c0
LAB_0012a49b:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012a560
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012a4c0:
CMP R12,qword ptr [RBP + -0x250]
SETC AL
AND R14B,AL
CMP R14B,0x1
JNZ 0x0012a516
LEA RAX,[0x465e08]
MOV RSI,qword ptr [RAX]
LEA RDI,[RBP + -0x240]
MOV RDX,R12
CALL 0x001242d0
TEST EAX,EAX
JNZ 0x0012a516
CMP byte ptr [RBP + R12*0x1 + -0x240],0x2f
JNZ 0x0012a516
LEA RSI,[R12 + RBP*0x1]
ADD RSI,-0x240
LEA RDI,[RBP + -0x23f]
MOV byte ptr [RDI + -0x1],0x7e
CALL 0x0015b2c8
LAB_0012a516:
LEA RSI,[RBP + -0x240]
MOV RDI,RBX
CALL 0x00158c48
TEST EAX,EAX
JZ 0x0012a49b
LEA RDI,[RBP + -0x240]
CALL 0x00124110
CMP byte ptr [RBX + RAX*0x1],0x0
JZ 0x0012a552
ADD RAX,RBX
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0015b2c8
JMP 0x0012a49b
LAB_0012a552:
MOV word ptr [RBX],0x2f2e
MOV byte ptr [RBX + 0x2],0x0
JMP 0x0012a49b
LAB_0012a560:
CALL 0x00124320
|
void pack_dirname(char *param_1)
{
char *__s2;
int iVar1;
int iVar2;
ulong uVar3;
size_t sVar4;
ulong __n;
long in_FS_OFFSET;
bool bVar5;
ulong local_258;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
intern_filename();
iVar1 = my_getwd(local_248,0x200,0);
if (iVar1 == 0) {
local_258 = strlen(local_248);
if ((*param_1 != '\0') && (*param_1 != '/')) {
sVar4 = strlen(param_1);
bchange(param_1,0,local_248,local_258,sVar4 + 1);
}
}
uVar3 = cleanup_dirname(param_1,param_1);
__s2 = home_dir;
if (uVar3 != 0) {
if (home_dir == (char *)0x0) {
bVar5 = false;
__n = 0;
}
else {
sVar4 = strlen(home_dir);
__n = sVar4 - (__s2[sVar4 - 1] == '/');
bVar5 = 1 < __n;
if (__n < uVar3 && bVar5) {
iVar2 = bcmp(param_1,__s2,__n);
bVar5 = true;
if ((iVar2 == 0) && (param_1[__n] == '/')) {
*param_1 = '~';
strmov_overlapp(param_1 + 1,param_1 + __n);
}
}
}
if (iVar1 == 0) {
if ((bool)(bVar5 & __n < local_258)) {
iVar1 = bcmp(local_248,home_dir,__n);
if ((iVar1 == 0) && (local_248[__n] == '/')) {
local_248[0] = '~';
strmov_overlapp(local_248 + 1,local_248 + __n);
}
}
iVar1 = is_prefix(param_1,local_248);
if (iVar1 != 0) {
sVar4 = strlen(local_248);
if (param_1[sVar4] == '\0') {
param_1[0] = '.';
param_1[1] = '/';
param_1[2] = '\0';
}
else {
strmov_overlapp(param_1,param_1 + sVar4);
}
}
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,388
|
minja::IfExpr::IfExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
IfExpr(const Location & location, std::shared_ptr<Expression> && c, std::shared_ptr<Expression> && t, std::shared_ptr<Expression> && e)
: Expression(location), condition(std::move(c)), then_expr(std::move(t)), else_expr(std::move(e)) {}
|
O2
|
cpp
|
minja::IfExpr::IfExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
callq 0x5f8a0
leaq 0x6d8f8(%rip), %rax # 0xdac48
addq $0x10, %rax
movq %rax, (%r12)
andq $0x0, 0x28(%r12)
movups (%r15), %xmm0
andq $0x0, 0x8(%r15)
movups %xmm0, 0x20(%r12)
andq $0x0, (%r15)
andq $0x0, 0x38(%r12)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x30(%r12)
andq $0x0, (%r14)
andq $0x0, 0x48(%r12)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x40(%r12)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_:
push r15
push r14
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja6IfExprE; `vtable for'minja::IfExpr
add rax, 10h
mov [r12], rax
and qword ptr [r12+28h], 0
movups xmm0, xmmword ptr [r15]
and qword ptr [r15+8], 0
movups xmmword ptr [r12+20h], xmm0
and qword ptr [r15], 0
and qword ptr [r12+38h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r12+30h], xmm0
and qword ptr [r14], 0
and qword ptr [r12+48h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r12+40h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long * minja::IfExpr::IfExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, __int128 *a5)
{
long long *result; // rax
__int128 v9; // xmm0
__int128 v10; // xmm0
__int128 v11; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &`vtable for'minja::IfExpr + 2;
*(_QWORD *)a1 = &`vtable for'minja::IfExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v9 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v9;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v10 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v10;
*(_QWORD *)a4 = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
v11 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v11;
*(_QWORD *)a5 = 0LL;
return result;
}
|
IfExpr:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RDI
CALL 0x0015f8a0
LEA RAX,[0x1dac48]
ADD RAX,0x10
MOV qword ptr [R12],RAX
AND qword ptr [R12 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R15]
AND qword ptr [R15 + 0x8],0x0
MOVUPS xmmword ptr [R12 + 0x20],XMM0
AND qword ptr [R15],0x0
AND qword ptr [R12 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R12 + 0x30],XMM0
AND qword ptr [R14],0x0
AND qword ptr [R12 + 0x48],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R12 + 0x40],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::IfExpr::IfExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::IfExpr::IfExpr
(IfExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3,
shared_ptr *param_4)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001dac58;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar1;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x48) = 0;
uVar1 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_4;
*(int8 *)(this + 0x48) = uVar1;
*(int8 *)param_4 = 0;
return;
}
|
|
12,389
|
js_async_function_resolve_create
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_async_function_resolve_create(JSContext *ctx,
JSAsyncFunctionData *s,
JSValue *resolving_funcs)
{
int i;
JSObject *p;
for(i = 0; i < 2; i++) {
resolving_funcs[i] =
JS_NewObjectProtoClass(ctx, ctx->function_proto,
JS_CLASS_ASYNC_FUNCTION_RESOLVE + i);
if (JS_IsException(resolving_funcs[i])) {
if (i == 1)
JS_FreeValue(ctx, resolving_funcs[0]);
return -1;
}
p = JS_VALUE_GET_OBJ(resolving_funcs[i]);
s->header.ref_count++;
p->u.async_function_data = s;
}
return 0;
}
|
O0
|
c
|
js_async_function_resolve_create:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
cmpl $0x2, 0x24(%rsp)
jge 0x99257
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
movq 0x38(%rsp), %rax
movl 0x24(%rsp), %ecx
addl $0x35, %ecx
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
callq 0x30190
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x99214
cmpl $0x1, 0x24(%rsp)
jne 0x9920a
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x29f80
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x9925f
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x30(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x9916b
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
js_async_function_resolve_create:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_20], rdx
mov [rsp+48h+var_24], 0
loc_9916B:
cmp [rsp+48h+var_24], 2
jge loc_99257
mov rax, [rsp+48h+var_20]
movsxd rcx, [rsp+48h+var_24]
shl rcx, 4
add rax, rcx
mov [rsp+48h+var_48], rax
mov rdi, [rsp+48h+var_10]
mov rax, [rsp+48h+var_10]
mov ecx, [rsp+48h+var_24]
add ecx, 35h ; '5'
mov rsi, [rax+48h]
mov rdx, [rax+50h]
call JS_NewObjectProtoClass
mov rcx, rax
mov rax, [rsp+48h+var_48]
mov [rsp+48h+var_40], rcx
mov [rsp+48h+var_38], rdx
mov rcx, [rsp+48h+var_40]
mov [rax], rcx
mov rcx, [rsp+48h+var_38]
mov [rax+8], rcx
mov rax, [rsp+48h+var_20]
movsxd rcx, [rsp+48h+var_24]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsException_1
cmp eax, 0
jz short loc_99214
cmp [rsp+48h+var_24], 1
jnz short loc_9920A
mov rdi, [rsp+48h+var_10]
mov rax, [rsp+48h+var_20]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
loc_9920A:
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp short loc_9925F
loc_99214:
mov rax, [rsp+48h+var_20]
movsxd rcx, [rsp+48h+var_24]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_18]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
mov rcx, [rsp+48h+var_18]
mov rax, [rsp+48h+var_30]
mov [rax+30h], rcx
mov eax, [rsp+48h+var_24]
add eax, 1
mov [rsp+48h+var_24], eax
jmp loc_9916B
loc_99257:
mov [rsp+48h+var_4], 0
loc_9925F:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
|
long long js_async_function_resolve_create(long long a1, _DWORD *a2, long long *a3)
{
long long v3; // rdx
long long *v5; // [rsp+0h] [rbp-48h]
long long v6; // [rsp+18h] [rbp-30h]
int i; // [rsp+24h] [rbp-24h]
for ( i = 0; ; ++i )
{
if ( i >= 2 )
return 0;
v5 = &a3[2 * i];
*v5 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), i + 53);
v5[1] = v3;
if ( JS_IsException_1(*v5, v5[1]) )
break;
v6 = a3[2 * i];
++*a2;
*(_QWORD *)(v6 + 48) = a2;
}
if ( i == 1 )
JS_FreeValue(a1, *a3, a3[1]);
return (unsigned int)-1;
}
|
js_async_function_resolve_create:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0x24],0x0
LAB_0019916b:
CMP dword ptr [RSP + 0x24],0x2
JGE 0x00199257
MOV RAX,qword ptr [RSP + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x24]
ADD ECX,0x35
MOV RSI,qword ptr [RAX + 0x48]
MOV RDX,qword ptr [RAX + 0x50]
CALL 0x00130190
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00199214
CMP dword ptr [RSP + 0x24],0x1
JNZ 0x0019920a
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00129f80
LAB_0019920a:
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x0019925f
LAB_00199214:
MOV RAX,qword ptr [RSP + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x30],RCX
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0019916b
LAB_00199257:
MOV dword ptr [RSP + 0x44],0x0
LAB_0019925f:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4 js_async_function_resolve_create(long param_1,int *param_2,int8 *param_3)
{
long lVar1;
int iVar2;
int1 auVar3 [16];
int local_24;
local_24 = 0;
while( true ) {
if (1 < local_24) {
return 0;
}
auVar3 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),
local_24 + 0x35);
*(int1 (*) [16])(param_3 + (long)local_24 * 2) = auVar3;
iVar2 = JS_IsException(param_3[(long)local_24 * 2],(param_3 + (long)local_24 * 2)[1]);
if (iVar2 != 0) break;
lVar1 = param_3[(long)local_24 * 2];
*param_2 = *param_2 + 1;
*(int **)(lVar1 + 0x30) = param_2;
local_24 = local_24 + 1;
}
if (local_24 == 1) {
JS_FreeValue(param_1,*param_3,param_3[1]);
}
return 0xffffffff;
}
|
|
12,390
|
psi_mutex_lock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O0
|
c
|
psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1a5916(%rip), %rax # 0x1cc8e0
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x24410
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2701d
leaq 0x1a58d6(%rip), %rax # 0x1cc8e0
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
psi_mutex_lock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_2701D
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_2701D:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_mutex_lock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v5, v4);
return v4;
}
|
psi_mutex_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2cc8e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124410
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0012701d
LEA RAX,[0x2cc8e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0012701d:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
12,391
|
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double)
|
monkey531[P]llama/common/json.hpp
|
JSON_HEDLEY_NON_NULL(1)
void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value)
{
static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3,
"internal error: not enough precision");
JSON_ASSERT(std::isfinite(value));
JSON_ASSERT(value > 0);
// If the neighbors (and boundaries) of 'value' are always computed for double-precision
// numbers, all float's can be recovered using strtod (and strtof). However, the resulting
// decimal representations are not exactly "short".
//
// The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars)
// says "value is converted to a string as if by std::sprintf in the default ("C") locale"
// and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars'
// does.
// On the other hand, the documentation for 'std::to_chars' requires that "parsing the
// representation using the corresponding std::from_chars function recovers value exactly". That
// indicates that single precision floating-point numbers should be recovered using
// 'std::strtof'.
//
// NB: If the neighbors are computed for single-precision numbers, there is a single float
// (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision
// value is off by 1 ulp.
#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if)
const boundaries w = compute_boundaries(static_cast<double>(value));
#else
const boundaries w = compute_boundaries(value);
#endif
grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus);
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jge 0x7ba37
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7ba53
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x7bcdf
movq 0x10(%r12), %rcx
movl 0x18(%r12), %r8d
movups (%r12), %xmm0
movups 0x20(%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7be25
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2fc19(%rip), %rdi # 0xab657
leaq 0x2e3cc(%rip), %rdx # 0xa9e11
leaq 0x3274d(%rip), %rcx # 0xae199
movl $0x4589, %esi # imm = 0x4589
jmp 0x7ba6d
leaq 0x2fbfd(%rip), %rdi # 0xab657
leaq 0x2e3b0(%rip), %rdx # 0xa9e11
leaq 0x3284a(%rip), %rcx # 0xae2b2
movl $0x458a, %esi # imm = 0x458A
xorl %eax, %eax
callq 0x18ad0
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jge short loc_7BA37
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jbe short loc_7BA53
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea r12, [rsp+78h+var_50]
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
mov rcx, [r12+10h]; int
mov r8d, [r12+18h]; int
movups xmm0, xmmword ptr [r12]
movups xmm1, xmmword ptr [r12+20h]
movups xmmword ptr [rsp+78h+var_68], xmm1; char
movups xmmword ptr [rsp+78h+var_78], xmm0; char
mov rdi, r15; int
mov rsi, r14; int
mov rdx, rbx; int
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_7BA37:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStdIsfiniteVal; "std::isfinite(value)"
mov esi, 4589h
jmp short loc_7BA6D
loc_7BA53:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aValue0; "value > 0"
mov esi, 458Ah
loc_7BA6D:
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(int a1, int a2, int a3, double a4)
{
int v5; // r9d
char *v7; // rsi
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
char v12[8]; // [rsp+28h] [rbp-50h] BYREF
int v13; // [rsp+30h] [rbp-48h]
int v14; // [rsp+38h] [rbp-40h]
int v15; // [rsp+40h] [rbp-38h]
char v16; // [rsp+48h] [rbp-30h]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v17; // [rsp+50h] [rbp-28h]
if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
{
v7 = (_BYTE *)(&stru_4588 + 1);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17801LL,
"GGML_ASSERT(%s) failed",
"std::isfinite(value)");
}
else
{
if ( a4 > 0.0 )
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12);
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(a1, a2, a3, v14, v15, v5, v12[0], v13, v16, v17);
}
v7 = (_BYTE *)(&stru_4588 + 2);
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17802LL,
"GGML_ASSERT(%s) failed",
"value > 0");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v7,
v8,
v9,
v10,
v11);
}
|
grisu2<double>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JGE 0x0017ba37
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JBE 0x0017ba53
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x0017bcdf
MOV RCX,qword ptr [R12 + 0x10]
MOV R8D,dword ptr [R12 + 0x18]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS XMM1,xmmword ptr [R12 + 0x20]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0017be25
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0017ba37:
LEA RDI,[0x1ab657]
LEA RDX,[0x1a9e11]
LEA RCX,[0x1ae199]
MOV ESI,0x4589
JMP 0x0017ba6d
LAB_0017ba53:
LEA RDI,[0x1ab657]
LEA RDX,[0x1a9e11]
LEA RCX,[0x1ae2b2]
MOV ESI,0x458a
LAB_0017ba6d:
XOR EAX,EAX
CALL 0x00118ad0
|
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>
(char *param_1,int *param_2,int *param_3,double param_4)
{
char *pcVar1;
int8 uVar2;
int8 in_R9;
int4 local_50 [2];
int4 uStack_48;
int8 local_40;
int4 local_38;
int4 local_30;
int4 uStack_28;
if ((ulong)ABS(param_4) < 0x7ff0000000000000) {
if (0.0 < param_4) {
compute_boundaries<double>((dtoa_impl *)local_50,param_4);
grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30,
uStack_28);
return;
}
pcVar1 = "value > 0";
uVar2 = 0x458a;
}
else {
pcVar1 = "std::isfinite(value)";
uVar2 = 0x4589;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar2,
"GGML_ASSERT(%s) failed",pcVar1);
}
|
|
12,392
|
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
|
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/exceptions.hpp
|
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
subq $0xd8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
leaq 0x57(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x13550
movq 0x18(%rsp), %rdx
leaq 0x562451(%rip), %rsi # 0x5cd8af
leaq 0x58(%rsp), %rdi
callq 0x169d0
jmp 0x6b46a
movl 0xcc(%rsp), %edx
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x61370
jmp 0x6b482
xorl %eax, %eax
movl %eax, %esi
leaq 0x20(%rsp), %rdi
callq 0x61410
jmp 0x6b492
movq 0xc0(%rsp), %rcx
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x612b0
jmp 0x6b4b3
leaq 0x20(%rsp), %rdi
callq 0x13768
leaq 0x78(%rsp), %rdi
callq 0x13768
leaq 0x58(%rsp), %rdi
callq 0x13768
leaq 0x57(%rsp), %rdi
callq 0x12d00
movl 0xcc(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x124a0
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
movq %rax, %rdx
callq 0x62610
jmp 0x6b506
leaq 0x98(%rsp), %rdi
callq 0x13768
movq 0x10(%rsp), %rax
addq $0xd8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x6b57c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x6b572
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x6b568
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x13768
leaq 0x78(%rsp), %rdi
callq 0x13768
leaq 0x58(%rsp), %rdi
callq 0x13768
leaq 0x57(%rsp), %rdi
callq 0x12d00
jmp 0x6b5a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x13768
movq 0x48(%rsp), %rdi
callq 0x13540
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
sub rsp, 0D8h
mov [rsp+0D8h+var_D0], rdi; int
mov rax, rdi
mov qword ptr [rsp+0D8h+var_C8], rax; int
mov [rsp+0D8h+var_8], rdi
mov [rsp+0D8h+var_C], esi
mov qword ptr [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_20], rcx
lea rdi, [rsp+0D8h+var_81]
mov qword ptr [rsp+0D8h+var_C0], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+0D8h+var_C0]
lea rsi, aTypeError; "type_error"
lea rdi, [rsp+0D8h+var_81+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_6B46A:
mov edx, [rsp+0D8h+var_C]
lea rdi, [rsp+0D8h+var_60]; int
lea rsi, [rsp+0D8h+var_81+1]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
jmp short $+2
loc_6B482:
xor eax, eax
mov esi, eax
lea rdi, [rsp+0D8h+var_B8]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr))
jmp short $+2
loc_6B492:
mov rcx, qword ptr [rsp+0D8h+var_18]; int
lea rdi, [rsp+0D8h+var_40]; int
lea rsi, [rsp+0D8h+var_60]; int
lea rdx, [rsp+0D8h+var_B8]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
jmp short $+2
loc_6B4B3:
lea rdi, [rsp+0D8h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_81+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_81]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov eax, [rsp+0D8h+var_C]
mov [rsp+0D8h+var_D4], eax
lea rdi, [rsp+0D8h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0D8h+var_D0]; this
mov esi, [rsp+0D8h+var_D4]; int
mov rdx, rax; char *
call _ZN8nlohmann16json_abi_v3_11_36detail10type_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::type_error::type_error(int,char const*)
jmp short $+2
loc_6B506:
lea rdi, [rsp+0D8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, qword ptr [rsp+0D8h+var_C8]
add rsp, 0D8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_6B57C
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_6B572
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_6B568
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6B568:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6B572:
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6B57C:
lea rdi, [rsp+arg_4F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_6B5A3
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6B5A3:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_3::detail::type_error * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::type_error *a1,
long long a2,
long long a3,
long long a4)
{
long long v4; // rdx
const char *v5; // rax
int v7; // [rsp+4h] [rbp-D4h]
int v8[13]; // [rsp+20h] [rbp-B8h] BYREF
int v9[8]; // [rsp+57h] [rbp-81h] BYREF
int v10[8]; // [rsp+78h] [rbp-60h] BYREF
int v11[8]; // [rsp+98h] [rbp-40h] BYREF
long long v12; // [rsp+B8h] [rbp-20h]
int v13[2]; // [rsp+C0h] [rbp-18h]
int v14; // [rsp+CCh] [rbp-Ch]
nlohmann::json_abi_v3_11_3::detail::type_error *v15; // [rsp+D0h] [rbp-8h]
v15 = a1;
v14 = a2;
*(_QWORD *)v13 = a3;
v12 = a4;
std::allocator<char>::allocator(v9, a2, a3);
std::string::basic_string<std::allocator<char>>((long long)v9 + 1, (long long)"type_error", (long long)v9);
nlohmann::json_abi_v3_11_3::detail::exception::name(v10, (long long)v9 + 1, v14);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((long long)v8, 0LL, v4);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v11,
(long long)v10,
(long long)v8,
*(long long *)v13);
std::string::~string(v8);
std::string::~string(v10);
std::string::~string((char *)v9 + 1);
std::allocator<char>::~allocator(v9);
v7 = v14;
v5 = (const char *)std::string::c_str(v11);
nlohmann::json_abi_v3_11_3::detail::type_error::type_error(a1, v7, v5);
std::string::~string(v11);
return a1;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
SUB RSP,0xd8
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0xd0],RDI
MOV dword ptr [RSP + 0xcc],ESI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb8],RCX
LEA RDI,[RSP + 0x57]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00113550
MOV RDX,qword ptr [RSP + 0x18]
LAB_0016b457:
LEA RSI,[0x6cd8af]
LEA RDI,[RSP + 0x58]
CALL 0x001169d0
JMP 0x0016b46a
LAB_0016b46a:
MOV EDX,dword ptr [RSP + 0xcc]
LAB_0016b471:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x58]
CALL 0x00161370
JMP 0x0016b482
LAB_0016b482:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x20]
CALL 0x00161410
JMP 0x0016b492
LAB_0016b492:
MOV RCX,qword ptr [RSP + 0xc0]
LAB_0016b49a:
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x78]
LEA RDX,[RSP + 0x20]
CALL 0x001612b0
JMP 0x0016b4b3
LAB_0016b4b3:
LEA RDI,[RSP + 0x20]
CALL 0x00113768
LEA RDI,[RSP + 0x78]
CALL 0x00113768
LEA RDI,[RSP + 0x58]
CALL 0x00113768
LEA RDI,[RSP + 0x57]
CALL 0x00112d00
MOV EAX,dword ptr [RSP + 0xcc]
MOV dword ptr [RSP + 0x4],EAX
LEA RDI,[RSP + 0x98]
CALL 0x001124a0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x4]
MOV RDX,RAX
LAB_0016b4ff:
CALL 0x00162610
LAB_0016b504:
JMP 0x0016b506
LAB_0016b506:
LEA RDI,[RSP + 0x98]
CALL 0x00113768
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0xd8
RET
|
type_error *
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(type_error *param_1,int param_2,string *param_3,int8 param_4)
{
int iVar1;
char *pcVar2;
exception local_b8 [55];
allocator local_81;
string local_80 [32];
exception local_60 [32];
detail local_40 [32];
int8 local_20;
string *local_18;
int local_c;
type_error *local_8;
local_20 = param_4;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 0016b457 to 0016b467 has its CatchHandler @ 0016b520 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"type_error",&local_81);
/* try { // try from 0016b471 to 0016b47f has its CatchHandler @ 0016b530 */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,local_c);
/* try { // try from 0016b482 to 0016b48f has its CatchHandler @ 0016b540 */
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_
(local_b8,(_func_decltype_nullptr *)0x0);
/* try { // try from 0016b49a to 0016b4b0 has its CatchHandler @ 0016b550 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
(local_40,(string *)local_60,(string *)local_b8,local_18);
std::__cxx11::string::~string((string *)local_b8);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
std::allocator<char>::~allocator((allocator<char> *)&local_81);
iVar1 = local_c;
pcVar2 = (char *)std::__cxx11::string::c_str();
/* try { // try from 0016b4ff to 0016b503 has its CatchHandler @ 0016b588 */
nlohmann::json_abi_v3_11_3::detail::type_error::type_error(param_1,iVar1,pcVar2);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
12,393
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array()
|
llama.cpp/common/json.hpp
|
bool end_array()
{
bool keep = true;
if (ref_stack.back())
{
keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());
if (keep)
{
ref_stack.back()->set_parents();
}
else
{
// discard array
*ref_stack.back() = discarded;
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
// remove discarded value
if (!keep && !ref_stack.empty() && ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->pop_back();
}
return true;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
testq %rcx, %rcx
je 0x87f69
subq 0x8(%rbx), %rax
shrq $0x3, %rax
decl %eax
movl %eax, 0xc(%rsp)
movb $0x3, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x88031
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
callq *0x98(%rbx)
testb %al, %al
jne 0x87f69
leaq 0xa8(%rbx), %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x889c4
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rdi
movq %r14, %rsi
callq 0x868e2
xorl %ebp, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x84776
movq %r14, %rdi
callq 0x88e90
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rax, %rcx
je 0x87ff4
movq 0x30(%rbx), %rdx
movl 0x38(%rbx), %esi
cmpq %rdx, 0x20(%rbx)
sete %dil
testl %esi, %esi
sete %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
je 0x88010
leaq -0x8(%rax), %rdi
movq %rdi, 0x10(%rbx)
subl $0x1, %esi
movl %esi, 0x38(%rbx)
jae 0x87fb3
movl $0x3f, 0x38(%rbx)
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
cmpq %rdi, %rcx
sete %cl
orb %cl, %bpl
jne 0x87fe9
movq -0x10(%rax), %rax
cmpb $0x2, (%rax)
jne 0x87fe9
movq 0x8(%rax), %rax
movq 0x8(%rax), %rbx
addq $-0x10, %rbx
movq %rbx, 0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x84776
movq %rbx, %rdi
callq 0x88e90
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x93517(%rip), %rdi # 0x11b512
leaq 0x8c12f(%rip), %rdx # 0x114131
leaq 0x944e5(%rip), %rcx # 0x11c4ee
movl $0x1bf5, %esi # imm = 0x1BF5
jmp 0x8802a
leaq 0x934fb(%rip), %rdi # 0x11b512
leaq 0x8c113(%rip), %rdx # 0x114131
leaq 0x94443(%rip), %rcx # 0x11c468
movl $0x1bf6, %esi # imm = 0x1BF6
xorl %eax, %eax
callq 0x21e60
callq 0x22280
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv:
push rbp
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rax-8]
mov bpl, 1
test rcx, rcx
jz short loc_87F69
sub rax, [rbx+8]
shr rax, 3
dec eax
mov [rsp+38h+var_2C], eax
mov [rsp+38h+var_2D], 3
cmp qword ptr [rbx+90h], 0
jz loc_88031
lea rdi, [rbx+80h]
lea rsi, [rsp+38h+var_2C]
lea rdx, [rsp+38h+var_2D]
call qword ptr [rbx+98h]
test al, al
jnz short loc_87F69
lea rsi, [rbx+0A8h]
lea r14, [rsp+38h+var_28]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rdi, [rax-8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
xor ebp, ebp
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()
loc_87F69:
mov rcx, [rbx+8]
mov rax, [rbx+10h]
cmp rcx, rax
jz short loc_87FF4
mov rdx, [rbx+30h]
mov esi, [rbx+38h]
cmp [rbx+20h], rdx
setz dil
test esi, esi
setz r8b
and r8b, dil
cmp r8b, 1
jz short loc_88010
lea rdi, [rax-8]
mov [rbx+10h], rdi
sub esi, 1
mov [rbx+38h], esi
jnb short loc_87FB3
mov dword ptr [rbx+38h], 3Fh ; '?'
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
loc_87FB3:
cmp rcx, rdi
setz cl
or bpl, cl
jnz short loc_87FE9
mov rax, [rax-10h]
cmp byte ptr [rax], 2
jnz short loc_87FE9
mov rax, [rax+8]
mov rbx, [rax+8]
add rbx, 0FFFFFFFFFFFFFFF0h
mov [rax+8], rbx
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_87FE9:
mov al, 1
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
loc_87FF4:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1BF5h
jmp short loc_8802A
loc_88010:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1BF6h
loc_8802A:
xor eax, eax
call _ggml_abort
loc_88031:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
|
char 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>>::end_array(
long long a1)
{
long long v1; // rax
char v2; // bp
long long v3; // rcx
long long v4; // rax
long long v5; // rdx
int v6; // esi
long long v7; // rax
long long v8; // rax
char *v9; // rbx
char v11; // [rsp+Bh] [rbp-2Dh] BYREF
int v12; // [rsp+Ch] [rbp-2Ch] BYREF
char v13[40]; // [rsp+10h] [rbp-28h] BYREF
v1 = *(_QWORD *)(a1 + 16);
v2 = 1;
if ( *(_QWORD *)(v1 - 8) )
{
v12 = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1;
v11 = 3;
if ( !*(_QWORD *)(a1 + 144) )
goto LABEL_15;
if ( !(*(unsigned __int8 ( **)(long long, int *, char *))(a1 + 152))(a1 + 128, &v12, &v11) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v13,
a1 + 168);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL),
(long long)v13);
v2 = 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(v13);
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(v13);
}
}
v3 = *(_QWORD *)(a1 + 8);
v4 = *(_QWORD *)(a1 + 16);
if ( v3 == v4 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7157LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
goto LABEL_15;
}
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7158LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_15:
std::__throw_bad_function_call();
}
*(_QWORD *)(a1 + 16) = v4 - 8;
*(_DWORD *)(a1 + 56) = v6 - 1;
if ( !v6 )
{
*(_DWORD *)(a1 + 56) = 63;
*(_QWORD *)(a1 + 48) = v5 - 8;
}
if ( !((v3 == v4 - 8) | (unsigned __int8)v2) )
{
v7 = *(_QWORD *)(v4 - 16);
if ( *(_BYTE *)v7 == 2 )
{
v8 = *(_QWORD *)(v7 + 8);
v9 = (char *)(*(_QWORD *)(v8 + 8) - 16LL);
*(_QWORD *)(v8 + 8) = v9;
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(v9);
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(v9);
}
}
return 1;
}
|
end_array:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
TEST RCX,RCX
JZ 0x00187f69
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
DEC EAX
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x3
CMP qword ptr [RBX + 0x90],0x0
JZ 0x00188031
LEA RDI,[RBX + 0x80]
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JNZ 0x00187f69
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x10]
MOV RDI,R14
CALL 0x001889c4
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,R14
CALL 0x001868e2
XOR EBP,EBP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184776
MOV RDI,R14
CALL 0x00188e90
LAB_00187f69:
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
CMP RCX,RAX
JZ 0x00187ff4
MOV RDX,qword ptr [RBX + 0x30]
MOV ESI,dword ptr [RBX + 0x38]
CMP qword ptr [RBX + 0x20],RDX
SETZ DIL
TEST ESI,ESI
SETZ R8B
AND R8B,DIL
CMP R8B,0x1
JZ 0x00188010
LEA RDI,[RAX + -0x8]
MOV qword ptr [RBX + 0x10],RDI
SUB ESI,0x1
MOV dword ptr [RBX + 0x38],ESI
JNC 0x00187fb3
MOV dword ptr [RBX + 0x38],0x3f
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
LAB_00187fb3:
CMP RCX,RDI
SETZ CL
OR BPL,CL
JNZ 0x00187fe9
MOV RAX,qword ptr [RAX + -0x10]
CMP byte ptr [RAX],0x2
JNZ 0x00187fe9
MOV RAX,qword ptr [RAX + 0x8]
MOV RBX,qword ptr [RAX + 0x8]
ADD RBX,-0x10
MOV qword ptr [RAX + 0x8],RBX
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00184776
MOV RDI,RBX
CALL 0x00188e90
LAB_00187fe9:
MOV AL,0x1
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
LAB_00187ff4:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21c4ee]
MOV ESI,0x1bf5
JMP 0x0018802a
LAB_00188010:
LEA RDI,[0x21b512]
LEA RDX,[0x214131]
LEA RCX,[0x21c468]
MOV ESI,0x1bf6
LAB_0018802a:
XOR EAX,EAX
CALL 0x00121e60
LAB_00188031:
CALL 0x00122280
|
/* 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> >::end_array() */
int8 __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>>
::end_array(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)
{
int iVar1;
long lVar2;
byte bVar3;
char cVar4;
char *pcVar5;
data *this_00;
int8 uVar6;
int1 local_2d;
int local_2c;
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 [16];
bVar3 = 1;
if (*(long *)(*(long *)(this + 0x10) + -8) != 0) {
local_2c = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1;
local_2d = 3;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
cVar4 = (**(code **)(this + 0x98))(this + 0x80,&local_2c,&local_2d);
if (cVar4 == '\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>
::basic_json(local_28,(basic_json *)(this + 0xa8));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8),local_28);
bVar3 = 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(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>
::data::~data((data *)local_28);
}
}
lVar2 = *(long *)(this + 0x10);
if (*(long *)(this + 8) == lVar2) {
pcVar5 = "!ref_stack.empty()";
uVar6 = 0x1bf5;
}
else {
iVar1 = *(int *)(this + 0x38);
if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) {
*(long *)(this + 0x10) = lVar2 + -8;
*(int *)(this + 0x38) = iVar1 + -1;
if (iVar1 == 0) {
*(int4 *)(this + 0x38) = 0x3f;
*(long *)(this + 0x30) = *(long *)(this + 0x30) + -8;
}
if ((!(bool)(bVar3 | *(long *)(this + 8) == lVar2 + -8)) &&
(**(char **)(lVar2 + -0x10) == '\x02')) {
lVar2 = *(long *)(*(char **)(lVar2 + -0x10) + 8);
this_00 = (data *)(*(long *)(lVar2 + 8) + -0x10);
*(data **)(lVar2 + 8) = this_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(this_00,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>
::data::~data(this_00);
}
return 1;
}
pcVar5 = "!keep_stack.empty()";
uVar6 = 0x1bf6;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar5);
}
|
|
12,394
|
lunasvg::matchSelector(std::vector<lunasvg::SimpleSelector, std::allocator<lunasvg::SimpleSelector>> const&, lunasvg::SVGElement const*)
|
dmazzella[P]pylunasvg/lunasvg/source/svgparser.cpp
|
static bool matchSelector(const Selector& selector, const SVGElement* element)
{
if(selector.empty())
return false;
auto it = selector.rbegin();
auto end = selector.rend();
if(!matchSimpleSelector(*it, element)) {
return false;
}
auto combinator = it->combinator;
++it;
while(it != end) {
switch(combinator) {
case SimpleSelector::Combinator::Child:
case SimpleSelector::Combinator::Descendant:
element = element->parentElement();
break;
case SimpleSelector::Combinator::DirectAdjacent:
case SimpleSelector::Combinator::InDirectAdjacent:
element = element->previousElement();
break;
case SimpleSelector::Combinator::None:
assert(false);
}
if(element == nullptr)
return false;
if(matchSimpleSelector(*it, element)) {
combinator = it->combinator;
++it;
} else if(combinator != SimpleSelector::Combinator::Descendant
&& combinator != SimpleSelector::Combinator::InDirectAdjacent) {
return false;
}
}
return true;
}
|
O0
|
cpp
|
lunasvg::matchSelector(std::vector<lunasvg::SimpleSelector, std::allocator<lunasvg::SimpleSelector>> const&, lunasvg::SVGElement const*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3eb40
testb $0x1, %al
jne 0x3afcf
jmp 0x3afd8
movb $0x0, -0x1(%rbp)
jmp 0x3b101
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x3eb80
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x3ebd0
leaq -0x20(%rbp), %rdi
callq 0x3ec20
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x3c8a0
testb $0x1, %al
jne 0x3b014
movb $0x0, -0x1(%rbp)
jmp 0x3b101
leaq -0x20(%rbp), %rdi
callq 0x3ec50
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3ec90
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3ecc0
testb $0x1, %al
jne 0x3b041
jmp 0x3b0fd
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x3b084
jmp 0x3b04d
movl -0x30(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x3b066
jmp 0x3b059
movl -0x30(%rbp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x3b075
jmp 0x3b0a3
movq -0x18(%rbp), %rdi
callq 0xe710
movq %rax, -0x18(%rbp)
jmp 0x3b0a3
movq -0x18(%rbp), %rdi
callq 0x18fb0
movq %rax, -0x18(%rbp)
jmp 0x3b0a3
leaq 0x51514(%rip), %rdi # 0x8c59f
leaq 0x51cb9(%rip), %rsi # 0x8cd4b
movl $0x118, %edx # imm = 0x118
leaq 0x51d08(%rip), %rcx # 0x8cda6
callq 0xb210
cmpq $0x0, -0x18(%rbp)
jne 0x3b0b0
movb $0x0, -0x1(%rbp)
jmp 0x3b101
leaq -0x20(%rbp), %rdi
callq 0x3ec20
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x3c8a0
testb $0x1, %al
jne 0x3b0cb
jmp 0x3b0e4
leaq -0x20(%rbp), %rdi
callq 0x3ec50
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3ec90
jmp 0x3b0f8
cmpl $0x1, -0x2c(%rbp)
je 0x3b0f6
cmpl $0x4, -0x2c(%rbp)
je 0x3b0f6
movb $0x0, -0x1(%rbp)
jmp 0x3b101
jmp 0x3b0f8
jmp 0x3b02b
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN7lunasvgL13matchSelectorERKSt6vectorINS_14SimpleSelectorESaIS1_EEPKNS_10SVGElementE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
call _ZNKSt6vectorIN7lunasvg14SimpleSelectorESaIS1_EE5emptyEv; std::vector<lunasvg::SimpleSelector>::empty(void)
test al, 1
jnz short loc_3AFCF
jmp short loc_3AFD8
loc_3AFCF:
mov [rbp+var_1], 0
jmp loc_3B101
loc_3AFD8:
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_20]
call _ZNKSt6vectorIN7lunasvg14SimpleSelectorESaIS1_EE6rbeginEv; std::vector<lunasvg::SimpleSelector>::rbegin(void)
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_28]
call _ZNKSt6vectorIN7lunasvg14SimpleSelectorESaIS1_EE4rendEv; std::vector<lunasvg::SimpleSelector>::rend(void)
lea rdi, [rbp+var_20]
call _ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS3_SaIS3_EEEEEdeEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator*(void)
mov rdi, rax
mov rsi, [rbp+var_18]
call _ZN7lunasvgL19matchSimpleSelectorERKNS_14SimpleSelectorEPKNS_10SVGElementE; lunasvg::matchSimpleSelector(lunasvg::SimpleSelector const&,lunasvg::SVGElement const*)
test al, 1
jnz short loc_3B014
mov [rbp+var_1], 0
jmp loc_3B101
loc_3B014:
lea rdi, [rbp+var_20]
call _ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS3_SaIS3_EEEEEptEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator->(void)
mov eax, [rax]
mov [rbp+var_2C], eax
lea rdi, [rbp+var_20]
call _ZNSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS3_SaIS3_EEEEEppEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator++(void)
loc_3B02B:
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_28]
call _ZStneIN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS3_SaIS3_EEEEEbRKSt16reverse_iteratorIT_ESE_; std::operator!=<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>(std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>> const&,std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>> const&)
test al, 1
jnz short loc_3B041
jmp loc_3B0FD
loc_3B041:
mov eax, [rbp+var_2C]
mov [rbp+var_30], eax
test eax, eax
jz short loc_3B084
jmp short $+2
loc_3B04D:
mov eax, [rbp+var_30]
dec eax
sub eax, 2
jb short loc_3B066
jmp short $+2
loc_3B059:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFDh
sub eax, 2
jb short loc_3B075
jmp short loc_3B0A3
loc_3B066:
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg7SVGNode13parentElementEv; lunasvg::SVGNode::parentElement(void)
mov [rbp+var_18], rax
jmp short loc_3B0A3
loc_3B075:
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg10SVGElement15previousElementEv; lunasvg::SVGElement::previousElement(void)
mov [rbp+var_18], rax
jmp short loc_3B0A3
loc_3B084:
lea rdi, aFalse; "false"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 118h
lea rcx, aBoolLunasvgMat; "bool lunasvg::matchSelector(const Selec"...
call ___assert_fail
loc_3B0A3:
cmp [rbp+var_18], 0
jnz short loc_3B0B0
mov [rbp+var_1], 0
jmp short loc_3B101
loc_3B0B0:
lea rdi, [rbp+var_20]
call _ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS3_SaIS3_EEEEEdeEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator*(void)
mov rdi, rax
mov rsi, [rbp+var_18]
call _ZN7lunasvgL19matchSimpleSelectorERKNS_14SimpleSelectorEPKNS_10SVGElementE; lunasvg::matchSimpleSelector(lunasvg::SimpleSelector const&,lunasvg::SVGElement const*)
test al, 1
jnz short loc_3B0CB
jmp short loc_3B0E4
loc_3B0CB:
lea rdi, [rbp+var_20]
call _ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS3_SaIS3_EEEEEptEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator->(void)
mov eax, [rax]
mov [rbp+var_2C], eax
lea rdi, [rbp+var_20]
call _ZNSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPKN7lunasvg14SimpleSelectorESt6vectorIS3_SaIS3_EEEEEppEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator++(void)
jmp short loc_3B0F8
loc_3B0E4:
cmp [rbp+var_2C], 1
jz short loc_3B0F6
cmp [rbp+var_2C], 4
jz short loc_3B0F6
mov [rbp+var_1], 0
jmp short loc_3B101
loc_3B0F6:
jmp short $+2
loc_3B0F8:
jmp loc_3B02B
loc_3B0FD:
mov [rbp+var_1], 1
loc_3B101:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char lunasvg::matchSelector(long long a1, lunasvg::SVGNode *a2)
{
lunasvg *v2; // rax
const lunasvg::SVGElement *v3; // rdx
lunasvg *v4; // rax
const lunasvg::SVGElement *v5; // rdx
int v7; // [rsp+4h] [rbp-2Ch]
_BYTE v8[8]; // [rsp+8h] [rbp-28h] BYREF
_BYTE v9[8]; // [rsp+10h] [rbp-20h] BYREF
lunasvg::SVGNode *v10; // [rsp+18h] [rbp-18h]
long long v11; // [rsp+20h] [rbp-10h]
v11 = a1;
v10 = a2;
if ( (std::vector<lunasvg::SimpleSelector>::empty(a1) & 1) != 0 )
return 0;
std::vector<lunasvg::SimpleSelector>::rbegin(v9, v11);
std::vector<lunasvg::SimpleSelector>::rend(v8, v11);
v2 = (lunasvg *)std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator*(v9);
if ( (lunasvg::matchSimpleSelector(v2, v10, v3) & 1) == 0 )
return 0;
LABEL_5:
v7 = *(_DWORD *)std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator->(v9);
std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator++(v9);
while ( (std::operator!=<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>(
v9,
v8) & 1) != 0 )
{
if ( !v7 )
__assert_fail(
"false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgparser.cpp",
280LL,
"bool lunasvg::matchSelector(const Selector &, const SVGElement *)");
if ( (unsigned int)(v7 - 1) < 2 )
{
v10 = (lunasvg::SVGNode *)lunasvg::SVGNode::parentElement(v10);
}
else if ( (unsigned int)(v7 - 3) < 2 )
{
v10 = lunasvg::SVGElement::previousElement(v10);
}
if ( !v10 )
return 0;
v4 = (lunasvg *)std::reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector const*,std::vector<lunasvg::SimpleSelector>>>::operator*(v9);
if ( (lunasvg::matchSimpleSelector(v4, v10, v5) & 1) != 0 )
goto LABEL_5;
if ( v7 != 1 && v7 != 4 )
return 0;
}
return 1;
}
|
matchSelector:
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]
CALL 0x0013eb40
TEST AL,0x1
JNZ 0x0013afcf
JMP 0x0013afd8
LAB_0013afcf:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013b101
LAB_0013afd8:
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x20]
CALL 0x0013eb80
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x28]
CALL 0x0013ebd0
LEA RDI,[RBP + -0x20]
CALL 0x0013ec20
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013c8a0
TEST AL,0x1
JNZ 0x0013b014
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013b101
LAB_0013b014:
LEA RDI,[RBP + -0x20]
CALL 0x0013ec50
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
LEA RDI,[RBP + -0x20]
CALL 0x0013ec90
LAB_0013b02b:
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x28]
CALL 0x0013ecc0
TEST AL,0x1
JNZ 0x0013b041
JMP 0x0013b0fd
LAB_0013b041:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x30],EAX
TEST EAX,EAX
JZ 0x0013b084
JMP 0x0013b04d
LAB_0013b04d:
MOV EAX,dword ptr [RBP + -0x30]
DEC EAX
SUB EAX,0x2
JC 0x0013b066
JMP 0x0013b059
LAB_0013b059:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x3
SUB EAX,0x2
JC 0x0013b075
JMP 0x0013b0a3
LAB_0013b066:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0010e710
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013b0a3
LAB_0013b075:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00118fb0
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013b0a3
LAB_0013b084:
LEA RDI,[0x18c59f]
LEA RSI,[0x18cd4b]
MOV EDX,0x118
LEA RCX,[0x18cda6]
CALL 0x0010b210
LAB_0013b0a3:
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0013b0b0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013b101
LAB_0013b0b0:
LEA RDI,[RBP + -0x20]
CALL 0x0013ec20
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013c8a0
TEST AL,0x1
JNZ 0x0013b0cb
JMP 0x0013b0e4
LAB_0013b0cb:
LEA RDI,[RBP + -0x20]
CALL 0x0013ec50
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
LEA RDI,[RBP + -0x20]
CALL 0x0013ec90
JMP 0x0013b0f8
LAB_0013b0e4:
CMP dword ptr [RBP + -0x2c],0x1
JZ 0x0013b0f6
CMP dword ptr [RBP + -0x2c],0x4
JZ 0x0013b0f6
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013b101
LAB_0013b0f6:
JMP 0x0013b0f8
LAB_0013b0f8:
JMP 0x0013b02b
LAB_0013b0fd:
MOV byte ptr [RBP + -0x1],0x1
LAB_0013b101:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
/* lunasvg::matchSelector(std::vector<lunasvg::SimpleSelector,
std::allocator<lunasvg::SimpleSelector> > const&, lunasvg::SVGElement const*) */
int1 lunasvg::matchSelector(vector *param_1,SVGElement *param_2)
{
bool bVar1;
ulong uVar2;
SimpleSelector *pSVar3;
int *piVar4;
int local_34;
reverse_iterator local_30 [8];
reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
local_28 [8];
SVGElement *local_20;
vector *local_18;
local_20 = param_2;
local_18 = param_1;
uVar2 = std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>::empty
((vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>> *)
param_1);
if ((uVar2 & 1) == 0) {
std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>::rbegin();
std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>::rend();
pSVar3 = (SimpleSelector *)
std::
reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::operator*(local_28);
uVar2 = matchSimpleSelector(pSVar3,local_20);
if ((uVar2 & 1) != 0) {
piVar4 = (int *)std::
reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::operator->(local_28);
local_34 = *piVar4;
std::
reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::operator++(local_28);
do {
while( true ) {
bVar1 = std::operator!=((reverse_iterator *)local_28,local_30);
if (!bVar1) {
return 1;
}
if (local_34 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgparser.cpp"
,0x118,"bool lunasvg::matchSelector(const Selector &, const SVGElement *)"
);
}
if (local_34 - 1U < 2) {
local_20 = (SVGElement *)SVGNode::parentElement((SVGNode *)local_20);
}
else if (local_34 - 3U < 2) {
local_20 = (SVGElement *)SVGElement::previousElement(local_20);
}
if (local_20 == (SVGElement *)0x0) {
return 0;
}
pSVar3 = (SimpleSelector *)
std::
reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::operator*(local_28);
uVar2 = matchSimpleSelector(pSVar3,local_20);
if ((uVar2 & 1) == 0) break;
piVar4 = (int *)std::
reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::operator->(local_28);
local_34 = *piVar4;
std::
reverse_iterator<__gnu_cxx::__normal_iterator<lunasvg::SimpleSelector_const*,std::vector<lunasvg::SimpleSelector,std::allocator<lunasvg::SimpleSelector>>>>
::operator++(local_28);
}
} while ((local_34 == 1) || (local_34 == 4));
}
}
return 0;
}
|
|
12,395
|
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&)
|
monkey531[P]llama/common/minja.hpp
|
CallExpr(const Location & location, std::shared_ptr<Expression> && obj, ArgumentsExpression && a)
: Expression(location), object(std::move(obj)), args(std::move(a)) {}
|
O2
|
cpp
|
minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x62cfa
leaq 0x8fb9a(%rip), %rax # 0xfe8c0
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
addq $0x30, %r15
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x6bbd0
|
_ZN5minja8CallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEONS_19ArgumentsExpressionE:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja8CallExprE; `vtable for'minja::CallExpr
add rax, 10h
mov [r15], rax
and qword ptr [r15+28h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r15+20h], xmm0
and qword ptr [r14], 0
add r15, 30h ; '0'
mov rdi, r15
mov rsi, rbx
pop rbx
pop r14
pop r15
jmp _ZN5minja19ArgumentsExpressionC2EOS0_; minja::ArgumentsExpression::ArgumentsExpression(minja::ArgumentsExpression&&)
|
long long minja::CallExpr::CallExpr(long long a1, _QWORD *a2, __int128 *a3, long long a4)
{
__int128 v6; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::CallExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
return minja::ArgumentsExpression::ArgumentsExpression(a1 + 48, a4);
}
|
CallExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
CALL 0x00162cfa
LEA RAX,[0x1fe8c0]
ADD RAX,0x10
MOV qword ptr [R15],RAX
AND qword ptr [R15 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x20],XMM0
AND qword ptr [R14],0x0
ADD R15,0x30
MOV RDI,R15
MOV RSI,RBX
POP RBX
POP R14
POP R15
JMP 0x0016bbd0
|
/* minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
minja::ArgumentsExpression&&) */
void __thiscall
minja::CallExpr::CallExpr
(CallExpr *this,Location *param_1,shared_ptr *param_2,ArgumentsExpression *param_3)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001fe8d0;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
ArgumentsExpression::ArgumentsExpression((ArgumentsExpression *)(this + 0x30),param_3);
return;
}
|
|
12,396
|
google::protobuf::FastInt64ToBuffer(long, char*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
|
char *FastInt64ToBuffer(int64_t i, char* buffer) {
// We could collapse the positive and negative sections, but that
// would be slightly slower for positive numbers...
// 22 bytes is enough to store -2**64, -18446744073709551616.
char* p = buffer + kFastInt64ToBufferOffset;
*p-- = '\0';
if (i >= 0) {
do {
*p-- = '0' + i % 10;
i /= 10;
} while (i > 0);
return p + 1;
} else {
// On different platforms, % and / have different behaviors for
// negative numbers, so we need to jump through hoops to make sure
// we don't divide negative numbers.
if (i > -10) {
i = -i;
*p-- = '0' + i;
*p = '-';
return p;
} else {
// Make sure we aren't at MIN_INT, in which case we can't say i = -i
i = i + 10;
i = -i;
*p-- = '0' + i % 10;
// Undo what we did a moment ago
i = i / 10 + 1;
do {
*p-- = '0' + i % 10;
i /= 10;
} while (i > 0);
*p = '-';
return p;
}
}
}
|
O0
|
cpp
|
google::protobuf::FastInt64ToBuffer(long, char*):
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq -0x18(%rsp), %rax
addq $0x15, %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rsp)
movb $0x0, (%rax)
cmpq $0x0, -0x10(%rsp)
jl 0x28c1d
jmp 0x28bc6
movq -0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
addq $0x30, %rdx
movb %dl, %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, (%rax)
movq -0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0x10(%rsp)
cmpq $0x0, -0x10(%rsp)
jg 0x28bc6
movq -0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rsp)
jmp 0x28d16
cmpq $-0xa, -0x10(%rsp)
jle 0x28c66
xorl %eax, %eax
subq -0x10(%rsp), %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
addq $0x30, %rax
movb %al, %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, (%rax)
movq -0x20(%rsp), %rax
movb $0x2d, (%rax)
movq -0x20(%rsp), %rax
movq %rax, -0x8(%rsp)
jmp 0x28d16
movq -0x10(%rsp), %rax
addq $0xa, %rax
movq %rax, -0x10(%rsp)
xorl %eax, %eax
subq -0x10(%rsp), %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
addq $0x30, %rdx
movb %dl, %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, (%rax)
movq -0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
addq $0x1, %rax
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
addq $0x30, %rdx
movb %dl, %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, (%rax)
movq -0x10(%rsp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0x10(%rsp)
cmpq $0x0, -0x10(%rsp)
jg 0x28cc0
movq -0x20(%rsp), %rax
movb $0x2d, (%rax)
movq -0x20(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
|
_ZN6google8protobuf17FastInt64ToBufferElPc:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov rax, [rsp+var_18]
add rax, 15h
mov [rsp+var_20], rax
mov rax, [rsp+var_20]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_20], rcx
mov byte ptr [rax], 0
cmp [rsp+var_10], 0
jl short loc_28C1D
jmp short $+2
loc_28BC6:
mov rax, [rsp+var_10]
mov ecx, 0Ah
cqo
idiv rcx
add rdx, 30h ; '0'
mov cl, dl
mov rax, [rsp+var_20]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_20], rdx
mov [rax], cl
mov rax, [rsp+var_10]
mov ecx, 0Ah
cqo
idiv rcx
mov [rsp+var_10], rax
cmp [rsp+var_10], 0
jg short loc_28BC6
mov rax, [rsp+var_20]
add rax, 1
mov [rsp+var_8], rax
jmp loc_28D16
loc_28C1D:
cmp [rsp+var_10], 0FFFFFFFFFFFFFFF6h
jle short loc_28C66
xor eax, eax
sub rax, [rsp+var_10]
mov [rsp+var_10], rax
mov rax, [rsp+var_10]
add rax, 30h ; '0'
mov cl, al
mov rax, [rsp+var_20]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_20], rdx
mov [rax], cl
mov rax, [rsp+var_20]
mov byte ptr [rax], 2Dh ; '-'
mov rax, [rsp+var_20]
mov [rsp+var_8], rax
jmp loc_28D16
loc_28C66:
mov rax, [rsp+var_10]
add rax, 0Ah
mov [rsp+var_10], rax
xor eax, eax
sub rax, [rsp+var_10]
mov [rsp+var_10], rax
mov rax, [rsp+var_10]
mov ecx, 0Ah
cqo
idiv rcx
add rdx, 30h ; '0'
mov cl, dl
mov rax, [rsp+var_20]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_20], rdx
mov [rax], cl
mov rax, [rsp+var_10]
mov ecx, 0Ah
cqo
idiv rcx
add rax, 1
mov [rsp+var_10], rax
loc_28CC0:
mov rax, [rsp+var_10]
mov ecx, 0Ah
cqo
idiv rcx
add rdx, 30h ; '0'
mov cl, dl
mov rax, [rsp+var_20]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_20], rdx
mov [rax], cl
mov rax, [rsp+var_10]
mov ecx, 0Ah
cqo
idiv rcx
mov [rsp+var_10], rax
cmp [rsp+var_10], 0
jg short loc_28CC0
mov rax, [rsp+var_20]
mov byte ptr [rax], 2Dh ; '-'
mov rax, [rsp+var_20]
mov [rsp+var_8], rax
loc_28D16:
mov rax, [rsp+var_8]
retn
|
_BYTE * google::protobuf::FastInt64ToBuffer(long long this, _BYTE *a2, char *a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
_BYTE *v6; // [rsp+0h] [rbp-20h]
_BYTE *v7; // [rsp+0h] [rbp-20h]
long long v8; // [rsp+10h] [rbp-10h]
long long v9; // [rsp+10h] [rbp-10h]
long long v10; // [rsp+10h] [rbp-10h]
v8 = this;
v6 = a2 + 20;
a2[21] = 0;
if ( this < 0 )
{
if ( this <= -10 )
{
v9 = -(this + 10);
v7 = a2 + 19;
a2[20] = v9 % 10 + 48;
v10 = v9 / 10 + 1;
do
{
v4 = v7--;
*v4 = v10 % 10 + 48;
v10 /= 10LL;
}
while ( v10 > 0 );
*v7 = 45;
return v7;
}
else
{
a2[20] = 48 - this;
a2[19] = 45;
return a2 + 19;
}
}
else
{
do
{
v3 = v6--;
*v3 = v8 % 10 + 48;
v8 /= 10LL;
}
while ( v8 > 0 );
return v6 + 1;
}
}
|
FastInt64ToBuffer:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV RAX,qword ptr [RSP + -0x18]
ADD RAX,0x15
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + -0x20],RCX
MOV byte ptr [RAX],0x0
CMP qword ptr [RSP + -0x10],0x0
JL 0x00128c1d
JMP 0x00128bc6
LAB_00128bc6:
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,0xa
CQO
IDIV RCX
ADD RDX,0x30
MOV CL,DL
MOV RAX,qword ptr [RSP + -0x20]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,0xa
CQO
IDIV RCX
MOV qword ptr [RSP + -0x10],RAX
CMP qword ptr [RSP + -0x10],0x0
JG 0x00128bc6
MOV RAX,qword ptr [RSP + -0x20]
ADD RAX,0x1
MOV qword ptr [RSP + -0x8],RAX
JMP 0x00128d16
LAB_00128c1d:
CMP qword ptr [RSP + -0x10],-0xa
JLE 0x00128c66
XOR EAX,EAX
SUB RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x10],RAX
MOV RAX,qword ptr [RSP + -0x10]
ADD RAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RSP + -0x20]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + -0x20]
MOV byte ptr [RAX],0x2d
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RSP + -0x8],RAX
JMP 0x00128d16
LAB_00128c66:
MOV RAX,qword ptr [RSP + -0x10]
ADD RAX,0xa
MOV qword ptr [RSP + -0x10],RAX
XOR EAX,EAX
SUB RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x10],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,0xa
CQO
IDIV RCX
ADD RDX,0x30
MOV CL,DL
MOV RAX,qword ptr [RSP + -0x20]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,0xa
CQO
IDIV RCX
ADD RAX,0x1
MOV qword ptr [RSP + -0x10],RAX
LAB_00128cc0:
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,0xa
CQO
IDIV RCX
ADD RDX,0x30
MOV CL,DL
MOV RAX,qword ptr [RSP + -0x20]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + -0x10]
MOV ECX,0xa
CQO
IDIV RCX
MOV qword ptr [RSP + -0x10],RAX
CMP qword ptr [RSP + -0x10],0x0
JG 0x00128cc0
MOV RAX,qword ptr [RSP + -0x20]
MOV byte ptr [RAX],0x2d
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RSP + -0x8],RAX
LAB_00128d16:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
/* google::protobuf::FastInt64ToBuffer(long, char*) */
char * google::protobuf::FastInt64ToBuffer(long param_1,char *param_2)
{
char *pcVar1;
char *local_20;
long local_10;
char *local_8;
pcVar1 = param_2 + 0x14;
param_2[0x15] = '\0';
local_10 = param_1;
if (param_1 < 0) {
if (param_1 < -9) {
*pcVar1 = (char)(-(param_1 + 10) % 10) + '0';
local_10 = -(param_1 + 10) / 10 + 1;
local_20 = param_2 + 0x13;
do {
local_8 = local_20 + -1;
*local_20 = (char)(local_10 % 10) + '0';
local_10 = local_10 / 10;
local_20 = local_8;
} while (0 < local_10);
*local_8 = '-';
}
else {
local_8 = param_2 + 0x13;
*pcVar1 = '0' - (char)param_1;
*local_8 = '-';
}
}
else {
do {
local_20 = pcVar1;
*local_20 = (char)(local_10 % 10) + '0';
local_10 = local_10 / 10;
pcVar1 = local_20 + -1;
} while (0 < local_10);
local_8 = local_20;
}
return local_8;
}
|
|
12,397
|
my_wc_mb_utf8mb4_no_range
|
eloqsql/strings/ctype-utf8.c
|
static int
my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r)
{
int count;
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;
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_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x80, -0x18(%rbp)
jae 0x71523
movl $0x1, -0x24(%rbp)
jmp 0x7156e
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x71536
movl $0x2, -0x24(%rbp)
jmp 0x7156c
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x71549
movl $0x3, -0x24(%rbp)
jmp 0x7156a
cmpq $0x200000, -0x18(%rbp) # imm = 0x200000
jae 0x7155c
movl $0x4, -0x24(%rbp)
jmp 0x71568
movl $0x0, -0x4(%rbp)
jmp 0x7163b
jmp 0x7156a
jmp 0x7156c
jmp 0x7156e
movl -0x24(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x3, %eax
ja 0x71635
movq -0x30(%rbp), %rax
leaq 0x149dc3(%rip), %rcx # 0x1bb350
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 -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
|
my_wc_mb_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 80h
jnb short loc_71523
mov [rbp+var_24], 1
jmp short loc_7156E
loc_71523:
cmp [rbp+var_18], 800h
jnb short loc_71536
mov [rbp+var_24], 2
jmp short loc_7156C
loc_71536:
cmp [rbp+var_18], 10000h
jnb short loc_71549
mov [rbp+var_24], 3
jmp short loc_7156A
loc_71549:
cmp [rbp+var_18], offset unk_200000
jnb short loc_7155C
mov [rbp+var_24], 4
jmp short loc_71568
loc_7155C:
mov [rbp+var_4], 0
jmp loc_7163B
loc_71568:
jmp short $+2
loc_7156A:
jmp short $+2
loc_7156C:
jmp short $+2
loc_7156E:
mov eax, [rbp+var_24]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_30], rcx
sub eax, 3
ja def_71594; jumptable 0000000000071594 default case
mov rax, [rbp+var_30]
lea rcx, jpt_71594
movsxd rax, ds:(jpt_71594 - 1BB350h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_71596:
mov rax, [rbp+var_18]; jumptable 0000000000071594 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_715C7:
mov rax, [rbp+var_18]; jumptable 0000000000071594 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_715F8:
mov rax, [rbp+var_18]; jumptable 0000000000071594 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_71629:
mov rax, [rbp+var_18]; jumptable 0000000000071594 case 1
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
def_71594:
mov eax, [rbp+var_24]; jumptable 0000000000071594 default case
mov [rbp+var_4], eax
loc_7163B:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_wc_mb_utf8mb4_no_range(long long a1, unsigned long long a2, _BYTE *a3)
{
unsigned int v4; // [rsp+Ch] [rbp-24h]
unsigned long long v5; // [rsp+18h] [rbp-18h]
v5 = a2;
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= 0x10000 )
{
if ( a2 >= (unsigned long long)&unk_200000 )
return 0;
v4 = 4;
}
else
{
v4 = 3;
}
}
else
{
v4 = 2;
}
}
else
{
v4 = 1;
}
switch ( v4 )
{
case 1u:
goto LABEL_14;
case 2u:
goto LABEL_13;
case 3u:
goto LABEL_12;
case 4u:
a3[3] = a2 & 0x3F | 0x80;
v5 = (a2 >> 6) | 0x10000;
LABEL_12:
a3[2] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0x800;
LABEL_13:
a3[1] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0xC0;
LABEL_14:
*a3 = v5;
break;
default:
break;
}
return v4;
}
|
my_wc_mb_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x80
JNC 0x00171523
MOV dword ptr [RBP + -0x24],0x1
JMP 0x0017156e
LAB_00171523:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x00171536
MOV dword ptr [RBP + -0x24],0x2
JMP 0x0017156c
LAB_00171536:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x00171549
MOV dword ptr [RBP + -0x24],0x3
JMP 0x0017156a
LAB_00171549:
CMP qword ptr [RBP + -0x18],0x200000
JNC 0x0017155c
MOV dword ptr [RBP + -0x24],0x4
JMP 0x00171568
LAB_0017155c:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0017163b
LAB_00171568:
JMP 0x0017156a
LAB_0017156a:
JMP 0x0017156c
LAB_0017156c:
JMP 0x0017156e
LAB_0017156e:
MOV EAX,dword ptr [RBP + -0x24]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x3
JA 0x00171635
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x2bb350]
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 + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0017163b:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_utf8mb4_no_range(int8 param_1,ulong param_2,int1 *param_3)
{
int4 local_2c;
ulong local_20;
if (param_2 < 0x80) {
local_2c = 1;
}
else if (param_2 < 0x800) {
local_2c = 2;
}
else if (param_2 < 0x10000) {
local_2c = 3;
}
else {
if (0x1fffff < param_2) {
return 0;
}
local_2c = 4;
}
local_20 = param_2;
switch(local_2c) {
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;
return local_2c;
default:
return local_2c;
}
}
|
|
12,398
|
my_wc_mb_utf8mb4_no_range
|
eloqsql/strings/ctype-utf8.c
|
static int
my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r)
{
int count;
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;
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;
}
|
O3
|
c
|
my_wc_mb_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %eax
cmpq $0x80, %rdi
jb 0x570e1
movl $0x2, %eax
cmpq $0x800, %rdi # imm = 0x800
jb 0x570cb
movl $0x3, %eax
cmpq $0x10000, %rdi # imm = 0x10000
jb 0x570b5
xorl %eax, %eax
cmpq $0x1fffff, %rdi # imm = 0x1FFFFF
ja 0x570e4
movl %edi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x3(%rsi)
shrq $0x6, %rdi
orq $0x10000, %rdi # imm = 0x10000
movl $0x4, %eax
movl %edi, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%rsi)
shrq $0x6, %rdi
orq $0x800, %rdi # imm = 0x800
movl %edi, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rsi)
shrq $0x6, %rdi
orq $0xc0, %rdi
movb %dil, (%rsi)
popq %rbp
retq
|
my_wc_mb_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov eax, 1
cmp rdi, 80h
jb short loc_570E1
mov eax, 2
cmp rdi, 800h
jb short loc_570CB
mov eax, 3
cmp rdi, 10000h
jb short loc_570B5
xor eax, eax
cmp rdi, offset unk_1FFFFF
ja short loc_570E4
mov eax, edi
and al, 3Fh
or al, 80h
mov [rsi+3], al
shr rdi, 6
or rdi, 10000h
mov eax, 4
loc_570B5:
mov ecx, edi
and cl, 3Fh
or cl, 80h
mov [rsi+2], cl
shr rdi, 6
or rdi, 800h
loc_570CB:
mov ecx, edi
and cl, 3Fh
or cl, 80h
mov [rsi+1], cl
shr rdi, 6
or rdi, 0C0h
loc_570E1:
mov [rsi], dil
loc_570E4:
pop rbp
retn
|
long long my_wc_mb_utf8mb4_no_range(unsigned long long a1, _BYTE *a2)
{
long long result; // rax
result = 1LL;
if ( a1 >= 0x80 )
{
result = 2LL;
if ( a1 >= 0x800 )
{
result = 3LL;
if ( a1 >= 0x10000 )
{
result = 0LL;
if ( a1 > (unsigned long long)&unk_1FFFFF )
return result;
a2[3] = a1 & 0x3F | 0x80;
a1 = (a1 >> 6) | 0x10000;
result = 4LL;
}
a2[2] = a1 & 0x3F | 0x80;
a1 = (a1 >> 6) | 0x800;
}
a2[1] = a1 & 0x3F | 0x80;
a1 = (a1 >> 6) | 0xC0;
}
*a2 = a1;
return result;
}
|
my_wc_mb_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV EAX,0x1
CMP RDI,0x80
JC 0x001570e1
MOV EAX,0x2
CMP RDI,0x800
JC 0x001570cb
MOV EAX,0x3
CMP RDI,0x10000
JC 0x001570b5
XOR EAX,EAX
CMP RDI,0x1fffff
JA 0x001570e4
MOV EAX,EDI
AND AL,0x3f
OR AL,0x80
MOV byte ptr [RSI + 0x3],AL
SHR RDI,0x6
OR RDI,0x10000
MOV EAX,0x4
LAB_001570b5:
MOV ECX,EDI
AND CL,0x3f
OR CL,0x80
MOV byte ptr [RSI + 0x2],CL
SHR RDI,0x6
OR RDI,0x800
LAB_001570cb:
MOV ECX,EDI
AND CL,0x3f
OR CL,0x80
MOV byte ptr [RSI + 0x1],CL
SHR RDI,0x6
OR RDI,0xc0
LAB_001570e1:
MOV byte ptr [RSI],DIL
LAB_001570e4:
POP RBP
RET
|
int8 my_wc_mb_utf8mb4_no_range(ulong param_1,int1 *param_2)
{
int8 uVar1;
uVar1 = 1;
if (0x7f < param_1) {
uVar1 = 2;
if (0x7ff < param_1) {
uVar1 = 3;
if (0xffff < param_1) {
if (0x1fffff < param_1) {
return 0;
}
param_2[3] = (byte)param_1 & 0x3f | 0x80;
param_1 = param_1 >> 6 | 0x10000;
uVar1 = 4;
}
param_2[2] = (byte)param_1 & 0x3f | 0x80;
param_1 = param_1 >> 6 | 0x800;
}
param_2[1] = (byte)param_1 & 0x3f | 0x80;
param_1 = param_1 >> 6 | 0xc0;
}
*param_2 = (char)param_1;
return uVar1;
}
|
|
12,399
|
fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::remove_cv<std::remove_reference<char const*>::type>::type, std::remove_cv<std::remove_reference<char const*>::type>::type, std::remove_cv<std::remove_reference<int>::type>::type> fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, char const*, char const*, int>(char const*&, char const*&, int&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
|
constexpr auto make_format_args(T&... args)
-> format_arg_store<Context, remove_cvref_t<T>...> {
return {args...};
}
|
O0
|
c
|
fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::remove_cv<std::remove_reference<char const*>::type>::type, std::remove_cv<std::remove_reference<char const*>::type>::type, std::remove_cv<std::remove_reference<int>::type>::type> fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, char const*, char const*, int>(char const*&, char const*&, int&):
subq $0x78, %rsp
movq %rdi, %rax
movq %rsi, -0x78(%rsp)
movq %rdx, -0x80(%rsp)
movq -0x78(%rsp), %rdx
movq -0x80(%rsp), %rcx
movq %rdi, -0x38(%rsp)
movq %rdx, -0x40(%rsp)
movq %rcx, -0x48(%rsp)
movq -0x38(%rsp), %rcx
movq -0x40(%rsp), %rdx
movq %rdx, 0x38(%rsp)
movb $0x1, 0x37(%rsp)
movb $0x1, 0x36(%rsp)
movb $0x1, 0x35(%rsp)
movq 0x38(%rsp), %rdx
leaq 0x34(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rdx
leaq 0x40(%rsp), %rsi
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rsi
movq %rsi, (%rdx)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rsi, -0x60(%rsp)
movq %rdx, -0x58(%rsp)
movq -0x48(%rsp), %rdx
movq %rdx, -0x28(%rsp)
movb $0x1, -0x29(%rsp)
movb $0x1, -0x2a(%rsp)
movb $0x1, -0x2b(%rsp)
movq -0x28(%rsp), %rdx
movl (%rdx), %edx
leaq -0x2c(%rsp), %rsi
movq %rsi, (%rsp)
movl %edx, -0x4(%rsp)
movl -0x4(%rsp), %edx
leaq -0x20(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x10(%rsp), %rdx
movl 0xc(%rsp), %esi
movl %esi, (%rdx)
movq -0x20(%rsp), %rsi
movq -0x18(%rsp), %rdx
movq %rsi, -0x70(%rsp)
movq %rdx, -0x68(%rsp)
movq %rcx, 0x28(%rsp)
leaq -0x60(%rsp), %rcx
movq %rcx, 0x20(%rsp)
leaq -0x70(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rdx
movq (%rdx), %rsi
movq %rsi, (%rcx)
movq 0x8(%rdx), %rdx
movq %rdx, 0x8(%rcx)
movq 0x18(%rsp), %rdx
movq (%rdx), %rsi
movq %rsi, 0x10(%rcx)
movq 0x8(%rdx), %rdx
movq %rdx, 0x18(%rcx)
addq $0x78, %rsp
retq
nopl (%rax)
|
_ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJA7_KciEEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRSB_:
sub rsp, 78h
mov rax, rdi
mov [rsp+78h+var_F0], rsi
mov [rsp+78h+var_F8], rdx
mov rdx, [rsp+78h+var_F0]
mov rcx, [rsp+78h+var_F8]
mov [rsp+78h+var_B0], rdi
mov [rsp+78h+var_B8], rdx
mov [rsp+78h+var_C0], rcx
mov rcx, [rsp+78h+var_B0]
mov rdx, [rsp+78h+var_B8]
mov [rsp+78h+var_40], rdx
mov [rsp+78h+var_41], 1
mov [rsp+78h+var_42], 1
mov [rsp+78h+var_43], 1
mov rdx, [rsp+78h+var_40]
lea rsi, [rsp+78h+var_44]
mov [rsp+78h+var_18], rsi
mov [rsp+78h+var_20], rdx
mov rdx, [rsp+78h+var_20]
lea rsi, [rsp+78h+var_38]
mov [rsp+78h+var_8], rsi
mov [rsp+78h+var_10], rdx
mov rdx, [rsp+78h+var_8]
mov rsi, [rsp+78h+var_10]
mov [rdx], rsi
mov rsi, [rsp+78h+var_38]
mov rdx, [rsp+78h+var_30]
mov [rsp+78h+var_D8], rsi
mov [rsp+78h+var_D0], rdx
mov rdx, [rsp+78h+var_C0]
mov [rsp+78h+var_A0], rdx
mov [rsp+78h+var_A1], 1
mov [rsp+78h+var_A2], 1
mov [rsp+78h+var_A3], 1
mov rdx, [rsp+78h+var_A0]
mov edx, [rdx]
lea rsi, [rsp+78h+var_A4]
mov [rsp+78h+var_78], rsi
mov [rsp+78h+var_7C], edx
mov edx, [rsp+78h+var_7C]
lea rsi, [rsp+78h+var_98]
mov [rsp+78h+var_68], rsi
mov [rsp+78h+var_6C], edx
mov rdx, [rsp+78h+var_68]
mov esi, [rsp+78h+var_6C]
mov [rdx], esi
mov rsi, [rsp+78h+var_98]
mov rdx, [rsp+78h+var_90]
mov [rsp+78h+var_E8], rsi
mov [rsp+78h+var_E0], rdx
mov [rsp+78h+var_50], rcx
lea rcx, [rsp+78h+var_D8]
mov [rsp+78h+var_58], rcx
lea rcx, [rsp+78h+var_E8]
mov [rsp+78h+var_60], rcx
mov rcx, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_58]
mov rsi, [rdx]
mov [rcx], rsi
mov rdx, [rdx+8]
mov [rcx+8], rdx
mov rdx, [rsp+78h+var_60]
mov rsi, [rdx]
mov [rcx+10h], rsi
mov rdx, [rdx+8]
mov [rcx+18h], rdx
add rsp, 78h
retn
|
_QWORD * fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,char const[7],int>(
_QWORD *a1,
long long a2,
_DWORD *a3)
{
_QWORD *result; // rax
int v4; // edx
_QWORD *v5; // rdx
_QWORD v6[2]; // [rsp+10h] [rbp-E8h] BYREF
long long v7; // [rsp+20h] [rbp-D8h] BYREF
long long v8; // [rsp+28h] [rbp-D0h]
_DWORD *v9; // [rsp+38h] [rbp-C0h]
long long v10; // [rsp+40h] [rbp-B8h]
_QWORD *v11; // [rsp+48h] [rbp-B0h]
_BYTE v12[4]; // [rsp+54h] [rbp-A4h] BYREF
_DWORD *v13; // [rsp+58h] [rbp-A0h]
_QWORD v14[3]; // [rsp+60h] [rbp-98h] BYREF
int v15; // [rsp+7Ch] [rbp-7Ch]
_BYTE *v16; // [rsp+80h] [rbp-78h]
int v17; // [rsp+8Ch] [rbp-6Ch]
_QWORD *v18; // [rsp+90h] [rbp-68h]
_QWORD *v19; // [rsp+98h] [rbp-60h]
long long *v20; // [rsp+A0h] [rbp-58h]
_QWORD *v21; // [rsp+A8h] [rbp-50h]
_BYTE v22[4]; // [rsp+B4h] [rbp-44h] BYREF
long long v23; // [rsp+B8h] [rbp-40h]
_QWORD v24[7]; // [rsp+C0h] [rbp-38h] BYREF
result = a1;
v11 = a1;
v10 = a2;
v9 = a3;
v23 = a2;
v22[3] = 1;
v22[2] = 1;
v22[1] = 1;
v24[4] = v22;
v24[3] = a2;
v24[6] = v24;
v24[5] = a2;
v24[0] = a2;
v7 = a2;
v8 = v24[1];
v13 = a3;
v12[3] = 1;
v12[2] = 1;
v12[1] = 1;
v4 = *a3;
v16 = v12;
v15 = v4;
v18 = v14;
v17 = v4;
LODWORD(v14[0]) = v4;
v6[0] = v14[0];
v6[1] = v14[1];
v21 = a1;
v20 = &v7;
v19 = v6;
*a1 = a2;
a1[1] = v8;
v5 = v19;
a1[2] = *v19;
a1[3] = v5[1];
return result;
}
|
make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,char_const[7],int>:
SUB RSP,0x78
MOV RAX,RDI
MOV qword ptr [RSP + -0x78],RSI
MOV qword ptr [RSP + -0x80],RDX
MOV RDX,qword ptr [RSP + -0x78]
MOV RCX,qword ptr [RSP + -0x80]
MOV qword ptr [RSP + -0x38],RDI
MOV qword ptr [RSP + -0x40],RDX
MOV qword ptr [RSP + -0x48],RCX
MOV RCX,qword ptr [RSP + -0x38]
MOV RDX,qword ptr [RSP + -0x40]
MOV qword ptr [RSP + 0x38],RDX
MOV byte ptr [RSP + 0x37],0x1
MOV byte ptr [RSP + 0x36],0x1
MOV byte ptr [RSP + 0x35],0x1
MOV RDX,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x34]
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x58],RDX
MOV RDX,qword ptr [RSP + 0x58]
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSP + 0x70],RSI
MOV qword ptr [RSP + 0x68],RDX
MOV RDX,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x68]
MOV qword ptr [RDX],RSI
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + -0x60],RSI
MOV qword ptr [RSP + -0x58],RDX
MOV RDX,qword ptr [RSP + -0x48]
MOV qword ptr [RSP + -0x28],RDX
MOV byte ptr [RSP + -0x29],0x1
MOV byte ptr [RSP + -0x2a],0x1
MOV byte ptr [RSP + -0x2b],0x1
MOV RDX,qword ptr [RSP + -0x28]
MOV EDX,dword ptr [RDX]
LEA RSI,[RSP + -0x2c]
MOV qword ptr [RSP],RSI
MOV dword ptr [RSP + -0x4],EDX
MOV EDX,dword ptr [RSP + -0x4]
LEA RSI,[RSP + -0x20]
MOV qword ptr [RSP + 0x10],RSI
MOV dword ptr [RSP + 0xc],EDX
MOV RDX,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0xc]
MOV dword ptr [RDX],ESI
MOV RSI,qword ptr [RSP + -0x20]
MOV RDX,qword ptr [RSP + -0x18]
MOV qword ptr [RSP + -0x70],RSI
MOV qword ptr [RSP + -0x68],RDX
MOV qword ptr [RSP + 0x28],RCX
LEA RCX,[RSP + -0x60]
MOV qword ptr [RSP + 0x20],RCX
LEA RCX,[RSP + -0x70]
MOV qword ptr [RSP + 0x18],RCX
MOV RCX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RDX]
MOV qword ptr [RCX],RSI
MOV RDX,qword ptr [RDX + 0x8]
MOV qword ptr [RCX + 0x8],RDX
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RDX]
MOV qword ptr [RCX + 0x10],RSI
MOV RDX,qword ptr [RDX + 0x8]
MOV qword ptr [RCX + 0x18],RDX
ADD RSP,0x78
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>,
std::remove_cv<std::remove_reference<char const [7]>::type>::type,
std::remove_cv<std::remove_reference<int>::type>::type>
fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, char const
[7], int>(char const (&) [7], int&) */
v10 * __thiscall
fmt::v10::
make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,char_const[7],int>
(v10 *this,char *param_1,int *param_2)
{
int8 local_98;
int8 local_90;
int8 local_30;
/* WARNING: Ignoring partial resolution of indirect */
local_98._0_4_ = *param_2;
*(char **)this = param_1;
*(int8 *)(this + 8) = local_30;
*(int8 *)(this + 0x10) = local_98;
*(int8 *)(this + 0x18) = local_90;
return this;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.