LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::ClipperOffset::FixOrientations()
void ClipperOffset::FixOrientations()
{
  //fixup orientations of all closed paths if the orientation of the
  //closed path with the lowermost vertex is wrong ...
  if (m_lowest.X >= 0 && 
    !Orientation(m_polyNodes.Childs[(int)m_lowest.X]->Contour))
  {
    for (int i = 0; i < m_polyNodes.ChildCount(); ++i)
    {
      PolyNode& node = *m_polyNodes.Childs[i];
      if (node.m_endtype == etClosedPolygon ||
        (node.m_endtype == etClosedLine && Orientation(node.Contour)))
          ReversePath(node.Contour);
    }
  } else
  {
    for (int i = 0; i < m_polyNodes.ChildCount(); ++i)
    {
      PolyNode& node = *m_polyNodes.Childs[i];
      if (node.m_endtype == etClosedLine && !Orientation(node.Contour))
        ReversePath(node.Contour);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa0(%rdi), %rax
testq %rax, %rax
js 0xd15f
movq 0xc8(%rbx), %r15
cltq
movq (%r15,%rax,8), %rdi
callq 0x7b8a
testb %al, %al
je 0xd1a3
xorl %r15d, %r15d
movq 0xc8(%rbx), %rax
movq 0xd0(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jge 0xd1ec
movq (%rax,%r15,8), %r14
cmpl $0x1, 0x44(%r14)
jne 0xd19e
movq %r14, %rdi
callq 0x7b8a
testb %al, %al
jne 0xd19e
movq %r14, %rdi
callq 0xd1f8
incq %r15
jmp 0xd162
xorl %r12d, %r12d
movq 0xd0(%rbx), %rax
subq %r15, %rax
shrq $0x3, %rax
cltq
cmpq %rax, %r12
jge 0xd1ec
movq (%r15,%r12,8), %r14
movl 0x44(%r14), %eax
testl %eax, %eax
je 0xd1d8
cmpl $0x1, %eax
jne 0xd1e7
movq %r14, %rdi
callq 0x7b8a
testb %al, %al
je 0xd1e7
movq %r14, %rdi
callq 0xd1f8
movq 0xc8(%rbx), %r15
incq %r12
jmp 0xd1a6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::SimplifyPolygon(std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>> const&, std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>>>&, ClipperLib::PolyFillType)
void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType)
{
  Clipper c;
  c.StrictlySimple(true);
  c.AddPath(in_poly, ptSubject, true);
  c.Execute(ctUnion, out_polys, fillType, fillType);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0xc8(%rsp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
andq $0x0, 0x30(%rdi)
movups %xmm0, 0x8(%rdi)
leaq 0xc516(%rip), %rax      # 0x1acb8
movq %rax, -0xc0(%rdi)
leaq 0xc550(%rip), %rax      # 0x1ad00
movq %rax, (%rdi)
leaq 0x80(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movups %xmm0, -0x70(%rax)
movups %xmm0, -0x60(%rax)
movups %xmm0, -0x50(%rax)
movups %xmm0, -0x40(%rax)
movups %xmm0, -0x30(%rax)
movups %xmm0, -0x20(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
xorl %ecx, %ecx
movb %cl, 0x60(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x29(%rax)
movb %cl, 0x44(%rax)
andw $0x0, 0x38(%rdi)
movb $0x1, 0x46(%rax)
pushq $0x1
popq %rcx
xorl %edx, %edx
callq 0x8cd0
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
movq %r14, %rdx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x96e8
leaq 0x8(%rsp), %rdi
callq 0x961c
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x961c
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::DistanceFromLineSqrd(ClipperLib::IntPoint const&, ClipperLib::IntPoint const&, ClipperLib::IntPoint const&)
double DistanceFromLineSqrd(
  const IntPoint& pt, const IntPoint& ln1, const IntPoint& ln2)
{
  //The equation of a line in general form (Ax + By + C = 0)
  //given 2 points (x�,y�) & (x�,y�) is ...
  //(y� - y�)x + (x� - x�)y + (y� - y�)x� - (x� - x�)y� = 0
  //A = (y� - y�); B = (x� - x�); C = (y� - y�)x� - (x� - x�)y�
  //perpendicular distance of point (x�,y�) = (Ax� + By� + C)/Sqrt(A� + B�)
  //see http://en.wikipedia.org/wiki/Perpendicular_distance
  double A = double(ln1.Y - ln2.Y);
  double B = double(ln2.X - ln1.X);
  double C = A * ln1.X  + B * ln1.Y;
  C = A * pt.X + B * pt.Y - C;
  return (C * C) / (A * A + B * B);
}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
cvtsi2sd %rcx, %xmm0
subq 0x8(%rdx), %rcx
cvtsi2sd %rcx, %xmm1
movq (%rdx), %rcx
subq %rax, %rcx
cvtsi2sd %rcx, %xmm2
cvtsi2sd %rax, %xmm3
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm3
addsd %xmm0, %xmm3
cvtsi2sdq (%rdi), %xmm0
cvtsi2sdq 0x8(%rdi), %xmm4
mulsd %xmm2, %xmm4
mulsd %xmm1, %xmm0
addsd %xmm4, %xmm0
subsd %xmm3, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::MinkowskiSum(std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>> const&, std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>>> const&, std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>>>&, ClipperLib::PolyFillType, bool)
void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, 
    PolyFillType pathFillType, bool pathIsClosed)
{
  Clipper c;
  for (size_t i = 0; i < paths.size(); ++i)
  {
    Paths tmp;
    Minkowski(pattern, paths[i], tmp, true, pathIsClosed);
    c.AddPaths(tmp, ptSubject, true);
  }
  if (pathIsClosed) c.AddPaths(paths, ptClip, true);
  c.Execute(ctUnion, solution, pathFillType, pathFillType);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %ecx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rax
movups %xmm0, 0x68(%rax)
andq $0x0, 0x78(%rax)
movups %xmm0, 0x50(%rax)
leaq 0xbbe8(%rip), %rcx      # 0x1acb8
movq %rcx, -0x78(%rax)
leaq 0xbc25(%rip), %rcx      # 0x1ad00
movq %rcx, 0x48(%rax)
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movups %xmm0, -0x70(%rax)
movups %xmm0, -0x60(%rax)
movups %xmm0, -0x50(%rax)
movups %xmm0, -0x40(%rax)
movups %xmm0, -0x30(%rax)
movups %xmm0, -0x20(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
xorl %r12d, %r12d
movb %r12b, 0x60(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x29(%rax)
movb %r12b, 0x44(%rax)
movb %r12b, 0x46(%rax)
andw $0x0, 0x80(%rax)
movq %rsi, %r15
movq %rdi, 0x18(%rsp)
movl %r8d, 0xc(%rsp)
movzbl %r8b, %r14d
leaq 0x20(%rsp), %rbx
pushq $0x1
popq %rbp
xorl %r13d, %r13d
movq (%r15), %rsi
movq 0x8(%r15), %rax
subq %rsi, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
cmpq %rax, %r13
jae 0xf1aa
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
addq %r12, %rsi
movq 0x18(%rsp), %rdi
movq %rbx, %rdx
movl %ebp, %ecx
movl %r14d, %r8d
callq 0xec71
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0x38(%rsp), %rax
addq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x9260
movq %rbx, %rdi
callq 0x671a
incq %r13
addq $0x18, %r12
jmp 0xf142
cmpb $0x0, 0xc(%rsp)
je 0xf1cc
movq 0x38(%rsp), %rax
leaq 0x38(%rsp), %rdi
addq -0x18(%rax), %rdi
pushq $0x1
popq %rcx
movq %r15, %rsi
movl %ecx, %edx
callq 0x9260
leaq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
movq 0x10(%rsp), %rdx
movl 0x8(%rsp), %ecx
movl %ecx, %r8d
callq 0x96e8
leaq 0x38(%rsp), %rdi
callq 0x961c
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xf213
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x671a
leaq 0x38(%rsp), %rdi
callq 0x961c
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::AddPolyNodeToPolygons(ClipperLib::PolyNode const&, ClipperLib::NodeType, std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>>>&)
void AddPolyNodeToPolygons(const PolyNode& polynode, NodeType nodetype, Paths& paths)
{
  bool match = true;
  if (nodetype == ntClosed) match = !polynode.IsOpen();
  else if (nodetype == ntOpen) return;

  if (!polynode.Contour.empty() && match)
    paths.push_back(polynode.Contour);
  for (int i = 0; i < polynode.ChildCount(); ++i)
    AddPolyNodeToPolygons(*polynode.Childs[i], nodetype, paths);
}

// Assembly:
cmpl $0x1, %esi
je 0xf2a0
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
cmpl $0x2, %esi
jne 0xf24f
movb 0x3c(%r14), %al
jmp 0xf251
xorl %eax, %eax
testb %al, %al
jne 0xf269
movq 0x8(%r14), %rax
cmpq %rax, (%r14)
je 0xf269
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf91c
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jge 0xf296
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0xf230
incq %r15
jmp 0xf26c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::OpenPathsFromPolyTree(ClipperLib::PolyTree&, std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>>>&)
void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths)
{
  paths.resize(0); 
  paths.reserve(polytree.Total());
  //Open paths are top level only, so ...
  for (int i = 0; i < polytree.ChildCount(); ++i)
    if (polytree.Childs[i]->IsOpen())
      paths.push_back(polytree.Childs[i]->Contour);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq %rsi, %rdi
xorl %esi, %esi
callq 0xf6f2
movq 0x50(%r14), %rax
subq 0x48(%r14), %rax
shrq $0x3, %rax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0xf7b4
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jge 0xf37d
movq (%rax,%r15,8), %rsi
cmpb $0x1, 0x3c(%rsi)
jne 0xf378
movq %rbx, %rdi
callq 0xf91c
incq %r15
jmp 0xf34f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::operator<<(std::ostream&, std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>> const&)
std::ostream& operator <<(std::ostream &s, const Path &p)
{
  if (p.empty()) return s;
  Path::size_type last = p.size() -1;
  for (Path::size_type i = 0; i < last; i++)
    s << "(" << p[i].X << "," << p[i].Y << "), ";
  s << "(" << p[last].X << "," << p[last].Y << ")\n";
  return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %r12
cmpq %r12, %rax
je 0xf4aa
movq %rsi, %r14
subq %rax, %r12
sarq $0x4, %r12
decq %r12
xorl %ebp, %ebp
leaq 0x4455(%rip), %r15      # 0x13862
leaq 0x4452(%rip), %r13      # 0x13866
movq %r12, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3210
movq (%r14), %rcx
subq $0x1, %r12
jb 0xf468
movq (%rcx,%rbp), %rsi
movq %rax, %rdi
callq 0x30c0
movq %rax, %rdi
leaq 0x4422(%rip), %rsi      # 0x13864
callq 0x3210
movq (%r14), %rcx
movq 0x8(%rcx,%rbp), %rsi
movq %rax, %rdi
callq 0x30c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x3210
addq $0x10, %rbp
jmp 0xf418
movq (%rsp), %r15
shlq $0x4, %r15
movq (%rcx,%r15), %rsi
movq %rax, %rdi
callq 0x30c0
leaq 0x43e1(%rip), %rsi      # 0x13864
movq %rax, %rdi
callq 0x3210
movq (%r14), %rcx
movq 0x8(%rcx,%r15), %rsi
movq %rax, %rdi
callq 0x30c0
leaq 0x4216(%rip), %rsi      # 0x136b8
movq %rax, %rdi
callq 0x3210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::operator<<(std::ostream&, std::vector<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>, std::allocator<std::vector<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>>> const&)
std::ostream& operator <<(std::ostream &s, const Paths &p)
{
  for (Paths::size_type i = 0; i < p.size(); i++)
    s << p[i];
  s << "\n";
  return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
pushq $0x18
popq %r12
xorl %r13d, %r13d
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
cqto
idivq %r12
cmpq %rax, %r13
jae 0xf4fd
addq %r15, %rsi
movq %rbx, %rdi
callq 0xf3d9
incq %r13
addq $0x18, %r15
jmp 0xf4d5
leaq 0x3dd1(%rip), %rsi      # 0x132d5
movq %rbx, %rdi
callq 0x3210
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::SetDx(ClipperLib::TEdge&)
inline void SetDx(TEdge &e)
{
  e.Delta.X = (e.Top.X - e.Bot.X);
  e.Delta.Y = (e.Top.Y - e.Bot.Y);

  if (e.Delta.Y == 0) e.Dx = HORIZONTAL;
  else e.Dx = (double)(e.Delta.X) / e.Delta.Y;
}

// Assembly:
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
subq (%rdi), %rax
movq %rax, 0x30(%rdi)
subq 0x8(%rdi), %rcx
movq %rcx, 0x38(%rdi)
je 0xf66b
cvtsi2sd %rax, %xmm0
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm0
jmp 0xf673
movsd 0x4055(%rip), %xmm0     # 0x136c8
movsd %xmm0, 0x40(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::E2InsertsBeforeE1(ClipperLib::TEdge&, ClipperLib::TEdge&)
inline bool E2InsertsBeforeE1(TEdge &e1, TEdge &e2)
{
  if (e2.Curr.X == e1.Curr.X) 
  {
    if (e2.Top.Y > e1.Top.Y)
      return e2.Top.X < TopX(e1, e2.Top.Y); 
      else return e1.Top.X > TopX(e2, e1.Top.Y);
  } 
  else return e2.Curr.X < e1.Curr.X;
}

// Assembly:
movq 0x10(%rdi), %rax
cmpq %rax, 0x10(%rsi)
jne 0xfa27
pushq %rbx
movq 0x28(%rsi), %rax
movq 0x28(%rdi), %rcx
cmpq %rcx, %rax
jle 0xfa2b
movq 0x20(%rsi), %rbx
movq %rax, %rsi
callq 0xf607
cmpq %rax, %rbx
setl %al
jmp 0xfa40
setl %al
retq
movq 0x20(%rdi), %rbx
movq %rsi, %rdi
movq %rcx, %rsi
callq 0xf607
cmpq %rax, %rbx
setg %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/hzeller[P]gcode-multi-shell-extrude/third_party/clipper.cpp
// Function: ClipperLib::UpdateOutPtIdxs(ClipperLib::OutRec&)
inline void UpdateOutPtIdxs(OutRec& outrec)
{  
  OutPt* op = outrec.Pts;
  do
  {
    op->Idx = outrec.Idx;
    op = op->Prev;
  }
  while(op != outrec.Pts);
}

// Assembly:
movq 0x18(%rdi), %rax
movl (%rdi), %ecx
movq %rax, %rdx
movl %ecx, (%rdx)
movq 0x20(%rdx), %rdx
cmpq %rax, %rdx
jne 0xfa4b
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/gen-psqr.c
// Function: square_mask
void
square_mask (mpz_t mask, int m)
{
  int    p, i, r, idx;

  p = mul_2exp_mod (1, mod_bits, m);
  p = neg_mod (p, m);

  mpz_set_ui (mask, 0L);
  for (i = 0; i < m; i++)
    {
      r = (i * i) % m;
      idx = (r * p) % m;
      mpz_setbit (mask, (unsigned long) idx);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x6789(%rip), %esi      # 0xe0e0
pushq $0x1
popq %rdi
movl %ebx, %edx
callq 0x78f2
movl %eax, %edi
movl %ebx, %esi
callq 0x790b
movl %eax, %r15d
andl $0x0, 0x4(%r14)
xorl %r12d, %r12d
testl %ebx, %ebx
movl $0x0, %r13d
cmovgl %ebx, %r13d
cmpl %r12d, %r13d
je 0x79aa
movl %r12d, %eax
imull %r12d, %eax
xorl %edx, %edx
idivl %ebx
movl %edx, %eax
imull %r15d, %eax
cltd
idivl %ebx
movslq %edx, %rsi
movq %r14, %rdi
callq 0x499f
incl %r12d
jmp 0x7981
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/gen-psqr.c
// Function: generate_sq_res_0x100
void
generate_sq_res_0x100 (int limb_bits)
{
  int  i, res;

  nsq_res_0x100 = (0x100 + limb_bits - 1) / limb_bits;
  sq_res_0x100 = (mpz_t *) xmalloc (nsq_res_0x100 * sizeof (*sq_res_0x100));

  for (i = 0; i < nsq_res_0x100; i++)
    mpz_init_set_ui (sq_res_0x100[i], 0L);

  for (i = 0; i < 0x100; i++)
    {
      res = (i * i) % 0x100;
      mpz_setbit (sq_res_0x100[res / limb_bits],
                  (unsigned long) (res % limb_bits));
    }

  sq_res_0x100_num = 0;
  for (i = 0; i < nsq_res_0x100; i++)
    sq_res_0x100_num += mpz_popcount (sq_res_0x100[i]);
  sq_res_0x100_fraction = (double) sq_res_0x100_num / 256.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leal 0xff(%rbx), %eax
cltd
idivl %edi
movl %eax, 0x670c(%rip)      # 0xe0e4
movslq %eax, %rdi
shlq $0x4, %rdi
callq 0x12b4
movq %rax, 0x66fd(%rip)      # 0xe0e8
pushq $0x8
popq %r14
xorl %r15d, %r15d
movq %r14, %r12
movslq 0x66e8(%rip), %rax      # 0xe0e4
cmpq %rax, %r15
jge 0x7a2e
movq 0x66e0(%rip), %r13      # 0xe0e8
movq $0x1, -0x8(%r13,%r12)
movq %r14, %rdi
callq *0x6696(%rip)           # 0xe0b0
movq %rax, (%r13,%r12)
andl $0x0, -0x4(%r13,%r12)
incq %r15
addq $0x10, %r12
jmp 0x79f5
xorl %r14d, %r14d
cmpl $0x100, %r14d           # imm = 0x100
je 0x7a63
movl %r14d, %eax
imull %r14d, %eax
movzbl %al, %eax
xorl %edx, %edx
idivl %ebx
movslq %eax, %rdi
shlq $0x4, %rdi
addq 0x6692(%rip), %rdi      # 0xe0e8
movq %rdx, %rsi
callq 0x499f
incl %r14d
jmp 0x7a31
andl $0x0, 0x6686(%rip)      # 0xe0f0
movl 0x6673(%rip), %r14d     # 0xe0e4
movq 0x6670(%rip), %rbx      # 0xe0e8
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
subq $0x1, %r14
jb 0x7aa0
movq %rbx, %rdi
callq 0x68b6
addl %eax, %r15d
movl %r15d, 0x6656(%rip)     # 0xe0f0
addq $0x10, %rbx
jmp 0x7a82
cvtsi2sd %r15d, %xmm0
mulsd 0x1583(%rip), %xmm0     # 0x9030
movsd %xmm0, 0x6643(%rip)     # 0xe0f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/gen-psqr.c
// Function: main
int
main (int argc, char *argv[])
{
  int  limb_bits, nail_bits;

  if (argc != 3)
    {
      fprintf (stderr, "Usage: gen-psqr <limbbits> <nailbits>\n");
      exit (1);
    }

  limb_bits = atoi (argv[1]);
  nail_bits = atoi (argv[2]);

  if (limb_bits <= 0
      || nail_bits < 0
      || nail_bits >= limb_bits)
    {
      fprintf (stderr, "Invalid limb/nail bits: %d %d\n",
               limb_bits, nail_bits);
      exit (1);
    }

  generate_sq_res_0x100 (limb_bits);
  generate_mod (limb_bits, nail_bits);

  print (limb_bits, nail_bits);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x3, %edi
jne 0x887d
movq %rsi, %r14
movq 0x8(%rsi), %rdi
callq 0x10f0
movl %eax, %ebx
movq 0x10(%r14), %rdi
callq 0x10f0
movl %eax, %r14d
testl %ebx, %ebx
jle 0x889b
testl %r14d, %r14d
js 0x889b
cmpl %ebx, %r14d
jge 0x889b
movl %ebx, %edi
callq 0x79b9
movl %ebx, %edi
movl %r14d, %esi
callq 0x7ac4
movl %ebx, %edi
movl %r14d, %esi
callq 0x825d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x5774(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x1615(%rip), %rdi      # 0x9ea3
pushq $0x26
popq %rsi
pushq $0x1
popq %rdx
callq 0x1120
jmp 0x88b8
movq 0x5756(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x161e(%rip), %rsi      # 0x9eca
movl %ebx, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x10b0
pushq $0x1
popq %rdi
callq 0x1110
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/main.cpp
// Function: test_vuota(sparse_matrix<int>)
void test_vuota(const smatrixi vuota){
  std::cout << "\n\ntest stampa matrice vuota\n";
  std::cout << vuota << std::endl;
  std::cout << "\ntest evaluate matrice vuota\n";
  positive pos;
  int count = evaluate(vuota, pos);
  assert(count == 0);
  std::cout << "valori accettabili: " << count << "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48c4(%rip), %r14      # 0x5fd0
leaq 0x1b45(%rip), %rsi      # 0x3258
movq %r14, %rdi
callq 0x10b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2281
movq %rax, %rdi
callq 0x1050
leaq 0x1b40(%rip), %rsi      # 0x3275
movq %r14, %rdi
callq 0x10b0
movq %rbx, %rdi
callq 0x223d
testl %eax, %eax
jne 0x1779
movq 0x4880(%rip), %rdi      # 0x5fd0
leaq 0x1b67(%rip), %rsi      # 0x32be
callq 0x10b0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1100
leaq 0x19d7(%rip), %rsi      # 0x3144
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x10b0
leaq 0x1b13(%rip), %rdi      # 0x3293
leaq 0x18c4(%rip), %rsi      # 0x304b
leaq 0x1b10(%rip), %rcx      # 0x329e
pushq $0x66
popq %rdx
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/main.cpp
// Function: test_duplicati()
void test_duplicati(){
  std::cout << "\ntest inserimento duplicati\n";
  smatrixi testM(0);
  testM.add(1, 0, 0);
  testM.add(2, 1, 2);
  testM.add(5, 0, 0);
  testM.add(2, 1, 2);

  testM.add(4, 0, 0);
  testM.add(5, 0, 0);
  testM.print();
  assert(testM.get_size() == 2);
  std::cout << "test duplicati superato\n";
  testM.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movq 0x4510(%rip), %rdi      # 0x5fd0
leaq 0x18ca(%rip), %rsi      # 0x3391
callq 0x10b0
leaq -0x30(%rbp), %rdi
andl $0x0, (%rdi)
movb $0x0, 0x4(%rdi)
movabsq $0x7fffffff7fffffff, %rax # imm = 0x7FFFFFFF7FFFFFFF
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
andl $0x0, 0x18(%rdi)
leaq -0xc(%rbp), %rsi
movl $0x1, (%rsi)
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2610
leaq -0xc(%rbp), %rsi
movl $0x2, (%rsi)
leaq -0x30(%rbp), %rdi
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
callq 0x2610
leaq -0xc(%rbp), %rsi
movl $0x5, (%rsi)
leaq -0x30(%rbp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2610
leaq -0xc(%rbp), %rsi
movl $0x2, (%rsi)
leaq -0x30(%rbp), %rdi
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
callq 0x2610
leaq -0xc(%rbp), %rsi
movl $0x4, (%rsi)
leaq -0x30(%rbp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2610
leaq -0xc(%rbp), %rsi
movl $0x5, (%rsi)
leaq -0x30(%rbp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2610
leaq -0x30(%rbp), %rdi
callq 0x27f0
cmpl $0x2, -0x18(%rbp)
jne 0x1bb3
movq 0x4442(%rip), %rdi      # 0x5fd0
leaq 0x1845(%rip), %rsi      # 0x33da
callq 0x10b0
leaq -0x30(%rbp), %rdi
callq 0x2888
leaq -0x30(%rbp), %rdi
callq 0x222a
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
leaq 0x17f4(%rip), %rdi      # 0x33ae
leaq 0x148a(%rip), %rsi      # 0x304b
leaq 0x17fc(%rip), %rcx      # 0x33c4
movl $0x93, %edx
callq 0x1070
jmp 0x1bde
jmp 0x1bde
jmp 0x1bde
jmp 0x1bde
jmp 0x1bde
jmp 0x1bde
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x222a
movq %rbx, %rdi
callq 0x1110
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/main.cpp
// Function: main
int main(){
  test_fondamentali();
  smatrixi costante(0);
  test_vuota(costante);
  test_point();
  test_duplicati();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
callq 0x125c
leaq -0x48(%rbp), %rsi
andl $0x0, (%rsi)
movb $0x0, 0x4(%rsi)
movabsq $0x7fffffff7fffffff, %rax # imm = 0x7FFFFFFF7FFFFFFF
movq %rax, 0x8(%rsi)
andq $0x0, 0x10(%rsi)
andl $0x0, 0x18(%rsi)
leaq -0x28(%rbp), %rdi
callq 0x2188
leaq -0x28(%rbp), %rdi
callq 0x16fb
leaq -0x28(%rbp), %rdi
callq 0x222a
callq 0x1796
callq 0x1ab0
leaq -0x48(%rbp), %rdi
callq 0x222a
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x222a
jmp 0x1c6a
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x222a
movq %rbx, %rdi
callq 0x1110
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: void printdef<float>(sparse_matrix<float>, int, int)
void printdef(sparse_matrix<T> smatrix, int n, int m){
  if(n < 0 || m < 0)
    throw NegativeIndexSparseMatrixException();
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m; j++){
      std::cout << smatrix(i, j) << " ";
    }
    std::cout << std::endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %eax
orl %esi, %eax
js 0x1eef
movl %edx, %ebx
movq %rdi, %r15
xorl %r12d, %r12d
testl %edx, %edx
cmovlel %r12d, %ebx
testl %esi, %esi
cmovlel %r12d, %esi
movq 0x413e(%rip), %r13      # 0x5fd0
movl %esi, -0x2c(%rbp)
cmpl %esi, %r12d
je 0x1ee0
xorl %r14d, %r14d
cmpl %r14d, %ebx
je 0x1ed0
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x2a0c
movss (%rax), %xmm0
movq %r13, %rdi
callq 0x1080
movq %rax, %rdi
leaq 0x149a(%rip), %rsi      # 0x3360
callq 0x10b0
incl %r14d
jmp 0x1e9d
movq %r13, %rdi
callq 0x1050
incl %r12d
movl -0x2c(%rbp), %esi
jmp 0x1e95
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x1060
leaq 0x3dca(%rip), %rcx      # 0x5cc8
movq %rcx, (%rax)
leaq 0x3d68(%rip), %rsi      # 0x5c70
movq 0x40d1(%rip), %rdx      # 0x5fe0
movq %rax, %rdi
callq 0x10f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: sparse_matrix<float>::sparse_matrix(sparse_matrix<float> const&)
sparse_matrix(const sparse_matrix &other): default_value(other.default_value),
					     dim(other.dim),
					     size_row(other.size_row),
					     size_column(other.size_column),
					     head(nullptr), size(0) {
    node *curr = other.head;

    // eseguo una copia nodo per nodo
    try {
      while(curr != nullptr) {
	add(curr->ret->v, curr->ret->x, curr->ret->y);
	curr = curr->next;
      }		
    }
    catch(...) {
      clear();
      throw NoSparseMatrixException();
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movss (%rsi), %xmm0
movss %xmm0, (%rdi)
movb 0x4(%rsi), %al
movb %al, 0x4(%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%rdi)
andq $0x0, 0x10(%rdi)
andl $0x0, 0x18(%rdi)
addq $0x10, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x1f68
movq 0x8(%r14), %rsi
movl 0x4(%rsi), %edx
movl 0x8(%rsi), %ecx
movq %rbx, %rdi
callq 0x1c7c
jmp 0x1f4c
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x28a6
pushq $0x8
popq %rdi
callq 0x1060
leaq 0x3dcc(%rip), %rcx      # 0x5d58
movq %rcx, (%rax)
leaq 0x3d9a(%rip), %rsi      # 0x5d30
movq 0x4043(%rip), %rdx      # 0x5fe0
movq %rax, %rdi
callq 0x10f0
movq %rax, %rbx
callq 0x10e0
movq %rbx, %rdi
callq 0x1110
movq %rax, %rdi
callq 0x28c4
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: sparse_matrix<int>::sparse_matrix<float>(sparse_matrix<float> const&)
sparse_matrix(const sparse_matrix<Q> &other):
    default_value(static_cast<T>(other.get_default_value())),
    dim(other.get_dim()), size_row(other.get_size_row()),
    size_column(other.get_size_column()), head(nullptr), size(0) {
    
    // mi muovo con gli iteratori nella matrice sparsa passata in ingresso
    // effettuo la add alla nuova matrice sparsa con cast del valore
    typename sparse_matrix<Q>::const_iterator i, ie;
    i = other.begin();
    ie = other.end();
    try {
      while(i != ie) {
	add(static_cast<T>(i->v), i->x, i->y);
	++i;
      }		
    }
    catch(...) {
      clear();
      throw NoCastSparseMatrixException();
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
cvttss2si (%rsi), %eax
movq %rdi, %rbx
movl %eax, (%rdi)
movb 0x4(%rsi), %al
movb %al, 0x4(%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%rdi)
andq $0x0, 0x10(%rdi)
andl $0x0, 0x18(%rdi)
addq $0x10, %r14
leaq -0x1c(%rbp), %r15
movq (%r14), %r14
testq %r14, %r14
je 0x207b
movq 0x8(%r14), %rax
cvttss2si (%rax), %ecx
movl %ecx, -0x1c(%rbp)
movl 0x4(%rax), %edx
movl 0x8(%rax), %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2610
jmp 0x2055
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x2888
pushq $0x8
popq %rdi
callq 0x1060
leaq 0x3cf3(%rip), %rcx      # 0x5d98
movq %rcx, (%rax)
leaq 0x3cc1(%rip), %rsi      # 0x5d70
movq 0x3f2a(%rip), %rdx      # 0x5fe0
movq %rax, %rdi
callq 0x10f0
movq %rax, %rbx
callq 0x10e0
movq %rbx, %rdi
callq 0x1110
movq %rax, %rdi
callq 0x28c4
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: std::ostream& operator<<<int>(std::ostream&, sparse_matrix<int> const&)
std::ostream &operator<<(std::ostream &os, 
			 const sparse_matrix<T> &smatrix) {
	
  typename sparse_matrix<T>::const_iterator i, ie;
	
  i = smatrix.begin();
  ie = smatrix.end();
  // evito overflow se provo a stampare su una matrice nulla
  if(smatrix.get_size() == 0)
    return os;
  // mi salvo il numero di riga per andare a capo
  int prevrow = i->x;
  
  while(i!=ie) {
    if(i->x != prevrow)
      std::cout << std::endl;
    os << i->v << "\t";
    prevrow = i->x;
    ++i;
  }
  return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x18(%rsi)
je 0x22f1
movq 0x10(%rsi), %r12
leaq 0x8(%r12), %r13
leaq 0x11ae(%rip), %r14      # 0x3456
movq 0x3d21(%rip), %r15      # 0x5fd0
testq %r12, %r12
je 0x22f1
movq (%r13), %rcx
leaq 0x8(%r12), %r13
movq 0x8(%r12), %rax
movl 0x4(%rax), %edx
cmpl 0x4(%rcx), %edx
je 0x22d6
movq %r15, %rdi
callq 0x1050
movq (%r13), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
movq (%r12), %r12
jmp 0x22af
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: sparse_matrix<int>::print() const
void print() const{
    node *current = head;
    while(current != nullptr){
      std::cout << current->ret->v << " in (" << current->ret->x << ", "
		<< current->ret->y <<")\n";
      current = current->next;
      
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rbx
movq 0x37c4(%rip), %r14      # 0x5fd0
leaq 0xc45(%rip), %r15       # 0x3458
leaq 0xb45(%rip), %r12       # 0x335f
leaq 0x990(%rip), %r13       # 0x31b1
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2878
movq 0x8(%rbx), %rax
movl (%rax), %esi
movq %r14, %rdi
callq 0x1100
movq %rax, %rdi
movq %r15, %rsi
callq 0x10b0
movq 0x8(%rbx), %rcx
movl 0x4(%rcx), %esi
movq %rax, %rdi
callq 0x1100
movq %rax, %rdi
movq %r12, %rsi
callq 0x10b0
movq 0x8(%rbx), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x1100
movq %rax, %rdi
movq %r13, %rsi
callq 0x10b0
jmp 0x2821
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: sparse_matrix<float>::recursive_clear(sparse_matrix<float>::node*)
void recursive_clear(node *n){
    if(n!=nullptr) {
      recursive_clear(n->next);
      delete n->ret;
      n->ret = nullptr;
      delete n;
      size--;
      n = nullptr;   
    }
  }

// Assembly:
testq %rsi, %rsi
je 0x2904
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
callq 0x28d2
movq 0x8(%r14), %rdi
callq 0x10a0
movq %r14, %rdi
callq 0x10a0
decl 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: sparse_matrix<float>::node::node(float const&, int, int)
node(const T &v, const int x, const int y): next(nullptr){
      try{
	ret = new element(v, x, y);
      }catch(...){
	throw noNodeException{};
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
andq $0x0, (%rdi)
pushq $0xc
popq %rdi
callq 0x10c0
movss (%r12), %xmm0
movss %xmm0, (%rax)
movl %r15d, 0x4(%rax)
movl %ebx, 0x8(%rax)
movq %rax, 0x8(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x1040
pushq $0x8
popq %rdi
callq 0x1060
leaq 0x3393(%rip), %rcx      # 0x5cf0
movq %rcx, (%rax)
leaq 0x3321(%rip), %rsi      # 0x5c88
movq 0x3672(%rip), %rdx      # 0x5fe0
movq %rax, %rdi
callq 0x10f0
movq %rax, %rbx
callq 0x10e0
movq %rbx, %rdi
callq 0x1110
movq %rax, %rdi
callq 0x28c4
// File: /workspace/github_cpp_makefile_star2_O2/dlcgold[P]sparsematrix-unimib/./sparsematrix.h
// Function: sparse_matrix<float>::operator()(int, int)
const T& operator()(int x, int y) {
    if(x < 0 || y < 0)
      throw  NegativeIndexSparseMatrixException();
    if((x < size_row) && (y < size_column)){
      node *current = head;
      T& value = default_value;

      // come per la add avanzo fino alle condizioni di arresto
      while(current->next != nullptr &&
	    ((current->next->ret->x == x && current->next->ret->y <= y)
	     || (current->next->ret->x < x))) {
	
	current = current->next;
      }
      // se mi sono fermato sul nodo corrispondente alle coordinate richieste
      // ne resituisco il valore, altrimenti resituisco il valore di default
      if(current->ret->x == x && current->ret->y == y){
	return current->ret->v;
      }else{
	return value;
      }
    }else{
      throw IndexOutOfBoundsException();
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
orl %esi, %eax
js 0x2a56
cmpl %esi, 0x8(%rdi)
jle 0x2a71
cmpl %edx, 0xc(%rdi)
jle 0x2a71
movq 0x10(%rdi), %rax
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
je 0x2a43
movq 0x8(%rax), %r8
cmpl %esi, 0x4(%r8)
jne 0x2a41
cmpl %edx, 0x8(%r8)
jle 0x2a24
jmp 0x2a43
jl 0x2a24
movq 0x8(%rcx), %rax
cmpl %esi, 0x4(%rax)
jne 0x2a51
cmpl %edx, 0x8(%rax)
je 0x2a54
movq %rdi, %rax
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x1060
leaq 0x3263(%rip), %rcx      # 0x5cc8
movq %rcx, (%rax)
leaq 0x3201(%rip), %rsi      # 0x5c70
jmp 0x2a8a
pushq $0x8
popq %rdi
callq 0x1060
leaq 0x3298(%rip), %rcx      # 0x5d18
movq %rcx, (%rax)
leaq 0x3216(%rip), %rsi      # 0x5ca0
movq 0x354f(%rip), %rdx      # 0x5fe0
movq %rax, %rdi
callq 0x10f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/BlinfoldKing[P]lisval/src/main.cpp
// Function: main
int main(int argc, char **argv) {
	if (argc > 1)	{
		string input = "";
		string line;
		ifstream myfile(argv[1]);
		if (myfile.is_open())
		{
			while (getline(myfile, line))
			{
				input += line + '\n';
			}
			myfile.close();
		}

		else
			cout << "Unable to open file\n";

		Parser p(input);
		Token* t = p.parse();
		if (t) {
			Evaluator e;
			e.eval(t);
		} else {
			cout << "invalid pattern: " << input << '\n';
		}

		return 0;
	}

	Repl r;
	r.run();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
cmpl $0x2, %edi
jl 0x360c
movq %rsi, %rbx
leaq 0x900f(%rip), %rsi      # 0xc582
leaq -0x48(%rbp), %rdi
leaq -0x2e0(%rbp), %rdx
callq 0x3100
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x8(%rbx), %rsi
leaq -0x2e0(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x3340
leaq -0x268(%rbp), %rdi
callq 0x3090
testb %al, %al
je 0x3634
leaq -0x2e0(%rbp), %rbx
leaq -0x68(%rbp), %r14
leaq -0xa0(%rbp), %r15
pushq $0xa
popq %r12
leaq -0x48(%rbp), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3649
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x3789
movq %r13, %rdi
movq %r15, %rsi
callq 0x3370
movq %r15, %rdi
callq 0x3140
jmp 0x35d0
leaq -0x2e0(%rbp), %rbx
movq %rbx, %rdi
callq 0x383e
movq %rbx, %rdi
callq 0xba10
leaq -0x2e0(%rbp), %rdi
callq 0x3860
jmp 0x36f6
movq 0xe98d(%rip), %rdi      # 0x11fc8
leaq 0x89c2(%rip), %rsi      # 0xc004
callq 0x31f0
jmp 0x3655
leaq -0x2e0(%rbp), %rdi
callq 0x3080
leaq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x37c4
leaq -0xa0(%rbp), %rdi
callq 0x8e16
movq %rax, %rbx
testq %rax, %rax
je 0x36a2
leaq -0xd8(%rbp), %rdi
callq 0x56d6
leaq -0xd8(%rbp), %rdi
movq %rbx, %rsi
callq 0x42ea
leaq -0xd8(%rbp), %rdi
callq 0x37fa
jmp 0x36cc
movq 0xe91f(%rip), %rdi      # 0x11fc8
leaq 0x8969(%rip), %rsi      # 0xc019
callq 0x31f0
leaq -0x48(%rbp), %rsi
movq %rax, %rdi
callq 0x31e0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x3240
leaq -0xa0(%rbp), %rdi
callq 0x381e
leaq -0x2e0(%rbp), %rdi
callq 0x30b0
leaq -0x68(%rbp), %rdi
callq 0x3140
leaq -0x48(%rbp), %rdi
callq 0x3140
xorl %eax, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x37fa
jmp 0x373f
jmp 0x373c
jmp 0x3760
jmp 0x3760
movq %rax, %rbx
jmp 0x376f
movq %rax, %rbx
leaq -0x2e0(%rbp), %rdi
callq 0x3860
jmp 0x3781
movq %rax, %rbx
jmp 0x3781
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x381e
jmp 0x3763
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x3140
jmp 0x3763
jmp 0x3760
movq %rax, %rbx
leaq -0x2e0(%rbp), %rdi
callq 0x30b0
leaq -0x68(%rbp), %rdi
callq 0x3140
leaq -0x48(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O2/BlinfoldKing[P]lisval/src/lib/evaluator.cpp
// Function: Evaluator::dec()
pair<Token*, function<Token*(Token*)>> Evaluator::dec() {
    Token* op = new UnaryOperator(UnaryOperatorType::DEC);
    Token* var1 = new Variable("Pattern");
    List* signature = new List();
    signature->list.push_back(op);
    signature->list.push_back(var1);
    Token* token = signature;
    auto res = make_pair(token, [this](Token* input) {
            List* list = static_cast<List*>(input);

            Token* new_signature = this->eval(list->list[1]);

            auto new_rule = make_pair(new_signature, [](Token* input) {
                        Token* res = new Boolean(true);
                        return res;
            });

            this->state.push_back(new_rule);

            Token* res = new Boolean(true);
            return res;
    });

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x8
popq %rdi
callq 0x3200
movabsq $0x100000004, %rcx      # imm = 0x100000004
movq %rcx, (%rax)
movq %rax, -0x38(%rbp)
pushq $0x28
popq %rdi
callq 0x3200
movq %rax, %r15
leaq 0x87d3(%rip), %rsi      # 0xc26f
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3100
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x749c
leaq -0x58(%rbp), %rdi
callq 0x3140
leaq -0x60(%rbp), %r12
movq %r15, (%r12)
pushq $0x20
popq %rdi
callq 0x3200
movq %rax, %r15
movl $0x1, (%rax)
leaq 0x8(%rax), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
leaq -0x38(%rbp), %rsi
movq %r13, %rdi
callq 0x74b0
movq %r13, %rdi
movq %r12, %rsi
callq 0x74b0
movq %r15, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r14, 0x8(%rbx)
leaq 0x2033(%rip), %rax      # 0x5b44
movq %rax, 0x20(%rbx)
leaq 0x20b4(%rip), %rax      # 0x5bd0
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3140
jmp 0x3b43
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x3210
movq %rbx, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O2/BlinfoldKing[P]lisval/src/lib/evaluator.cpp
// Function: Evaluator::not_()
pair<Token*, function<Token*(Token*)>> Evaluator::not_() {
    Token* op = new UnaryOperator(UnaryOperatorType::NOT);
    Token* var1 = new Variable("Pattern");
    List* signature = new List();
    signature->list.push_back(op);
    signature->list.push_back(var1);
    Token* token = signature;
    auto res = make_pair(token, [this](Token* input) {
            List* list = static_cast<List*>(input);

            Token* pattern_token = this->eval(list->list[1]);
            if (pattern_token->type != TokenType::BOOLEAN) {
                Token* t = new Error("expect a boolean, got:" + pattern_token->debug(), input);
                return t;
            }

            Boolean* pattern = static_cast<Boolean*>(pattern_token);


            Token* res = new Boolean(!pattern->value);
            return res;
    });

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x8
popq %rdi
callq 0x3200
movq $0x4, (%rax)
movq %rax, -0x38(%rbp)
pushq $0x28
popq %rdi
callq 0x3200
movq %rax, %r15
leaq 0x86dd(%rip), %rsi      # 0xc26f
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3100
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x749c
leaq -0x58(%rbp), %rdi
callq 0x3140
leaq -0x60(%rbp), %r12
movq %r15, (%r12)
pushq $0x20
popq %rdi
callq 0x3200
movq %rax, %r15
movl $0x1, (%rax)
leaq 0x8(%rax), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
leaq -0x38(%rbp), %rsi
movq %r13, %rdi
callq 0x74b0
movq %r13, %rdi
movq %r12, %rsi
callq 0x74b0
movq %r15, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r14, 0x8(%rbx)
leaq 0x2029(%rip), %rax      # 0x5c30
movq %rax, 0x20(%rbx)
leaq 0x20ee(%rip), %rax      # 0x5d00
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3140
jmp 0x3c39
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x3210
movq %rbx, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O2/BlinfoldKing[P]lisval/src/lib/evaluator.cpp
// Function: Evaluator::plus()
pair<Token*, function<Token*(Token*)>> Evaluator::plus() {
    Token* op = new BinaryOperator(BinaryOperatorType::PLUS);
    Token* var1 = new Variable("L");
    Token* var2 = new Variable("R");
    List* signature = new List();
    signature->list.push_back(op);
    signature->list.push_back(var1);
    signature->list.push_back(var2);
    Token* token = signature;
    auto res = make_pair(token, [this](Token* input) {
            List* list = static_cast<List*>(input);

            Token* a_token = this->eval(list->list[1]);
            Token* b_token = this->eval(list->list[2]);

            if (a_token->type != TokenType::NUMBER) {
                Token* t = new Error("expect a number, got: " + a_token->debug(), input);
                return t;
            }

            if (b_token->type != TokenType::NUMBER) {
                Token* t = new Error("expect a number, got: " + b_token->debug(), input);
                return t;
            }

            Number* a = static_cast<Number*>(a_token);
            Number* b = static_cast<Number*>(b_token);

            Token* res = new Number(a->value + b->value);
            return res;
    });

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x8
popq %rdi
callq 0x3200
movabsq $0x100000005, %rcx      # imm = 0x100000005
movq %rcx, (%rax)
movq %rax, -0x48(%rbp)
pushq $0x28
popq %rdi
callq 0x3200
movq %rax, %r15
leaq 0x85e9(%rip), %rsi      # 0xc277
leaq -0x88(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x3100
leaq -0x88(%rbp), %rsi
movq %r15, %rdi
callq 0x749c
leaq -0x88(%rbp), %rdi
callq 0x3140
movq %r15, -0x40(%rbp)
pushq $0x28
popq %rdi
callq 0x3200
movq %rax, %r15
leaq 0x881c(%rip), %rsi      # 0xc4eb
leaq -0x68(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3100
leaq -0x68(%rbp), %rsi
movq %r15, %rdi
callq 0x749c
leaq -0x68(%rbp), %rdi
callq 0x3140
leaq -0x38(%rbp), %r12
movq %r15, (%r12)
pushq $0x20
popq %rdi
callq 0x3200
movq %rax, %r15
movl $0x1, (%rax)
leaq 0x8(%rax), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
leaq -0x48(%rbp), %rsi
movq %r13, %rdi
callq 0x74b0
leaq -0x40(%rbp), %rsi
movq %r13, %rdi
callq 0x74b0
movq %r13, %rdi
movq %r12, %rsi
callq 0x74b0
movq %r15, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r14, 0x8(%rbx)
leaq 0x1fda(%rip), %rax      # 0x5d2a
movq %rax, 0x20(%rbx)
leaq 0x210d(%rip), %rax      # 0x5e68
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
jmp 0x3d86
jmp 0x3d8d
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x3140
jmp 0x3d90
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x3210
movq %rbx, %rdi
callq 0x3320
nop
// File: /workspace/github_cpp_makefile_star2_O2/BlinfoldKing[P]lisval/src/lib/evaluator.cpp
// Function: Evaluator::clear()
pair<Token*, function<Token*(Token*)>> Evaluator::clear() {
    Token* op = new Atom("clear");
    List* signature = new List();
    signature->list.push_back(op);
    Token* token = signature;
    auto res = make_pair(token, [this](Token* input) {
            clrscr();
           return nullptr;
    });

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x3200
movq %rax, %r15
leaq 0x77b8(%rip), %rsi      # 0xc269
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x3100
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x74d4
leaq -0x48(%rbp), %rdi
callq 0x3140
leaq -0x50(%rbp), %r12
movq %r15, (%r12)
pushq $0x20
popq %rdi
callq 0x3200
movq %rax, %r15
movl $0x1, (%rax)
leaq 0x8(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movq %r12, %rsi
callq 0x74b0
movq %r15, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r14, 0x8(%rbx)
leaq 0x1ea1(%rip), %rax      # 0x69b8
movq %rax, 0x20(%rbx)
leaq 0x1ea4(%rip), %rax      # 0x69c6
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3140
jmp 0x4b47
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r15, %rdi
callq 0x3210
movq %rbx, %rdi
callq 0x3320