LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::R3Span(double, double, double, double, double, double)
R3Span::
R3Span(RNCoord x1, RNCoord y1, RNCoord z1, RNCoord x2, RNCoord y2, RNCoord z2)
    : end(x2, y2, z2)
{
    R3Point p1(x1, y1, z1);
    R3Point p2(x2, y2, z2);
    R3Vector v(p2 - p1);
    length = v.Length();
    if (RNIsNotZero(length)) v /= length;
    ray.Reset(p1, v, TRUE);
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movsd %xmm0, 0x78(%rsp)
movsd %xmm1, 0x70(%rsp)
movsd %xmm2, 0x68(%rsp)
movsd %xmm3, 0x60(%rsp)
movsd %xmm4, 0x58(%rsp)
movsd %xmm5, 0x50(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x6e3d0
movq (%rsp), %rdi
addq $0x30, %rdi
movsd 0x60(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
callq 0x6eb50
movsd 0x78(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
movsd 0x68(%rsp), %xmm2
leaq 0x38(%rsp), %rdi
callq 0x6eb50
movsd 0x60(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
leaq 0x20(%rsp), %rdi
callq 0x6eb50
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x6eeb0
leaq 0x8(%rsp), %rdi
callq 0x6fe90
movq (%rsp), %rax
movsd %xmm0, 0x48(%rax)
movsd 0x48(%rax), %xmm0
leaq 0x10ae12(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x555a0
cmpl $0x0, %eax
je 0x6d6ef
movq (%rsp), %rax
movsd 0x48(%rax), %xmm0
leaq 0x8(%rsp), %rdi
callq 0x70ec0
movq (%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movl $0x1, %ecx
callq 0x6e1a0
addq $0x88, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::BBox() const
const R3Box R3Span::
BBox(void) const
{
    // Return bounding box 
    R3Box bbox(Start(), Start());
    bbox.Union(End());
    return bbox;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movb $0x0, 0x47(%rsp)
callq 0x39250
movq 0x20(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0x39250
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x42940
movq 0x20(%rsp), %rdi
callq 0x39260
movq %rax, 0x28(%rsp)
jmp 0x6d851
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x444b0
jmp 0x6d862
movb $0x1, 0x47(%rsp)
testb $0x1, 0x47(%rsp)
jne 0x6d894
jmp 0x6d88a
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x36a80
jmp 0x6d89e
movq 0x10(%rsp), %rdi
callq 0x36a80
movq 0x8(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0xf890
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::Reposition(int, gaps::R3Point const&)
void R3Span::
Reposition(int k, const R3Point& point)
{
    // Set one endpoint of span
    if (k == 0) ray = R3Ray(point, end);
    else { end = point; ray.Align(end - ray.Start()); }
    length = R3Distance(Start(), End());
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x6c(%rsp)
jne 0x6da2c
movq 0x10(%rsp), %rdx
movq 0x60(%rsp), %rsi
addq $0x30, %rdx
leaq 0x30(%rsp), %rdi
callq 0x6e450
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3c110
jmp 0x6da78
movq 0x10(%rsp), %rdi
movq 0x60(%rsp), %rsi
addq $0x30, %rdi
callq 0x6f1e0
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0x30, %rax
movq %rax, 0x8(%rsp)
callq 0x3c0c0
movq 0x8(%rsp), %rsi
movq %rax, %rdx
leaq 0x18(%rsp), %rdi
callq 0x6eeb0
movq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x6e1e0
movq 0x10(%rsp), %rdi
callq 0x39250
movq 0x10(%rsp), %rdi
movq %rax, (%rsp)
callq 0x39260
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x86c40
movq 0x10(%rsp), %rax
movsd %xmm0, 0x48(%rax)
addq $0x78, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::Flip()
void R3Span::
Flip(void)
{
    // Flip direction of span
    R3Point swap = Start();
    ray.Reposition(end);
    end = swap;
    ray.Flip();
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x39250
movq %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x6eb90
movq (%rsp), %rdi
movq %rdi, %rsi
addq $0x30, %rsi
callq 0x6e210
movq (%rsp), %rdi
addq $0x30, %rdi
leaq 0x8(%rsp), %rsi
callq 0x6f1e0
movq (%rsp), %rdi
callq 0x6e240
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Line.h
// Function: gaps::R3Line::Reset(gaps::R3Point const&, gaps::R3Vector const&, int)
inline void R3Line::
Reset(const R3Point& point, const R3Vector& vector, RNBoolean normalized)
{
    // Reset line
    this->point = point;
    this->vector = vector;
    if (!normalized) this->vector.Normalize();
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x18(%rsp), %rsi
callq 0x6f1e0
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rdi
callq 0x70970
cmpl $0x0, 0xc(%rsp)
jne 0x6e2d0
movq (%rsp), %rdi
addq $0x18, %rdi
callq 0x70410
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Ray.cpp
// Function: gaps::R3Ray::T(gaps::R3Point const&) const
const RNScalar R3Ray::
T(const R3Point& point) const
{
    // Return parametric value of closest point on ray
    if (IsZero()) return 0.0;
    RNScalar denom = Vector().Dot(Vector());
    assert(RNIsNotZero(denom));
    R3Vector topoint = point - Start();
    return (Vector().Dot(topoint) / denom);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x6e660
cmpl $0x0, %eax
je 0x6e57d
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x6e5f2
movq 0x18(%rsp), %rdi
callq 0x3c0e0
movq 0x18(%rsp), %rdi
movq %rax, 0x8(%rsp)
callq 0x3c0e0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x702c0
movq 0x18(%rsp), %rdi
movsd %xmm0, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x3c0c0
movq 0x10(%rsp), %rsi
movq %rax, %rdx
leaq 0x20(%rsp), %rdi
callq 0x6eeb0
movq 0x18(%rsp), %rdi
callq 0x3c0e0
movq %rax, %rdi
leaq 0x20(%rsp), %rsi
callq 0x702c0
divsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x58, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Line.cpp
// Function: gaps::R3Line::R3Line(gaps::RNArray<gaps::R3Point*> const&)
R3Line::
R3Line(const RNArray<R3Point *>& points)
    : point(0, 0, 0),
      vector(0, 0, 0)
{
    // Check number of points
    if (points.NEntries() < 2) return;

    // Compute centroid
    point = R3Centroid(points);

    // Compute principle axes
    R3Triad triad = R3PrincipleAxes(point, points);

    // Select direction of most variation
    vector = triad[0];
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rdi
movq %rdi, (%rsp)
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x6eb50
movq (%rsp), %rdi
addq $0x18, %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x6fcb0
movq 0x68(%rsp), %rdi
callq 0x13600
cmpl $0x2, %eax
jge 0x6e8cc
jmp 0x6e924
movq 0x68(%rsp), %rsi
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x8cd30
movq (%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x6f1e0
movq (%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x8ce50
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x39fb0
movq (%rsp), %rdi
movq %rax, %rsi
addq $0x18, %rdi
callq 0x70970
addq $0x78, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Line.cpp
// Function: gaps::R3Line::R3Line(gaps::R3Point*, int)
R3Line::
R3Line(R3Point *points, int npoints)
    : point(0, 0, 0),
      vector(0, 0, 0)
{
    // Check number of points
    if (npoints < 2) return;

    // Compute centroid
    point = R3Centroid(npoints, points);

    // Compute principle axes
    R3Triad triad = R3PrincipleAxes(point, npoints, points);

    // Select direction of most variation
    vector = triad[0];
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x8(%rsp)
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x6eb50
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x6fcb0
cmpl $0x2, 0x74(%rsp)
jge 0x6e983
jmp 0x6e9e6
movl 0x74(%rsp), %esi
movq 0x78(%rsp), %rdx
leaq 0x58(%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
callq 0x8fea0
movq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x6f1e0
movq 0x8(%rsp), %rsi
movl 0x74(%rsp), %edx
movq 0x78(%rsp), %rcx
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x8ff60
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x39fb0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq $0x18, %rdi
callq 0x70970
addq $0x88, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Line.cpp
// Function: gaps::R3Line::operator==(gaps::R3Line const&) const
const RNBoolean R3Line::
operator==(const R3Line& line) const
{
    // Check if vectors are equal
    if (vector != line.vector) return FALSE;

    // Return whether point lies on this line
    R3Vector v = vector;
    v.Cross(line.Point() - point);
    return v.IsZero();
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x18, %rdi
movq 0x40(%rsp), %rsi
addq $0x18, %rsi
callq 0x70390
cmpl $0x0, %eax
je 0x6eac9
movl $0x0, 0x54(%rsp)
jmp 0x6eb15
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
leaq 0x28(%rsp), %rdi
callq 0x6fcf0
movq 0x40(%rsp), %rdi
callq 0x3c0d0
movq 0x8(%rsp), %rdx
movq %rax, %rsi
leaq 0x10(%rsp), %rdi
callq 0x6eeb0
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x70500
leaq 0x28(%rsp), %rdi
callq 0x375a0
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Collinear(gaps::R3Point const&, gaps::R3Point const&) const
const RNBoolean R3Point::
Collinear(const R3Point& point1, const R3Point& point2) const
{
    // Check if two of points are same
    if ((*this == point1) || (*this == point2) || (point1 == point2)) return TRUE;

    /// Check if three points are collinear
    R3Vector v = point1 - *this;
    v.Cross(point1 - point2);
    if (RNIsZero(v.Length())) return TRUE;
    return FALSE;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x40(%rsp), %rsi
callq 0x6ece0
cmpl $0x0, %eax
jne 0x6ee32
movq (%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x6ece0
cmpl $0x0, %eax
jne 0x6ee32
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x6ece0
cmpl $0x0, %eax
je 0x6ee3c
movl $0x1, 0x54(%rsp)
jmp 0x6eea3
movq (%rsp), %rdx
movq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x6eeb0
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x6eeb0
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x70500
leaq 0x20(%rsp), %rdi
callq 0x6fe90
leaq 0x10965d(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36b80
cmpl $0x0, %eax
je 0x6ee9b
movl $0x1, 0x54(%rsp)
jmp 0x6eea3
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Project(gaps::R3Line const&)
void R3Point::
Project(const R3Line& line)
{
    // Move point to closest point on line
    const R3Point *p = &(line.Point());
    const R3Vector *v = &(line.Vector());
    RNScalar denom = v->Dot(*v);
    if (RNIsZero(denom)) return;
    RNScalar t = (v->X() * (X() - p->X()) + v->Y() *(Y() - p->Y()) + v->Z() * (Z() - p->Z())) / denom;
    *this = *p + *v * t;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x3c0d0
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x3c0f0
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x702c0
movsd %xmm0, 0x90(%rsp)
movsd 0x90(%rsp), %xmm0
leaq 0x109544(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36b80
cmpl $0x0, %eax
je 0x6efaf
jmp 0x6f101
movq 0x98(%rsp), %rdi
callq 0x38c20
movq 0x50(%rsp), %rdi
movsd %xmm0, 0x28(%rsp)
callq 0x37820
movsd %xmm0, 0x8(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37820
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x98(%rsp), %rdi
callq 0x38c30
movq 0x50(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
callq 0x37870
movsd %xmm0, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37870
movsd 0x10(%rsp), %xmm3
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
movaps %xmm0, %xmm4
movsd 0x28(%rsp), %xmm0
subsd %xmm4, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x98(%rsp), %rdi
callq 0x38c40
movq 0x50(%rsp), %rdi
movsd %xmm0, 0x40(%rsp)
callq 0x378c0
movsd %xmm0, 0x30(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x378c0
movsd 0x30(%rsp), %xmm2
movsd 0x38(%rsp), %xmm1
movaps %xmm0, %xmm3
movsd 0x40(%rsp), %xmm0
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
divsd 0x90(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x98(%rsp), %rsi
movsd 0x88(%rsp), %xmm0
leaq 0x58(%rsp), %rdi
callq 0x70b80
movq 0x48(%rsp), %rsi
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x6f110
movq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x6f1e0
addq $0xb8, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::operator=(gaps::R3Point const&)
R3Point& R3Point::
operator=(const R3Point& point)
{
    v[0] = point.v[0];
    v[1] = point.v[1];
    v[2] = point.v[2];
    return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rsp), %rcx
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rsp), %rcx
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%rax)
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::operator+=(gaps::R3Vector const&)
R3Point& R3Point::
operator+=(const R3Vector& vector)
{
    v[0] += vector[0];
    v[1] += vector[1];
    v[2] += vector[2];
    return *this;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x3a4b0
movq (%rsp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x3a4b0
movq (%rsp), %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq 0x8(%rsp), %rdi
movl $0x2, %esi
callq 0x3a4b0
movq (%rsp), %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
addq $0x18, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::XRotate(double)
void R3Point:: 
XRotate(RNAngle radians)
{
    // rotate matrix around X axis counterclockwise
    RNScalar c = cos(radians);
    RNScalar s = sin(radians);
    RNScalar y = v[1];
    RNScalar z = v[2];
    v[1] = c*y - s*z;
    v[2] = s*y + c*z;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf930
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf100
movq (%rsp), %rax
movsd %xmm0, 0x18(%rsp)
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x18(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::YRotate(double)
void R3Point:: 
YRotate(RNAngle radians)
{
    // rotate matrix around Y axis counterclockwise
    RNScalar c = cos(radians);
    RNScalar s = sin(radians);
    RNScalar x = v[0];
    RNScalar z = v[2];
    v[0] =  c*x + s*z;
    v[2] = -s*x + c*z;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf930
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf100
movq (%rsp), %rax
movsd %xmm0, 0x18(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x18(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x18(%rsp), %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::ZRotate(double)
void R3Point:: 
ZRotate(RNAngle radians)
{
    // rotate matrix around Z axis counterclockwise 
    RNScalar c = cos(radians);
    RNScalar s = sin(radians);
    RNScalar x = v[0];
    RNScalar y = v[1];
    v[0] = c*x - s*y;
    v[1] = s*x + c*y;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf930
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf100
movq (%rsp), %rax
movsd %xmm0, 0x18(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x18(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Rotate(int, double)
void R3Point:: 
Rotate(RNAxis axis, RNAngle radians)
{
    // rotate point around an axis counterclockwise
    switch (axis) {
    case RN_XAXIS: 
	XRotate(radians); 
	break;

    case RN_YAXIS: 
	YRotate(radians); 
	break;

    case RN_ZAXIS: 
	ZRotate(radians); 
	break;

    default: 
	RNWarning("Matrix rotation around undefined axis");
	break;
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x6f5e0
jmp 0x6f5ca
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x6f5f1
jmp 0x6f5d5
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x6f602
jmp 0x6f613
movq (%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6f360
jmp 0x6f621
movq (%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6f420
jmp 0x6f621
movq (%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6f4e0
jmp 0x6f621
leaq 0xc483c(%rip), %rdi     # 0x133e56
movb $0x0, %al
callq 0xd5010
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::operator*=(double)
R3Point& R3Point::
operator*=(const RNScalar a)
{
    v[0] *= a;
    v[1] *= a;
    v[2] *= a;
    return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movsd -0x10(%rsp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movsd -0x10(%rsp), %xmm0
mulsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movsd -0x10(%rsp), %xmm0
mulsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::operator/=(double)
R3Point& R3Point::
operator/=(const RNScalar a)
{
    assert(a != 0);
    v[0] /= a;
    v[1] /= a;
    v[2] /= a;
    return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movsd -0x10(%rsp), %xmm1
movsd (%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd -0x10(%rsp), %xmm1
movsd 0x8(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movsd -0x10(%rsp), %xmm1
movsd 0x10(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::operator/(gaps::R3Point const&, double)
R3Point 
operator/(const R3Point& point, const RNScalar a)
{
    assert(a != 0);
    return R3Point(point.X() / a, 
		   point.Y() / a, 
		   point.Z() / a);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x37820
divsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x37870
divsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x378c0
movq (%rsp), %rdi
movsd 0x8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
divsd 0x20(%rsp), %xmm2
callq 0x6eb50
movq 0x18(%rsp), %rax
addq $0x38, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::R3Vector(double, double)
R3Vector::
R3Vector(RNAngle pitch, RNAngle yaw)
{
    RNScalar cosine_yaw = cos(yaw);
    v[0] = cosine_yaw * cos(pitch);
    v[1] = cosine_yaw * sin(pitch); 
    v[2] = sin(yaw);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0xf930
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf930
movq 0x10(%rsp), %rax
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0xf100
movq 0x10(%rsp), %rax
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x20(%rsp), %xmm0
callq 0xf100
movq 0x10(%rsp), %rax
movsd %xmm0, 0x10(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::MinDimension() const
const RNDimension R3Vector::
MinDimension(void) const
{
    // Return principal dimension of vector
    if (fabs(v[0]) <= fabs(v[1])) {
        if (fabs(v[0]) <= fabs(v[2])) return RN_X;
        else return RN_Z;
    }
    else {
        if (fabs(v[1]) <= fabs(v[2])) return RN_Y;
        else return RN_Z;
    }
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x18(%rsp)
movsd (%rax), %xmm1
movaps 0xc3346(%rip), %xmm0    # 0x133270
pand %xmm0, %xmm1
movsd 0x8(%rax), %xmm0
movaps 0xc3336(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x6ff82
movq -0x18(%rsp), %rax
movsd (%rax), %xmm1
movaps 0xc331c(%rip), %xmm0    # 0x133270
pand %xmm0, %xmm1
movsd 0x10(%rax), %xmm0
movaps 0xc330c(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x6ff78
movl $0x0, -0x4(%rsp)
jmp 0x6ffbf
movl $0x2, -0x4(%rsp)
jmp 0x6ffbf
movq -0x18(%rsp), %rax
movsd 0x8(%rax), %xmm1
movaps 0xc32dd(%rip), %xmm0    # 0x133270
pand %xmm0, %xmm1
movsd 0x10(%rax), %xmm0
movaps 0xc32cd(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x6ffb7
movl $0x1, -0x4(%rsp)
jmp 0x6ffbf
movl $0x2, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::MaxDimension() const
const RNDimension R3Vector::
MaxDimension(void) const
{
    // Return principal dimension of vector
    if (fabs(v[0]) >= fabs(v[1])) {
        if (fabs(v[0]) >= fabs(v[2])) return RN_X;
        else return RN_Z;
    }
    else {
        if (fabs(v[1]) >= fabs(v[2])) return RN_Y;
        else return RN_Z;
    }
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x18(%rsp)
movsd (%rax), %xmm0
movaps 0xc3286(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
movsd 0x8(%rax), %xmm1
movaps 0xc3276(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70042
movq -0x18(%rsp), %rax
movsd (%rax), %xmm0
movaps 0xc325c(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
movsd 0x10(%rax), %xmm1
movaps 0xc324c(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70038
movl $0x0, -0x4(%rsp)
jmp 0x7007f
movl $0x2, -0x4(%rsp)
jmp 0x7007f
movq -0x18(%rsp), %rax
movsd 0x8(%rax), %xmm0
movaps 0xc321d(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
movsd 0x10(%rax), %xmm1
movaps 0xc320d(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70077
movl $0x1, -0x4(%rsp)
jmp 0x7007f
movl $0x2, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Sextant() const
const RNSextant R3Vector::
Sextant(void) const
{
    // Return principal direction of vector
    if (fabs(v[0]) >= fabs(v[1])) {
        if (fabs(v[0]) >= fabs(v[2])) {
            if (v[0] >= 0.0) return RN_PX_SEXTANT;
            else return RN_NX_SEXTANT;
        }
        else {
            if (v[2] >= 0.0) return RN_PZ_SEXTANT;
            else return RN_NZ_SEXTANT;
        }
    }
    else {
        if (fabs(v[1]) >= fabs(v[2])) {
            if (v[1] >= 0.0) return RN_PY_SEXTANT;
            else return RN_NY_SEXTANT;
        }
        else {
            if (v[2] >= 0.0) return RN_PZ_SEXTANT;
            else return RN_NZ_SEXTANT;
        }
    }
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x18(%rsp)
movsd (%rax), %xmm0
movaps 0xc31c6(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
movsd 0x8(%rax), %xmm1
movaps 0xc31b6(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70148
movq -0x18(%rsp), %rax
movsd (%rax), %xmm0
movaps 0xc3198(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
movsd 0x10(%rax), %xmm1
movaps 0xc3188(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7011e
movq -0x18(%rsp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70111
movl $0x1, -0x4(%rsp)
jmp 0x701bf
movl $0x0, -0x4(%rsp)
jmp 0x701bf
movq -0x18(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7013e
movl $0x5, -0x4(%rsp)
jmp 0x701bf
movl $0x4, -0x4(%rsp)
jmp 0x701bf
movq -0x18(%rsp), %rax
movsd 0x8(%rax), %xmm0
movaps 0xc3117(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
movsd 0x10(%rax), %xmm1
movaps 0xc3107(%rip), %xmm2    # 0x133270
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7019a
movq -0x18(%rsp), %rax
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70190
movl $0x3, -0x4(%rsp)
jmp 0x701bf
movl $0x2, -0x4(%rsp)
jmp 0x701bf
movq -0x18(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x701b7
movl $0x5, -0x4(%rsp)
jmp 0x701bf
movl $0x4, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Octant() const
const RNOctant R3Vector::
Octant(void) const
{
    // Return octant vector points into
    if (v[0] >= 0.0) {
        if (v[1] >= 0.0) {
	    if (v[2] >= 0.0) return RN_PPP_OCTANT;
            else return RN_PPN_OCTANT;
        }
	else {
	    if (v[2] >= 0.0) return RN_PNP_OCTANT;
            else return RN_PNN_OCTANT;
        }
    }
    else {
        if (v[1] >= 0.0) {
	    if (v[2] >= 0.0) return RN_NPP_OCTANT;
            else return RN_NPN_OCTANT;
        }
	else {
	    if (v[2] >= 0.0) return RN_NNP_OCTANT;
            else return RN_NNN_OCTANT;
        }
    }
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x18(%rsp)
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70253
movq -0x18(%rsp), %rax
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7022c
movq -0x18(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7021f
movl $0x7, -0x4(%rsp)
jmp 0x702b2
movl $0x6, -0x4(%rsp)
jmp 0x702b2
movq -0x18(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70249
movl $0x5, -0x4(%rsp)
jmp 0x702b2
movl $0x4, -0x4(%rsp)
jmp 0x702b2
movq -0x18(%rsp), %rax
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7028d
movq -0x18(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x70283
movl $0x3, -0x4(%rsp)
jmp 0x702b2
movl $0x2, -0x4(%rsp)
jmp 0x702b2
movq -0x18(%rsp), %rax
movsd 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x702aa
movl $0x1, -0x4(%rsp)
jmp 0x702b2
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Normalize()
void R3Vector::
Normalize(void)
{
    RNLength length = Length();
    if (length == 0.0) return;
    v[0] /= length;
    v[1] /= length;
    v[2] /= length;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x6fe90
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x70440
jp 0x70440
jmp 0x7047e
movq (%rsp), %rax
movsd 0x8(%rsp), %xmm1
movsd (%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Cross(gaps::R3Vector const&)
void R3Vector::
Cross(const R3Vector& vector)
{
    const RNScalar x = (v[1]*vector.v[2]) - (v[2]*vector.v[1]);
    const RNScalar y = (v[2]*vector.v[0]) - (v[0]*vector.v[2]);
    const RNScalar z = (v[0]*vector.v[1]) - (v[1]*vector.v[0]);
    v[2] = z; v[1] = y; v[0] = x; 
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movsd 0x8(%rax), %xmm0
movq -0x10(%rsp), %rcx
movsd 0x10(%rcx), %xmm2
movsd 0x10(%rax), %xmm1
movq -0x10(%rsp), %rcx
mulsd 0x8(%rcx), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movsd 0x10(%rax), %xmm0
movq -0x10(%rsp), %rcx
movsd (%rcx), %xmm2
movsd (%rax), %xmm1
movq -0x10(%rsp), %rcx
mulsd 0x10(%rcx), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rsp)
movsd (%rax), %xmm0
movq -0x10(%rsp), %rcx
movsd 0x8(%rcx), %xmm2
movsd 0x8(%rax), %xmm1
movq -0x10(%rsp), %rcx
mulsd (%rcx), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rsp)
movsd -0x28(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
movsd -0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd -0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Rotate(int, double)
void R3Vector:: 
Rotate(RNAxis axis, RNAngle radians)
{
    // rotate vector around an axis counterclockwise
    switch (axis) {
    case RN_XAXIS: 
	XRotate(radians); 
	break;

    case RN_YAXIS: 
	YRotate(radians); 
	break;

    case RN_ZAXIS: 
	ZRotate(radians); 
	break;

    default: 
	RNWarning("Matrix rotation around undefined axis");
	break;
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x70880
jmp 0x7086a
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x70891
jmp 0x70875
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x708a2
jmp 0x708b3
movq (%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x70600
jmp 0x708c1
movq (%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x706c0
jmp 0x708c1
movq (%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x70780
jmp 0x708c1
leaq 0xc359c(%rip), %rdi     # 0x133e56
movb $0x0, %al
callq 0xd5010
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Rotate(gaps::R3Vector const&, double)
void R3Vector::
Rotate(const R3Vector& axis, RNAngle theta)
{
    // Rotate vector counterclockwise around axis (looking at axis end-on) (rz(xaxis) = yaxis)
    // From Goldstein: v' = v cos t + a (v . a) [1 - cos t] - (v x a) sin t
    if (RNIsEqual(fabs(Dot(axis)), 1.0)) return;
    const RNScalar cos_theta = cos(theta);
    const RNScalar dot = this->Dot(axis);
    R3Vector cross = *this % axis;
    *this *= cos_theta;
    *this += axis * dot * (1.0 - cos_theta);
    *this -= cross * sin(theta); 
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movsd %xmm0, 0x80(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x88(%rsp), %rsi
callq 0x702c0
movaps 0xc287f(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
leaq 0x107ae4(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm2
movsd 0xc2600(%rip), %xmm1    # 0x133008
callq 0x37170
cmpl $0x0, %eax
je 0x70a17
jmp 0x70ada
movsd 0x80(%rsp), %xmm0
callq 0xf930
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x78(%rsp)
movq 0x88(%rsp), %rsi
callq 0x702c0
movq 0x8(%rsp), %rsi
movsd %xmm0, 0x70(%rsp)
movq 0x88(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0x70af0
movq 0x8(%rsp), %rdi
movsd 0x78(%rsp), %xmm0
callq 0x70b40
movq 0x88(%rsp), %rsi
movsd 0x70(%rsp), %xmm0
leaq 0x28(%rsp), %rdi
callq 0x70b80
movsd 0xc257e(%rip), %xmm0    # 0x133008
subsd 0x78(%rsp), %xmm0
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x70b80
movq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x70be0
movsd 0x80(%rsp), %xmm0
callq 0xf100
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x70b80
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x70c30
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::operator+=(gaps::R3Vector const&)
R3Vector& R3Vector::
operator+=(const R3Vector& vector)
{
    v[0] += vector.v[0];
    v[1] += vector.v[1];
    v[2] += vector.v[2];
    return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movsd (%rcx), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rsp), %rcx
movsd 0x8(%rcx), %xmm0
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rsp), %rcx
movsd 0x10(%rcx), %xmm0
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Project(gaps::R3Vector const&)
void R3Vector::
Project(const R3Vector& vector)
{
    // Project onto another vector    
    RNScalar dot = this->Dot(vector);
    RNLength length = vector.Length();
    if ((RNIsPositive(length)) && (length != 1.0)) 
	dot /= (length * length);
    *this = vector * dot;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x38(%rsp), %rsi
callq 0x702c0
movsd %xmm0, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x6fe90
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
leaq 0x10780b(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
cmpl $0x0, %eax
je 0x70d17
movsd 0x28(%rsp), %xmm0
movsd 0xc2317(%rip), %xmm1    # 0x133008
ucomisd %xmm1, %xmm0
jne 0x70cfb
jp 0x70cfb
jmp 0x70d17
movsd 0x28(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x38(%rsp), %rsi
movsd 0x30(%rsp), %xmm0
leaq 0x10(%rsp), %rdi
callq 0x70b80
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x70970
addq $0x48, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::operator*=(gaps::R3Vector const&)
R3Vector& R3Vector::
operator*=(const R3Vector& vector)
{
    // Entry by entry multiply (not dot or cross product)
    v[0] *= vector.v[0];
    v[1] *= vector.v[1];
    v[2] *= vector.v[2];
    return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movsd (%rcx), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rsp), %rcx
movsd 0x8(%rcx), %xmm0
mulsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rsp), %rcx
movsd 0x10(%rcx), %xmm0
mulsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::operator/=(gaps::R3Vector const&)
R3Vector& R3Vector::
operator/=(const R3Vector& vector)
{
    // Entry by entry divide
    assert(vector.v[0] != 0);
    v[0] /= vector.v[0];
    assert(vector.v[1] != 0);
    v[1] /= vector.v[1];
    assert(vector.v[2] != 0);
    v[2] /= vector.v[2];
    return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movsd (%rcx), %xmm1
movsd (%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rsp), %rcx
movsd 0x8(%rcx), %xmm1
movsd 0x8(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rsp), %rcx
movsd 0x10(%rcx), %xmm1
movsd 0x10(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rax)
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::operator*(gaps::R3Vector const&, gaps::R3Vector const&)
R3Vector 
operator*(const R3Vector& vector1, const R3Vector& vector2)
{
    // Entry by entry multiply (not dot or cross product)
    return R3Vector(vector1.v[0] * vector2.v[0], 
		    vector1.v[1] * vector2.v[1], 
		    vector1.v[2] * vector2.v[2]);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq 0x10(%rsp), %rax
mulsd (%rax), %xmm0
movq 0x18(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x10(%rsp), %rax
mulsd 0x8(%rax), %xmm1
movq 0x18(%rsp), %rax
movsd 0x10(%rax), %xmm2
movq 0x10(%rsp), %rax
mulsd 0x10(%rax), %xmm2
callq 0x6fcb0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::operator/(gaps::R3Vector const&, gaps::R3Vector const&)
R3Vector 
operator/(const R3Vector& vector1, const R3Vector& vector2)
{
    assert(vector2.v[0] != 0);
    assert(vector2.v[1] != 0);
    assert(vector2.v[2] != 0);
    return R3Vector(vector1.v[0]/vector2.v[0], 
		    vector1.v[1]/vector2.v[1], 
		    vector1.v[2]/vector2.v[2]);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq 0x10(%rsp), %rax
divsd (%rax), %xmm0
movq 0x18(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x10(%rsp), %rax
divsd 0x8(%rax), %xmm1
movq 0x18(%rsp), %rax
movsd 0x10(%rax), %xmm2
movq 0x10(%rsp), %rax
divsd 0x10(%rax), %xmm2
callq 0x6fcb0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::operator/(gaps::R3Vector const&, double)
R3Vector 
operator/(const R3Vector& vector, const RNScalar a)
{
    assert(a != 0);
    return R3Vector(vector.v[0]/a, 
		    vector.v[1]/a, 
		    vector.v[2]/a);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
divsd 0x10(%rsp), %xmm0
movq 0x18(%rsp), %rax
movsd 0x8(%rax), %xmm1
divsd 0x10(%rsp), %xmm1
movq 0x18(%rsp), %rax
movsd 0x10(%rax), %xmm2
divsd 0x10(%rsp), %xmm2
callq 0x6fcb0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3RandomDirection()
R3Vector 
R3RandomDirection(void)
{
  RNScalar phi = RN_TWO_PI * RNRandomScalar();
  RNScalar z = RNRandomScalar();
  RNScalar theta = acos(z);
  RNScalar sin_theta = sin(theta);
  RNScalar x = sin_theta * cos(phi);
  RNScalar y = sin_theta * sin(phi);
  R3Vector vector(x, y, z);
  if (RNRandomScalar() < 0.5) vector.Flip();
  return vector;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x60(%rsp)
leaq 0xc568b(%rip), %rax     # 0x1368f8
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0xd4710
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
callq 0xd4710
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
callq 0xf470
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
callq 0xf100
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x58(%rsp), %xmm0
callq 0xf930
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x58(%rsp), %xmm0
callq 0xf100
movq 0x20(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x38(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
callq 0x6fcb0
callq 0xd4710
movaps %xmm0, %xmm1
movsd 0xc1cd4(%rip), %xmm0    # 0x133010
ucomisd %xmm1, %xmm0
jbe 0x7134c
movq 0x20(%rsp), %rdi
callq 0x70490
movq 0x8(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/ply.cpp
// Function: ply_write
PlyFile *ply_write(
  FILE *fp,
  int nelems,
  char **elem_names,
  int file_type
)
{
  int i;
  PlyFile *plyfile;
  PlyElement *elem;

  /* check for NULL file pointer */
  if (fp == NULL)
    return (NULL);

  if (native_binary_type == -1)
     get_native_binary_type();
  if (!types_checked)
     check_types();
  
  /* create a record for this object */

  plyfile = (PlyFile *) myalloc (sizeof (PlyFile));
  if (file_type == PLY_BINARY_NATIVE)
     plyfile->file_type = native_binary_type;
  else
     plyfile->file_type = file_type;
  plyfile->num_comments = 0;
  plyfile->num_obj_info = 0;
  plyfile->nelems = nelems;
  plyfile->version = 1.0;
  plyfile->fp = fp;
  plyfile->other_elems = NULL;

  /* tuck aside the names of the elements */

  plyfile->elems = (PlyElement **) myalloc (sizeof (PlyElement *) * nelems);
  for (i = 0; i < nelems; i++) {
    elem = (PlyElement *) myalloc (sizeof (PlyElement));
    plyfile->elems[i] = elem;
    elem->name = my_strdup (elem_names[i]);
    elem->num = 0;
    elem->nprops = 0;
  }

  /* return pointer to the file descriptor */
  return (plyfile);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x7138c
movq $0x0, 0x30(%rsp)
jmp 0x714ea
cmpl $-0x1, 0x106f71(%rip)   # 0x178304
jne 0x7139a
callq 0x71500
cmpl $0x0, 0x5082d7(%rip)    # 0x579678
jne 0x713a8
callq 0x71580
movl $0x50, %edi
movl $0xad, %esi
leaq 0xc3f36(%rip), %rdx     # 0x1352ef
callq 0x71630
movq %rax, 0x8(%rsp)
cmpl $0x4, 0x14(%rsp)
jne 0x713da
movl 0x106f34(%rip), %ecx    # 0x178304
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
jmp 0x713e6
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x20(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x30(%rax)
movl 0x24(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x8(%rsp), %rax
movss 0xc1e51(%rip), %xmm0    # 0x133268
movss %xmm0, 0xc(%rax)
movq 0x28(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x48(%rax)
movslq 0x24(%rsp), %rax
shlq $0x3, %rax
movl %eax, %edi
movl $0xbb, %esi
leaq 0xc3ea2(%rip), %rdx     # 0x1352ef
callq 0x71630
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x714e0
movl $0x30, %edi
movl $0xbd, %esi
leaq 0xc3e6e(%rip), %rdx     # 0x1352ef
callq 0x71630
movq %rax, (%rsp)
movq (%rsp), %rdx
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x10(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x18(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x71680
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq (%rsp), %rax
movl $0x0, 0x8(%rax)
movq (%rsp), %rax
movl $0x0, 0x10(%rax)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x71466
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/ply.cpp
// Function: get_native_binary_type()
void get_native_binary_type()
{
    endian_test_type test;

    test.int_value = 0;
    test.int_value = 1;
    if (test.byte_values[0] == 1)
       native_binary_type = PLY_BINARY_LE;
    else if (test.byte_values[sizeof(int)-1] == 1)
       native_binary_type = PLY_BINARY_BE;
    else
    {
	fprintf(stderr, "ply: Couldn't determine machine endianness.\n");
	fprintf(stderr, "ply: Exiting...\n");
	exit(1);
    }
}

// Assembly:
pushq %rax
movl $0x0, 0x4(%rsp)
movl $0x1, 0x4(%rsp)
movsbl 0x4(%rsp), %eax
cmpl $0x1, %eax
jne 0x71527
movl $0x3, 0x106ddf(%rip)    # 0x178304
jmp 0x71579
movsbl 0x7(%rsp), %eax
cmpl $0x1, %eax
jne 0x7153d
movl $0x2, 0x106dc9(%rip)    # 0x178304
jmp 0x71577
movq 0xfda84(%rip), %rax     # 0x16efc8
movq (%rax), %rdi
leaq 0xc4247(%rip), %rsi     # 0x135795
movb $0x0, %al
callq 0xf730
movq 0xfda6c(%rip), %rax     # 0x16efc8
movq (%rax), %rdi
leaq 0xc425c(%rip), %rsi     # 0x1357c2
movb $0x0, %al
callq 0xf730
movl $0x1, %edi
callq 0xf600
jmp 0x71579
popq %rax
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/ply.cpp
// Function: check_types()
void check_types()
{
    if ((ply_type_size[PLY_CHAR] != sizeof(char)) ||
	(ply_type_size[PLY_SHORT] != sizeof(short)) ||	
	(ply_type_size[PLY_INT] != sizeof(int)) ||	
	(ply_type_size[PLY_UCHAR] != sizeof(unsigned char)) ||	
	(ply_type_size[PLY_USHORT] != sizeof(unsigned short)) ||	
	(ply_type_size[PLY_UINT] != sizeof(unsigned int)) ||	
	(ply_type_size[PLY_FLOAT] != sizeof(float)) ||	
	(ply_type_size[PLY_DOUBLE] != sizeof(double)))
    {
	fprintf(stderr, "ply: Type sizes do not match built-in types\n");
	fprintf(stderr, "ply: Exiting...\n");
	exit(1);
    }
    
    types_checked = 1;
}

// Assembly:
pushq %rax
movslq 0x106d5c(%rip), %rax    # 0x1782e4
cmpq $0x1, %rax
jne 0x715e9
movslq 0x106d53(%rip), %rax    # 0x1782e8
cmpq $0x2, %rax
jne 0x715e9
movslq 0x106d4a(%rip), %rax    # 0x1782ec
cmpq $0x4, %rax
jne 0x715e9
movslq 0x106d41(%rip), %rax    # 0x1782f0
cmpq $0x1, %rax
jne 0x715e9
movslq 0x106d38(%rip), %rax    # 0x1782f4
cmpq $0x2, %rax
jne 0x715e9
movslq 0x106d2f(%rip), %rax    # 0x1782f8
cmpq $0x4, %rax
jne 0x715e9
movslq 0x106d26(%rip), %rax    # 0x1782fc
cmpq $0x4, %rax
jne 0x715e9
movslq 0x106d1d(%rip), %rax    # 0x178300
cmpq $0x8, %rax
je 0x71623
movq 0xfd9d8(%rip), %rax     # 0x16efc8
movq (%rax), %rdi
leaq 0xc41d9(%rip), %rsi     # 0x1357d3
movb $0x0, %al
callq 0xf730
movq 0xfd9c0(%rip), %rax     # 0x16efc8
movq (%rax), %rdi
leaq 0xc41b0(%rip), %rsi     # 0x1357c2
movb $0x0, %al
callq 0xf730
movl $0x1, %edi
callq 0xf600
movl $0x1, 0x50804b(%rip)    # 0x579678
popq %rax
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/ply.cpp
// Function: my_alloc(int, int, char*)
char *my_alloc(int size, int lnum, char *fname)
{
  char *ptr;

  ptr = (char *) malloc (size);

  if (ptr == 0) {
    fprintf(stderr, "Memory allocation bombed on line %d in %s\n", lnum, fname);
  }

  return (ptr);
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movslq 0x14(%rsp), %rdi
callq 0xf6a0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x71677
movq 0xfd96b(%rip), %rax     # 0x16efc8
movq (%rax), %rdi
movl 0x10(%rsp), %edx
movq 0x8(%rsp), %rcx
leaq 0xc42a6(%rip), %rsi     # 0x135916
movb $0x0, %al
callq 0xf730
movq (%rsp), %rax
addq $0x18, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/ply.cpp
// Function: my_strdup(char*)
char *my_strdup(char *str)
{
  // Copy a string (strdup 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0xf200
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xf6a0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x716be
movq $0x0, 0x20(%rsp)
jmp 0x716df
movq 0x8(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xf3d0
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)