LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Align.cpp
// Function: gaps::R2AlignError(gaps::RNArray<gaps::R2Point*> const&, gaps::RNArray<gaps::R2Point*> const&, gaps::R3Matrix const&, double const*)
RNScalar 
R2AlignError(const RNArray<R2Point *>& points1, const RNArray<R2Point *>& points2, 
  const R3Matrix& matrix, const RNScalar* weights)
{
  // Get number of points
  int count = points1.NEntries();
  if (points2.NEntries() < count) count = points2.NEntries();
  if (count == 0) return -1;

  // Compute sum of squared distances
  RNScalar ssd = 0;
  RNScalar total_weight = 0;
  for (int i = 0; i < count; i++) {
    RNScalar weight = (weights) ? weights[i] : 1;
    R2Point *point1 = points1[i];
    R2Point point2 = *(points2[i]);
    point2 = matrix * point2;
    R2Vector v = *point1 - point2;
    ssd += weight * v.Dot(v);
    total_weight += weight;
  }

  // Return RMSD
  if (total_weight == 0) return -1;
  else return sqrt(ssd / total_weight);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movl 0xc(%rdi), %eax
movq %rsi, 0x10(%rsp)
movl 0xc(%rsi), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
movsd 0x34088(%rip), %xmm0    # 0xa2048
testl %eax, %eax
jle 0x6e0b3
movl %eax, %r15d
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
leaq 0x48(%rsp), %r13
leaq 0x38(%rsp), %rbp
xorpd %xmm3, %xmm3
movsd %xmm3, 0x28(%rsp)
movsd %xmm2, 0x30(%rsp)
movsd 0x34044(%rip), %xmm0    # 0xa2038
testq %rbx, %rbx
je 0x6dfff
movsd (%rbx,%r12,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %r14
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rsi
movq %r13, %rdi
callq 0x680b0
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x66e98
movq %r13, %rdi
movq %rbp, %rsi
callq 0x681de
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x682e3
movq %rbp, %rdi
movq %rbp, %rsi
callq 0x68540
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x28(%rsp), %xmm3
addsd %xmm0, %xmm3
movsd 0x30(%rsp), %xmm2
addsd %xmm1, %xmm2
incq %r12
cmpq %r12, %r15
jne 0x6dfe0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
movsd 0x33fb5(%rip), %xmm0    # 0xa2048
jne 0x6e097
jnp 0x6e0b3
divsd %xmm2, %xmm3
ucomisd %xmm1, %xmm3
jb 0x6e0aa
xorps %xmm0, %xmm0
sqrtsd %xmm3, %xmm0
jmp 0x6e0b3
movapd %xmm3, %xmm0
callq 0xe340
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Arc.cpp
// Function: gaps::R2Arc::R2Arc(gaps::R2Point const&, double, double, double)
R2Arc::
R2Arc(const R2Point& center, RNLength radius, RNAngle theta1, RNAngle theta2)
    : circle(center, radius),
      start(theta1),
      stop(theta2)
{
    // Needed because don't know if RN_TWO_PI is initialized
    RNScalar TWO_PI = 2.0 * 3.14159265358979323846;
    while (start >= TWO_PI) start -= TWO_PI;
    while (start < 0.0) start += TWO_PI;
    while (stop >= (start + TWO_PI)) stop -= TWO_PI;
    while (stop < start) stop += TWO_PI;
    assert((0.0 <= start) && (start <= TWO_PI));
    assert((start <= stop) && (stop <= (start + TWO_PI)));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsd %xmm2, 0x8(%rsp)
movsd %xmm1, (%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
callq 0x6ef50
leaq 0x75c5a(%rip), %rax     # 0xe4698
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
movq %r14, %rsi
movsd 0x10(%rsp), %xmm0
callq 0x6f090
movsd (%rsp), %xmm3
movsd %xmm3, 0x28(%rbx)
movsd 0x8(%rsp), %xmm2
movsd %xmm2, 0x30(%rbx)
ucomisd 0x3b488(%rip), %xmm3    # 0xa9ef8
jb 0x6ea91
movsd 0x3b486(%rip), %xmm0    # 0xa9f00
movsd 0x3b476(%rip), %xmm1    # 0xa9ef8
addsd %xmm0, %xmm3
ucomisd %xmm1, %xmm3
jae 0x6ea82
movsd %xmm3, 0x28(%rbx)
xorpd %xmm0, %xmm0
ucomisd %xmm3, %xmm0
jbe 0x6eab2
movsd 0x3b455(%rip), %xmm1    # 0xa9ef8
addsd %xmm1, %xmm3
ucomisd %xmm3, %xmm0
ja 0x6eaa3
movsd %xmm3, 0x28(%rbx)
movsd 0x3b43e(%rip), %xmm0    # 0xa9ef8
addsd %xmm3, %xmm0
ucomisd %xmm0, %xmm2
jb 0x6eadb
movsd 0x3b434(%rip), %xmm1    # 0xa9f00
addsd %xmm1, %xmm2
ucomisd %xmm0, %xmm2
jae 0x6eacc
movsd %xmm2, 0x30(%rbx)
ucomisd %xmm2, %xmm3
jbe 0x6eaf8
movsd 0x3b40f(%rip), %xmm0    # 0xa9ef8
addsd %xmm0, %xmm2
ucomisd %xmm2, %xmm3
ja 0x6eae9
movsd %xmm2, 0x30(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x6ef5c
movq %r14, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Arc.cpp
// Function: gaps::R2Arc::BBox() const
const R2Box R2Arc::
BBox(void) const
{
    // Return bounding box of arc ???
    R2Box bbox(R2null_box);
    bbox.Union(StartPoint());
    bbox.Union(StopPoint());
    if ((start < 0.0) && (stop > 0.0)) bbox.Union(Center() + R2posx_point * Radius());
    if ((start < RN_PI_OVER_TWO) && (stop > RN_PI_OVER_TWO)) bbox.Union(Center() + R2posy_point * Radius());
    if ((start < RN_PI) && (stop > RN_PI)) bbox.Union(Center() + R2negx_point * Radius());
    if ((start < RN_THREE_PI_OVER_TWO) && (stop > RN_THREE_PI_OVER_TWO)) bbox.Union(Center() + R2negy_point * Radius());
    return bbox;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4792d6(%rip), %rsi    # 0x4e7ed8
callq 0x65278
movsd 0x28(%r14), %xmm0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6eb4c
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x65986
movsd 0x30(%r14), %xmm0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6eb4c
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x65986
movsd 0x28(%r14), %xmm1
movsd 0x30(%r14), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x6eca6
ucomisd %xmm2, %xmm0
jbe 0x6eca6
movsd 0x20(%r14), %xmm0
leaq 0x479630(%rip), %rsi    # 0x4e82a0
leaq 0x18(%rsp), %rdi
callq 0x6834d
leaq 0x10(%r14), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x682bb
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x65986
movsd 0x28(%r14), %xmm1
movsd 0x30(%r14), %xmm0
leaq 0x3b32b(%rip), %rax     # 0xa9fd8
movsd (%rax), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x6ed00
ucomisd %xmm2, %xmm0
jbe 0x6ed00
movsd 0x20(%r14), %xmm0
leaq 0x4795e6(%rip), %rsi    # 0x4e82b0
leaq 0x18(%rsp), %rdi
callq 0x6834d
leaq 0x10(%r14), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x682bb
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x65986
movsd 0x28(%r14), %xmm1
movsd 0x30(%r14), %xmm0
leaq 0x3b2c1(%rip), %rax     # 0xa9fc8
movsd (%rax), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x6ed5a
ucomisd %xmm2, %xmm0
jbe 0x6ed5a
movsd 0x20(%r14), %xmm0
leaq 0x47959c(%rip), %rsi    # 0x4e82c0
leaq 0x18(%rsp), %rdi
callq 0x6834d
leaq 0x10(%r14), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x682bb
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x65986
movsd 0x28(%r14), %xmm1
movsd 0x30(%r14), %xmm0
leaq 0x3b27f(%rip), %rax     # 0xa9fe0
movsd (%rax), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x6edab
ucomisd %xmm2, %xmm0
jbe 0x6edab
movsd 0x20(%r14), %xmm0
leaq 0x479552(%rip), %rsi    # 0x4e82d0
leaq 0x18(%rsp), %rdi
callq 0x6834d
addq $0x10, %r14
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
movq %r14, %rsi
callq 0x682bb
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x65986
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x6edc0
jmp 0x6edc0
jmp 0x6edc0
jmp 0x6edc0
jmp 0x6edc0
movq %rax, %r14
movq %rbx, %rdi
callq 0x65c14
movq %r14, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Arc.cpp
// Function: gaps::R2Arc::SetStartAngle(double)
void R2Arc::
SetStartAngle(RNAngle theta)
{
    // Set arc start angle
    start = theta;
    while (start >= RN_TWO_PI) start -= RN_TWO_PI;
    while (start < 0.0) start += RN_TWO_PI;
    while (stop >= (start + RN_TWO_PI)) { stop -= RN_TWO_PI; }
    while (stop < start) { stop += RN_TWO_PI; }
    assert((0.0 <= start) && (start <= RN_TWO_PI));
    assert((start <= stop) && (stop <= (start + RN_TWO_PI)));
}

// Assembly:
leaq 0x3b1af(%rip), %rax     # 0xa9fe8
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
jb 0x6ee49
subsd %xmm1, %xmm0
jmp 0x6ee3d
movsd %xmm0, 0x28(%rdi)
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
jbe 0x6ee67
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm2
ja 0x6ee58
movsd %xmm0, 0x28(%rdi)
movapd %xmm1, %xmm3
addsd %xmm0, %xmm3
movsd 0x30(%rdi), %xmm2
ucomisd %xmm3, %xmm2
jb 0x6ee89
subsd %xmm1, %xmm2
ucomisd %xmm3, %xmm2
jae 0x6ee7a
movsd %xmm2, 0x30(%rdi)
ucomisd %xmm2, %xmm0
jbe 0x6ee9e
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
ja 0x6ee8f
movsd %xmm2, 0x30(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Circle.cpp
// Function: gaps::R2InitCircle()
int 
R2InitCircle()
{
    // Initialize circle angles and points 
    for (int i = 0; i < R2circle_npoints; i++) {
        R2circle_angles[i] = ((RNScalar) i * RN_TWO_PI) / (RNScalar) R2circle_npoints;
        R2circle_points[i] = R2Point(cos(R2circle_angles[i]), sin(R2circle_angles[i]));
    }

    /* Return success */
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x3b06e(%rip), %rax     # 0xa9fe8
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x479565(%rip), %rbx    # 0x4e84f0
leaq 0x47945e(%rip), %r15    # 0x4e83f0
xorl %r12d, %r12d
leaq 0x18(%rsp), %r14
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd 0x8(%rsp), %xmm0
mulsd 0x3a158(%rip), %xmm0    # 0xa9108
movsd %xmm0, (%r15)
callq 0xe860
movsd %xmm0, 0x10(%rsp)
movsd (%r15), %xmm0
callq 0xe0f0
movaps %xmm0, %xmm1
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x680a6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x681de
incq %r12
addq $0x10, %rbx
addq $0x8, %r15
cmpq $0x20, %r12
jne 0x6ef9a
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Circle.cpp
// Function: gaps::R2Circle::Transform(gaps::R2Transformation const&)
void R2Circle::
Transform (const R2Transformation& transformation)
{
    // Transform center 
    center.Transform(transformation);

    // Scale radius 
    if (!transformation.IsIsotropic()) RNWarning("Circle transformed by anisotropic transformation");
    R2Vector v(R2ones_vector);
    v.Transform(transformation);
    radius *= v.Length() / RN_SQRT_TWO;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x681ba
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
testl %eax, %eax
jne 0x6f203
leaq 0x39f32(%rip), %rdi     # 0xa912e
xorl %eax, %eax
callq 0x71a8d
leaq 0x3a836(%rip), %rsi     # 0xa9a40
movq %rsp, %r15
movq %r15, %rdi
callq 0x683dc
movq %r15, %rdi
movq %r14, %rsi
callq 0x68790
movq %r15, %rdi
callq 0x68476
leaq 0x3adc9(%rip), %rax     # 0xa9ff8
divsd (%rax), %xmm0
mulsd 0x18(%rbx), %xmm0
movsd %xmm0, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNGrfx.cpp
// Function: gaps::DecodePickColor(unsigned char*, unsigned int*, unsigned char*)
void
DecodePickColor(unsigned char color[4], unsigned int *index, unsigned char *alpha)
{
  // Unpack index (and then subtract one)
  unsigned int k = 0;
  k |= color[0] << 0;
  k |= color[1] << 8;
  k |= color[2] << 16;
  if (alpha) *alpha = color[4];
  if (index) *index = k - 1;
}

// Assembly:
movzwl (%rdi), %ecx
movzbl 0x2(%rdi), %eax
testq %rdx, %rdx
je 0x6f3bb
movb 0x4(%rdi), %dil
movb %dil, (%rdx)
testq %rsi, %rsi
je 0x6f3c9
shll $0x10, %eax
orl %ecx, %eax
decl %eax
movl %eax, (%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNGrfx.cpp
// Function: gaps::R2SetViewport(int, int, int, int)
void 
R2SetViewport(int xmin, int ymin, int xmax, int ymax)
{
    /* Update viewport */
    RNgrfx_viewport_xmin = xmin;
    RNgrfx_viewport_ymin = ymin;
    RNgrfx_viewport_xmax = xmax;
    RNgrfx_viewport_ymax = ymax;
    RNgrfx_viewport_xcenter = (RNgrfx_viewport_xmax + RNgrfx_viewport_xmin) / 2;
    RNgrfx_viewport_ycenter = (RNgrfx_viewport_ymax + RNgrfx_viewport_ymin) / 2;
    RNgrfx_viewport_width = RNgrfx_viewport_xmax - RNgrfx_viewport_xmin;
    RNgrfx_viewport_height = RNgrfx_viewport_ymax - RNgrfx_viewport_ymin;

    /* Update scale */
    RNgrfx_window_xscale = RNgrfx_viewport_width / RNgrfx_window_width;
    RNgrfx_window_yscale = RNgrfx_viewport_height / RNgrfx_window_height;
}

// Assembly:
movl %edi, 0x479328(%rip)    # 0x4e86f8
movl %esi, 0x479326(%rip)    # 0x4e86fc
movl %edx, 0x766e8(%rip)     # 0xe5ac4
movl %ecx, 0x766e6(%rip)     # 0xe5ac8
leal (%rdx,%rdi), %eax
movl %eax, %r8d
shrl $0x1f, %r8d
addl %eax, %r8d
sarl %r8d
movl %r8d, 0x766c3(%rip)     # 0xe5abc
leal (%rcx,%rsi), %eax
movl %eax, %r8d
shrl $0x1f, %r8d
addl %eax, %r8d
sarl %r8d
movl %r8d, 0x766b0(%rip)     # 0xe5ac0
subl %edi, %edx
cvtsi2ss %edx, %xmm0
movl %edx, 0x76698(%rip)     # 0xe5ab4
subl %esi, %ecx
divss 0x76676(%rip), %xmm0    # 0xe5a9c
movss %xmm0, 0x76666(%rip)    # 0xe5a94
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movl %ecx, 0x7667d(%rip)     # 0xe5ab8
divss 0x7665d(%rip), %xmm0    # 0xe5aa0
movss %xmm0, 0x7664d(%rip)    # 0xe5a98
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNGrfx.cpp
// Function: gaps::R2SetWindow(float, float, float, float)
void 
R2SetWindow(float xmin, float ymin, float xmax, float ymax)
{
    /* Update window */
    RNgrfx_window_xmin = xmin;
    RNgrfx_window_ymin = ymin;
    RNgrfx_window_xmax = xmax;
    RNgrfx_window_ymax = ymax;
    RNgrfx_window_xcenter = (RNgrfx_window_xmax + RNgrfx_window_xmin) / 2.0;
    RNgrfx_window_ycenter = (RNgrfx_window_ymax + RNgrfx_window_ymin) / 2.0;
    RNgrfx_window_width = RNgrfx_window_xmax - RNgrfx_window_xmin;
    RNgrfx_window_height = RNgrfx_window_ymax - RNgrfx_window_ymin;

    /* Update scale */
    RNgrfx_window_xscale = RNgrfx_viewport_width / RNgrfx_window_width;
    RNgrfx_window_yscale = RNgrfx_viewport_height / RNgrfx_window_height;
}

// Assembly:
movss %xmm0, 0x47929c(%rip)   # 0x4e86f0
movss %xmm1, 0x479298(%rip)   # 0x4e86f4
movss %xmm2, 0x76648(%rip)    # 0xe5aac
movss %xmm3, 0x76644(%rip)    # 0xe5ab0
movaps %xmm0, %xmm4
addss %xmm2, %xmm4
movss 0x3aafd(%rip), %xmm5    # 0xa9f78
mulss %xmm5, %xmm4
movss %xmm4, 0x7661d(%rip)    # 0xe5aa4
movaps %xmm1, %xmm4
addss %xmm3, %xmm4
mulss %xmm5, %xmm4
movss %xmm4, 0x7660e(%rip)    # 0xe5aa8
subss %xmm0, %xmm2
movss %xmm2, 0x765f6(%rip)    # 0xe5a9c
subss %xmm1, %xmm3
xorps %xmm0, %xmm0
cvtsi2ssl 0x765ff(%rip), %xmm0 # 0xe5ab4
movss %xmm3, 0x765e3(%rip)    # 0xe5aa0
xorps %xmm1, %xmm1
cvtsi2ssl 0x765f0(%rip), %xmm1 # 0xe5ab8
divss %xmm2, %xmm0
movss %xmm0, 0x765c0(%rip)    # 0xe5a94
divss %xmm3, %xmm1
movss %xmm1, 0x765b8(%rip)    # 0xe5a98
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNGrfx.cpp
// Function: gaps::R2ScaleWindow(float, float)
void 
R2ScaleWindow(float xscale, float yscale)
{
    /* Update window */
    RNgrfx_window_xmin = RNgrfx_window_xcenter - 0.5 * xscale * RNgrfx_window_width;
    RNgrfx_window_ymin = RNgrfx_window_ycenter - 0.5 * yscale * RNgrfx_window_height;
    RNgrfx_window_xmax = RNgrfx_window_xcenter + 0.5 * xscale * RNgrfx_window_width;
    RNgrfx_window_ymax = RNgrfx_window_ycenter + 0.5 * yscale * RNgrfx_window_height;
    RNgrfx_window_width = RNgrfx_window_xmax - RNgrfx_window_xmin;
    RNgrfx_window_height = RNgrfx_window_ymax - RNgrfx_window_ymin;

    /* Update scale */
    RNgrfx_window_xscale = RNgrfx_viewport_width / RNgrfx_window_width;
    RNgrfx_window_yscale = RNgrfx_viewport_height / RNgrfx_window_height;
}

// Assembly:
cvtss2sd 0x765bb(%rip), %xmm3    # 0xe5aa4
cvtss2sd %xmm0, %xmm0
movsd 0x32b3b(%rip), %xmm4    # 0xa2030
mulsd %xmm4, %xmm0
cvtss2sd 0x7659b(%rip), %xmm5    # 0xe5a9c
movapd 0x32b17(%rip), %xmm6    # 0xa2020
movapd %xmm0, %xmm7
xorpd %xmm6, %xmm7
cvtss2sd 0x7658f(%rip), %xmm2    # 0xe5aa8
cvtss2sd %xmm1, %xmm1
mulsd %xmm4, %xmm1
xorps %xmm4, %xmm4
cvtss2sd 0x76574(%rip), %xmm4    # 0xe5aa0
xorpd %xmm1, %xmm6
unpcklpd %xmm7, %xmm0            # xmm0 = xmm0[0],xmm7[0]
movlhps %xmm5, %xmm5            # xmm5 = xmm5[0,0]
mulpd %xmm0, %xmm5
movlhps %xmm3, %xmm3            # xmm3 = xmm3[0,0]
addpd %xmm5, %xmm3
cvtpd2ps %xmm3, %xmm0
movapd %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
movss %xmm3, 0x47919a(%rip)   # 0x4e86f0
movss %xmm0, 0x7654e(%rip)    # 0xe5aac
unpcklpd %xmm6, %xmm1            # xmm1 = xmm1[0],xmm6[0]
movlhps %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd %xmm1, %xmm4
movlhps %xmm2, %xmm2            # xmm2 = xmm2[0,0]
addpd %xmm4, %xmm2
cvtpd2ps %xmm2, %xmm1
movapd %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
movss %xmm2, 0x479170(%rip)   # 0x4e86f4
movss %xmm1, 0x76524(%rip)    # 0xe5ab0
subss %xmm3, %xmm0
movss %xmm0, 0x76504(%rip)    # 0xe5a9c
subss %xmm2, %xmm1
xorps %xmm2, %xmm2
cvtsi2ssl 0x7650d(%rip), %xmm2 # 0xe5ab4
movss %xmm1, 0x764f1(%rip)    # 0xe5aa0
xorps %xmm3, %xmm3
cvtsi2ssl 0x764fe(%rip), %xmm3 # 0xe5ab8
divss %xmm0, %xmm2
movss %xmm2, 0x764ce(%rip)    # 0xe5a94
divss %xmm1, %xmm3
movss %xmm3, 0x764c6(%rip)    # 0xe5a98
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNGrfx.cpp
// Function: gaps::R2TranslateWindow(float, float)
void 
R2TranslateWindow(float xtranslate, float ytranslate)
{
    /* Update window */
    RNgrfx_window_xmin += xtranslate;
    RNgrfx_window_ymin += ytranslate;
    RNgrfx_window_xmax += xtranslate;
    RNgrfx_window_ymax += ytranslate;
    RNgrfx_window_xcenter = (RNgrfx_window_xmax + RNgrfx_window_xmin) / 2.0;
    RNgrfx_window_ycenter = (RNgrfx_window_ymax + RNgrfx_window_ymin) / 2.0;
}

// Assembly:
movss 0x479115(%rip), %xmm2   # 0x4e86f0
addss %xmm0, %xmm2
movss %xmm2, 0x479109(%rip)   # 0x4e86f0
movss 0x479105(%rip), %xmm3   # 0x4e86f4
addss %xmm1, %xmm3
addss 0x764b1(%rip), %xmm0    # 0xe5aac
movss %xmm3, 0x4790f1(%rip)   # 0x4e86f4
movss %xmm0, 0x764a1(%rip)    # 0xe5aac
addss 0x7649d(%rip), %xmm1    # 0xe5ab0
movss %xmm1, 0x76495(%rip)    # 0xe5ab0
addss %xmm2, %xmm0
movss 0x3a951(%rip), %xmm2    # 0xa9f78
mulss %xmm2, %xmm0
movss %xmm0, 0x76471(%rip)    # 0xe5aa4
addss %xmm3, %xmm1
mulss %xmm2, %xmm1
movss %xmm1, 0x76465(%rip)    # 0xe5aa8
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::operator=(gaps::RNVArray const&)
RNVArray& RNVArray::
operator=(const RNVArray& array)
{
    // Empty array
    Empty();

    // Copy array of entries
    if (array.nentries > 0) {
	// Allocate memory for entries
	Resize(array.nentries);
	
	// Copy entries from array
	for (int i = 0; i < array.nentries; i++) 
            entries[i] = array.entries[i];

	// Update number of entries
	nentries = array.nentries;
    }

    // Return array
    return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
jle 0x6f837
movl $0x0, 0xc(%rbx)
movl 0xc(%r14), %esi
testl %esi, %esi
jle 0x6f86b
movq %rbx, %rdi
callq 0x6f906
movslq 0xc(%r14), %rax
testq %rax, %rax
jle 0x6f868
xorl %ecx, %ecx
movq (%r14), %rdx
movq (%rdx,%rcx,8), %rdx
movq (%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x6f852
movl %eax, 0xc(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::InternalInsert(void*, int)
RNArrayEntry *RNVArray::
InternalInsert(void *data, int k)
{
    // Make sure there is enough storage for new entry
    Resize(nentries+1);

    // Increment number of entries
    nentries++;

    // Shift entries up one notch 
    if (k < (nentries-1)) Shift(k, 0, 1);

    // Copy data into kth entry
    entries[k] = data;

    // Return entry
    return &entries[k];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rdi), %esi
incl %esi
callq 0x6f906
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %eax
movl %eax, 0xc(%rbx)
movl %ecx, %eax
subl %ebp, %eax
setg %dl
testl %eax, %eax
setg %al
testb %al, %dl
jne 0x6f8d7
movslq %ebp, %rax
jmp 0x6f8f2
movslq %ebp, %rax
movq (%rbx), %rdx
movq -0x8(%rdx,%rcx,8), %rsi
movq %rsi, (%rdx,%rcx,8)
leaq -0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq %rax, %rdx
jg 0x6f8da
movq (%rbx), %rcx
movq %r14, (%rcx,%rax,8)
shlq $0x3, %rax
addq (%rbx), %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::Resize(int)
void RNVArray::
Resize(int length)
{
    // Check if length is valid
    assert(length >= nentries);
    assert(nentries <= nallocated);

    // Check if are growing array
    if (length > nallocated) {
	// Adjust length to be next greater power of 2
	int tmplength = RN_ARRAY_MIN_ALLOCATED;
	while (tmplength < length) tmplength *= 2;
	length = tmplength;

	// Allocate new entries
	RNArrayEntry *newentries = NULL;
	if (length > 0) {
	    newentries = (RNArrayEntry *) malloc(length * sizeof(RNArrayEntry));
	    assert(newentries);
	}

	// Copy old entries into new entries
	if (nentries > 0) {
	    assert(entries);
	    assert(newentries);
	    for (int i = 0; i < nentries; i++)
                newentries[i] = entries[i];
	}
 
	// Zero remaining new entries
	if (nentries < length) {
	    assert(newentries);
	    for (int i = nentries; i < length; i++)
                newentries[i] = NULL;
	}

	// Replace entries
	if (entries) free(entries);
	entries = newentries;

	// Update nallocated
	nallocated = length;
    }
}

// Assembly:
cmpl %esi, 0x8(%rdi)
jge 0x6f987
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %eax
movl %eax, %r15d
leal (%r15,%r15), %eax
cmpl %esi, %r15d
jl 0x6f918
movl %r15d, %edi
shlq $0x3, %rdi
callq 0xe5e0
movq %rax, %r14
movslq 0xc(%rbx), %rax
testq %rax, %rax
jle 0x6f951
movq (%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq %rsi, (%r14,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x6f941
cmpl %r15d, %eax
jge 0x6f96e
leaq (%r14,%rax,8), %rdi
notl %eax
addl %r15d, %eax
leaq 0x8(,%rax,8), %rdx
xorl %esi, %esi
callq 0xe260
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6f97b
callq 0xe540
movq %r14, (%rbx)
movl %r15d, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::Shift(int, int, int)
void RNVArray::
Shift(int start, int length, int delta)
{
    /* Compute number of entries to shift */
    if ((delta < 0) && (start < -delta)) start = -delta;
    int nshift = nentries - start;
    if (delta > 0) nshift -= delta;
    if (nshift <= 0) return;
    if ((length > 0) && (length < nshift)) nshift = length;

    /* Shift array entries */
    if (delta < 0) {
        for (int i = start; i < (start + nshift); i++) {
	    entries[i+delta]=entries[i];
	}
    }
    else if (delta > 0) {
        for (int i = (start + nshift - 1); i >= start; i--) {
	    entries[i+delta]=entries[i];
	}
    }
}

// Assembly:
movl %ecx, %r8d
negl %r8d
cmpl %esi, %r8d
movl %esi, %r9d
cmovgl %r8d, %r9d
xorl %eax, %eax
testl %ecx, %ecx
movl %esi, %r11d
cmovsl %r9d, %r11d
cmovgl %ecx, %eax
movl 0xc(%rdi), %r10d
addl %r11d, %eax
subl %eax, %r10d
testl %r10d, %r10d
jle 0x6fa2b
cmpl %edx, %r10d
movl %edx, %eax
cmovbl %r10d, %eax
testl %edx, %edx
cmovlel %r10d, %eax
testl %ecx, %ecx
js 0x6f9fb
jle 0x6fa2b
addl %esi, %eax
cmpl %esi, %eax
jle 0x6fa2b
movslq %eax, %rdx
movl %ecx, %eax
movslq %esi, %rcx
shlq $0x3, %rax
movq (%rdi), %rsi
leaq (%rsi,%rdx,8), %r8
movq -0x8(%rsi,%rdx,8), %rsi
leaq -0x1(%rdx), %r9
movq %rsi, -0x8(%rax,%r8)
movq %r9, %rdx
cmpq %rcx, %r9
jg 0x6f9dc
jmp 0x6fa2b
leal (%rax,%r9), %edx
cmpl %edx, %r9d
jge 0x6fa2b
cmpl %r8d, %esi
cmovgl %esi, %r8d
movslq %r8d, %rdx
movslq %ecx, %rcx
shlq $0x3, %rcx
movq (%rdi), %rsi
leaq (%rsi,%rdx,8), %r8
movq (%rsi,%rdx,8), %rsi
movq %rsi, (%rcx,%r8)
incq %rdx
decl %eax
jne 0x6fa15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::InternalRemove(int)
void RNVArray::
InternalRemove(int k) 
{
    // Shift entries down one notch
    if (k < (nentries-1)) Shift(k+1, 0, -1);

    // Decrement number of entries
    nentries--;
}

// Assembly:
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
cmpl %esi, %ecx
jle 0x6fa67
xorl %edx, %edx
testl %esi, %esi
cmovgl %esi, %edx
incl %edx
movl %eax, %esi
subl %edx, %esi
setle %r8b
testl %esi, %esi
setle %sil
orb %r8b, %sil
jne 0x6fa67
movl %edx, %edx
movq (%rdi), %rsi
movq (%rsi,%rdx,8), %r8
movq %r8, -0x8(%rsi,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x6fa54
movl %ecx, 0xc(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::Empty(int)
void RNVArray::
Empty(RNBoolean deallocate)
{
    // Remove all entries from array
    Truncate(0);

    // Deallocate memory
    if (deallocate) {
        if (entries) delete entries;
        entries = NULL;
        nallocated = 0;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
jle 0x6fa7d
movl $0x0, 0xc(%rbx)
testl %esi, %esi
je 0x6faa1
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6fa93
movl $0x8, %esi
callq 0xe450
movq $0x0, (%rbx)
movl $0x0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::Reverse(int, int)
void RNVArray::
Reverse(int start, int length)
{
    /* Compute number of entries to reverse */
    int nreverse = nentries - start;
    if (nreverse <= 0) return;
    if ((length > 0) && (length < nreverse)) nreverse = length;
    if (nreverse <= 0) return;

    // Reverse length at start
    int i, j;
    for (i = start, j = start + nreverse - 1; i < j; i++, j--) {
        Swap(i, j);
    }
}

// Assembly:
movl 0xc(%rdi), %eax
subl %esi, %eax
jle 0x6fb3f
cmpl %edx, %eax
movl %edx, %ecx
cmovbl %eax, %ecx
testl %edx, %edx
cmovlel %eax, %ecx
leal (%rcx,%rsi), %eax
decl %eax
cmpl %esi, %eax
jle 0x6fb3f
cltq
movslq %esi, %rcx
decq %rax
movq (%rdi), %rdx
movq (%rdx,%rcx,8), %rsi
movq 0x8(%rdx,%rax,8), %r8
movq %r8, (%rdx,%rcx,8)
movq (%rdi), %rdx
movq %rsi, 0x8(%rdx,%rax,8)
incq %rcx
leaq -0x1(%rax), %rdx
cmpq %rax, %rcx
movq %rdx, %rax
jl 0x6fb18
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNArray.cpp
// Function: gaps::RNVArray::Append(gaps::RNVArray const&)
void RNVArray::
Append(const RNVArray& array)
{
    // Resize first
    Resize(NEntries() + array.NEntries());

    // Insert entries of array
    for (int i = 0; i < array.NEntries(); i++)
	Insert(array.Kth(i));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0xc(%rsi), %esi
addl 0xc(%rdi), %esi
callq 0x6f906
cmpl $0x0, 0xc(%rbx)
jle 0x6fb9c
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rsi
movl 0xc(%r14), %edx
movq %r14, %rdi
callq 0x6f8a2
incq %r15
movslq 0xc(%rbx), %rax
cmpq %rax, %r15
jl 0x6fb7d
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::rotate_cols(int, int, double, double, double*, int, int, int, int)
void rotate_cols(int i,int j,RNScalar cos,RNScalar sin,RNScalar* a,int start,int n,int mm,int nn)
{
    int end = start+n, k;
    RNScalar x,y;
    for (k=start; k<end; k++) {
	x = REF2D(a,mm,nn,k,i);
	y = REF2D(a,mm,nn,k,j);
	REF2D(a,mm,nn,k,i) =  cos*x + sin*y;
	REF2D(a,mm,nn,k,j) = -sin*x + cos*y;
    }
}

// Assembly:
testl %r8d, %r8d
jle 0x702f4
addl %ecx, %r8d
movapd 0x31d8f(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
movslq %ecx, %rax
movslq 0x8(%rsp), %rcx
movslq %edi, %rdi
movslq %esi, %rsi
movslq %r8d, %r8
movq %rcx, %r9
imulq %rax, %r9
leaq (%rdx,%r9,8), %rdx
shlq $0x3, %rcx
movsd (%rdx,%rdi,8), %xmm3
movsd (%rdx,%rsi,8), %xmm4
movapd %xmm4, %xmm5
mulsd %xmm1, %xmm5
movapd %xmm0, %xmm6
mulsd %xmm3, %xmm6
addsd %xmm5, %xmm6
movsd %xmm6, (%rdx,%rdi,8)
mulsd %xmm0, %xmm4
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd %xmm3, (%rdx,%rsi,8)
incq %rax
addq %rcx, %rdx
cmpq %r8, %rax
jl 0x702b5
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::rotate_rows(int, int, double, double, double*, int, int, int, int)
void rotate_rows(int i,int j, RNScalar cos,RNScalar sin,RNScalar* a,int start,int n,int mm,int nn)
{
    int end = start+n, k;
    RNScalar x,y;
    for (k=start; k<end; k++) {
	x = REF2D(a,mm,nn,i,k);
	y = REF2D(a,mm,nn,j,k);
	REF2D(a,mm,nn,i,k) =  cos*x + sin*y;
	REF2D(a,mm,nn,j,k) = -sin*x + cos*y;
    }
}

// Assembly:
testl %r8d, %r8d
jle 0x70363
movl 0x8(%rsp), %eax
addl %ecx, %r8d
imull %eax, %edi
imull %eax, %esi
movapd 0x31d11(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
movslq %ecx, %rax
movslq %edi, %rdi
movslq %esi, %r9
movslq %r8d, %rcx
leaq (%rdx,%rdi,8), %rsi
leaq (%rdx,%r9,8), %rdx
movsd (%rsi,%rax,8), %xmm3
movsd (%rdx,%rax,8), %xmm4
movapd %xmm4, %xmm5
mulsd %xmm1, %xmm5
movapd %xmm0, %xmm6
mulsd %xmm3, %xmm6
addsd %xmm5, %xmm6
movsd %xmm6, (%rsi,%rax,8)
mulsd %xmm0, %xmm4
mulsd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd %xmm3, (%rdx,%rax,8)
incq %rax
cmpq %rcx, %rax
jl 0x70327
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::clr_top_supdiag_elt(double*, int, int, double*, int, int, int)
void clr_top_supdiag_elt(RNScalar * b,int p,int z,RNScalar * u,int m,int n,int min)
{
    int i;
    RNScalar r, x, hypot, cos, sin;

    for (i=p+1; i<=z; i++) {
	r = REF2D(b,m,n,p,i);
	x = REF2D(b,m,n,i,i);
	if (r==0) break;
	hypot = ((RNScalar) sqrt (r*r + x*x)); //hypot = pythag(r,x);
	cos = x/hypot;
	sin = r/hypot;
	/* update the diagonal and superdiagonal elements */
	REF2D(b,m,n,p,i) = 0;
	REF2D(b,m,n,i,i) = hypot;
	/* Rotate the remainder of rows p and i (only need to
	** rotate one more element, since the rest are zero) */
	if (i != z) rotate_rows(p,i,cos,sin,b,i+1,1,m,n);
	/* accumulate the rotation into u */
	rotate_cols(i,p,cos,sin,u,0,m,m,min);
    }
}

// Assembly:
cmpl %edx, %esi
jge 0x704bd
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %eax
imull %esi, %eax
cltq
leaq (%rdi,%rax,8), %rax
movslq 0x30(%rsp), %r10
movslq %esi, %r15
movl %r8d, %esi
leaq (%rcx,%r15,8), %rcx
movslq %r9d, %r11
incl %r9d
movslq %edx, %rdx
shlq $0x3, %r10
movl $0x8, %ebx
xorpd %xmm0, %xmm0
movapd 0x31c73(%rip), %xmm1    # 0xa2020
movsd 0x8(%rax,%r15,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x703c0
jnp 0x704b5
leaq 0x1(%r15), %r14
movl %r9d, %ebp
imull %r14d, %ebp
movslq %ebp, %r12
movsd (%rdi,%r12,8), %xmm3
movapd %xmm3, %xmm4
mulsd %xmm3, %xmm4
movapd %xmm2, %xmm5
mulsd %xmm2, %xmm5
addsd %xmm4, %xmm5
xorps %xmm4, %xmm4
sqrtsd %xmm5, %xmm4
divsd %xmm4, %xmm3
divsd %xmm4, %xmm2
movq $0x0, (%rax,%r14,8)
movsd %xmm4, (%rdi,%r12,8)
cmpq %rdx, %r14
je 0x70451
movq %r14, %r12
imulq %r11, %r12
leaq (%rdi,%r12,8), %r12
movsd 0x10(%r12,%r15,8), %xmm4
movsd 0x10(%rax,%r15,8), %xmm5
movapd %xmm2, %xmm6
mulsd %xmm4, %xmm6
movapd %xmm3, %xmm7
mulsd %xmm5, %xmm7
addsd %xmm6, %xmm7
movsd %xmm7, 0x10(%rax,%r15,8)
mulsd %xmm3, %xmm4
mulsd %xmm2, %xmm5
subsd %xmm5, %xmm4
movsd %xmm4, 0x10(%r12,%r15,8)
testl %r8d, %r8d
jle 0x704a5
movapd %xmm2, %xmm4
xorpd %xmm1, %xmm4
movq %rcx, %r15
movq %rsi, %r12
movsd (%r15,%rbx), %xmm5
movsd (%r15), %xmm6
movapd %xmm2, %xmm7
mulsd %xmm6, %xmm7
movapd %xmm3, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm7, %xmm8
movsd %xmm8, (%r15,%rbx)
mulsd %xmm3, %xmm6
mulsd %xmm4, %xmm5
addsd %xmm6, %xmm5
movsd %xmm5, (%r15)
addq %r10, %r15
decq %r12
jne 0x70464
addq $0x8, %rbx
movq %r14, %r15
cmpq %rdx, %r14
jne 0x703ad
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::clr_bot_supdiag_elt(double*, int, int, double*, int, int, int)
void clr_bot_supdiag_elt(RNScalar * b,int p,int z,RNScalar * v,int m,int n,int min)
{
    int i;
    RNScalar r, x, hypot, cos, sin;

    for (i=z-1; i>=p; i--) {
	r = REF2D(b,m,n,i,z);
	x = REF2D(b,m,n,i,i);
	if (r==0) break;
	hypot = ((RNScalar) sqrt (r*r + x*x)); //hypot = pythag(r,x);
	cos = x/hypot;
	sin = r/hypot;
	/* update the diagonal and superdiagonal elements */
	REF2D(b,m,n,i,z) = 0;
	REF2D(b,m,n,i,i) = hypot;
	/* Rotate the remainder of cols z and i (only need to
	** rotate one more element, since the rest are zero) */
	if (i != p) rotate_cols(i,z,cos,sin,b,i-1,1,m,n);
	/* accumulate the rotation into v */
	rotate_rows(i,z,cos,sin,v,0,n,min,n);
    }
}

// Assembly:
cmpl %esi, %edx
jle 0x7061f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq %r9d, %rax
movslq %edx, %r14
leaq (%rdi,%r14,8), %r8
imull %r9d, %edx
movslq %edx, %r10
movl %eax, %edx
leaq (%rcx,%r10,8), %r10
movslq %esi, %rsi
leaq -0x1(%r14), %r11
imulq %rax, %r11
leaq (%rcx,%r11,8), %rcx
leaq (,%rax,8), %r11
negq %r11
xorpd %xmm0, %xmm0
movapd 0x31b13(%rip), %xmm1    # 0xa2020
leaq -0x1(%r14), %rbx
movq %rbx, %r12
imulq %rax, %r12
movsd (%r8,%r12,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x7052a
jnp 0x70615
movl %ebx, %ebp
imull %r9d, %ebp
movslq %ebp, %r13
leaq (%rdi,%rbx,8), %r15
movsd (%r15,%r13,8), %xmm3
movapd %xmm3, %xmm4
mulsd %xmm3, %xmm4
movapd %xmm2, %xmm5
mulsd %xmm2, %xmm5
addsd %xmm4, %xmm5
xorps %xmm4, %xmm4
sqrtsd %xmm5, %xmm4
divsd %xmm4, %xmm3
divsd %xmm4, %xmm2
movq $0x0, (%r8,%r12,8)
movsd %xmm4, (%r15,%r13,8)
cmpq %rsi, %rbx
je 0x705b3
addq $-0x2, %r14
imulq %rax, %r14
movsd (%r15,%r14,8), %xmm4
movsd (%r8,%r14,8), %xmm5
movapd %xmm2, %xmm6
mulsd %xmm5, %xmm6
movapd %xmm3, %xmm7
mulsd %xmm4, %xmm7
addsd %xmm6, %xmm7
movsd %xmm7, (%r15,%r14,8)
mulsd %xmm3, %xmm5
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm5
movsd %xmm5, (%r8,%r14,8)
testl %r9d, %r9d
jle 0x70606
movapd %xmm2, %xmm4
xorpd %xmm1, %xmm4
xorl %r14d, %r14d
movsd (%rcx,%r14,8), %xmm5
movsd (%r10,%r14,8), %xmm6
movapd %xmm2, %xmm7
mulsd %xmm6, %xmm7
movapd %xmm3, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm7, %xmm8
movsd %xmm8, (%rcx,%r14,8)
mulsd %xmm3, %xmm6
mulsd %xmm4, %xmm5
addsd %xmm6, %xmm5
movsd %xmm5, (%r10,%r14,8)
incq %r14
cmpq %r14, %rdx
jne 0x705c3
addq %r11, %rcx
movq %rbx, %r14
cmpq %rsi, %rbx
jg 0x7050d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::RNSvdBacksubstitute(int, int, double const*, double const*, double const*, double const*, double*, double)
void RNSvdBacksubstitute(int m, int n, 
    const RNScalar *u, const RNScalar *w, const RNScalar *vt, const RNScalar *b, 
    RNScalar *x, RNScalar eps)
{
    const int min = MIN(m,n);
    const RNScalar thresh = eps * w[0];	/* singular vals are sorted, w[0] is max */
    RNScalar *tmp = ALLOC1D(min);
    int i,j,k;

    for (j=0; j<min; j++) {
	RNScalar s = 0;
	if (w[j] >= thresh) {
	    for (i=0; i<m; i++) s += REF2D(u,m,min,i,j) * b[i];
	    s /= w[j];
	}
	tmp[j] = s;
    }
    for (k=0; k<n; k++) {
	RNScalar s=0;
	for (j=0; j<min; j++) s += REF2D(vt,min,n,j,k) * tmp[j];
	x[k] = s;
    }
    FREE(tmp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movl %edi, (%rsp)
cmpl %esi, %edi
movl %esi, 0x4(%rsp)
movl %esi, %ebp
cmovll %edi, %ebp
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
mulsd (%rcx), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq (,%rbp,8), %r14
movq %r14, %rdi
callq 0xe5e0
movsd 0x8(%rsp), %xmm3
movl (%rsp), %r9d
testl %ebp, %ebp
jle 0x713ae
movl %r9d, %ecx
xorl %edx, %edx
movsd (%r12,%rdx,8), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm3, %xmm1
jb 0x7139d
movq %r13, %rsi
xorl %edi, %edi
movsd (%rsi), %xmm2
mulsd (%r15,%rdi,8), %xmm2
addsd %xmm2, %xmm0
incq %rdi
addq %r14, %rsi
cmpq %rdi, %rcx
jne 0x71380
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
addq $0x8, %r13
cmpq %rbp, %rdx
jne 0x7136b
movl 0x4(%rsp), %ecx
testl %ecx, %ecx
movq 0x10(%rsp), %r10
jle 0x71401
movl %ecx, %ecx
leaq (,%rcx,8), %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
testl %r9d, %r9d
jle 0x713ef
movq %rbx, %rdi
xorl %r8d, %r8d
movsd (%rdi), %xmm1
mulsd (%rax,%r8,8), %xmm1
addsd %xmm1, %xmm0
incq %r8
addq %rdx, %rdi
cmpq %r8, %rbp
jne 0x713d6
movsd %xmm0, (%r10,%rsi,8)
incq %rsi
addq $0x8, %rbx
cmpq %rcx, %rsi
jne 0x713c7
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe540
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNSvd.cpp
// Function: gaps::RNSvdSolve(int, int, double const*, double const*, double*, double)
void RNSvdSolve(int m, int n, 
    const RNScalar *a, const RNScalar *b,
    RNScalar *x, RNScalar eps)
{
  // Allocate memory
  int min = (m < n) ? m : n;
  RNScalar *u = new RNScalar [ m * min ];
  RNScalar *w = new RNScalar [ min ];
  RNScalar *vt = new RNScalar [ min * n ];
  assert(u && w && vt);

  // Decompose matrix
  RNSvdDecompose(m, n, a, u, w, vt);

  // Backsubstitute
  RNSvdBacksubstitute(m, n, u, w, vt, b, x, eps);

  // Delete memory
  delete [] u;
  delete [] w;
  delete [] vt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x20(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movl %esi, %ebp
movl %edi, %r15d
cmpl %esi, %edi
movl %esi, %r14d
cmovll %edi, %r14d
movq %rdx, 0x8(%rsp)
movl %r14d, %eax
imull %edi, %eax
leaq (,%rax,8), %rdi
testl %eax, %eax
movq $-0x1, %r13
cmovsq %r13, %rdi
callq 0xe030
movq %rax, %r12
leaq (,%r14,8), %rdi
testl %r14d, %r14d
cmovsq %r13, %rdi
callq 0xe030
movq %rax, %rbx
imull %ebp, %r14d
leaq (,%r14,8), %rdi
testl %r14d, %r14d
cmovsq %r13, %rdi
callq 0xe030
movq %rax, %r14
movl %r15d, %edi
movl %ebp, %esi
movq 0x8(%rsp), %rdx
movq %r12, %rcx
movq %rbx, %r8
movq %rax, %r9
callq 0x710b6
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl %r15d, %edi
movl %ebp, %esi
movq %r12, %rdx
movq %rbx, %rcx
movq %r14, %r8
movq 0x18(%rsp), %r9
movsd 0x20(%rsp), %xmm0
callq 0x7130c
movq %r12, %rdi
callq 0xe5b0
movq %rbx, %rdi
callq 0xe5b0
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe5b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNScalar.cpp
// Function: gaps::RNSeedRandomScalar(double)
void 
RNSeedRandomScalar(RNScalar seed)
{
#if (RN_OS == RN_WINDOWS)
  if (seed == 0.0) srand(GetTickCount());
  else srand((int) (1.0E6 * seed));
#elif (RN_CC_VER == RN_C11)
#else
  if (seed == 0.0) { 
    struct timeval timevalue;
    gettimeofday(&timevalue, NULL);
    srand48(timevalue.tv_usec);
  }
  else {
    srand48((long) (1.0E6 * seed));
  }
#endif
  random_seeded = TRUE;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x715c9
jp 0x715c9
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe760
movq 0x8(%rbx), %rdi
jmp 0x715d6
mulsd 0x3899f(%rip), %xmm0    # 0xa9f70
cvttsd2si %xmm0, %rdi
callq 0xe7b0
movb $0x1, 0x4771de(%rip)    # 0x4e87c0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNType.cpp
// Function: gaps::RNClassType::RNClassType(int, char const*)
RNClassType::
RNClassType(RNClassID id, const char *name)
{
    // Initialize class type
    this->id = id;
    if (!name) this->name = NULL;
    else {
	this->name = new char[strlen(name) + 1];
	assert(this->name);
	strcpy(this->name, name);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl %esi, (%rdi)
testq %rdx, %rdx
je 0x716cc
movq %rdx, %rbx
movq %rdx, %rdi
callq 0xe1e0
leaq 0x1(%rax), %rdi
callq 0xe030
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe3d0
movq $0x0, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNType.cpp
// Function: gaps::RNClassType::RNClassType(char const*)
RNClassType::
RNClassType(const char *name)
{
    // Initialize class type
    id = ++RNnclass_ids;
    if (!name) this->name = NULL;
    else {
	this->name = new char[strlen(name) + 1];
	assert(this->name);
	strcpy(this->name, name);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x4770ef(%rip), %eax    # 0x4e87d8
incl %eax
movl %eax, 0x4770e7(%rip)    # 0x4e87d8
movl %eax, (%rdi)
testq %rsi, %rsi
je 0x71722
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xe1e0
leaq 0x1(%rax), %rdi
callq 0xe030
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe3d0
movq $0x0, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNMem.cpp
// Function: gaps::RNSwap(void*, void*, void*, int)
void RNSwap(void *node1, void *node2, void *buffer, int size)
{
    // Check arguments
    assert(node1);
    assert(node2);
    assert(size > 0);

    // Find suitable swap buffer 
    void *swap = buffer;
    char swap_buffer[RN_SWAP_BUFFER_SIZE];
    if (buffer == NULL) {
	swap = (void *) swap_buffer;
	if (size > RN_SWAP_BUFFER_SIZE) {
	    swap = (void *) malloc(size);
            if (!swap) {
		RNFail("Unable to allocate swap buffer");
                return;
	    }
	}
    }

    // Swap two buffers 
    RNCopy(node1, swap, size);
    RNCopy(node2, node1, size);
    RNCopy(swap, node2, size);

    // Free swap buffer 
    if (buffer == NULL) {
	if (size > RN_SWAP_BUFFER_SIZE) {
	    free(swap);
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %ecx, %ebx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
movq %rdx, %r15
testq %rdx, %rdx
jne 0x717b4
cmpl $0x401, %ebx            # imm = 0x401
jl 0x717b1
movl %ebx, %edi
callq 0xe5e0
movq %rax, %r15
testq %rax, %rax
jne 0x717b4
leaq 0x3886f(%rip), %rdi     # 0xaa008
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x719d2
movq %rsp, %r15
testq %r13, %r13
setne %bpl
movslq %ebx, %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xe370
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xe370
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xe370
cmpl $0x401, %ebx            # imm = 0x401
setl %al
orb %bpl, %al
jne 0x717fe
movq %r15, %rdi
callq 0xe540
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNMem.cpp
// Function: gaps::RNStrdup(char const*)
char *RNStrdup(const char *str)
{
  // Copy a string (RNStrdup is not part of standard)
  size_t len = strlen(str) + 1;
  void *output = malloc(len);
  if (output == NULL) return NULL;
  return (char *) memcpy (output, str, len);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xe1e0
movq %rax, %r14
incq %r14
movq %r14, %rdi
callq 0xe5e0
testq %rax, %rax
je 0x71867
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe370
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNMem.cpp
// Function: gaps::RNStrncpy(char*, char const*, int)
char *RNStrncpy(char *dst, const char *src, int max_length)
{
  // Check arguments
  if (!dst) return NULL;
  if (!src) return NULL;
  if (max_length < 0) return NULL;

  // Copy characters
  int count = 0;
  char *dstp = dst;
  const char *srcp = src;
  while (count < max_length) {
    if (count++ >= max_length) break;
    if (!*srcp) { *dstp = '\0'; break; }
    *dstp++ = *srcp++;
  }

  // Return destination address
  return dst;
}

// Assembly:
movq %rdi, %rax
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
orb %cl, %dil
testl %edx, %edx
sets %cl
orb %dil, %cl
je 0x7188f
xorl %eax, %eax
retq
testl %edx, %edx
je 0x718ab
movl %edx, %ecx
xorl %edx, %edx
movb (%rsi,%rdx), %dil
testb %dil, %dil
je 0x718ac
movb %dil, (%rax,%rdx)
incq %rdx
cmpl %edx, %ecx
jne 0x71897
retq
movb $0x0, (%rax,%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNError.cpp
// Function: gaps::RNAbort(char const*, ...)
void RNAbort(const char *fmt, ...)
{
#if (0) && (RN_OS == RN_WINDOWS)
    /* Display error message */
    char outbuf[256];
    outbuf[0] = '\0';
    if (fmt) {
	char buf[256];
        va_list args;
        va_start(args, fmt);
        vsprintf(buf, fmt, args);
	strcat(outbuf, buf);
        va_end(args);
        strcat(outbuf, "\n");
    }
    MessageBox(NULL, outbuf, "GAPS FATAL ERROR -- ABORTING", MB_ICONSTOP | MB_OK);
#endif

    /* Print error message */
    if (RNerror_file) {
        // perror("GAPS FATAL ERROR.  ABORTING:");
	if (fmt) {
	    va_list args;
	    va_start(args, fmt);
	    vfprintf(RNerror_file, fmt, args);
	    va_end(args);
	    fprintf(RNerror_file, "\n");
	}
	fflush(RNerror_file);
    }

    /* Abort */
    fflush(stdout);
    fflush(stderr);
    abort();
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
testb %al, %al
je 0x7193b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movq 0x476e85(%rip), %rdi    # 0x4e87e0
testq %rdi, %rdi
je 0x719af
testq %r10, %r10
je 0x719aa
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq %r10, %rsi
callq 0xe5f0
movq 0x476e47(%rip), %rsi    # 0x4e87e0
movl $0xa, %edi
callq 0xe5a0
movq 0x476e36(%rip), %rdi    # 0x4e87e0
callq 0xe520
movq 0x735ba(%rip), %rax     # 0xe4f70
movq (%rax), %rdi
callq 0xe520
movq 0x735f3(%rip), %rax     # 0xe4fb8
movq (%rax), %rdi
callq 0xe520
callq 0xe270
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/RNError.cpp
// Function: gaps::RNFail(char const*, ...)
void RNFail(const char *fmt, ...)
{
#if (0) && (RN_OS == RN_WINDOWS)
    /* Display error message */
    char outbuf[256];
    outbuf[0] = '\0';
    if (fmt) {
	char buf[256];
        va_list args;
        va_start(args, fmt);
        vsprintf(buf, fmt, args);
	strcat(outbuf, buf);
        va_end(args);
        strcat(outbuf, "\n");
    }
    MessageBox(NULL, outbuf, "GAPS ERROR", MB_ICONSTOP | MB_OK);
#endif

    /* Print error message */
    if (RNerror_file) {
        // perror("GAPS ERROR");
        if (fmt) {
	    va_list args;
	    va_start(args, fmt);
	    vfprintf(RNerror_file, fmt, args);
	    va_end(args);
	    fprintf(RNerror_file, "\n");
	}
    }
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
testb %al, %al
je 0x71a17
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movq 0x476da9(%rip), %rdi    # 0x4e87e0
testq %rdi, %rdi
sete %al
testq %r10, %r10
sete %cl
orb %al, %cl
jne 0x71a85
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq %r10, %rsi
callq 0xe5f0
movq 0x476d65(%rip), %rsi    # 0x4e87e0
movl $0xa, %edi
callq 0xe5a0
addq $0xd8, %rsp
retq