LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x14(%rbp)
movb $0x0, -0x15(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movb $0x1, -0x21(%rbp)
movl $0x0, -0x28(%rbp)
callq 0x235c0
movsd %xmm0, -0x20(%rbp)
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x21d1b
jp 0x21d1b
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movq -0x38(%rbp), %rcx
movl 0x8(%rcx), %eax
cmpl (%rcx), %eax
je 0x21d2f
movb $0x0, -0x21(%rbp)
jmp 0x21ddf
jmp 0x21d31
movb -0x15(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x21d3f
jmp 0x21ddd
movq -0x38(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0x8(%rcx), %eax
jl 0x21d4f
movb $0x1, -0x15(%rbp)
jmp 0x21d51
movl -0x14(%rbp), %ecx
xorl %eax, %eax
cmpl -0x28(%rbp), %ecx
movb %al, -0x39(%rbp)
jg 0x21d66
movb -0x15(%rbp), %al
xorb $-0x1, %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x21d6f
jmp 0x21dc8
movq -0x38(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x1fe60
movq -0x38(%rbp), %rdi
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
movl -0x14(%rbp), %esi
callq 0x1fe60
movq -0x38(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
movslq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd -0x10(%rbp), %xmm2
callq 0x21df0
testb $0x1, %al
jne 0x21dbd
movb $0x0, -0x21(%rbp)
movb $0x1, -0x15(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x21d51
movl $0x0, -0x14(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x21d31
jmp 0x21ddf
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::WithinTolerance(double, double, double)
bool Matrix::WithinTolerance(double arg1,
                             double arg2,
                             double tol)
{
  bool test;

  if (tol == 0.0)
  {
    //
    // The default value of tol is 0.0, so no tolerance was provided.  Use
    // machine epsilon.
    //
    std::numeric_limits<double> lim;

    double eps = lim.min();

    tol = eps;
  }

  test = fabs(arg1 - arg2) <= tol;

  return test;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x21e2f
jp 0x21e2f
callq 0x235c0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x10(%rbp), %xmm1
subsd -0x18(%rbp), %xmm1
movaps 0x27b0(%rip), %xmm0     # 0x245f0
pand %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
setae %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: 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
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x1c(%rbp)
movl 0x8(%rax), %esi
subl $0x1, %esi
movl (%rax), %edx
subl $0x1, %edx
leaq -0x38(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x1f2e0
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movq -0x68(%rbp), %rcx
movl -0x48(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x222c8
cvtsi2sdl -0x48(%rbp), %xmm0
ucomisd -0x10(%rbp), %xmm0
jne 0x22208
jp 0x22208
jmp 0x222b8
movl $0x0, -0x4c(%rbp)
movq -0x68(%rbp), %rcx
movl -0x4c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x222a8
cvtsi2sdl -0x4c(%rbp), %xmm0
ucomisd -0x18(%rbp), %xmm0
jne 0x2222e
jp 0x2222e
jmp 0x22298
movq -0x68(%rbp), %rdi
movl -0x48(%rbp), %esi
callq 0x1fe60
movq %rax, -0x70(%rbp)
jmp 0x22240
movq -0x70(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x80(%rbp)
movl -0x44(%rbp), %esi
leaq -0x38(%rbp), %rdi
callq 0x1fe60
movq %rax, -0x78(%rbp)
jmp 0x22264
movq -0x78(%rbp), %rax
movsd -0x80(%rbp), %xmm0
movslq -0x1c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x22298
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1f580
jmp 0x2230f
jmp 0x2229a
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2220f
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl $0x0, -0x1c(%rbp)
jmp 0x222ba
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x221e5
leaq -0x38(%rbp), %rdi
callq 0x21e70
movsd %xmm0, -0x88(%rbp)
jmp 0x222db
movsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1f580
movsd -0x90(%rbp), %xmm0
addq $0x90, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x33d0
nopl (%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %esi
movl -0xc(%rbp), %edx
xorps %xmm0, %xmm0
callq 0x1f5c0
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x22b6b
movq -0x18(%rbp), %rdx
movq 0x10(%rdx), %rax
movl -0x10(%rbp), %ecx
imull (%rdx), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x14ad(%rip), %xmm0     # 0x24008
movsd %xmm0, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x22b33
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x80, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %rax
movq -0x48(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq %rax, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x234d0
movq -0x48(%rbp), %rdi
movl %eax, -0x34(%rbp)
callq 0x234f0
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movl %eax, %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movl $0x0, -0x20(%rbp)
movq -0x48(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, -0x58(%rbp)
callq 0x234d0
movl %eax, -0x54(%rbp)
jmp 0x22c4f
movl -0x58(%rbp), %eax
movl -0x54(%rbp), %ecx
cmpl %ecx, %eax
jge 0x22d16
movl $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, -0x60(%rbp)
callq 0x234f0
movl %eax, -0x5c(%rbp)
jmp 0x22c78
movl -0x60(%rbp), %eax
movl -0x5c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x22d06
movq -0x48(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movl -0x20(%rbp), %esi
callq 0x1fe60
movq %rax, -0x68(%rbp)
jmp 0x22ca2
movq -0x40(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
movq -0x68(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movl -0x20(%rbp), %esi
callq 0x1fe60
movq %rax, -0x78(%rbp)
jmp 0x22ccf
movq -0x78(%rbp), %rax
movsd -0x80(%rbp), %xmm0
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x22c64
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x1f580
jmp 0x22d36
jmp 0x22d08
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x22c3b
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x22d29
movq -0x40(%rbp), %rdi
callq 0x1f580
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x33d0
nop
// File: 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
subq $0x90, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %rax
movq -0x48(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq %rax, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x234d0
movq -0x48(%rbp), %rdi
movl %eax, -0x34(%rbp)
callq 0x234f0
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movl %eax, %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movl $0x0, -0x20(%rbp)
movq -0x48(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, -0x58(%rbp)
callq 0x234d0
movl %eax, -0x54(%rbp)
jmp 0x2306f
movl -0x58(%rbp), %eax
movl -0x54(%rbp), %ecx
cmpl %ecx, %eax
jge 0x231a8
movl $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, -0x60(%rbp)
callq 0x234f0
movl %eax, -0x5c(%rbp)
jmp 0x23098
movl -0x60(%rbp), %eax
movl -0x5c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23198
movq -0x48(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x1fe60
movq %rax, -0x68(%rbp)
jmp 0x230b8
movq -0x68(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x23123
jp 0x23123
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x70(%rbp)
movq $0x0, (%rdi)
callq 0x23500
movq -0x70(%rbp), %rdi
leaq 0xbbd8(%rip), %rsi      # 0x2ecd0
leaq 0x441(%rip), %rdx       # 0x23540
callq 0x33b0
jmp 0x231d1
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x1f580
jmp 0x231c8
movq -0x48(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movl -0x20(%rbp), %esi
callq 0x1fe60
movq %rax, -0x78(%rbp)
jmp 0x2313f
movq -0x40(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
movq -0x78(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x90(%rbp)
movl -0x20(%rbp), %esi
callq 0x1fe60
movq %rax, -0x88(%rbp)
jmp 0x23172
movq -0x88(%rbp), %rax
movsd -0x90(%rbp), %xmm0
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x23084
jmp 0x2319a
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2305b
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x231bb
movq -0x40(%rbp), %rdi
callq 0x1f580
movq -0x50(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %r8, -0x70(%rbp)
movw %cx, %ax
movw %dx, %cx
movw %si, %dx
movq %rdi, -0x8(%rbp)
movw %dx, -0xa(%rbp)
movw %cx, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movq %r8, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movw $0xd903, (%rax)         # imm = 0xD903
movw $0xd903, 0x2(%rax)      # imm = 0xD903
movw $0x3c00, 0x4(%rax)      # imm = 0x3C00
movw $0x0, 0x6(%rax)
addq $0x8, %rax
movq %rax, -0x60(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x23d0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0x4a74(%rip), %rsi      # 0x7090
callq 0x2bc0
jmp 0x2623
leaq -0x19(%rbp), %rdi
callq 0x2270
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rsi
movw -0xa(%rbp), %cx
movw %cx, (%rax)
movw -0xc(%rbp), %cx
movw %cx, 0x2(%rax)
movw -0xe(%rbp), %cx
movw %cx, 0x4(%rax)
leaq -0x50(%rbp), %rdi
callq 0x2100
jmp 0x2656
movq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x26c0
jmp 0x2665
leaq -0x50(%rbp), %rdi
callq 0x2140
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x19(%rbp), %rdi
callq 0x2270
jmp 0x26b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x26ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2140
movq -0x60(%rbp), %rdi
callq 0x2140
movq -0x28(%rbp), %rdi
callq 0x23c0
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x2160
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x279d
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2420
movsbl (%rax), %eax
movl %eax, -0x3c(%rbp)
subl $0x41, %eax
je 0x2751
jmp 0x271f
movl -0x3c(%rbp), %eax
subl $0x46, %eax
je 0x2762
jmp 0x2729
movl -0x3c(%rbp), %eax
subl $0x53, %eax
je 0x2773
jmp 0x2733
movl -0x3c(%rbp), %eax
subl $0x61, %eax
je 0x2751
jmp 0x273d
movl -0x3c(%rbp), %eax
subl $0x66, %eax
je 0x2762
jmp 0x2747
movl -0x3c(%rbp), %eax
subl $0x73, %eax
je 0x2773
jmp 0x2784
movq -0x28(%rbp), %rax
movzwl 0x6(%rax), %ecx
orl $0x4, %ecx
movw %cx, 0x6(%rax)
jmp 0x278a
movq -0x28(%rbp), %rax
movzwl 0x6(%rax), %ecx
orl $0x1, %ecx
movw %cx, 0x6(%rax)
jmp 0x278a
movq -0x28(%rbp), %rax
movzwl 0x6(%rax), %ecx
orl $0x2, %ecx
movw %cx, 0x6(%rax)
jmp 0x278a
movb $0x0, -0x1(%rbp)
jmp 0x27a1
jmp 0x278c
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x26e4
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movsbl -0x11(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0x41, %eax
je 0x2886
jmp 0x2854
movl -0x18(%rbp), %eax
subl $0x46, %eax
je 0x28a2
jmp 0x285e
movl -0x18(%rbp), %eax
subl $0x53, %eax
je 0x28be
jmp 0x2868
movl -0x18(%rbp), %eax
subl $0x61, %eax
je 0x2886
jmp 0x2872
movl -0x18(%rbp), %eax
subl $0x66, %eax
je 0x28a2
jmp 0x287c
movl -0x18(%rbp), %eax
subl $0x73, %eax
je 0x28be
jmp 0x28da
movq -0x20(%rbp), %rax
movzwl 0x6(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x28de
movq -0x20(%rbp), %rax
movzwl 0x6(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x28de
movq -0x20(%rbp), %rax
movzwl 0x6(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x28de
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movw %ax, (%rdi)
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
addl %ecx, %eax
movw %ax, 0x2(%rdi)
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
addl %ecx, %eax
movw %ax, 0x4(%rdi)
movq -0x10(%rbp), %rax
movzbl 0x7(%rax), %eax
andl $0xff, %eax
movw %ax, 0x6(%rdi)
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rdx
subq $0x8, %rdx
callq 0x2320
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: m1c0l[P]TCP/TcpMessage.cpp
// Function: TcpMessage::messageToBuffer(unsigned char*)
size_t TcpMessage::messageToBuffer(uint8_t* b) {
    
    //Probably a better way to do this...
    b[0] = (seqNum >> 8) & 0xff;
    b[1] = seqNum & 0xff;
    b[2] = (ackNum >> 8) & 0xff;
    b[3] = ackNum & 0xff;
    b[4] = recvWindow >> 8;
    b[5] = recvWindow & 0xff;
    b[6] = 0x0;
    b[7] = flags;
    
	data.copy((char*)b + 8, data.size(), 0);

	// 8 byte header + body
	return HEADER_SIZE + data.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl (%rdi), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movzwl (%rdi), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movzwl 0x2(%rdi), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movzwl 0x2(%rdi), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movzwl 0x4(%rdi), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movzwl 0x4(%rdi), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x6(%rax)
movw 0x6(%rdi), %ax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
addq $0x8, %rdi
callq 0x2160
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x2070
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x2160
addq $0x8, %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x2990
movq %rax, -0x438(%rbp)
movl -0xc(%rbp), %edi
leaq -0x430(%rbp), %rsi
movq -0x438(%rbp), %rdx
movq -0x18(%rbp), %r8
movl -0x1c(%rbp), %r9d
xorl %ecx, %ecx
callq 0x2060
cmpq $-0x1, %rax
jne 0x2aec
leaq 0x4527(%rip), %rdi      # 0x7004
callq 0x21c0
movl $0x1, %edi
callq 0x22c0
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x440(%rbp)
movl -0x14(%rbp), %edi
leaq -0x430(%rbp), %rsi
movq -0x20(%rbp), %r8
movl $0x408, %edx            # imm = 0x408
xorl %ecx, %ecx
leaq -0x24(%rbp), %r9
callq 0x2190
movl %eax, -0x434(%rbp)
cmpl $-0x1, -0x434(%rbp)
jne 0x2b7a
callq 0x2040
cmpl $0xb, (%rax)
jne 0x2b64
movl $0x2, -0x4(%rbp)
jmp 0x2b9b
leaq 0x44a0(%rip), %rdi      # 0x700b
callq 0x21c0
movl $0x1, %edi
callq 0x22c0
movq -0x440(%rbp), %rdi
leaq -0x430(%rbp), %rsi
movslq -0x434(%rbp), %rdx
callq 0x28f0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopw (%rax,%rax)
// File: m1c0l[P]TCP/Utils.cpp
// Function: inWindow(unsigned short, unsigned short, unsigned short)
bool inWindow(uint16_t seq, uint16_t bot, uint16_t top) {
	if (bot < top) { // no wraparound
		return seq >= bot && seq <= top;
	}
	else { // wraps around
		return seq <= top || seq >= bot;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %dx, %ax
movw %si, %cx
movw %di, %dx
movw %dx, -0x4(%rbp)
movw %cx, -0x6(%rbp)
movw %ax, -0x8(%rbp)
movzwl -0x6(%rbp), %eax
movzwl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2f90
movzwl -0x4(%rbp), %ecx
movzwl -0x6(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x9(%rbp)
jl 0x2f86
movzwl -0x4(%rbp), %eax
movzwl -0x8(%rbp), %ecx
cmpl %ecx, %eax
setle %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x2fb9
movzwl -0x4(%rbp), %ecx
movzwl -0x8(%rbp), %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0xa(%rbp)
jle 0x2fb1
movzwl -0x4(%rbp), %eax
movzwl -0x6(%rbp), %ecx
cmpl %ecx, %eax
setge %al
movb %al, -0xa(%rbp)
movb -0xa(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x302a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
cqto
idivq %rcx
addq $0x1, %rax
movl %eax, -0x1c(%rbp)
imull $0xf4240, -0x1c(%rbp), %eax # imm = 0xF4240
movslq %eax, %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movslq -0x1c(%rbp), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq 0x8(%rcx), %rax
cmpq $0xf4240, %rax          # imm = 0xF4240
jle 0x3086
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq 0x8(%rcx), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
cqto
idivq %rcx
movl %eax, -0x20(%rbp)
imull $0xf4240, -0x20(%rbp), %eax # imm = 0xF4240
movslq %eax, %rcx
movq -0x18(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movslq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
subq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
subq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
setl %al
andb $0x1, %al
movzbl %al, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movl %edi, -0x14(%rbp)
movl -0x14(%rbp), %edi
movl $0x1, %esi
movl $0x14, %edx
leaq -0x10(%rbp), %rcx
movl $0x10, %r8d
callq 0x23e0
movl %eax, -0x18(%rbp)
cmpl $-0x1, -0x18(%rbp)
jne 0x311e
leaq 0x3f2f(%rip), %rdi      # 0x703e
callq 0x21c0
movl $0x1, %edi
callq 0x22c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x7a120, %rax          # imm = 0x7A120
movq %rax, -0x28(%rbp)
cmpq $0xf4240, -0x28(%rbp)   # imm = 0xF4240
jl 0x31b2
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
subq $0xf4240, %rax          # imm = 0xF4240
movq %rax, -0x28(%rbp)
callq 0x3130
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x2fc0
movl %eax, -0x44(%rbp)
cmpl $0x1, -0x44(%rbp)
jne 0x31e9
movq $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: m1c0l[P]TCP/Utils.cpp
// Function: timeval_cmp(timeval, timeval)
bool timeval_cmp(timeval a, timeval b) {
	if (a.tv_sec < b.tv_sec) {
		return true;
	}
	else if (a.tv_sec > b.tv_sec) {
		return false;
	}
	else {
		return a.tv_usec < b.tv_usec;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x3224
movb $0x1, -0x1(%rbp)
jmp 0x3244
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x3234
movb $0x0, -0x1(%rbp)
jmp 0x3244
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
setl %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movb %dl, %al
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
andb $0x1, %al
movb %al, -0xb(%rbp)
movq 0x7d03(%rip), %rdi      # 0xafc8
leaq 0x3d96(%rip), %rsi      # 0x7062
callq 0x2220
movq -0x18(%rbp), %rdi
leaq 0x3d95(%rip), %rsi      # 0x7071
callq 0x49e0
testb $0x1, %al
jne 0x32e7
jmp 0x3306
movq 0x7cda(%rip), %rdi      # 0xafc8
leaq 0x3d9a(%rip), %rsi      # 0x708f
callq 0x2220
movq %rax, %rdi
movzwl -0xa(%rbp), %esi
callq 0x23b0
testb $0x1, -0xb(%rbp)
je 0x331f
movq 0x7cb5(%rip), %rdi      # 0xafc8
leaq 0x3d5b(%rip), %rsi      # 0x7075
callq 0x2220
movq -0x18(%rbp), %rdi
leaq 0x3d5b(%rip), %rsi      # 0x7085
callq 0x49e0
testb $0x1, %al
jne 0x3335
jmp 0x3354
movq 0x7c8c(%rip), %rdi      # 0xafc8
leaq 0x3d4c(%rip), %rsi      # 0x708f
callq 0x2220
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x21f0
movq 0x7c6d(%rip), %rdi      # 0xafc8
movl $0xa, %esi
callq 0x22b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movq -0x10(%rbp), %rsi
callq 0x2060
movq -0x90(%rbp), %rdi
callq 0x20e0
movq -0x90(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x2080
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x2720
jmp 0x2380
movq -0x90(%rbp), %rdi
callq 0x20e0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x90(%rbp), %rdi
callq 0x2080
movq %rax, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2760
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x99(%rbp)
jne 0x23c6
jmp 0x23e9
movq -0x90(%rbp), %rdi
callq 0x2080
movq %rax, -0x58(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2760
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x23f8
jmp 0x2517
jmp 0x23fa
movq -0x90(%rbp), %rdi
callq 0x2080
movq %rax, -0x60(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2760
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x9a(%rbp)
jne 0x2428
jmp 0x2440
leaq -0x40(%rbp), %rdi
callq 0x27a0
movsbl (%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x9a(%rbp)
movb -0x9a(%rbp), %al
testb $0x1, %al
jne 0x244c
jmp 0x247a
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x27c0
movq %rax, -0x68(%rbp)
jmp 0x23fa
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x2090
jmp 0x253d
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x90(%rbp), %rdi
callq 0x2080
movq %rax, -0x70(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2760
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x9b(%rbp)
jne 0x24b0
jmp 0x24c8
leaq -0x48(%rbp), %rdi
callq 0x27a0
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x9b(%rbp)
movb -0x9b(%rbp), %al
testb $0x1, %al
jne 0x24d4
jmp 0x24e5
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0x27c0
movq %rax, -0x78(%rbp)
jmp 0x2482
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x2720
jmp 0x250a
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x2398
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x252d
movq -0x90(%rbp), %rdi
callq 0x2090
movq -0x98(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x21a0
nopw %cs:(%rax,%rax)
// File: MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<int>::exists(int)
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
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x472d
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x471f
movb $0x1, -0x1(%rbp)
jmp 0x4731
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x4707
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
// File: MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
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
subq $0x50, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x6e22
movl $0x30, %edi
callq 0x41d0
movq -0x38(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
callq 0x40c0
jmp 0x6de2
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq $0x0, 0x20(%rcx)
movq 0x10(%rax), %rdx
movq %rdx, 0x28(%rcx)
movq %rcx, 0x8(%rax)
jmp 0x6f06
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x30, %esi
callq 0x41e0
jmp 0x6f19
movq -0x30(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x6e97
movl $0x30, %edi
callq 0x41d0
movq -0x38(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
callq 0x40c0
jmp 0x6e4b
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movq 0x8(%rax), %rdx
movq %rdx, 0x20(%rcx)
movq $0x0, 0x28(%rcx)
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x28(%rax)
jmp 0x6f04
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x30, %esi
callq 0x41e0
jmp 0x6f19
movl $0x30, %edi
callq 0x41d0
movq -0x38(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
callq 0x40c0
jmp 0x6eb6
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
movq 0x10(%rax), %rdx
movq %rdx, 0x20(%rcx)
movq $0x0, 0x28(%rcx)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rdx
movq 0x10(%rax), %rcx
movq %rdx, 0x28(%rcx)
movq -0x28(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x6f04
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x30, %esi
callq 0x41e0
jmp 0x6f19
jmp 0x6f06
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x4300
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<int>::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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x10(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rcx
movq $0x0, 0x10(%rcx)
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x4885
movq -0x18(%rbp), %rdi
movl $0x18, %esi
callq 0x41e0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: MechaDragonX[P]CPPCollections/double_linked_list.cpp
// Function: DoubleLinkedList<int>::remove(int)
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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x8(%rax), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x4901
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x48f2
movq -0x30(%rbp), %rdi
movl $0x18, %esi
callq 0x41e0
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
jmp 0x497e
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x497e
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x4970
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x4963
movq -0x38(%rbp), %rdi
movl $0x18, %esi
callq 0x41e0
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x490d
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<int>::exists(int)
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
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8d4d
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x8d3f
movb $0x1, -0x1(%rbp)
jmp 0x8d51
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x8d27
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
// File: MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
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
subq $0x50, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0xaf5a
movl $0x28, %edi
callq 0x41d0
movq -0x38(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
callq 0x40c0
jmp 0xaf22
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq 0x10(%rax), %rdx
movq %rdx, 0x20(%rcx)
movq %rcx, 0x8(%rax)
jmp 0xb02b
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x28, %esi
callq 0x41e0
jmp 0xb03e
movq -0x30(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0xafc4
movl $0x28, %edi
callq 0x41d0
movq -0x38(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
callq 0x40c0
jmp 0xaf83
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movq $0x0, 0x20(%rcx)
movq %rcx, 0x10(%rax)
movq 0x10(%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0xb029
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x28, %esi
callq 0x41e0
jmp 0xb03e
movl $0x28, %edi
callq 0x41d0
movq -0x38(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
callq 0x40c0
jmp 0xafe3
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
movq $0x0, 0x20(%rcx)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rdx
movq 0x10(%rax), %rcx
movq %rdx, 0x20(%rcx)
movq -0x28(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0xb029
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x28, %esi
callq 0x41e0
jmp 0xb03e
jmp 0xb02b
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x4300
nopw (%rax,%rax)
// File: MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<int>::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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq 0x10(%rcx), %rax
je 0x8e74
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8e54
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x8e9c
movq -0x28(%rbp), %rdi
movl $0x10, %esi
callq 0x41e0
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: MechaDragonX[P]CPPCollections/linked_list.cpp
// Function: LinkedList<int>::remove(int)
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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rax), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x8f15
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x8f06
movq -0x38(%rbp), %rdi
movl $0x10, %esi
callq 0x41e0
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
jmp 0x8f86
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8f86
movq -0x28(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x8f78
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x8f6b
movq -0x40(%rbp), %rdi
movl $0x10, %esi
callq 0x41e0
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x8f2d
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)