LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator*(Matrix) const
Matrix Matrix::operator* (const Matrix rhs) const
{
  if (cols != rhs.rows)
  {
    throw(DIMERR()); 
  }

  Matrix result(rows, rhs.cols);

  double *pResElem(result.pData);
  double *pRhsCol(rhs.pData);
  double *pLhsRow(pData);

  for (int lhsRow = 0; lhsRow < rows; ++lhsRow)
  {
    for (int rhsCol = 0; rhsCol < rhs.cols; ++rhsCol)
    {
      pLhsRow = pData + lhsRow * cols;
      pRhsCol = rhs.pData + rhsCol;
      for (int resIdx = 0; resIdx < cols; ++resIdx)
      {
        *pResElem += *pLhsRow++ * *pRhsCol;
        pRhsCol += rhs.cols; 
      }
      ++pResElem;
    }
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %eax
cmpl 0x8(%rdx), %eax
jne 0x13d70
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x8(%rsi), %esi
movl (%rdx), %edx
xorpd %xmm0, %xmm0
callq 0x13382
movslq 0x8(%r15), %rax
testq %rax, %rax
jle 0x13d5e
movq 0x10(%r14), %rcx
movl (%rbx), %edx
movq 0x10(%r15), %rsi
movl (%r15), %edi
movslq %edx, %r8
movslq %edi, %r9
shlq $0x3, %r9
shlq $0x3, %r8
xorl %r10d, %r10d
testl %edx, %edx
jle 0x13d53
movq 0x10(%rbx), %r11
xorl %r15d, %r15d
testl %edi, %edi
jle 0x13d43
movsd (%rcx), %xmm0
movq %r11, %r12
xorl %r13d, %r13d
movsd (%rsi,%r13,8), %xmm1
mulsd (%r12), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx)
incq %r13
addq %r8, %r12
cmpl %r13d, %edi
jne 0x13d24
addq $0x8, %rcx
incq %r15
addq $0x8, %r11
cmpq %rdx, %r15
jne 0x13d16
incq %r10
addq %r9, %rsi
cmpq %rax, %r10
jne 0x13d0b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x30b0
leaq 0x9fc7(%rip), %rcx      # 0x1dd48
movq %rcx, (%rax)
leaq 0x9f65(%rip), %rsi      # 0x1dcf0
movq 0xa24e(%rip), %rdx      # 0x1dfe0
movq %rax, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13382
movsd -0x18(%rbp), %xmm1
movl 0x4(%r14), %eax
testl %eax, %eax
jle 0x13dea
movq 0x10(%r14), %rcx
movq 0x10(%rbx), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpl %esi, %eax
jne 0x13dd5
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13eca
jnp 0x13f16
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edx
movl 0x8(%rsi), %esi
xorpd %xmm0, %xmm0
callq 0x13382
movl 0x4(%r14), %eax
testl %eax, %eax
movsd -0x18(%rbp), %xmm1
jle 0x13f0a
movq 0x10(%r14), %rcx
movq 0x10(%rbx), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpl %esi, %eax
jne 0x13ef5
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x8, %edi
callq 0x30b0
leaq 0x9e49(%rip), %rcx      # 0x1dd70
movq %rcx, (%rax)
leaq 0x9dd7(%rip), %rsi      # 0x1dd08
movq 0xa0a8(%rip), %rdx      # 0x1dfe0
movq %rax, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13f7b
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x13f7b
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0x13f79
movq 0x10(%rsi), %rcx
movq 0x10(%rdi), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
addsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpl %esi, %eax
jne 0x13f63
popq %rbp
retq
movl $0x8, %edi
callq 0x30b0
leaq 0x9dbc(%rip), %rcx      # 0x1dd48
movq %rcx, (%rax)
leaq 0x9d5a(%rip), %rsi      # 0x1dcf0
movq 0xa043(%rip), %rdx      # 0x1dfe0
movq %rax, %rdi
callq 0x32b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x14057
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x14057
movq 0x10(%rsi), %rax
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x14032
jnp 0x14074
movl 0x4(%rdi), %ecx
testl %ecx, %ecx
jle 0x14055
movq 0x10(%rdi), %rdx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
mulsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpl %esi, %ecx
jne 0x1403f
popq %rbp
retq
movl $0x8, %edi
callq 0x30b0
leaq 0x9ce0(%rip), %rcx      # 0x1dd48
movq %rcx, (%rax)
leaq 0x9c7e(%rip), %rsi      # 0x1dcf0
jmp 0x1408f
movl $0x8, %edi
callq 0x30b0
leaq 0x9ceb(%rip), %rcx      # 0x1dd70
movq %rcx, (%rax)
leaq 0x9c79(%rip), %rsi      # 0x1dd08
movq 0x9f4a(%rip), %rdx      # 0x1dfe0
movq %rax, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x141b8
jnp 0x141dc
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0x141da
movq 0x10(%rdi), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x141c5
popq %rbp
retq
movl $0x8, %edi
callq 0x30b0
leaq 0x9b83(%rip), %rcx      # 0x1dd70
movq %rcx, (%rax)
leaq 0x9b11(%rip), %rsi      # 0x1dd08
movq 0x9de2(%rip), %rdx      # 0x1dfe0
movq %rax, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x148a6
cmpl $0x1, 0x8(%rsi)
jne 0x1489b
cmpl $0x1, (%rsi)
je 0x148a6
cmpl $0x1, 0x8(%rdi)
jne 0x148d6
cmpl $0x1, (%rdi)
jne 0x148d6
testl %eax, %eax
jle 0x148d0
movq 0x10(%rdi), %rcx
movq 0x10(%rsi), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x148b8
jmp 0x148d4
xorpd %xmm0, %xmm0
popq %rbp
retq
movl $0x8, %edi
callq 0x30b0
leaq 0x9461(%rip), %rcx      # 0x1dd48
movq %rcx, (%rax)
leaq 0x93ff(%rip), %rsi      # 0x1dcf0
movq 0x96e8(%rip), %rdx      # 0x1dfe0
movq %rax, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13382
movl 0x8(%r14), %ecx
testl %ecx, %ecx
jle 0x1497e
movl (%r14), %eax
xorl %r15d, %r15d
testl %eax, %eax
jle 0x14973
xorl %r12d, %r12d
movq %r14, %rdi
movl %r15d, %esi
callq 0x139a6
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x28(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x139a6
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x14938
movl 0x8(%r14), %ecx
incq %r15
movslq %ecx, %rdx
cmpq %rdx, %r15
jl 0x14931
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1499f
callq 0x3200
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
callq 0x32d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x14a84
movq %rdi, %rbx
xorpd %xmm2, %xmm2
cmpeqsd %xmm0, %xmm2
movsd 0x3bc8(%rip), %xmm1     # 0x185a8
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movapd %xmm2, -0x40(%rbp)
movb $0x1, %r14b
xorl %r15d, %r15d
xorl %r13d, %r13d
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
movzbl %r13b, %r13d
movl $0x1, %eax
cmovgel %eax, %r13d
testb $0x1, %r13b
jne 0x14a75
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x139a6
movsd (%rax,%r12,8), %xmm0
movaps %xmm0, -0x50(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x139a6
movapd -0x50(%rbp), %xmm1
subsd (%rax,%r15,8), %xmm1
andpd 0x1b56(%rip), %xmm1     # 0x165a0
movapd -0x40(%rbp), %xmm0
ucomisd %xmm1, %xmm0
setae %al
jae 0x14a60
movl $0x1, %r13d
jmp 0x14a64
movzbl %r13b, %r13d
andb %al, %r14b
cmpq %r15, %r12
jae 0x14a75
incq %r12
testb $0x1, %r13b
je 0x14a17
incq %r15
testb $0x1, %r13b
je 0x149fa
jmp 0x14a87
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
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
movsd %xmm1, -0x68(%rbp)
movsd %xmm0, -0x60(%rbp)
movq %rdi, %rbx
movl (%rdi), %r14d
movl 0x8(%rdi), %eax
movq %rax, -0x30(%rbp)
decl %eax
leal -0x1(%r14), %r12d
movl %eax, -0x50(%rbp)
movl %r12d, -0x58(%rbp)
imull %eax, %r12d
movl %r12d, -0x54(%rbp)
leaq (,%r12,8), %r15
testl %r12d, %r12d
movq $-0x1, %rdi
cmovnsq %r15, %rdi
callq 0x3030
movq %rax, %r13
movq %rax, -0x48(%rbp)
testl %r12d, %r12d
jle 0x14d75
movq %r13, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x30e0
movq %r13, -0x40(%rbp)
movq -0x30(%rbp), %rax
testl %eax, %eax
jle 0x14e0b
xorl %r15d, %r15d
movl $0x0, -0x34(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
ucomisd -0x60(%rbp), %xmm0
jne 0x14da0
jnp 0x14e03
testl %r14d, %r14d
jle 0x14e00
xorl %r12d, %r12d
xorl %r13d, %r13d
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
ucomisd -0x68(%rbp), %xmm0
jne 0x14dbc
jnp 0x14df2
movq %rbx, %rdi
movl %r15d, %esi
callq 0x139a6
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x58(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x139a6
movslq %r13d, %r13
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax,%r13,8)
incl %r13d
movl (%rbx), %r14d
incq %r12
movslq %r14d, %rax
cmpq %rax, %r12
jl 0x14dab
movl 0x8(%rbx), %eax
incl -0x34(%rbp)
incl %r15d
cmpl %eax, %r15d
jl 0x14d8f
leaq -0x58(%rbp), %rdi
callq 0x14adc
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x14e2c
movsd %xmm0, -0x30(%rbp)
callq 0x3200
movsd -0x30(%rbp), %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
testq %rax, %rax
jne 0x14e50
jmp 0x14e59
movq %rax, %rbx
movq -0x40(%rbp), %rdi
callq 0x3200
movq %rbx, %rdi
callq 0x32d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x134d0
movslq 0x8(%rbx), %rax
testq %rax, %rax
jle 0x1534c
movq 0x10(%rbx), %rcx
movl (%rbx), %edx
incl %edx
xorl %esi, %esi
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
movslq %esi, %rsi
movq %rdi, (%rcx,%rsi,8)
addl %edx, %esi
decq %rax
jne 0x1533e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13382
movl 0x8(%r14), %ecx
testl %ecx, %ecx
jle 0x15409
movl (%r14), %eax
xorl %r15d, %r15d
testl %eax, %eax
jle 0x15401
xorl %r12d, %r12d
movq %r14, %rdi
movl %r15d, %esi
callq 0x139a6
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x139a6
movsd -0x30(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x153c1
movl 0x8(%r14), %ecx
incl %r15d
cmpl %ecx, %r15d
jl 0x153ba
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1542a
callq 0x3200
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13382
movl 0x8(%r14), %ecx
testl %ecx, %ecx
jle 0x15648
movl (%r14), %eax
xorl %r15d, %r15d
testl %eax, %eax
jle 0x15640
xorl %r12d, %r12d
movq %r14, %rdi
movl %r15d, %esi
callq 0x139a6
movsd (%rax,%r12,8), %xmm0
ucomisd 0xfcc(%rip), %xmm0      # 0x165c8
jne 0x15600
jnp 0x15658
movq %r14, %rdi
movl %r15d, %esi
callq 0x139a6
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x139a6
movsd -0x28(%rbp), %xmm0
divsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x155e3
movl 0x8(%r14), %ecx
incl %r15d
cmpl %ecx, %r15d
jl 0x155dc
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x30b0
leaq 0x8707(%rip), %rcx      # 0x1dd70
movq %rcx, (%rax)
leaq 0x8695(%rip), %rsi      # 0x1dd08
movq 0x8966(%rip), %rdx      # 0x1dfe0
movq %rax, %rdi
callq 0x32b0
jmp 0x15684
movq %rax, %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x15695
callq 0x3200
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/test/units/redirect/redirect_srv.c
// Function: main
int main(int argc, char *argv[])
{
  scdc_init(SCDC_INIT_DEFAULT);

  TRACE_F("dataprov open");
  scdc_dataprov_t dp = scdc_dataprov_open(REDIRECT_TEST_SCDC_PATH, "hook", &redirect_test_hook);

  TRACE_F("nodeport open");
  scdc_nodeport_t np = scdc_nodeport_open("uds:socketname:max_connections", "redirect", 2);
/*  scdc_nodeport_t np = scdc_nodeport_open("tcp:max_connections", 2);*/

  TRACE_F("nodeport start");
  scdc_nodeport_start(np, SCDC_NODEPORT_START_ASYNC_UNTIL_CANCEL);

  printf(TRACE_PREFIX "Press <ENTER> to quit!\n");
  getchar();

  TRACE_F("nodeport stop");
  scdc_nodeport_stop(np);

  TRACE_F("nodeport close");
  scdc_nodeport_close(np);

  TRACE_F("dataprov close");
  scdc_dataprov_close(dp);

  scdc_release();

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x5da61(%rip), %rdi     # 0x6a4cd
xorl %eax, %eax
callq 0x182c1
movq 0x7e526(%rip), %r13     # 0x8afa0
movq (%r13), %rdi
leaq 0x5b57f(%rip), %rbx     # 0x68004
leaq 0x5b58b(%rip), %r14     # 0x68017
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7b0
movq (%r13), %rcx
leaq 0x5b578(%rip), %rdi     # 0x6801c
movl $0xd, %esi
movl $0x1, %edx
callq 0xbab0
movq (%r13), %rsi
movl $0xa, %edi
callq 0xb690
leaq 0x5b562(%rip), %r12     # 0x6802a
leaq 0x5ede1(%rip), %rsi     # 0x6b8b0
leaq 0x7c122(%rip), %rdx     # 0x88bf8
movq %r12, %rdi
xorl %eax, %eax
callq 0x1867b
movq %rax, %r15
movq (%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7b0
movq (%r13), %rcx
leaq 0x5b534(%rip), %rdi     # 0x68033
movl $0xd, %esi
movl $0x1, %edx
callq 0xbab0
movq (%r13), %rsi
movl $0xa, %edi
callq 0xb690
leaq 0x5b51e(%rip), %rdi     # 0x68041
movq %r12, %rsi
movl $0x2, %edx
xorl %eax, %eax
callq 0x18883
movq %rax, %r12
movq (%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7b0
movq (%r13), %rcx
leaq 0x5b50f(%rip), %rdi     # 0x68060
movl $0xe, %esi
movl $0x1, %edx
callq 0xbab0
movq (%r13), %rsi
movl $0xa, %edi
callq 0xb690
movl $0x4, %esi
movq %r12, %rdi
callq 0x18997
leaq 0x5b519(%rip), %rdi     # 0x6809b
callq 0xb880
callq 0xb760
movq (%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7b0
movq (%r13), %rcx
leaq 0x5b4c7(%rip), %rdi     # 0x6806f
movl $0xd, %esi
movl $0x1, %edx
callq 0xbab0
movq (%r13), %rsi
movl $0xa, %edi
callq 0xb690
movq %r12, %rdi
callq 0x189c8
movq (%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7b0
movq (%r13), %rcx
leaq 0x5b494(%rip), %rdi     # 0x6807d
movl $0xe, %esi
movl $0x1, %edx
callq 0xbab0
movq (%r13), %rsi
movl $0xa, %edi
callq 0xb690
movq %r12, %rdi
callq 0x18975
movq (%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7b0
movq (%r13), %rcx
leaq 0x5b462(%rip), %rdi     # 0x6808c
movl $0xe, %esi
movl $0x1, %edx
callq 0xbab0
movq (%r13), %rsi
movl $0xa, %edi
callq 0xb690
movq %r15, %rdi
callq 0x18776
callq 0x183c2
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x18(%rdi), %rax
movq %rax, (%rsp)
movq %rax, 0x8(%rdi)
leaq 0x2b2d(%rip), %rdx      # 0x5089
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2952
movw %r13w, (%rbx)
movw %r12w, 0x2(%rbx)
movw %bp, 0x4(%rbx)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x28bc
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2611
movzwl 0x6(%rbx), %r9d
xorl %ecx, %ecx
movabsq $0x100000001, %rdx      # imm = 0x100000001
movabsq $0x2000000020, %rsi     # imm = 0x2000000020
movabsq $0x4000000040000, %r8   # imm = 0x4000000040000
movzbl (%rdi,%rcx), %r10d
addl $-0x41, %r10d
cmpl $0x32, %r10d
ja 0x2611
btq %r10, %rdx
jb 0x25f5
btq %r10, %rsi
jb 0x25ee
btq %r10, %r8
jae 0x2611
movw $0x2, %r10w
jmp 0x25fa
movw $0x1, %r10w
jmp 0x25fa
movw $0x4, %r10w
movzwl %r10w, %r10d
orl %r9d, %r10d
movw %r10w, 0x6(%rbx)
incq %rcx
movl %r10d, %r9d
cmpq %rcx, %rax
jne 0x25c6
cmpq %r12, %rdi
je 0x2623
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r14), %rdi
cmpq (%rsp), %rdi
je 0x264d
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/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), %rcx
testq %rcx, %rcx
je 0x26f3
pushq %rbp
pushq %r14
pushq %rbx
movq (%rsi), %rdx
movzwl 0x6(%rdi), %ebx
movq %rcx, %rsi
negq %rsi
movl $0x1, %r8d
xorl %eax, %eax
movabsq $0x100000001, %r9       # imm = 0x100000001
movabsq $0x2000000020, %r10     # imm = 0x2000000020
movabsq $0x4000000040000, %r11  # imm = 0x4000000040000
movzbl -0x1(%rdx,%r8), %r14d
addl $-0x41, %r14d
cmpl $0x32, %r14d
ja 0x26ed
btq %r14, %r9
jb 0x26c8
btq %r14, %r10
jb 0x26c2
btq %r14, %r11
jae 0x26ed
movw $0x2, %ax
jmp 0x26cc
movw $0x1, %ax
jmp 0x26cc
movw $0x4, %ax
movzwl %ax, %ebp
orl %ebx, %ebp
movw %bp, 0x6(%rdi)
cmpq %rcx, %r8
setae %al
leaq (%rsi,%r8), %r14
incq %r14
incq %r8
movl %ebp, %ebx
cmpq $0x1, %r14
jne 0x269a
popq %rbx
popq %r14
popq %rbp
jmp 0x26f5
movb $0x1, %al
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2765
movabsq $0x100000001, %rcx      # imm = 0x100000001
btq %rsi, %rcx
jb 0x276c
movabsq $0x2000000020, %rcx     # imm = 0x2000000020
btq %rsi, %rcx
jb 0x2766
movabsq $0x4000000040000, %rcx  # imm = 0x4000000040000
btq %rsi, %rcx
jae 0x2765
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_O3/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 0x27b8
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r14, %r8
movl %ebx, %r9d
callq 0x2040
cmpq $-0x1, %rax
je 0x284e
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2140
cmpl $-0x1, %eax
jne 0x289b
callq 0x2030
movq %rax, %rcx
movl $0x2, %eax
cmpl $0xb, (%rcx)
je 0x28b0
callq 0x2375
movslq %eax, %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2776
movl $0x1, %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
movabsq $0x431bde82d7b634db, %r10 # imm = 0x431BDE82D7B634DB
subq %rax, %rdx
jle 0x2a73
movq %rdx, %rax
imulq %r10
movq %rdx, %rax
shrq $0x12, %rax
shrq $0x3f, %rdx
addl %edx, %eax
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 0x2aae
mulq %r10
shrq $0x12, %rdx
movabsq $0xf424000000000, %r10  # imm = 0xF424000000000
imulq %rdx, %r10
sarq $0x20, %r10
addq %r9, %r10
movq %r10, 0x8(%rcx)
movslq %edx, %rax
subq %rax, %r8
movq %r8, (%rcx)
movq 0x8(%rsi), %rax
subq %r10, %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_O3/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)
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x2320
cmpl $-0x1, %eax
je 0x2af6
addq $0x18, %rsp
retq
callq 0x238a
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, (%rsp)
movl $0x7a120, %eax          # imm = 0x7A120
leaq (%rsi,%rax), %rcx
movq %rcx, 0x8(%rsp)
cmpq %rax, %rsi
jl 0x2b4b
incq %rdi
movq %rdi, (%rsp)
addq $-0x7a120, %rsi         # imm = 0xFFF85EE0
movq %rsi, 0x8(%rsp)
xorl %ebx, %ebx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x22f0
movaps (%r14), %xmm0
movaps %xmm0, (%r14)
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x2a22
movl %eax, %ecx
movl $0x0, %eax
testl %ecx, %ecx
jne 0x2b8b
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x43c6(%rip), %rdi      # 0x6fd0
leaq 0x244a(%rip), %rsi      # 0x505b
movl $0xe, %edx
callq 0x2210
leaq 0x2448(%rip), %rsi      # 0x506a
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2c55
movq 0x439b(%rip), %r15      # 0x6fd0
leaq 0x244c(%rip), %rsi      # 0x5088
movl $0x1, %edx
movq %r15, %rdi
callq 0x2210
movzwl %r14w, %esi
movq %r15, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x2c72
movq 0x436f(%rip), %rdi      # 0x6fd0
leaq 0x2406(%rip), %rsi      # 0x506e
movl $0xf, %edx
callq 0x2210
leaq 0x2405(%rip), %rsi      # 0x507e
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2caf
movq 0x4344(%rip), %r14      # 0x6fd0
leaq 0x23f5(%rip), %rsi      # 0x5088
movl $0x1, %edx
movq %r14, %rdi
callq 0x2210
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2210
leaq 0x7(%rsp), %rsi
movb $0xa, (%rsi)
movq 0x4312(%rip), %rdi      # 0x6fd0
movl $0x1, %edx
callq 0x2210
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x149a
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
setne %sil
leaq (%rax,%rcx), %rdx
decq %rdx
cmpq %rax, %rdx
seta %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1273
incq %rax
movb -0x1(%rax), %cl
movb (%rdx), %sil
movb %sil, -0x1(%rax)
movb %cl, (%rdx)
decq %rdx
leaq 0x1(%rax), %rcx
cmpq %rdx, %rax
movq %rcx, %rax
jb 0x1251
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x12f4
leaq (%rax,%rcx), %rdi
movq %rax, %rdx
movq %rdx, %rsi
cmpb $0x20, (%rsi)
jne 0x1292
incq %rsi
cmpq %rdi, %rsi
jne 0x1282
movq %rdi, %rsi
movq %rsi, %rdx
cmpq %rdi, %rsi
je 0x12ad
movq %rsi, %rdx
cmpb $0x20, (%rdx)
je 0x12ad
incq %rdx
cmpq %rdi, %rdx
jne 0x129d
movq %rdi, %rdx
cmpq %rdx, %rsi
setne %r8b
leaq -0x1(%rdx), %rdi
cmpq %rsi, %rdi
seta %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x12eb
incq %rsi
movb -0x1(%rsi), %al
movb (%rdi), %cl
movb %cl, -0x1(%rsi)
movb %al, (%rdi)
decq %rdi
leaq 0x1(%rsi), %rax
cmpq %rdi, %rsi
movq %rax, %rsi
jb 0x12cb
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
leaq (%rax,%rcx), %rdi
cmpq %rdi, %rdx
jne 0x127f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<Student>::add(Student)
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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0x53f8
movl 0x18(%r14), %r12d
movl $0x68, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
cmpl $0x1, %r12d
jne 0x546a
movq %rbx, %rdi
callq 0x594c
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x594c
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x8(%r14), %rax
movq %rax, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
movq %rbx, 0x10(%r14)
movq %rbx, 0x60(%rax)
jmp 0x54bc
movl $0x68, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x594c
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x594c
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq $0x0, 0x58(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x60(%rbx)
movq %rbx, 0x8(%r14)
jmp 0x54bc
movq %rbx, %rdi
callq 0x594c
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x594c
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x10(%r14), %rax
movq %rax, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
movq %rbx, 0x60(%rax)
movq %rbx, 0x10(%r14)
incl 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54db
jmp 0x54db
jmp 0x54f5
jmp 0x54f5
jmp 0x5512
jmp 0x5512
movq %rax, %r14
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x54f8
movq (%r13), %rsi
incq %rsi
callq 0x3140
jmp 0x54f8
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x5515
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3140
jmp 0x5515
movq %rax, %r14
movl $0x68, %esi
movq %rbx, %rdi
callq 0x3140
movq %r14, %rdi
callq 0x31e0
// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<Student>::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 0x58(%rbx), %rax
movq %rax, 0x10(%rdi)
movq $0x0, 0x60(%rax)
decl 0x18(%rdi)
leaq 0x40(%rbx), %rdi
callq 0x5b6e
movq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x5568
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x557f
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x68, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3140
// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<Student>::remove(Student)
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 %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xc040
movq 0x8(%rbx), %r14
testb %al, %al
je 0x5616
movq 0x60(%r14), %rax
movq %rax, 0x8(%rbx)
movq $0x0, 0x58(%rax)
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x55e4
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x55fb
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x68, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %r14, %r14
je 0x560b
movq %r14, %rdi
movq %r15, %rsi
callq 0xc040
testb %al, %al
je 0x5682
movq 0x58(%r14), %rax
movq 0x60(%r14), %rcx
movq %rcx, 0x60(%rax)
movq %rax, 0x58(%rcx)
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x565b
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x5672
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x68, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
movq 0x60(%r14), %r14
jmp 0x5616
// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<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 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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0x4ecb
movq %rsi, %rbx
movq 0x8(%rsi), %r14
cmpq %r14, 0x8(%r12)
jne 0x4ec1
movb $0x1, %r15b
testq %r14, %r14
je 0x4ece
movq (%rbx), %rsi
movq (%r12), %rdi
movq %r14, %rdx
callq 0x3150
testl %eax, %eax
je 0x4ece
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x4e9f
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0x7603
movq %rsi, %rbx
movq 0x8(%rsi), %r14
cmpq %r14, 0x8(%r12)
jne 0x75f9
movb $0x1, %r15b
testq %r14, %r14
je 0x7606
movq (%rbx), %rsi
movq (%r12), %rdi
movq %r14, %rdx
callq 0x3150
testl %eax, %eax
je 0x7606
movq 0x20(%r12), %r12
testq %r12, %r12
jne 0x75d7
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<Student>::add(Student)
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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0x7b2a
movl 0x18(%r14), %r12d
movl $0x60, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
cmpl $0x1, %r12d
jne 0x7b94
movq %rbx, %rdi
callq 0x594c
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x594c
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq $0x0, 0x58(%rbx)
movq %rbx, 0x10(%r14)
movq 0x8(%r14), %rax
movq %rbx, 0x58(%rax)
jmp 0x7be2
movl $0x60, %edi
callq 0x3130
movq %rax, %rbx
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x594c
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x594c
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq 0x10(%r14), %rax
movq %rax, 0x58(%rbx)
movq %rbx, 0x8(%r14)
jmp 0x7be2
movq %rbx, %rdi
callq 0x594c
leaq 0x20(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r13, 0x20(%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x594c
movq %rbx, %rdi
addq $0x40, %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x59f8
movq $0x0, 0x58(%rbx)
movq 0x10(%r14), %rax
movq %rbx, 0x58(%rax)
movq %rbx, 0x10(%r14)
incl 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7c01
jmp 0x7c01
jmp 0x7c1b
jmp 0x7c1b
jmp 0x7c38
jmp 0x7c38
movq %rax, %r14
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x7c1e
movq (%r13), %rsi
incq %rsi
callq 0x3140
jmp 0x7c1e
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x7c3b
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x3140
jmp 0x7c3b
movq %rax, %r14
movl $0x60, %esi
movq %rbx, %rdi
callq 0x3140
movq %r14, %rdi
callq 0x31e0
// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<Student>::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 0x58(%rax), %rax
cmpq %r14, %rax
jne 0x7c62
movq $0x0, 0x58(%rcx)
testq %r14, %r14
je 0x7cb3
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x7c9c
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x7cb3
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x60, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<Student>::remove(Student)
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 %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xc040
movq 0x8(%rbx), %r14
movq 0x58(%r14), %r12
testb %al, %al
je 0x7d43
movq %r12, 0x8(%rbx)
leaq 0x40(%r14), %rdi
callq 0x5b6e
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x7d13
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x7d2a
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x60, %esi
movq %r14, %rdi
callq 0x3140
decl 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testq %r12, %r12
je 0x7d3a
movq %r12, %rdi
movq %r15, %rsi
callq 0xc040
testb %al, %al
je 0x7dad
movq 0x58(%r12), %rax
movq %rax, 0x58(%r14)
leaq 0x40(%r12), %rdi
callq 0x5b6e
movq 0x20(%r12), %rdi
leaq 0x30(%r12), %rax
cmpq %rax, %rdi
je 0x7d84
movq (%rax), %rsi
incq %rsi
callq 0x3140
movq (%r12), %rdi
leaq 0x10(%r12), %rax
cmpq %rax, %rdi
je 0x7d9d
movq (%rax), %rsi
incq %rsi
callq 0x3140
movl $0x60, %esi
movq %r12, %rdi
callq 0x3140
decl 0x18(%rbx)
movq 0x58(%r12), %r12
jmp 0x7d43