LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: DavidLBruce[P]sim3dof/build/../src/SimExec.cpp
// Function: SimExec::get_list_index(char*, char**, int)
int SimExec::get_list_index( char *val,
                             char **list,
                             int  max_index )
{
  int index_found = 0;
  int index = 0;
  int i, tmpN;

  if (isdigit(val[0]))
    return atoi(val);

  tmpN=strlen(val);
  if (val[tmpN-1]=='\n')
    val[tmpN-1]='\0';

  if (val[tmpN-1]=='\r')
    val[tmpN-1]='\0';

  // TBD: Not sure why this works, but seems necessary for unix runs
  //  val[tmpN-1]='\0';
  //  val[tmpN-2]='\0';

  while (!index_found && (index<max_index))
  {
    //    if ((strcmp(val, list[index]) == 0) || (((strncmp(val, list[index],strlen(val)-2) == 0)) & (InWindows < 1)) )
    if ((strcmp(val, list[index]) == 0) )
      index_found = 1;
    else
      index++;
  }

  if (!index_found)
  {
    printf("Invalid mode in get_list_index: %s chosen from { ", val);

    for (i=0; i < max_index; i++)
      printf("%s ", list[i]);

    printf("}\n");
    printf("... exiting\n");

    exit(0);

  }
  else
  {

    return index;
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x31e0
cmpl $0x0, %eax
je 0x1bcb7
movq -0x18(%rbp), %rdi
callq 0x3370
movl %eax, -0x4(%rbp)
jmp 0x1bdd6
movq -0x18(%rbp), %rdi
callq 0x3100
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x1bcea
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x1bd11
movq -0x18(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x1bd13
xorl %eax, %eax
cmpl $0x0, -0x28(%rbp)
movb %al, -0x35(%rbp)
jne 0x1bd2a
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
setl %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x1bd33
jmp 0x1bd61
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3320
cmpl $0x0, %eax
jne 0x1bd56
movl $0x1, -0x28(%rbp)
jmp 0x1bd5f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1bd13
cmpl $0x0, -0x28(%rbp)
jne 0x1bdd0
movq -0x18(%rbp), %rsi
leaq 0xa807(%rip), %rdi      # 0x26579
movb $0x0, %al
callq 0x3050
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x1bdad
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xa810(%rip), %rdi      # 0x265ab
movb $0x0, %al
callq 0x3050
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1bd80
leaq 0xa7fb(%rip), %rdi      # 0x265af
movb $0x0, %al
callq 0x3050
leaq 0xa7f0(%rip), %rdi      # 0x265b2
movb $0x0, %al
callq 0x3050
xorl %edi, %edi
callq 0x32c0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: DavidLBruce[P]sim3dof/build/../src/Target.cpp
// Function: Target::Target()
Target::Target() :
MdlBase()
{
  //
  // Default initialization of input variables
  //
  frameTimeStep = 999.0e9;
  initFrameTime = 999.0e9;

//  initVxb = 1.0e3;
  initVxb = 270.0;
  weaveAmpl = 4.0 * GRAVITY;
  weavePeriod = 10;

  weaveStart = 999.e9;
  weaveEnd = -1.0;

  //
  // Register states for integration
  //
  RegisterState( pxf, vxf);
  RegisterState( pyf, vyf);

  RegisterState( vxf, axf);
  RegisterState( vyf, ayf);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xd640
movq -0x20(%rbp), %rdi
leaq 0x104d4(%rip), %rax     # 0x2ec48
movq %rax, (%rdi)
movabsq $0x426d132148c00000, %rax # imm = 0x426D132148C00000
movq %rax, 0x8(%rdi)
movq %rax, 0xf8(%rdi)
movabsq $0x4070e00000000000, %rcx # imm = 0x4070E00000000000
movq %rcx, 0x100(%rdi)
movabsq $0x40439eb851eb851f, %rcx # imm = 0x40439EB851EB851F
movq %rcx, 0x118(%rdi)
movabsq $0x4024000000000000, %rcx # imm = 0x4024000000000000
movq %rcx, 0x120(%rdi)
movq %rax, 0x108(%rdi)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x110(%rdi)
movq %rdi, %rsi
addq $0x160, %rsi            # imm = 0x160
movq %rdi, %rdx
addq $0x180, %rdx            # imm = 0x180
callq 0xd9d0
jmp 0x1e7f2
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x168, %rsi            # imm = 0x168
movq %rdi, %rdx
addq $0x190, %rdx            # imm = 0x190
callq 0xd9d0
jmp 0x1e811
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x180, %rsi            # imm = 0x180
movq %rdi, %rdx
addq $0x130, %rdx            # imm = 0x130
callq 0xd9d0
jmp 0x1e830
movq -0x20(%rbp), %rdi
movq %rdi, %rsi
addq $0x190, %rsi            # imm = 0x190
movq %rdi, %rdx
addq $0x140, %rdx            # imm = 0x140
callq 0xd9d0
jmp 0x1e84f
addq $0x20, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0xd790
movq -0x10(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/build/../src/Target.cpp
// Function: Target::Initialize()
void Target::Initialize()
{
  double cth;
  double sth;

  ResetAll();

  simTime = GetSimTime();
  
  nextFrameTime = initFrameTime;

  omega = TWOPI / weavePeriod;

  //
  // Crossing angle and flight path angle are supplements of each other.
  //
  theta = PI - pExec->xa;

  cth = cos( theta );
  sth = sin( theta );

  vxb = initVxb;
  vyb = 0.0;

  vxf = vxb * cth - vyb * sth;
  vyf = vxb * sth + vyb * cth;;

  pxf = -pExec->tFinal * vxf;
  pyf = -pExec->tFinal * vyf;

  weavePhase = uniform( -PI, PI, &pExec->seed );

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x1eaa0
movq -0x20(%rbp), %rdi
callq 0x3c40
movq -0x20(%rbp), %rax
movsd %xmm0, 0x1a0(%rax)
movsd 0xf8(%rax), %xmm0
movsd %xmm0, 0x30(%rax)
movsd 0x7ced(%rip), %xmm0     # 0x26600
divsd 0x120(%rax), %xmm0
movsd %xmm0, 0x158(%rax)
movq 0x1b0(%rax), %rcx
movsd 0x6346(%rip), %xmm0     # 0x24c78
subsd 0x188(%rcx), %xmm0
movsd %xmm0, 0x170(%rax)
movsd 0x170(%rax), %xmm0
callq 0x3430
movq -0x20(%rbp), %rax
movsd %xmm0, -0x10(%rbp)
movsd 0x170(%rax), %xmm0
callq 0x30a0
movq -0x20(%rbp), %rax
movsd %xmm0, -0x18(%rbp)
movsd 0x100(%rax), %xmm0
movsd %xmm0, 0x178(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x188(%rax)
movsd 0x178(%rax), %xmm0
movsd -0x10(%rbp), %xmm2
movsd 0x188(%rax), %xmm1
mulsd -0x18(%rbp), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x180(%rax)
movsd 0x178(%rax), %xmm0
movsd -0x18(%rbp), %xmm2
movsd 0x188(%rax), %xmm1
mulsd -0x10(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x190(%rax)
movq 0x1b0(%rax), %rcx
movsd 0x178(%rcx), %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd 0x180(%rax), %xmm0
movsd %xmm0, 0x160(%rax)
movq 0x1b0(%rax), %rcx
movsd 0x178(%rcx), %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd 0x190(%rax), %xmm0
movsd %xmm0, 0x168(%rax)
movq 0x1b0(%rax), %rdi
addq $0x200, %rdi            # imm = 0x200
movsd 0x7b82(%rip), %xmm0     # 0x265f8
movsd 0x61fa(%rip), %xmm1     # 0x24c78
callq 0xcc50
movq -0x20(%rbp), %rax
movsd %xmm0, 0x1a8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/build/../src/Target.cpp
// Function: Target::ResetAll()
void Target::ResetAll()
{
  axb       = 0.0;
  axf       = 0.0;
  ayb       = 0.0;
  ayf       = 0.0;
  omega     = 0.0;
  pxf       = 0.0;
  pyf       = 0.0;
  simTime   = 0.0;
  theta     = 0.0;
  vxb       = 0.0;
  vxf       = 0.0;
  vyb       = 0.0;
  vyf       = 0.0;
  weaveInit = false;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x128(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x130(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x138(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x140(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x158(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x160(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x168(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1a0(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x170(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x178(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x180(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x188(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x190(%rax)
movb $0x0, 0x198(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/build/../src/Target.cpp
// Function: Target::UpdateDerivatives()
void Target::UpdateDerivatives()
{
  simTime = GetSimTime();

  theta = atan2( vyf, vxf );

  axf = axb * cos(theta) - ayb * sin(theta);
  ayf = axb * sin(theta) + ayb * cos(theta);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x3c40
movq -0x18(%rbp), %rax
movsd %xmm0, 0x1a0(%rax)
movsd 0x190(%rax), %xmm0
movsd 0x180(%rax), %xmm1
callq 0x3070
movq -0x18(%rbp), %rax
movsd %xmm0, 0x170(%rax)
movsd 0x128(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0x170(%rax), %xmm0
callq 0x3430
movq -0x18(%rbp), %rax
movsd %xmm0, -0x38(%rbp)
movsd 0x138(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd 0x170(%rax), %xmm0
callq 0x30a0
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm2
movq -0x18(%rbp), %rax
movaps %xmm0, %xmm3
movsd -0x30(%rbp), %xmm0
mulsd %xmm3, %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rax)
movsd 0x128(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd 0x170(%rax), %xmm0
callq 0x30a0
movq -0x18(%rbp), %rax
movsd %xmm0, -0x20(%rbp)
movsd 0x138(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x170(%rax), %xmm0
callq 0x3430
movsd -0x28(%rbp), %xmm1
movsd -0x20(%rbp), %xmm2
movq -0x18(%rbp), %rax
movaps %xmm0, %xmm3
movsd -0x10(%rbp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x140(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Construct(int, int, double)
void Matrix::Construct(int    _rows,
                       int    _cols,
                       double initVal)
{
  rows = _rows;
  cols = _cols;
  nElem = rows * cols;

  pData = new double[nElem];

  if (pData == NULL)
  {
    throw(MEMERR());
  }

  Set(initVal);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, (%rax)
movl 0x8(%rax), %ecx
imull (%rax), %ecx
movl %ecx, 0x4(%rax)
movslq 0x4(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, 0x10(%rax)
jne 0x1f3c7
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x28(%rbp), %rdi
callq 0x23410
movq -0x28(%rbp), %rdi
leaq 0xf8e5(%rip), %rsi      # 0x2eca0
leaq 0x408e(%rip), %rdx      # 0x23450
callq 0x33b0
movq -0x20(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
callq 0x1f530
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Matrix(Matrix const&)
Matrix::Matrix(const Matrix &mat)
{
  double *ptr1(mat.pData);
  double *ptr2(NULL);
  int _rows(mat.rows);
  int _cols(mat.cols);

  Construct(_rows, _cols);
  ptr2 = pData;

  for (int idx = 0; idx < nElem; ++idx)
  {
    *ptr2++ = *ptr1++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x1f480
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x1f47a
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rbp)
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
movsd %xmm0, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1f43d
addq $0x40, %rsp
popq %rbp
retq
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Construct(int, int)
void Matrix::Construct(int _rows,
                       int _cols)
{
  rows = _rows;
  cols = _cols;
  nElem = rows * cols;

  pData = new double[nElem];

  if (pData == NULL)
  {
    throw(MEMERR());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, (%rax)
movl 0x8(%rax), %ecx
imull (%rax), %ecx
movl %ecx, 0x4(%rax)
movslq 0x4(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, 0x10(%rax)
jne 0x1f522
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x20(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x20(%rbp), %rdi
callq 0x23410
movq -0x20(%rbp), %rdi
leaq 0xf78a(%rip), %rsi      # 0x2eca0
leaq 0x3f33(%rip), %rdx      # 0x23450
callq 0x33b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Resize(int, int, double)
void Matrix::Resize(int _rows, int _cols, double initVal)
{
  if (pData != NULL)
  {
    delete [] pData;
  }

  rows = _rows;
  cols = _cols;
  nElem = _rows * _cols;
  {
    Construct(rows, cols, initVal);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x10(%rax)
je 0x1f603
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1f601
movq -0x28(%rbp), %rdi
callq 0x32f0
jmp 0x1f603
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, 0x8(%rdi)
movl -0x10(%rbp), %eax
movl %eax, (%rdi)
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
movl %eax, 0x4(%rdi)
movl 0x8(%rdi), %esi
movl (%rdi), %edx
movsd -0x18(%rbp), %xmm0
callq 0x1f320
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::CheckDim(int, int)
bool Matrix::CheckDim(int row, int col)
{
  bool pass(false);

  if ((row >= 0) &&
      (row < rows) &&
      (col >=0 ) &&
      (col < cols))
  {
    pass = true;
  }

  return pass;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x0, -0x11(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x1f681
movq -0x20(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x1f681
cmpl $0x0, -0x10(%rbp)
jl 0x1f681
movq -0x20(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl (%rcx), %eax
jge 0x1f681
movb $0x1, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::CheckDim(int)
bool Matrix::CheckDim(int idx)
{
  bool pass(false);

  if ((idx >= 0) &&
      (idx < nElem) &&
      ((rows == 1 ) ||
      (cols == 1)))
  {
    pass = true;
  }

  return pass;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb $0x0, -0xd(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x1f6d0
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x1f6d0
movq -0x18(%rbp), %rax
cmpl $0x1, 0x8(%rax)
je 0x1f6cc
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1f6d0
movb $0x1, -0xd(%rbp)
movb -0xd(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::GetPtr(int, int)
double* Matrix::GetPtr(int row, int col)
{
  bool pass = CheckDim(row, col);
  double *ptr(NULL);

  if (pass)
  {
    ptr = pData + row * cols + col;
  }
  else
  {
    throw(DIMERR());
  }

  return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x1f640
andb $0x1, %al
movb %al, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
testb $0x1, -0x11(%rbp)
je 0x1f741
movq -0x28(%rbp), %rdx
movq 0x10(%rdx), %rax
movl -0xc(%rbp), %ecx
imull (%rdx), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x10(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x1f77e
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x30(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x30(%rbp), %rdi
callq 0x23470
movq -0x30(%rbp), %rdi
leaq 0xf546(%rip), %rsi      # 0x2ecb8
leaq 0x3d37(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::GetPtr(int)
double* Matrix::GetPtr(int idx)
{
  bool pass = CheckDim(idx);
  double *ptr(NULL);

  if (pass)
  {
    ptr = pData + idx;
  }
  else
  {
    throw(DIMERR());
  }

  return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %esi
callq 0x1f690
andb $0x1, %al
movb %al, -0xd(%rbp)
movq $0x0, -0x18(%rbp)
testb $0x1, -0xd(%rbp)
je 0x1f7db
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x1f818
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x28(%rbp), %rdi
callq 0x23470
movq -0x28(%rbp), %rdi
leaq 0xf4ac(%rip), %rsi      # 0x2ecb8
leaq 0x3c9d(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Matrix::Print(string format)
{
  double *pElem(pData);

  if (rows > 1)
  {
    for (int row = 0; row < rows; ++row)
    {
      for (int col = 0; col < cols; ++col)
      {
        printf(format.c_str(), *pElem);
        ++pElem;
      }
      printf("\n");
    }
  }
  else
  {
    for (int col = 0; col < cols; ++col)
    {
      printf(format.c_str(), *pElem);
      ++pElem;
    }
    printf("\n");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x18(%rbp)
cmpl $0x1, 0x8(%rax)
jle 0x1f9ac
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x1f9aa
movl $0x0, -0x20(%rbp)
movq -0x30(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl (%rcx), %eax
jge 0x1f991
movq -0x38(%rbp), %rdi
callq 0x30e0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movb $0x1, %al
callq 0x3050
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1f954
leaq 0x586d(%rip), %rdi      # 0x25205
movb $0x0, %al
callq 0x3050
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1f941
jmp 0x1f9fe
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl (%rcx), %eax
jge 0x1f9f0
movq -0x38(%rbp), %rdi
callq 0x30e0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
movb $0x1, %al
callq 0x3050
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1f9b3
leaq 0x580e(%rip), %rdi      # 0x25205
movb $0x0, %al
callq 0x3050
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::GetRow(int)
Matrix Matrix::GetRow(int row)
{
  if ((row < 0) ||
      (row >= rows))
  {
    throw(DIMERR());
  }

  Matrix result(1, cols);
  double *ptr1(pData + row * cols);
  double *ptr2(result.pData);

  for (int col = 0; col < cols; ++col)
  {
    *ptr2++ = *ptr1++;
  }
  
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x1fb28
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jl 0x1fb65
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x50(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x50(%rbp), %rdi
callq 0x23470
movq -0x50(%rbp), %rdi
leaq 0xf15f(%rip), %rsi      # 0x2ecb8
leaq 0x3950(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rax
movb $0x0, -0x15(%rbp)
movl (%rax), %edx
movl $0x1, %esi
xorps %xmm0, %xmm0
callq 0x1f2e0
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rax
movq 0x10(%rsi), %rcx
movl -0x14(%rbp), %edx
imull (%rsi), %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x1fbeb
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
movsd (%rax), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
movsd %xmm0, (%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1fbaf
movb $0x1, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
jne 0x1fbfe
movq -0x48(%rbp), %rdi
callq 0x1f580
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::GetCol(int)
Matrix Matrix::GetCol(int col)
{
  if ((col < 0) ||
      (col >= cols))
  {
    throw(DIMERR());
  }

  Matrix result(rows, 1);
  double *ptr1(pData + col);
  double *ptr2(result.pData);

  for (int row = 0; row < rows; ++row)
  {
    *ptr2++ = *ptr1;
    ptr1 += cols;
  }
  
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x1fc47
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl (%rcx), %eax
jl 0x1fc84
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x50(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x50(%rbp), %rdi
callq 0x23470
movq -0x50(%rbp), %rdi
leaq 0xf040(%rip), %rsi      # 0x2ecb8
leaq 0x3831(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rax
movb $0x0, -0x15(%rbp)
movl 0x8(%rax), %esi
movl $0x1, %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rax
movq 0x10(%rcx), %rcx
movslq -0x14(%rbp), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x1fd14
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
movsd (%rcx), %xmm0
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x8, %rdx
movq %rdx, -0x28(%rbp)
movsd %xmm0, (%rcx)
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1fcca
movb $0x1, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
jne 0x1fd27
movq -0x48(%rbp), %rdi
callq 0x1f580
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator()(int)
double& Matrix::operator()(int idx)
{
  bool pass = CheckDim(idx);

  if (!pass)
  {
    throw(DIMERR());
  }

  double &rVal(*GetPtr(idx));

  return rVal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0xc(%rbp), %esi
callq 0x1f690
andb $0x1, %al
movb %al, -0xd(%rbp)
testb $0x1, -0xd(%rbp)
jne 0x1fda7
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x28(%rbp), %rdi
callq 0x23470
movq -0x28(%rbp), %rdi
leaq 0xef1d(%rip), %rsi      # 0x2ecb8
leaq 0x370e(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x1f790
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator()(int, int)
double& Matrix::operator()(int row, int col)
{
  bool pass = CheckDim(row, col);

  if (!pass)
  {
    throw(DIMERR());
  }

  double &rVal(*GetPtr(row, col));

  return rVal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x1f640
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x1fe3d
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x30(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x30(%rbp), %rdi
callq 0x23470
movq -0x30(%rbp), %rdi
leaq 0xee87(%rip), %rsi      # 0x2ecb8
leaq 0x3678(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x1f6e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator[](int)
double* Matrix::operator[](int row)
{
  if ((row < 0) || (row > rows - 1))
  {
    throw(DIMERR());
  }

  double *pRow(pData + row * cols);

  return pRow;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x1fe8e
movq -0x20(%rbp), %rcx
movl -0xc(%rbp), %eax
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x1fecb
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x28(%rbp), %rdi
callq 0x23470
movq -0x28(%rbp), %rdi
leaq 0xedf9(%rip), %rsi      # 0x2ecb8
leaq 0x35ea(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x20(%rbp), %rdx
movq 0x10(%rdx), %rax
movl -0xc(%rbp), %ecx
imull (%rdx), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator=(Matrix)
Matrix Matrix::operator= (Matrix mat)
{
  double *ptr1 = mat.pData;
  double *ptr2(NULL);
  int    _rows = mat.NumRows();
  int    _cols = mat.NumCols();

  Construct(_rows, _cols);
  ptr2 = pData;

  for (int idx = 0; idx < nElem; ++idx)
  {
    *ptr2++ = *ptr1++;
  }
  return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdx, -0x48(%rbp)
movq %rdi, %rax
movq -0x48(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq %rax, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rdi), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
callq 0x234d0
movq -0x48(%rbp), %rdi
movl %eax, -0x2c(%rbp)
callq 0x234f0
movq -0x40(%rbp), %rdi
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x1f480
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x1ffb5
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
movsd (%rax), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
movsd %xmm0, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1ff78
movq -0x40(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x1f3e0
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator+(Matrix) const
Matrix Matrix::operator+ (const Matrix rhs) const
{
  if ((rows != rhs.rows) ||
      (cols != rhs.cols))
  {
    throw(DIMERR()); 
  }

  Matrix result(rows, cols);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdx, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl 0x8(%rax), %eax
cmpl 0x8(%rdx), %eax
jne 0x20061
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movl (%rax), %eax
cmpl (%rcx), %eax
je 0x2009e
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x48(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x48(%rbp), %rdi
callq 0x23470
movq -0x48(%rbp), %rdi
leaq 0xec26(%rip), %rsi      # 0x2ecb8
leaq 0x3417(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rax
movb $0x0, -0x19(%rbp)
movl 0x8(%rax), %esi
movl (%rax), %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movl $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x20108
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rdx
movq 0x10(%rdx), %rdx
movslq -0x20(%rbp), %rsi
movsd (%rdx,%rsi,8), %xmm0
movq 0x10(%rcx), %rcx
movslq -0x20(%rbp), %rdx
addsd (%rcx,%rdx,8), %xmm0
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x200be
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x2011b
movq -0x38(%rbp), %rdi
callq 0x1f580
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::operator/(Matrix) const
Matrix Matrix::operator/ (const Matrix rhs) const
{
  if ((rows != rhs.rows) ||
      (cols != rhs.cols))
  {
    throw(DIMERR()); 
  }

  Matrix result(rows, cols);

  for (int idx = 0; idx < nElem; ++idx)
  {
    if (rhs.pData[idx] == 0.0)
    {
      throw(DIVBYZERO());
    }

    result.pData[idx] = pData[idx] / rhs.pData[idx];
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdx, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl 0x8(%rax), %eax
cmpl 0x8(%rdx), %eax
jne 0x20281
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
movl (%rax), %eax
cmpl (%rcx), %eax
je 0x202be
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x58(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x58(%rbp), %rdi
callq 0x23470
movq -0x58(%rbp), %rdi
leaq 0xea06(%rip), %rsi      # 0x2ecb8
leaq 0x31f7(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rax
movb $0x0, -0x19(%rbp)
movl 0x8(%rax), %esi
movl (%rax), %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movl $0x0, -0x20(%rbp)
movq -0x38(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x20398
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x20357
jp 0x20357
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x60(%rbp)
movq $0x0, (%rdi)
callq 0x23500
movq -0x60(%rbp), %rdi
leaq 0xe99e(%rip), %rsi      # 0x2ecd0
leaq 0x3207(%rip), %rdx      # 0x23540
callq 0x33b0
jmp 0x203be
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x1f580
jmp 0x203b5
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq 0x10(%rdx), %rdx
movslq -0x20(%rbp), %rsi
movsd (%rdx,%rsi,8), %xmm0
movq 0x10(%rcx), %rcx
movslq -0x20(%rbp), %rdx
divsd (%rcx,%rdx,8), %xmm0
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x202de
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x203ab
movq -0x48(%rbp), %rdi
callq 0x1f580
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x33d0
nop
// File: 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
subq $0x70, %rsp
movq %rdx, -0x68(%rbp)
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movl (%rax), %eax
cmpl 0x8(%rdx), %eax
je 0x2042f
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x70(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x70(%rbp), %rdi
callq 0x23470
movq -0x70(%rbp), %rdi
leaq 0xe895(%rip), %rsi      # 0x2ecb8
leaq 0x3086(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x50(%rbp), %rcx
movq -0x68(%rbp), %rax
movq -0x60(%rbp), %rdi
movb $0x0, -0x19(%rbp)
movl 0x8(%rcx), %esi
movl (%rax), %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rcx
movq -0x50(%rbp), %rax
movq 0x10(%rdx), %rdx
movq %rdx, -0x28(%rbp)
movq 0x10(%rcx), %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x50(%rbp), %rcx
movl -0x3c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x2055e
movl $0x0, -0x40(%rbp)
movq -0x68(%rbp), %rcx
movl -0x40(%rbp), %eax
cmpl (%rcx), %eax
jge 0x2054e
movq -0x68(%rbp), %rax
movq -0x50(%rbp), %rsi
movq 0x10(%rsi), %rcx
movl -0x3c(%rbp), %edx
imull (%rsi), %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movslq -0x40(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x50(%rbp), %rcx
movl -0x44(%rbp), %eax
cmpl (%rcx), %eax
jge 0x20534
movq -0x68(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x8, %rdx
movq %rdx, -0x38(%rbp)
movsd (%rcx), %xmm0
movq -0x30(%rbp), %rcx
movsd (%rcx), %xmm2
movq -0x28(%rbp), %rcx
movsd (%rcx), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx)
movl (%rax), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x204d7
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x2048e
jmp 0x20550
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x20477
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x20571
movq -0x60(%rbp), %rdi
callq 0x1f580
movq -0x58(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movb $0x0, -0x19(%rbp)
movl 0x8(%rax), %esi
movl (%rax), %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x10(%rdi), %rcx
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x2061a
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x30(%rbp)
movsd (%rax), %xmm0
addsd -0x18(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
movsd %xmm0, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x205d8
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x2062d
movq -0x48(%rbp), %rdi
callq 0x1f580
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x20835
jp 0x20835
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x58(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x58(%rbp), %rdi
callq 0x23500
movq -0x58(%rbp), %rdi
leaq 0xe4a7(%rip), %rsi      # 0x2ecd0
leaq 0x2d10(%rip), %rdx      # 0x23540
callq 0x33b0
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rdi
movb $0x0, -0x19(%rbp)
movl 0x8(%rax), %esi
movl (%rax), %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movq -0x50(%rbp), %rcx
movq -0x40(%rbp), %rax
movq 0x10(%rcx), %rcx
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x208af
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x30(%rbp)
movsd (%rax), %xmm0
divsd -0x18(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
movsd %xmm0, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2086d
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x208c2
movq -0x50(%rbp), %rdi
callq 0x1f580
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x40, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl 0x8(%rax), %eax
cmpl 0x8(%rsi), %eax
jne 0x20902
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl (%rcx), %eax
je 0x2093f
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x40(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x40(%rbp), %rdi
callq 0x23470
movq -0x40(%rbp), %rdi
leaq 0xe385(%rip), %rsi      # 0x2ecb8
leaq 0x2b76(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, -0x18(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x2099f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rbp)
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2095e
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl 0x8(%rax), %eax
cmpl 0x8(%rsi), %eax
jne 0x20ac2
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl (%rcx), %eax
je 0x20aff
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x40(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x40(%rbp), %rdi
callq 0x23470
movq -0x40(%rbp), %rdi
leaq 0xe1c5(%rip), %rsi      # 0x2ecb8
leaq 0x29b6(%rip), %rdx      # 0x234b0
callq 0x33b0
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, -0x18(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x20b67
jp 0x20b67
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x48(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x48(%rbp), %rdi
callq 0x23500
movq -0x48(%rbp), %rdi
leaq 0xe175(%rip), %rsi      # 0x2ecd0
leaq 0x29de(%rip), %rdx      # 0x23540
callq 0x33b0
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x20baf
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rbp)
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x20b6e
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x20e76
jp 0x20e76
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x30(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x30(%rbp), %rdi
callq 0x23500
movq -0x30(%rbp), %rdi
leaq 0xde66(%rip), %rsi      # 0x2ecd0
leaq 0x26cf(%rip), %rdx      # 0x23540
callq 0x33b0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x20ec0
movsd -0x10(%rbp), %xmm1
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rbp)
movsd (%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x20e89
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: DavidLBruce[P]sim3dof/Matrix/build/../../Matrix/src/Matrix.cpp
// Function: Matrix::Max(double, double)
double Matrix::Max(double lhArg, double rhArg)
{
  double ans;

  if (lhArg < rhArg)
  {
    ans = rhArg;
  }
  else
  {
    ans = lhArg;
  }

  return (ans);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd -0x10(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x21abe
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x21ac8
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
popq %rbp
retq
nop
// File: 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
subq $0x40, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movl 0x4(%rsi), %eax
cmpl 0x4(%rcx), %eax
je 0x21b5f
movq -0x30(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x21b0f
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
je 0x21b5f
movq -0x28(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x21b22
movq -0x28(%rbp), %rax
cmpl $0x1, (%rax)
je 0x21b5f
movl $0x8, %edi
callq 0x3110
movq %rax, %rdi
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x3130
movq -0x38(%rbp), %rdi
callq 0x23470
movq -0x38(%rbp), %rdi
leaq 0xd165(%rip), %rsi      # 0x2ecb8
leaq 0x1956(%rip), %rdx      # 0x234b0
callq 0x33b0
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x21bb1
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x18(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x21b66
movsd -0x18(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x60, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x11(%rbp)
movl (%rax), %esi
movl 0x8(%rax), %edx
xorps %xmm0, %xmm0
callq 0x1f2e0
movl $0x0, -0x18(%rbp)
movq -0x38(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x21c96
movl $0x0, -0x1c(%rbp)
movq -0x38(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl (%rcx), %eax
jge 0x21c86
movq -0x38(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x1fe60
movq %rax, -0x50(%rbp)
jmp 0x21c2f
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %ecx, %esi
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x1fe60
movq %rax, -0x58(%rbp)
jmp 0x21c52
movq -0x58(%rbp), %rax
movsd -0x60(%rbp), %xmm0
movslq -0x18(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x21c12
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x1f580
jmp 0x21cb3
jmp 0x21c88
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x21bfb
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x21ca9
movq -0x48(%rbp), %rdi
callq 0x1f580
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x33d0
nopl (%rax)