LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator+(double) const
Matrix Matrix::operator+ (const double rhs) const
{
  Matrix result(rows, cols);

  double *pResElem(result.pData);

  double *pElem(pData);

  for (int idx = 0; idx < nElem; ++idx)
  {
    *pResElem++ = *pElem++ + rhs;
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, -0x18(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edx
movl 0x8(%rsi), %esi
xorpd %xmm0, %xmm0
callq 0x12d02
movsd -0x18(%rbp), %xmm1
movq 0x10(%rbx), %rax
movq 0x10(%r14), %rcx
movl 0x4(%r14), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
cmpl %esi, %edx
je 0x1365b
movsd (%rcx,%rsi,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
jmp 0x13644
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator/(double) const
Matrix Matrix::operator/ (const double rhs) const
{
  if (rhs == 0.0)
  {
    throw(DIVBYZERO());
  }

  Matrix result(rows, cols);

  double *pResElem(result.pData);

  double *pElem(pData);

  for (int idx = 0; idx < nElem; ++idx)
  {
    *pResElem++ = *pElem++ / rhs;
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorpd %xmm1, %xmm1
movsd %xmm0, -0x18(%rbp)
ucomisd %xmm1, %xmm0
jne 0x1373e
jnp 0x13788
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edx
movl 0x8(%rsi), %esi
xorpd %xmm0, %xmm0
callq 0x12d02
movq 0x10(%rbx), %rax
movq 0x10(%r14), %rcx
movl 0x4(%r14), %edx
xorl %esi, %esi
movsd -0x18(%rbp), %xmm1
cmpl %edx, %esi
jge 0x1377c
movsd (%rcx,%rsi,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
jmp 0x13765
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x30e0
leaq 0x95d9(%rip), %rcx      # 0x1cd70
movq %rcx, (%rax)
leaq 0x9567(%rip), %rsi      # 0x1cd08
movq 0x9838(%rip), %rdx      # 0x1cfe0
movq %rax, %rdi
callq 0x3300
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator+=(Matrix)
void Matrix::operator+= (const Matrix rhs)
{
  if ((rows != rhs.rows) ||
      (cols != rhs.cols))
  {
    throw(DIMERR()); 
  }

  double *pElem(pData);
  double *pRhsElem(rhs.pData); 

  for (int idx = 0; idx < nElem; ++idx)
  {
    *pElem++ += *pRhsElem++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jne 0x137e9
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x137e9
movq 0x10(%rdi), %rax
movq 0x10(%rsi), %rcx
movl 0x4(%rdi), %edx
xorl %esi, %esi
cmpl %edx, %esi
jge 0x137e7
movsd (%rcx,%rsi,8), %xmm0
addsd (%rax,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
jmp 0x137cf
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x30e0
leaq 0x9550(%rip), %rcx      # 0x1cd48
movq %rcx, (%rax)
leaq 0x94ee(%rip), %rsi      # 0x1ccf0
movq 0x97d7(%rip), %rdx      # 0x1cfe0
movq %rax, %rdi
callq 0x3300
nop
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator*=(Matrix)
void Matrix::operator*= (const Matrix rhs)
{
  if ((rows != rhs.rows) ||
      (cols != rhs.cols))
  {
    throw(DIMERR()); 
  }

  double *pElem(pData);
  double *pRhsElem(rhs.pData); 
    if (*pRhsElem == 0.0)
    {
      throw(DIVBYZERO());
    }

  for (int idx = 0; idx < nElem; ++idx)
  {
    *pElem++ *= *pRhsElem++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jne 0x138bd
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x138bd
movq 0x10(%rsi), %rax
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1389a
jnp 0x138d8
movq 0x10(%rdi), %rcx
movl 0x4(%rdi), %edx
xorl %esi, %esi
cmpl %edx, %esi
jge 0x138bb
movsd (%rax,%rsi,8), %xmm0
mulsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
jmp 0x138a3
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x30e0
leaq 0x947c(%rip), %rcx      # 0x1cd48
movq %rcx, (%rax)
leaq 0x941a(%rip), %rsi      # 0x1ccf0
jmp 0x138f1
pushq $0x8
popq %rdi
callq 0x30e0
leaq 0x9489(%rip), %rcx      # 0x1cd70
movq %rcx, (%rax)
leaq 0x9417(%rip), %rsi      # 0x1cd08
movq 0x96e8(%rip), %rdx      # 0x1cfe0
movq %rax, %rdi
callq 0x3300
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator/=(double)
void Matrix::operator/= (const double rhs)
{
  if (rhs == 0.0)
  {
    throw(DIVBYZERO());
  }

  double *pElem(pData);

  for (int idx = 0; idx < nElem; ++idx)
  {
    *pElem++ /= rhs;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x13a1a
jnp 0x13a3c
movq 0x10(%rdi), %rax
movl 0x4(%rdi), %ecx
xorl %edx, %edx
cmpl %ecx, %edx
jge 0x13a3a
movsd (%rax,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rdx,8)
incq %rdx
jmp 0x13a23
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x30e0
leaq 0x9325(%rip), %rcx      # 0x1cd70
movq %rcx, (%rax)
leaq 0x92b3(%rip), %rsi      # 0x1cd08
movq 0x9584(%rip), %rdx      # 0x1cfe0
movq %rax, %rdi
callq 0x3300
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::DotProduct(Matrix)
double Matrix::DotProduct(Matrix arg)
{
  double result(0.0);

  if ((arg.nElem != nElem) &&
      ((arg.rows != 1) || (arg.cols != 1)) &&
      ((rows != 1) || (cols != 1)))
  {
    throw (DIMERR());
  }

  for (int idx = 0; idx < nElem; ++idx)
  {
    result += pData[idx] * arg.pData[idx];
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rdi), %eax
cmpl %eax, 0x4(%rsi)
je 0x14066
cmpl $0x1, 0x8(%rsi)
jne 0x1405b
cmpl $0x1, (%rsi)
je 0x14066
cmpl $0x1, 0x8(%rdi)
jne 0x14093
cmpl $0x1, (%rdi)
jne 0x14093
movq 0x10(%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
xorpd %xmm0, %xmm0
cmpq %rdx, %rax
je 0x14091
movsd (%rcx,%rdx,8), %xmm1
movq 0x10(%rsi), %rdi
mulsd (%rdi,%rdx,8), %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x14075
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x30e0
leaq 0x8ca6(%rip), %rcx      # 0x1cd48
movq %rcx, (%rax)
leaq 0x8c44(%rip), %rsi      # 0x1ccf0
movq 0x8f2d(%rip), %rdx      # 0x1cfe0
movq %rax, %rdi
callq 0x3300
nop
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Transpose()
Matrix Matrix::Transpose()
{
  Matrix result(cols, rows);

  for (int row = 0; row < rows; ++row)
  {
    for (int col = 0; col < cols; ++col)
    {
      result[col][row] = (*this)[row][col];
    }
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
movl 0x8(%r14), %edx
xorps %xmm0, %xmm0
callq 0x12d02
xorl %r15d, %r15d
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jge 0x1412c
xorl %r12d, %r12d
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x14127
movq %r14, %rdi
movl %r15d, %esi
callq 0x1324e
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x28(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1324e
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r12
jmp 0x140ee
incq %r15
jmp 0x140e2
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x12dd8
movq %r14, %rdi
callq 0x3320
nop
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::IsSymmetric(double)
bool Matrix::IsSymmetric(double tol)
{
  int    col(0);
  bool   done(false);
  double eps(0.0);
  bool   result(true);
  int    row(0);

  std::numeric_limits<double> lim;

  eps = lim.min();

  if (tol == 0.0)
  {
    //
    // The default value of tol is 0.0, so no tolerance was provided.  Use
    // machine epsilon.
    //
    tol = eps;
  }

  if (rows != cols)
  {
    result = false;
  }
  else
  {
    while (!done)
    {
      if (row >= rows)
      {
        done = true;
      }

      while ((col <= row) && !done)
      {
        if (!WithinTolerance((*this)[row][col], (*this)[col][row], tol))
        {
          result = false;
          done = true;
        }
        ++col;
      }
      col = 0;
      ++row;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl 0x8(%rdi), %eax
cmpl (%rdi), %eax
jne 0x14217
movq %rdi, %rbx
xorpd %xmm2, %xmm2
cmpeqsd %xmm0, %xmm2
movsd 0x3428(%rip), %xmm1     # 0x175a8
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movapd %xmm2, -0x40(%rbp)
movb $0x1, %r14b
xorl %r15d, %r15d
xorl %r13d, %r13d
testb $0x1, %r13b
jne 0x1421a
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
movzbl %r13b, %r13d
pushq $0x1
popq %rax
cmovgel %eax, %r13d
xorl %r12d, %r12d
cmpq %r15, %r12
ja 0x14212
testb $0x1, %r13b
jne 0x14212
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1324e
movsd (%rax,%r12,8), %xmm0
movaps %xmm0, -0x50(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1324e
movapd -0x50(%rbp), %xmm1
subsd (%rax,%r15,8), %xmm1
andpd 0x13ad(%rip), %xmm1     # 0x155a0
movapd -0x40(%rbp), %xmm0
ucomisd %xmm1, %xmm0
setae %al
movzbl %r13b, %r13d
pushq $0x1
popq %rcx
cmovbl %ecx, %r13d
andb %al, %r14b
incq %r12
jmp 0x141b5
incq %r15
jmp 0x1419a
xorl %r14d, %r14d
andb $0x1, %r14b
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Minor(double, double)
double Matrix::Minor(double row_, double col_)
{
  int    minCol(0);
  Matrix minMat(rows-1, cols-1);
  double result(0);
  int    minRow(0);

  for (int row = 0; row < rows; ++row)
  {
    if (row != row_)
    {
      for (int col = 0; col < cols; ++col)
      {
        if  (col != col_)
        {
          minMat[minRow][minCol] = (*this)[row][col];
          ++minCol;
        }
      }
      ++minRow;
      minCol = 0;
    }
  }

  result = minMat.Det();

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm1, -0x40(%rbp)
movsd %xmm0, -0x38(%rbp)
movq %rdi, %rbx
movl (%rdi), %edx
movl 0x8(%rdi), %esi
decl %esi
decl %edx
leaq -0x58(%rbp), %rdi
xorpd %xmm0, %xmm0
callq 0x12d02
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpl 0x8(%rbx), %r12d
jge 0x14508
cvtsi2sd %r12d, %xmm0
ucomisd -0x38(%rbp), %xmm0
jne 0x144ac
jnp 0x14503
xorl %r13d, %r13d
xorl %r14d, %r14d
movslq (%rbx), %rax
cmpq %rax, %r13
jge 0x14500
cvtsi2sd %r13d, %xmm0
ucomisd -0x40(%rbp), %xmm0
jne 0x144c8
jnp 0x144fb
movq %rbx, %rdi
movl %r12d, %esi
callq 0x1324e
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x58(%rbp), %rdi
movl %r15d, %esi
callq 0x1324e
movslq %r14d, %r14
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax,%r14,8)
incl %r14d
incq %r13
jmp 0x144b2
incl %r15d
incl %r12d
jmp 0x14498
leaq -0x58(%rbp), %rdi
callq 0x1426e
movsd %xmm0, -0x30(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x12dd8
movsd -0x30(%rbp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14535
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x12dd8
movq %rbx, %rdi
callq 0x3320
nop
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Eye(int)
void Matrix::Eye(int size)
{
  int idx(0);

  Resize(size, size);

  for (idx = 0; idx < rows; ++idx)
  {
    pData[idx * cols + idx] = 1.0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movl %esi, %edx
callq 0x12dfc
movslq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movl (%rbx), %edx
incl %edx
xorl %esi, %esi
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
xorl %r8d, %r8d
cmpq %rax, %r8
jge 0x149b1
movslq %esi, %rsi
movq %rdi, (%rcx,%rsi,8)
incq %r8
addl %edx, %esi
jmp 0x1499e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: MATRIX::operator+(double, Matrix)
Matrix operator+ (const double lhs, Matrix rhs)
{
  Matrix result(rhs.NumRows(), rhs.NumCols());

  for (int row = 0; row < rhs.NumRows(); ++row)
  {
    for (int col = 0; col < rhs.NumCols(); ++col)
    {
      result[row][col] = lhs + rhs[row][col];
    }
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movsd %xmm0, -0x28(%rbp)
movq %rdi, %rbx
movl (%rsi), %edx
movl 0x8(%rsi), %esi
xorpd %xmm0, %xmm0
callq 0x12d02
xorl %r15d, %r15d
cmpl 0x8(%r14), %r15d
jge 0x14a62
xorl %r12d, %r12d
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x14a5d
movq %r14, %rdi
movl %r15d, %esi
callq 0x1324e
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1324e
movsd -0x30(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r12
jmp 0x14a1f
incl %r15d
jmp 0x14a16
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x12dd8
movq %r14, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O2/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: MATRIX::operator/(double, Matrix)
Matrix operator/ (const double lhs, Matrix rhs)
{
  Matrix result(rhs.NumRows(), rhs.NumCols());

  for (int row = 0; row < rhs.NumRows(); ++row)
  {
    for (int col = 0; col < rhs.NumCols(); ++col)
    {
      if (rhs[row][col] == 0.0)
      {
        throw(Matrix::DIVBYZERO());
      }
      result[row][col] = lhs / rhs[row][col];
    }
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movsd %xmm0, -0x28(%rbp)
movq %rdi, %rbx
movl (%rsi), %edx
movl 0x8(%rsi), %esi
xorpd %xmm0, %xmm0
callq 0x12d02
xorl %r15d, %r15d
cmpl 0x8(%r14), %r15d
jge 0x14c4d
xorl %r12d, %r12d
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x14c48
movq %r14, %rdi
movl %r15d, %esi
callq 0x1324e
movsd (%rax,%r12,8), %xmm0
ucomisd 0x9ba(%rip), %xmm0      # 0x155c8
jne 0x14c12
jnp 0x14c5d
movq %r14, %rdi
movl %r15d, %esi
callq 0x1324e
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1324e
movsd -0x28(%rbp), %xmm0
divsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r12
jmp 0x14bed
incl %r15d
jmp 0x14be4
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x30e0
leaq 0x8104(%rip), %rcx      # 0x1cd70
movq %rcx, (%rax)
leaq 0x8092(%rip), %rsi      # 0x1cd08
movq 0x8363(%rip), %rdx      # 0x1cfe0
movq %rax, %rdi
callq 0x3300
jmp 0x14c87
movq %rax, %r14
movq %rbx, %rdi
callq 0x12dd8
movq %r14, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O2/statgen[P]statgen/lib/tclap-1.2.0/examples/test18.cpp
// Function: main
int main(int argc, char** argv)
{
	try {

		CmdLine cmd("Command description message", ' ', "0.9", true);

		cmd.setExceptionHandling(false);

		cmd.parse(argc, argv);

	} catch (ArgException &e) { // catch any exceptions
		cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
		return 1;
	} catch (ExitException &e) { // catch any exceptions
		cerr << "Exiting on ExitException." << endl;
		return e.getExitStatus();
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x4bdf(%rip), %rsi      # 0x8022
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x38be
leaq 0x4be5(%rip), %rsi      # 0x803e
leaq 0x30(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x38be
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x20
popq %rdx
leaq 0x30(%rsp), %rcx
pushq $0x1
popq %r8
callq 0x42e2
leaq 0x30(%rsp), %rdi
callq 0x3308
leaq 0x10(%rsp), %rdi
callq 0x3308
leaq 0x50(%rsp), %rdi
movb $0x0, 0xd8(%rdi)
movl %ebp, %esi
movq %rbx, %rdx
callq 0x4450
leaq 0x50(%rsp), %rdi
callq 0x423e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x423e
jmp 0x3503
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3308
jmp 0x34f1
movq %rdx, %r14
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3308
jmp 0x3503
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x2, %r14d
jne 0x359e
movq %rbx, %rdi
callq 0x3090
movq %rax, %rbx
movq 0x9ad1(%rip), %rdi      # 0xcff0
leaq 0x4b36(%rip), %rsi      # 0x805c
callq 0x3170
movq %rax, %r14
leaq 0x8(%rbx), %rsi
leaq 0x50(%rsp), %rdi
callq 0x3200
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x3160
leaq 0x4b14(%rip), %rsi      # 0x8064
movq %rax, %rdi
callq 0x3170
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x4508
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3160
movq %rax, %rdi
callq 0x30c0
leaq 0x10(%rsp), %rdi
callq 0x3308
leaq 0x50(%rsp), %rdi
callq 0x3308
callq 0x3260
pushq $0x1
popq %rbx
jmp 0x34b9
cmpl $0x1, %r14d
jne 0x360a
movq %rbx, %rdi
callq 0x3090
movq %rax, %rbx
movq 0x9a3a(%rip), %rdi      # 0xcff0
leaq 0x4a85(%rip), %rsi      # 0x8042
callq 0x3170
movq %rax, %rdi
callq 0x30c0
movl (%rbx), %ebx
callq 0x3260
jmp 0x34b9
jmp 0x35f8
jmp 0x35da
movq %rax, %rbx
jmp 0x3605
movq %rax, %rbx
callq 0x3260
jmp 0x360a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3308
jmp 0x35fb
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3308
callq 0x3260
movq %rbx, %rdi
callq 0x3280
movq %rax, %rdi
callq 0x41e8
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/absInt.cc
// Function: main
int main() {
	vector<int> vi;
	int i;
	while (cin >> i)
		vi.push_back(i);
	// pass a lambda to for_each to print each element in vi
	for_each(vi.begin(), vi.end(), [](int i) { cout << i << " "; });
	cout << endl;

	vector<int> orig = vi; // save original data in vi

	// replace negative values by their absolute value
	transform(vi.begin(), vi.end(), vi.begin(),
	          [](int i) { return i < 0 ? -i : i; });
	// print the elements now in vi
	for_each(vi.begin(), vi.end(), [](int i) { cout << i << " "; });
	cout << endl;

	vi = orig;  // start afresh
	// use a lambda with a specified return type to transform vi
	transform(vi.begin(), vi.end(), vi.begin(),
	          [](int i) -> int 
	          { if (i < 0) return -i; else return i; });
	// print the elements now in vi
	for_each(vi.begin(), vi.end(), [](int i) { cout << i << " "; });
	cout << endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
leaq -0x40(%rbp), %rbx
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq 0x2d5f(%rip), %r14      # 0x3fe0
leaq -0x44(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1080
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x12ab
movq %rbx, %rdi
movq %r15, %rsi
callq 0x140e
jmp 0x1285
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
movq 0x2d16(%rip), %rbx      # 0x3fd0
leaq 0xd5d(%rip), %r14       # 0x201e
cmpq %r12, %r15
je 0x12e2
movl (%r15), %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
addq $0x4, %r15
jmp 0x12c1
movq 0x2ce7(%rip), %rdi      # 0x3fd0
callq 0x1060
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1434
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
movq %r15, %rax
cmpq %r12, %rax
je 0x131c
movl (%rax), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
movl %edx, (%rax)
addq $0x4, %rax
jmp 0x1306
movq 0x2cad(%rip), %rbx      # 0x3fd0
leaq 0xcf4(%rip), %r14       # 0x201e
cmpq %r12, %r15
je 0x134b
movl (%r15), %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
addq $0x4, %r15
jmp 0x132a
movq 0x2c7e(%rip), %rdi      # 0x3fd0
callq 0x1060
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x148c
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
movq %r15, %rax
cmpq %r12, %rax
je 0x1385
movl (%rax), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
movl %edx, (%rax)
addq $0x4, %rax
jmp 0x136f
movq 0x2c44(%rip), %rbx      # 0x3fd0
leaq 0xc8b(%rip), %r14       # 0x201e
cmpq %r12, %r15
je 0x13b4
movl (%r15), %esi
movq %rbx, %rdi
callq 0x1100
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
addq $0x4, %r15
jmp 0x1393
movq 0x2c15(%rip), %rdi      # 0x3fd0
callq 0x1060
leaq -0x60(%rbp), %rdi
callq 0x156e
leaq -0x40(%rbp), %rdi
callq 0x156e
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13f9
jmp 0x13f9
jmp 0x13e9
jmp 0x13e9
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x156e
jmp 0x13fc
jmp 0x13f9
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x156e
movq %rbx, %rdi
callq 0x1110
nop
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::TcpMessage(unsigned short, unsigned short, unsigned short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
TcpMessage::TcpMessage(uint16_t seq, uint16_t ack, uint16_t recvWind, string tcpFlags) {
	seqNum = seq;
	ackNum = ack;
	recvWindow = recvWind;
	setFlag(tcpFlags);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movabsq $0x3c00d903d903, %rax   # imm = 0x3C00D903D903
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
leaq 0x1bb9(%rip), %rsi      # 0x4089
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x2780
movw %r13w, (%rbx)
movw %r12w, 0x2(%rbx)
movw %bp, 0x4(%rbx)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x2270
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2532
movq %r14, %rdi
callq 0x20d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::setFlag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool TcpMessage::setFlag(string flag) {
    for (size_t i = 0; i < flag.size(); i++){
        switch (flag[i]) {
            case 'A':
            case 'a':
                flags |= ACK_FLAG;
                break;
            case 'F':
            case 'f':
                flags |= FIN_FLAG;
                break;
            case 'S':
            case 's':
                flags |= SYN_FLAG;
                break;
            default:
                // cerr << "flag parameter must be A, F or S";
                return false;
        }
    }
    return true;
}

// Assembly:
movq 0x8(%rsi), %rax
movzwl 0x6(%rdi), %r10d
xorl %ecx, %ecx
movabsq $0x100000001, %rdx      # imm = 0x100000001
movabsq $0x2000000020, %r8      # imm = 0x2000000020
movabsq $0x4000000040000, %r9   # imm = 0x4000000040000
cmpq %rcx, %rax
je 0x25ab
movq (%rsi), %r11
movzbl (%r11,%rcx), %r11d
addl $-0x41, %r11d
cmpl $0x32, %r11d
ja 0x25ab
btq %r11, %rdx
jb 0x2592
btq %r11, %r8
jb 0x258b
btq %r11, %r9
jae 0x25ab
movw $0x2, %r11w
jmp 0x2597
movw $0x1, %r11w
jmp 0x2597
movw $0x4, %r11w
movzwl %r11w, %r11d
orl %r10d, %r11d
movw %r11w, 0x6(%rdi)
incq %rcx
movl %r11d, %r10d
jmp 0x255b
cmpq %rax, %rcx
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::getFlag(char)
bool TcpMessage::getFlag(char flag) {
    switch (flag) {
        case 'A':
        case 'a':
            return !!(flags & ACK_FLAG);
        case 'F':
        case 'f':
            return !!(flags & FIN_FLAG);
        case 'S':
        case 's':
            return !!(flags & SYN_FLAG);
        default:
            // cerr << "flag parameter must be A, F or S";
            return false;
    }
}

// Assembly:
xorl %eax, %eax
addl $-0x41, %esi
cmpl $0x32, %esi
ja 0x2619
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rsi, %rcx
jb 0x2620
movabsq $0x2000000020, %rcx     # imm = 0x2000000020
btq %rsi, %rcx
jb 0x261a
movabsq $0x4000000040000, %rcx  # imm = 0x4000000040000
btq %rsi, %rcx
jae 0x2619
movb 0x6(%rdi), %al
andb $0x2, %al
shrb %al
retq
movb 0x6(%rdi), %al
andb $0x1, %al
retq
movb 0x6(%rdi), %al
andb $0x4, %al
shrb $0x2, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::bufferToMessage(unsigned char*, unsigned long)
void TcpMessage::bufferToMessage(uint8_t* buf, size_t size) {
    seqNum = ((buf[0] << 8) + buf[1]);
    ackNum = ((buf[2] << 8) + buf[3]);
    recvWindow = ((buf[4] << 8) + buf[5]);
    flags =  buf[7] & 0xff;
    data.assign((char*)buf+8, size-8);
    return;
   
}

// Assembly:
movzwl (%rsi), %eax
rolw $0x8, %ax
movw %ax, (%rdi)
movzwl 0x2(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rdi)
movzwl 0x4(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0x4(%rdi)
movzbl 0x7(%rsi), %eax
movw %ax, 0x6(%rdi)
addq $0x8, %rdi
addq $0x8, %rsi
addq $-0x8, %rdx
jmp 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::sendto(int, sockaddr_in*, unsigned int)
void TcpMessage::sendto(int sockfd, sockaddr_in *si_other, socklen_t len) {
	uint8_t buf[BUFFER_SIZE];
	size_t msgLen = messageToBuffer(buf);
	if (::sendto(sockfd, buf, msgLen, 0, (sockaddr*)si_other, len) == -1) {
		perror("sendto");
		exit(1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rsp, %r15
movq %r15, %rsi
callq 0x2666
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r14, %r8
movl %ebx, %r9d
callq 0x2040
cmpq $-0x1, %rax
je 0x26fc
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1901(%rip), %rdi      # 0x4004
callq 0x2160
pushq $0x1
popq %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::recvfrom(int, sockaddr_in*, unsigned int)
int TcpMessage::recvfrom(int sockfd, sockaddr_in *si_other, socklen_t len) {
	uint8_t buf[BUFFER_SIZE];
	int recv_len = ::recvfrom(sockfd, buf, BUFFER_SIZE, 0, (sockaddr*)si_other, &len);
	if (recv_len == -1) {
		if (errno == EWOULDBLOCK) {
			// cerr << "timeout\n";
			return RECV_TIMEOUT;
		}	
		perror("recvfrom");
		exit(1);
	}
	bufferToMessage(buf, recv_len);
	return RECV_SUCCESS;
}

// Assembly:
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq %rdx, %r8
movl %esi, %eax
movq %rdi, %rbx
leaq 0xc(%rsp), %r9
movl %ecx, (%r9)
leaq 0x10(%rsp), %rsi
movl $0x408, %edx            # imm = 0x408
movl %eax, %edi
xorl %ecx, %ecx
callq 0x2130
cmpl $-0x1, %eax
jne 0x274e
callq 0x2030
cmpl $0xb, (%rax)
jne 0x276a
pushq $0x2
jmp 0x2760
movslq %eax, %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x262a
pushq $0x1
popq %rax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
retq
leaq 0x189a(%rip), %rdi      # 0x400b
callq 0x2160
pushq $0x1
popq %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/Utils.cpp
// Function: timeval_subtract(timeval*, timeval*, timeval*)
int
timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
{
  /* Perform the carry for the later subtraction by updating y. */
  if (x->tv_usec < y->tv_usec) {
    int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
    y->tv_usec -= 1000000 * nsec;
    y->tv_sec += nsec;
  }
  if (x->tv_usec - y->tv_usec > 1000000) {
    int nsec = (x->tv_usec - y->tv_usec) / 1000000;
    y->tv_usec += 1000000 * nsec;
    y->tv_sec -= nsec;
  }

  /* Compute the time remaining to wait.
     tv_usec is certainly positive. */
  result->tv_sec = x->tv_sec - y->tv_sec;
  result->tv_usec = x->tv_usec - y->tv_usec;

  /* Return 1 if result is negative. */
  return x->tv_sec < y->tv_sec;
}

// Assembly:
movq %rdx, %rcx
movq 0x8(%rsi), %rax
movq (%rdx), %r8
movq 0x8(%rdx), %r9
movq %r9, %rdx
subq %rax, %rdx
jle 0x28c8
movl $0xf4240, %r10d         # imm = 0xF4240
movq %rdx, %rax
cqto
idivq %r10
incl %eax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
movslq %edx, %rdx
subq %rdx, %r9
movq %r9, 0x8(%rcx)
cltq
addq %rax, %r8
movq %r8, (%rcx)
movq 0x8(%rsi), %rax
subq %r9, %rax
cmpq $0xf4241, %rax          # imm = 0xF4241
jl 0x2906
movl $0xf4240, %r10d         # imm = 0xF4240
xorl %edx, %edx
divq %r10
movabsq $0xf424000000000, %rdx  # imm = 0xF424000000000
imulq %rax, %rdx
sarq $0x20, %rdx
addq %r9, %rdx
movq %rdx, 0x8(%rcx)
cltq
subq %rax, %r8
movq %r8, (%rcx)
movq 0x8(%rsi), %rax
subq %rdx, %rax
movq (%rsi), %rdx
subq %r8, %rdx
movq %rdx, (%rdi)
movq %rax, 0x8(%rdi)
movq (%rsi), %rdx
xorl %eax, %eax
cmpq (%rcx), %rdx
setl %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/Utils.cpp
// Function: setSocketTimeout(int, timeval)
void setSocketTimeout(int sockfd, timeval tv) {
	int r = setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (void*)&tv, sizeof(tv));
	if (r == -1) {
		perror("setsockopt");
		exit(1);
	}
}

// Assembly:
subq $0x18, %rsp
leaq 0x8(%rsp), %rcx
movq %rsi, (%rcx)
movq %rdx, 0x8(%rcx)
pushq $0x1
popq %rsi
pushq $0x14
popq %rdx
pushq $0x10
popq %r8
callq 0x2310
cmpl $-0x1, %eax
je 0x2948
addq $0x18, %rsp
retq
leaq 0x16ef(%rip), %rdi      # 0x403e
callq 0x2160
pushq $0x1
popq %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/Utils.cpp
// Function: timeRemaining(timeval)
timeval timeRemaining(timeval start) {
	timeval end = start;
	end.tv_usec += TIMEOUT * 1000;
	if (end.tv_usec >= 1000000) { // carry over
		end.tv_sec += 1;
		end.tv_usec -= 1000000;
	}
	timeval n = now();

	timeval result;
	int r = timeval_subtract(&result, &end, &n);

	// make result zero if negative
	if (r == 1) {
		result.tv_sec = 0;
		result.tv_usec = 0;
	}
	return result;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x8(%rsp)
movl $0x7a120, %eax          # imm = 0x7A120
leaq (%rsi,%rax), %rcx
movq %rcx, 0x10(%rsp)
cmpq %rax, %rsi
jl 0x29ab
incq %rdi
movq %rdi, 0x8(%rsp)
addq $-0x7a120, %rsi         # imm = 0xFFF85EE0
movq %rsi, 0x10(%rsp)
callq 0x295c
leaq 0x28(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rcx, %rdx
callq 0x2886
testl %eax, %eax
jne 0x29de
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rax
jmp 0x29e2
xorl %edx, %edx
xorl %eax, %eax
addq $0x38, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/m1c0l[P]TCP/client.cpp
// Function: printSend(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned short, bool)
void printSend(string pktType, uint16_t ack, bool isRetransmit) {
	cout << "Sending packet";
	if (pktType != "SYN") {
   		cout << " " << ack;
	}
	if (isRetransmit) {
		cout << " Retransmission";
	}
	if (pktType != "ACK") {
		// SYN or FIN
		cout << " " << pktType;
	}
	cout << '\n';
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x458d(%rip), %rdi      # 0x6fc8
leaq 0x1619(%rip), %rsi      # 0x405b
callq 0x21b0
leaq 0x161c(%rip), %rsi      # 0x406a
movq %rbx, %rdi
callq 0x3673
testb %al, %al
je 0x2a79
movq 0x4567(%rip), %rdi      # 0x6fc8
leaq 0x1620(%rip), %rsi      # 0x4088
callq 0x21b0
movzwl %r14w, %esi
movq %rax, %rdi
callq 0x22f0
testb %bpl, %bpl
je 0x2a91
movq 0x4543(%rip), %rdi      # 0x6fc8
leaq 0x15e2(%rip), %rsi      # 0x406e
callq 0x21b0
leaq 0x15e6(%rip), %rsi      # 0x407e
movq %rbx, %rdi
callq 0x3673
testb %al, %al
je 0x2ac2
movq 0x451d(%rip), %rdi      # 0x6fc8
leaq 0x15d6(%rip), %rsi      # 0x4088
callq 0x21b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2180
movq 0x44ff(%rip), %rdi      # 0x6fc8
pushq $0xa
popq %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/eschwabe[P]interview-practice/src/reversewords.cpp
// Function: ReverseWords(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string ReverseWords(const string& str) {
    string rstr = str;
    reverse(rstr.begin(), rstr.end());

    auto word_start = rstr.begin();
    auto word_end = word_start;

    while(word_start != rstr.end() && word_end != rstr.end()) {

        while(word_start != rstr.end() && (*word_start) == ' ') {
            word_start++;
        }

        word_end = word_start;
        while(word_end != rstr.end() && (*word_end) != ' ') {
            word_end++;
        }

        reverse(word_start, word_end);

        word_start = word_end;
    }

    return rstr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10a0
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
callq 0x13a1
movq (%rbx), %r14
movq (%rbx), %rax
addq 0x8(%rbx), %rax
cmpq %rax, %r14
je 0x1265
movq %r14, %rdi
cmpq %rax, %rdi
je 0x1248
cmpb $0x20, (%rdi)
jne 0x1248
incq %rdi
jmp 0x1239
movq %rdi, %r14
cmpq %rax, %r14
je 0x125b
cmpb $0x20, (%r14)
je 0x125b
incq %r14
jmp 0x124b
movq %r14, %rsi
callq 0x13a1
jmp 0x122a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x1272
movq %rax, %r14
movq %rbx, %rdi
callq 0x1040
movq %r14, %rdi
callq 0x10c0
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<float>::exists(float)
bool DoubleLinkedList<T>::exists(T value) {
    DoubleListNode<T>* current = head_;
    while(current != nullptr) {
        if(current->value == value)
            return true;

        current = current->next;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
addq $0x8, %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x3d91
movss (%rax), %xmm1
leaq 0x10(%rax), %rdi
ucomiss %xmm0, %xmm1
jne 0x3d7a
jp 0x3d7a
testq %rax, %rax
setne %al
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<float>::add(float)
void DoubleLinkedList<T>::add(T value) {
    if(head_ == nullptr)
        head_ = new DoubleListNode<T>{ value, nullptr, tail_ };
        // tail = nullptr in this case
    else if(size_ == 1) {
        // Set tail to new value
        tail_ = new DoubleListNode<T>{ value, head_, nullptr };
        // Make head => tail (forward link)
        head_->next = tail_;
    }
    else {
        // Make a new node with the passed value that is backward linked to tail and forward linked to nullptr
        DoubleListNode<T>* neo = new DoubleListNode<T>{ value, tail_, nullptr };
        // Make tail => neo
        tail_->next = neo;
        // Make neo the new tail
        tail_ = neo;
    }

    size_++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movss %xmm0, -0x1c(%rbp)
movq %rdi, %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x3de7
movl 0x18(%rbx), %r14d
pushq $0x18
popq %rdi
callq 0x3140
movss -0x1c(%rbp), %xmm0
movss %xmm0, (%rax)
cmpl $0x1, %r14d
jne 0x3e0f
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movq %rax, 0x10(%rbx)
movq %rax, 0x10(%r15)
pushq $0x1
popq %r14
jmp 0x3e24
pushq $0x18
popq %rdi
callq 0x3140
movss -0x1c(%rbp), %xmm0
movss %xmm0, (%rax)
andq $0x0, 0x8(%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x8(%rbx)
movl 0x18(%rbx), %r14d
jmp 0x3e24
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
andq $0x0, 0x10(%rax)
movq %rax, 0x10(%rcx)
movq %rax, 0x10(%rbx)
incl %r14d
movl %r14d, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::remove()
void DoubleLinkedList<T>::remove() {
    DoubleListNode<T>* oldTail = tail_;
    // Make tail the previous value
    tail_ = tail_->previous;
    // Forward link it to nullptr
    tail_->next = nullptr;
    // decrement size
    size_--;

    delete oldTail;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
movq 0x20(%rbx), %rax
movq %rax, 0x10(%rdi)
andq $0x0, 0x28(%rax)
decl 0x18(%rdi)
movq %rbx, %rdi
callq 0x30a0
pushq $0x30
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3150
nop
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void DoubleLinkedList<T>::remove(T value) {
    if(head_->value == value) {
        DoubleListNode<T>* oldHead = head_;
        head_ = head_->next;
        head_->previous = nullptr;
        delete oldHead;
        size_--;
        return;
    }

    DoubleListNode<T>* current = head_;
    while(current != nullptr) {
        if(current->value == value) {
            // If there is are values 1, 2, 3 that are linked to each other,
            // 1 => 3
            current->previous->next = current->next;
            // 1 <=  3 (backward link)
            current->next->previous = current->previous;

            // Delete the removed node
            delete current;
            size_--;
        }
        current = current->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x4694
testb %al, %al
je 0x4802
movq 0x8(%rbx), %r14
movq 0x28(%r14), %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x20(%rax)
movq %r14, %rdi
callq 0x30a0
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x3150
decl 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rbx), %r15
pushq $0x30
popq %r12
movq (%r15), %r15
testq %r15, %r15
je 0x47f9
movq %r15, %rdi
movq %r14, %rsi
callq 0x4694
testb %al, %al
je 0x4847
movq 0x20(%r15), %rax
movq 0x28(%r15), %rcx
movq %rcx, 0x28(%rax)
movq %rax, 0x20(%rcx)
movq %r15, %rdi
callq 0x30a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x3150
decl 0x18(%rbx)
addq $0x28, %r15
jmp 0x480a
nop
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<int>::toString[abi:cxx11]()
std::string DoubleLinkedList<T>::toString() {
    DoubleListNode<T>* current = head_;
    std::string output = "";
    while(current != nullptr) {
        if(current->next != nullptr) {
            // If type is Student
            if constexpr (std::is_same<T, Student>::value)
                output += current->value.toString(false) + " => ";
            // If type is std::string
            else if constexpr (std::is_same<T, std::string>::value)
                output += current->value + " => ";
            // Otherwise, it's a primitive
            else
                output += std::to_string(current->value) + " => ";
        }
        else {
            // If type is Student
            if constexpr (std::is_same<T, Student>::value)
                output += current->value.toString(false);
            // If type is std::string
            else if constexpr (std::is_same<T, std::string>::value)
                output += current->value;
            // Otherwise, it's a primitive
            else
                output += std::to_string(current->value);
        }

        current = current->next;
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r13
leaq 0x7db1(%rip), %rsi      # 0xb3be
leaq -0x48(%rbp), %r14
movq %r14, %rdx
callq 0x36d4
leaq -0x68(%rbp), %r15
leaq 0x79e0(%rip), %r12      # 0xb004
testq %r13, %r13
je 0x3687
cmpq $0x0, 0x10(%r13)
je 0x3662
movl (%r13), %esi
movq %r15, %rdi
callq 0x3738
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x370f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3220
movq %r14, %rdi
callq 0x30a0
movq %r15, %rdi
jmp 0x367c
movl (%r13), %esi
movq %r14, %rdi
callq 0x3738
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3220
movq %r14, %rdi
callq 0x30a0
movq 0x10(%r13), %r13
jmp 0x3624
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36b2
movq %rax, %r14
leaq -0x48(%rbp), %rdi
jmp 0x36be
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x30a0
jmp 0x36ba
movq %rax, %r14
jmp 0x36c3
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x30a0
movq %r14, %rdi
callq 0x31e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool LinkedList<T>::exists(T value) {
    ListNode<T>* current = head_;
    while(current != nullptr) {
        if(current->value == value)
            return true;

        current = current->next;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
addq $0x8, %rdi
movq (%rdi), %r14
testq %r14, %r14
je 0x6279
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4694
leaq 0x20(%r14), %rdi
testb %al, %al
je 0x625e
testq %r14, %r14
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<float>::add(float)
void LinkedList<T>::add(T value) {
    if(head_ == nullptr)
        head_ = new ListNode<T>{ value, tail_ };
        // tail = nullptr in this case
    else if(size_ == 1) {
        // Set tail to new value
        tail_ = new ListNode<T>{ value, nullptr };
        // Make head => tail (forward link)
        head_->next = tail_;
    }
    else {
        // Make a new node with the passed value that is forward linked to nullptr
        ListNode<T>* neo = new ListNode<T>{ value, nullptr };
        // Make tail => neo
        tail_->next = neo;
        // Make neo the new tail
        tail_ = neo;
    }

    size_++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movss %xmm0, -0x1c(%rbp)
movq %rdi, %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x5a4b
movl 0x18(%rbx), %r14d
pushq $0x10
popq %rdi
callq 0x3140
andq $0x0, 0x8(%rax)
movss -0x1c(%rbp), %xmm0
movss %xmm0, (%rax)
cmpl $0x1, %r14d
jne 0x5a6e
movq %rax, 0x10(%rbx)
movq %rax, 0x8(%r15)
pushq $0x1
popq %r14
jmp 0x5a7a
pushq $0x10
popq %rdi
callq 0x3140
movss -0x1c(%rbp), %xmm0
movss %xmm0, (%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x8(%rbx)
movl 0x18(%rbx), %r14d
jmp 0x5a7a
movq 0x10(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq %rax, 0x10(%rbx)
incl %r14d
movl %r14d, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::remove()
void LinkedList<T>::remove() {
    ListNode<T>* oldTail = tail_;
    ListNode<T>* previous = head_;

    while(previous->next != tail_)
        previous = previous->next;

    previous->next = nullptr;
    delete oldTail;

    size_--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %r14
movq %rax, %rcx
movq 0x20(%rax), %rax
cmpq %r14, %rax
jne 0x6348
andq $0x0, 0x20(%rcx)
testq %r14, %r14
je 0x6366
movq %r14, %rdi
callq 0x30a0
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x3150
decl 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void LinkedList<T>::remove(T value) {
    if(head_->value == value) {
        ListNode<T>* oldHead = head_;
        head_ = head_->next;
        delete oldHead;
        size_--;
        return;
    }

    ListNode<T>* previous = head_;
    ListNode<T>* current = head_->next;
    while(current != nullptr) {
        if(current->value == value) {
            // Make previous's next, current's next
            previous->next = current->next;
            // Delete the removed node
            delete current;
            size_--;
        }
        current = current->next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x4694
movq 0x8(%rbx), %r14
testb %al, %al
je 0x63cc
movq 0x20(%r14), %rax
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x30a0
pushq $0x28
popq %rsi
movq %r14, %rdi
callq 0x3150
decl 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x20, %r14
pushq $0x28
popq %r12
movq %r14, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x63bd
movq %r13, %rdi
movq %r15, %rsi
callq 0x4694
testb %al, %al
je 0x640c
movq 0x20(%r13), %rax
movq %rax, (%r14)
movq %r13, %rdi
callq 0x30a0
movq %r13, %rdi
movq %r12, %rsi
callq 0x3150
decl 0x18(%rbx)
addq $0x20, %r13
jmp 0x63d7
// File: /workspace/github_cpp_makefile_star2_O2/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<int>::toString[abi:cxx11]()
std::string LinkedList<T>::toString() {
    ListNode<T>* current = head_;
    std::string output = "";
    while(current != nullptr) {
        if(current->next != nullptr) {
            // If type is Student
            if constexpr (std::is_same<T, Student>::value)
                output += current->value.toString(false) + " => ";
            // If type is std::string
            else if constexpr (std::is_same<T, std::string>::value)
                output += current->value + " => ";
            // Otherwise, it's a primitive
            else
                output += std::to_string(current->value) + " => ";
        }
        else {
            // If type is Student
            if constexpr (std::is_same<T, Student>::value)
                output += current->value.toString(false);
            // If type is std::string
            else if constexpr (std::is_same<T, std::string>::value)
                output += current->value;
            // Otherwise, it's a primitive
            else
                output += std::to_string(current->value);
        }

        current = current->next;
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r13
leaq 0x6063(%rip), %rsi      # 0xb3be
leaq -0x48(%rbp), %r14
movq %r14, %rdx
callq 0x36d4
leaq -0x68(%rbp), %r15
leaq 0x5c92(%rip), %r12      # 0xb004
testq %r13, %r13
je 0x53d5
cmpq $0x0, 0x8(%r13)
je 0x53b0
movl (%r13), %esi
movq %r15, %rdi
callq 0x3738
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x370f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3220
movq %r14, %rdi
callq 0x30a0
movq %r15, %rdi
jmp 0x53ca
movl (%r13), %esi
movq %r14, %rdi
callq 0x3738
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3220
movq %r14, %rdi
callq 0x30a0
movq 0x8(%r13), %r13
jmp 0x5372
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5400
movq %rax, %r14
leaq -0x48(%rbp), %rdi
jmp 0x540c
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x30a0
jmp 0x5408
movq %rax, %r14
jmp 0x5411
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x30a0
movq %r14, %rdi
callq 0x31e0
nop