LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVScanline.cpp
// Function: gaps::GSVScanline::UpdateBBox()
void GSVScanline::
UpdateBBox(void) 
{
  // Just checking
  assert(read_count > 0);
  assert(points);

  // Update bounding box
  bbox = R3null_box;
  for (int i = 0; i < NPoints(); i++) {
    bbox.Union(PointPosition(i));
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
addq $0x88, %rdi
leaq 0x2a9097(%rip), %rsi    # 0x3024f8
callq 0x386d0
movl $0x0, 0x3c(%rsp)
movq 0x18(%rsp), %rdi
movl 0x3c(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x3a120
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x594c7
movq 0x18(%rsp), %rsi
movq %rsi, %rax
addq $0x88, %rax
movq %rax, 0x8(%rsp)
movl 0x3c(%rsp), %edx
leaq 0x20(%rsp), %rdi
callq 0x59950
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x153680
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x5946e
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVScanline.cpp
// Function: gaps::GSVScanline::WritePoints(_IO_FILE*, int)
int GSVScanline::
WritePoints(FILE *fp, RNBoolean seek) 
{
  // Seek within file
  if (seek && (file_offset > 0)) {
    // Seek to file offset
    if (!RNFileSeek(fp, file_offset, RN_FILE_SEEK_SET)) {
      RNFail("Unable to seek to scanline points\n");
      return 0;
    }
  }
  else {
    // Update file offset
    file_offset = RNFileTell(fp);
  }

  // Write number of points 
  if (fwrite(&npoints, sizeof(int), 1, fp) != (unsigned int) 1) {
    RNFail("Unable to write number of scanline points\n");
    return 0;
  }

  // Write points
  if (npoints > 0) {
    if (fwrite(points, sizeof(GSVPoint), npoints, fp) != (unsigned int) npoints) {
      RNFail("Unable to write scanline points\n");
      return 0;
    }
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x59813
movq (%rsp), %rax
cmpq $0x0, 0x18(%rax)
jbe 0x59813
movq (%rsp), %rax
movq 0x10(%rsp), %rdi
movq 0x18(%rax), %rsi
xorl %edx, %edx
callq 0x1caea0
cmpl $0x0, %eax
jne 0x59811
leaq 0x20dc00(%rip), %rdi    # 0x2673fd
movb $0x0, %al
callq 0x1cbff0
movl $0x0, 0x24(%rsp)
jmp 0x598b5
jmp 0x59828
movq 0x10(%rsp), %rdi
callq 0x1caef0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq (%rsp), %rdi
addq $0x30, %rdi
movq 0x10(%rsp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x2a360
cmpq $0x1, %rax
je 0x59862
leaq 0x20dc3d(%rip), %rdi    # 0x26748e
movb $0x0, %al
callq 0x1cbff0
movl $0x0, 0x24(%rsp)
jmp 0x598b5
movq (%rsp), %rax
cmpl $0x0, 0x30(%rax)
jle 0x598ad
movq (%rsp), %rax
movq 0x28(%rax), %rdi
movslq 0x30(%rax), %rdx
movq 0x10(%rsp), %rcx
movl $0x50, %esi
callq 0x2a360
movq (%rsp), %rcx
movl 0x30(%rcx), %ecx
cmpq %rcx, %rax
je 0x598ab
leaq 0x20dc1f(%rip), %rdi    # 0x2674b9
movb $0x0, %al
callq 0x1cbff0
movl $0x0, 0x24(%rsp)
jmp 0x598b5
jmp 0x598ad
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVScanline.cpp
// Function: gaps::GSVScanline::ReleasePoints()
int GSVScanline::
ReleasePoints(void) 
{
  // Check read counter
  if (--read_count > 0) return 1;
  assert(points);

  // Release points
  delete [] points;
  points = NULL;

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl 0x20(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x20(%rcx)
cmpl $0x0, %eax
jbe 0x598eb
movl $0x1, 0x24(%rsp)
jmp 0x5991e
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x59909
movq 0x8(%rsp), %rdi
callq 0x296f0
movq 0x10(%rsp), %rax
movq $0x0, 0x28(%rax)
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/./GSVPoint.h
// Function: gaps::GSVPoint::Transform(gaps::R3Transformation const&)
inline void GSVPoint::
Transform(const R3Transformation& transformation)
{
  // Transform position and normal
  R3Point position = Position();
  R3Vector normal = Normal();
  R3Vector tangent = Tangent();
  position.Transform(transformation);
  normal.Transform(transformation);
  tangent.Transform(transformation);
  SetPosition(position);
  SetNormal(normal);
  SetTangent(tangent);

  // Transform radii
  double scale = transformation.ScaleFactor();
  if (RNIsNotEqual(scale, 1.0)) {
    for (int i = 0; i < 2; i++) {
      double r = this->radius[i];
      r *= fabs(scale);
      if (r > 64000) r = 64000;
      this->radius[i] = r;
    }
  }
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rsi
movq %rsi, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0x3a200
movq (%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x3a240
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x4adc0
movq 0x68(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x180a00
movq 0x68(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x182050
movq 0x68(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x182050
movq (%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x44e10
movq (%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4ad50
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4ae10
movq 0x68(%rsp), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
leaq 0x29f2c3(%rip), %rax    # 0x2f8e28
movsd (%rax), %xmm2
movsd 0x20c49f(%rip), %xmm1   # 0x266010
callq 0x59e00
cmpl $0x0, %eax
je 0x59c0e
movl $0x0, 0x14(%rsp)
cmpl $0x2, 0x14(%rsp)
jge 0x59c0c
movq (%rsp), %rax
movslq 0x14(%rsp), %rcx
movzwl 0x40(%rax,%rcx,2), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
movaps 0x20d40d(%rip), %xmm1   # 0x266fc0
pand %xmm1, %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x20d7cf(%rip), %xmm1   # 0x2673a0
ucomisd %xmm1, %xmm0
jbe 0x59be5
movsd 0x20d7c1(%rip), %xmm0   # 0x2673a0
movsd %xmm0, 0x8(%rsp)
movq (%rsp), %rax
cvttsd2si 0x8(%rsp), %ecx
movw %cx, %dx
movslq 0x14(%rsp), %rcx
movw %dx, 0x40(%rax,%rcx,2)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x59b87
jmp 0x59c0e
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::~GSVMesh()
GSVMesh::
~GSVMesh(void)
{
  // Delete everything
  Empty();

  // Delete search tree
  if (search_tree) delete search_tree;

  // Delete vertices
  if (gsv_vertex_block) delete [] gsv_vertex_block;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x38(%rsp)
leaq 0x28cc56(%rip), %rax    # 0x2e6b60
movq %rax, (%rdi)
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x59f18
movq 0x38(%rsp), %rax
cmpq $0x0, 0x140(%rax)
je 0x59f59
movq 0x38(%rsp), %rax
movq 0x140(%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x59f57
movq 0x30(%rsp), %rdi
callq 0xf98e0
movq 0x30(%rsp), %rdi
movl $0x18, %esi
callq 0x291f0
jmp 0x59f59
movq 0x38(%rsp), %rax
cmpq $0x0, 0x138(%rax)
je 0x59ffa
movq 0x38(%rsp), %rax
movq 0x138(%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x59ff8
movq 0x28(%rsp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, 0x10(%rsp)
movq -0x8(%rcx), %rax
movq %rax, 0x18(%rsp)
imulq $0xa8, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, 0x20(%rsp)
je 0x59fde
movq 0x20(%rsp), %rdi
addq $-0xa8, %rdi
movq %rdi, 0x8(%rsp)
callq 0x5e0f0
movq 0x28(%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x20(%rsp)
jne 0x59fb4
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
imulq $0xa8, %rax, %rsi
addq $0x8, %rsi
callq 0x29030
jmp 0x59ffa
movq 0x38(%rsp), %rdi
callq 0x118a50
addq $0x48, %rsp
retq
movq %rax, %rdi
callq 0x44300
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexTimestamp(gaps::R3MeshVertex*) const
RNScalar GSVMesh::
VertexTimestamp(R3MeshVertex *v) const
{
  // Return vertex timestamp
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return RN_UNKNOWN;
  return scanline->Timestamp();
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x5a08f
movsd 0x20bf81(%rip), %xmm0   # 0x266008
movsd %xmm0, 0x20(%rsp)
jmp 0x5a09e
movq (%rsp), %rdi
callq 0x44c80
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexHeight(gaps::R3MeshVertex*) const
RNScalar GSVMesh::
VertexHeight(R3MeshVertex *v) const
{
  // Return vertex height
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return RN_UNKNOWN;
  RNCoord groundZ = scanline->EstimatedGroundZ();
  const R3Point& position = VertexPosition(vertex);
  return position.Z() - groundZ;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x5a0fb
movsd 0x20bf15(%rip), %xmm0   # 0x266008
movsd %xmm0, 0x40(%rsp)
jmp 0x5a135
movq 0x20(%rsp), %rdi
callq 0x570a0
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rsi
callq 0x391a0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x38c20
subsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
addq $0x48, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexLaserAngle(gaps::R3MeshVertex*) const
RNScalar GSVMesh::
VertexLaserAngle(R3MeshVertex *v) const
{
  // Return vertex angle
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return RN_UNKNOWN;
  const GSVPose& pose = scanline->Pose();
  const R3Point& viewpoint = pose.Viewpoint();
  const R3Vector& towards = pose.Towards();
  R3Vector up = pose.Up();
  const R3Point& position = VertexPosition(vertex);
  R3Vector vec = position - viewpoint;
  RNLength distance = vec.Length();
  if (RNIsZero(distance)) return RN_UNKNOWN;
  vec /= distance;
  RNScalar dot = vec.Dot(towards);
  RNAngle angle = acos(dot);
  if (vec.Dot(up) > 0) angle = RN_PI_OVER_TWO + angle;
  else angle = RN_PI_OVER_TWO - angle;
  return angle;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x5a1ac
movsd 0x20be6a(%rip), %xmm0   # 0x266008
movsd %xmm0, 0xb0(%rsp)
jmp 0x5a300
movq 0x90(%rsp), %rdi
callq 0x44c60
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0x3a330
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x5e6c0
leaq 0x60(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x5e730
movq 0x8(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x391a0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1800f0
leaq 0x28(%rsp), %rdi
callq 0x1810d0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
leaq 0x29ebd9(%rip), %rax    # 0x2f8e28
movsd (%rax), %xmm1
callq 0x51990
cmpl $0x0, %eax
je 0x5a273
movsd 0x20bda3(%rip), %xmm0   # 0x266008
movsd %xmm0, 0xb0(%rsp)
jmp 0x5a300
movsd 0x20(%rsp), %xmm0
leaq 0x28(%rsp), %rdi
callq 0x182100
movq 0x78(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x181500
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x29b90
movsd %xmm0, 0x10(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x181500
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5a2da
leaq 0x213cc0(%rip), %rax    # 0x26df88
movsd (%rax), %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x5a2f1
leaq 0x213ca7(%rip), %rax    # 0x26df88
movsd (%rax), %xmm0
subsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movsd 0xb0(%rsp), %xmm0
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexLaserDepth(gaps::R3MeshVertex*) const
RNScalar GSVMesh::
VertexLaserDepth(R3MeshVertex *v) const
{
  // Return vertex depth
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return RN_UNKNOWN;
  const GSVPose& pose = scanline->Pose();
  R3Vector towards = pose.Towards();
  const R3Point& viewpoint = pose.Viewpoint();
  const R3Point& position = VertexPosition(vertex);
  R3Vector vec = position - viewpoint;
  RNScalar depth = vec.Dot(towards);
  return depth;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x5a371
movsd 0x20bca2(%rip), %xmm0   # 0x266008
movsd %xmm0, 0x80(%rsp)
jmp 0x5a3ea
movq 0x60(%rsp), %rdi
callq 0x44c60
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x5e6c0
movq 0x58(%rsp), %rdi
callq 0x3a330
movq 0x8(%rsp), %rdi
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rsi
callq 0x391a0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %rdi
callq 0x1800f0
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x181500
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x80(%rsp), %xmm0
addq $0x88, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexLaserDistance(gaps::R3MeshVertex*) const
RNScalar GSVMesh::
VertexLaserDistance(R3MeshVertex *v) const
{
  // Return vertex distance
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return RN_UNKNOWN;
  const GSVPose& pose = scanline->Pose();
  const R3Point& viewpoint = pose.Viewpoint();
  const R3Point& position = VertexPosition(vertex);
  return R3Distance(position, viewpoint);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x5a44a
movsd 0x20bbc6(%rip), %xmm0   # 0x266008
movsd %xmm0, 0x40(%rsp)
jmp 0x5a490
movq 0x20(%rsp), %rdi
callq 0x44c60
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3a330
movq (%rsp), %rdi
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rsi
callq 0x391a0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x10df80
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexLaserViewpoint(gaps::R3MeshVertex*) const
R3Point GSVMesh::
VertexLaserViewpoint(R3MeshVertex *v) const
{
  // Return vertex viewpoint
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return R3zero_point;
  const GSVPose& pose = scanline->Pose();
  return pose.Viewpoint();
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x5a4f6
movq 0x8(%rsp), %rdi
leaq 0x6a8db1(%rip), %rsi    # 0x7032a0
callq 0x17fdd0
jmp 0x5a51c
movq 0x20(%rsp), %rdi
callq 0x44c60
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3a330
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x17fdd0
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexLaserTowards(gaps::R3MeshVertex*) const
R3Vector GSVMesh::
VertexLaserTowards(R3MeshVertex *v) const
{
  // Return vertex viewpoint
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return R3zero_vector;
  const GSVPose& pose = scanline->Pose();
  return pose.Towards();
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x5a586
movq 0x8(%rsp), %rdi
leaq 0x6a8e11(%rip), %rsi    # 0x703390
callq 0x180f30
jmp 0x5a5a4
movq 0x20(%rsp), %rdi
callq 0x44c60
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
callq 0x5e6c0
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexLaserUp(gaps::R3MeshVertex*) const
R3Vector GSVMesh::
VertexLaserUp(R3MeshVertex *v) const
{
  // Return vertex viewpoint
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return R3zero_vector;
  const GSVPose& pose = scanline->Pose();
  return pose.Up();
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x5a606
movq 0x8(%rsp), %rdi
leaq 0x6a8d91(%rip), %rsi    # 0x703390
callq 0x180f30
jmp 0x5a624
movq 0x20(%rsp), %rdi
callq 0x44c60
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
callq 0x5e730
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::VertexScanlineIndex(gaps::R3MeshVertex*) const
int GSVMesh::
VertexScanlineIndex(R3MeshVertex *v) const
{
  // Return vertex viewpoint
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  GSVScanline *scanline = vertex->scanline;
  if (!scanline) return -1;
  return scanline->ScanIndex();
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x5a669
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x5a676
movq (%rsp), %rdi
callq 0x565d0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::MergeVertex(gaps::R3MeshVertex*, gaps::R3MeshVertex*)
GSVMeshVertex *GSVMesh::
MergeVertex(R3MeshVertex *v1, R3MeshVertex *v2)
{
  // Get GSV vertex info
  GSVScanline *scanline = VertexScanline(v1);
  int point_index = VertexPointIndex(v1);
  int boundary_type = VertexBoundaryType(v1);

  // Merge vertices
  GSVMeshVertex *vertex = (GSVMeshVertex *) R3Mesh::MergeVertex(v1, v2);

  // Assign GSV properties to new vertex
  if (vertex) {
    vertex->scanline = scanline;
    vertex->point_index = point_index;
    vertex->boundary_type = boundary_type;
  }

  // Return new vertex
  return vertex;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e150
movq (%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e180
movq (%rsp), %rdi
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e1a0
movq (%rsp), %rdi
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x11f3d0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x5b7be
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x98(%rax)
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa0(%rax)
movl 0x10(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa4(%rax)
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::CollapseEdge(gaps::R3MeshEdge*, gaps::R3Point const&)
GSVMeshVertex *GSVMesh::
CollapseEdge(R3MeshEdge *edge, const R3Point& point)
{
  // Get GSV vertex info
  GSVMeshVertex *v0 = VertexOnEdge(edge, 0);
  GSVScanline *scanline = VertexScanline(v0);
  int point_index = VertexPointIndex(v0);
  int boundary_type = VertexBoundaryType(v0);

  // Collapse edge
  GSVMeshVertex *vertex = (GSVMeshVertex *) R3Mesh::CollapseEdge(edge, point);

  // Assign GSV properties to new vertex
  if (vertex) {
    vertex->scanline = scanline;
    vertex->point_index = point_index;
    vertex->boundary_type = boundary_type;
  }

  // Return new vertex
  return vertex;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x5e1c0
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e150
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e180
movq 0x8(%rsp), %rdi
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e1a0
movq 0x8(%rsp), %rdi
movl %eax, 0x18(%rsp)
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x11fc50
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x5b888
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movl 0x1c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xa0(%rax)
movl 0x18(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xa4(%rax)
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::CollapseFace(gaps::R3MeshFace*, gaps::R3Point const&)
GSVMeshVertex *GSVMesh::
CollapseFace(R3MeshFace *face, const R3Point& point)
{
  // Get GSV vertex info
  GSVMeshVertex *v0 = VertexOnFace(face, 0);
  GSVScanline *scanline = VertexScanline(v0);
  int point_index = VertexPointIndex(v0);
  int boundary_type = VertexBoundaryType(v0);

  // Collapse face
  GSVMeshVertex *vertex = (GSVMeshVertex *) R3Mesh::CollapseFace(face, point);

  // Assign GSV properties to new vertex
  if (vertex) {
    vertex->scanline = scanline;
    vertex->point_index = point_index;
    vertex->boundary_type = boundary_type;
  }

  // Return new vertex
  return vertex;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x5e1f0
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e150
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e180
movq 0x8(%rsp), %rdi
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e1a0
movq 0x8(%rsp), %rdi
movl %eax, 0x18(%rsp)
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x120910
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x5b958
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movl 0x1c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xa0(%rax)
movl 0x18(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xa4(%rax)
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::CollapseEdge(gaps::R3MeshEdge*)
GSVMeshVertex *GSVMesh::
CollapseEdge(R3MeshEdge *edge)
{
  // Get GSV vertex info
  GSVMeshVertex *v0 = VertexOnEdge(edge, 0);
  GSVScanline *scanline = VertexScanline(v0);
  int point_index = VertexPointIndex(v0);
  int boundary_type = VertexBoundaryType(v0);

  // Collapse edge
  GSVMeshVertex *vertex = (GSVMeshVertex *) R3Mesh::CollapseEdge(edge);

  // Assign GSV properties to new vertex
  if (vertex) {
    vertex->scanline = scanline;
    vertex->point_index = point_index;
    vertex->boundary_type = boundary_type;
  }

  // Return new vertex
  return vertex;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x5e1c0
movq (%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e150
movq (%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e180
movq (%rsp), %rdi
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e1a0
movq (%rsp), %rdi
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rsi
callq 0x1208c0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x5ba19
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x98(%rax)
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa0(%rax)
movl 0x10(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa4(%rax)
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::CollapseFace(gaps::R3MeshFace*)
GSVMeshVertex *GSVMesh::
CollapseFace(R3MeshFace *face)
{
  // Get GSV vertex info
  GSVMeshVertex *v0 = VertexOnFace(face, 0);
  GSVScanline *scanline = VertexScanline(v0);
  int point_index = VertexPointIndex(v0);
  int boundary_type = VertexBoundaryType(v0);

  // Collapse face
  GSVMeshVertex *vertex = (GSVMeshVertex *) R3Mesh::CollapseFace(face);

  // Assign GSV properties to new vertex
  if (vertex) {
    vertex->scanline = scanline;
    vertex->point_index = point_index;
    vertex->boundary_type = boundary_type;
  }

  // Return new vertex
  return vertex;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x5e1f0
movq (%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e150
movq (%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e180
movq (%rsp), %rdi
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e1a0
movq (%rsp), %rdi
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rsi
callq 0x120a10
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x5bad9
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x98(%rax)
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa0(%rax)
movl 0x10(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa4(%rax)
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::SplitEdge(gaps::R3MeshEdge*, gaps::R3Point const&, gaps::R3MeshEdge**, gaps::R3MeshEdge**)
GSVMeshVertex *GSVMesh::
SplitEdge(R3MeshEdge *edge, const R3Point& point, R3MeshEdge **e0, R3MeshEdge **e1)
{
  // Get GSV vertex info
  GSVMeshVertex *v0 = VertexOnEdge(edge, 0);
  GSVScanline *scanline = VertexScanline(v0);
  int point_index = VertexPointIndex(v0);
  int boundary_type = VertexBoundaryType(v0);

  // Split edge
  GSVMeshVertex *vertex = (GSVMeshVertex *) R3Mesh::SplitEdge(edge, point, e0, e1);

  // Assign GSV properties to new vertex
  if (vertex) {
    vertex->scanline = scanline;
    vertex->point_index = point_index;
    vertex->boundary_type = boundary_type;
  }

  // Return new vertex
  return vertex;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x5e1c0
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e150
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e180
movq 0x8(%rsp), %rdi
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rsi
callq 0x5e1a0
movq 0x8(%rsp), %rdi
movl %eax, 0x18(%rsp)
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
callq 0x120a60
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x5bbbc
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movl 0x1c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xa0(%rax)
movl 0x18(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xa4(%rax)
movq 0x10(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::SplitFace(gaps::R3MeshFace*, gaps::R3Point const&, gaps::R3MeshFace**, gaps::R3MeshFace**, gaps::R3MeshFace**)
GSVMeshVertex *GSVMesh::
SplitFace(R3MeshFace *face, const R3Point& point, 
  R3MeshFace **f0, R3MeshFace **f1, R3MeshFace **f2)
{
  // Get GSV vertex info
  GSVMeshVertex *v0 = VertexOnFace(face, 0);
  GSVScanline *scanline = VertexScanline(v0);
  int point_index = VertexPointIndex(v0);
  int boundary_type = VertexBoundaryType(v0);

  // Split face
  GSVMeshVertex *vertex = (GSVMeshVertex *) R3Mesh::SplitFace(face, point, f0, f1, f2);

  // Assign GSV properties to new vertex
  if (vertex) {
    vertex->scanline = scanline;
    vertex->point_index = point_index;
    vertex->boundary_type = boundary_type;
  }

  // Return new vertex
  return vertex;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x5e1f0
movq (%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e150
movq (%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e180
movq (%rsp), %rdi
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rsi
callq 0x5e1a0
movq (%rsp), %rdi
movl %eax, 0x10(%rsp)
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x28(%rsp), %r9
callq 0x1214b0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x5be31
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x98(%rax)
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa0(%rax)
movl 0x10(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xa4(%rax)
movq 0x8(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::CreateVertex(gaps::R3Point const&, gaps::R3MeshVertex*)
R3MeshVertex *GSVMesh::
CreateVertex(const R3Point& position, R3MeshVertex *v)
{
  // Create GSV vertex
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  if (!v) {
    vertex = new GSVMeshVertex();
    vertex->flags.Add(R3_MESH_VERTEX_ALLOCATED);
  }

  // Fill in GSV stuff
  vertex->scanline = NULL;
  vertex->point_index = -1;
  vertex->boundary_type = GSV_MESH_NO_BOUNDARY;

  // Fill in R3Mesh stuff 
  return R3Mesh::CreateVertex(position, vertex);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x5bee2
movl $0xa8, %edi
callq 0x292e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
callq 0x5e0a0
jmp 0x5be8b
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
addq $0x78, %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x38e50
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x38e70
jmp 0x5bee2
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
movl $0xa8, %esi
callq 0x291f0
jmp 0x5bf29
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rax
movq $0x0, 0x98(%rax)
movq 0x38(%rsp), %rax
movl $0xffffffff, 0xa0(%rax) # imm = 0xFFFFFFFF
movq 0x38(%rsp), %rax
movl $0x0, 0xa4(%rax)
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x11e130
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x29c10
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::CreateVertex(gaps::R3Point const&, gaps::R3Vector const&, gaps::R3MeshVertex*)
R3MeshVertex *GSVMesh::
CreateVertex(const R3Point& position, const R3Vector& normal, R3MeshVertex *v)
{
  // Create GSV vertex
  GSVMeshVertex *vertex = (GSVMeshVertex *) v;
  if (!vertex) {
    vertex = new GSVMeshVertex();
    vertex->flags.Add(R3_MESH_VERTEX_ALLOCATED);
  }

  // Fill in GSV stuff
  vertex->scanline = NULL;
  vertex->point_index = -1;
  vertex->boundary_type = GSV_MESH_NO_BOUNDARY;

  // Fill in R3Mesh stuff 
  return R3Mesh::CreateVertex(position, normal, vertex);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x5bfe5
movl $0xa8, %edi
callq 0x292e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x5e0a0
jmp 0x5bf90
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x78, %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x38e50
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x38e70
jmp 0x5bfe5
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0xa8, %esi
callq 0x291f0
jmp 0x5c031
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movq $0x0, 0x98(%rax)
movq 0x30(%rsp), %rax
movl $0xffffffff, 0xa0(%rax) # imm = 0xFFFFFFFF
movq 0x30(%rsp), %rax
movl $0x0, 0xa4(%rax)
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x11e230
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x29c10
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::Intersection(gaps::R3Ray const&, gaps::R3MeshIntersection*, double, double, int (*)(gaps::R3Point const&, gaps::R3Vector const&, gaps::R3Mesh*, gaps::R3MeshFace*, void*), void*) const
R3MeshType GSVMesh::
Intersection(const R3Ray& ray, R3MeshIntersection *intersection, 
  RNScalar min_t, RNScalar max_t,
  int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *), 
  void *compatible_data) const
{
  // Create search tree
  if (!search_tree) {
    GSVMesh *mesh = (GSVMesh *) this;
    mesh->search_tree = new R3MeshSearchTree((R3Mesh *) this);
    if (!search_tree) {
      RNFail("Unable to build mesh search tree\n");
      return R3_MESH_NULL_TYPE;
    }
  }

  // Use search tree to find intersection
  R3MeshIntersection closest;
  search_tree->FindIntersection(ray, closest, min_t, max_t, IsCompatible, compatible_data);
  if (intersection) *intersection = closest;
  return closest.type;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movsd %xmm0, 0x80(%rsp)
movsd %xmm1, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %r8, 0x68(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x140(%rax)
jne 0x5c3fa
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movl $0x18, %edi
callq 0x292e0
movq 0x8(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
callq 0xf9720
jmp 0x5c39d
movq 0x8(%rsp), %rax
movq (%rsp), %rdx
movq 0x60(%rsp), %rcx
movq %rdx, 0x140(%rcx)
cmpq $0x0, 0x140(%rax)
jne 0x5c3f8
leaq 0x20b15f(%rip), %rdi    # 0x267522
movb $0x0, %al
callq 0x1cbff0
movl $0x0, 0xa4(%rsp)
jmp 0x5c463
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
movl $0x18, %esi
callq 0x291f0
jmp 0x5c472
jmp 0x5c3fa
leaq 0x10(%rsp), %rdi
callq 0x5e2e0
movq 0x8(%rsp), %rax
movq 0x140(%rax), %rdi
movq 0x90(%rsp), %rsi
movsd 0x80(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %r8
leaq 0x10(%rsp), %rdx
callq 0xff760
cmpq $0x0, 0x88(%rsp)
je 0x5c458
movq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5e300
movl 0x10(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x29c10
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVMesh.cpp
// Function: gaps::GSVMesh::ClosestPoint(gaps::R3Point const&, gaps::R3MeshIntersection*, double, double, int (*)(gaps::R3Point const&, gaps::R3Vector const&, gaps::R3Mesh*, gaps::R3MeshFace*, void*), void*)
R3MeshType GSVMesh::
ClosestPoint(const R3Point& query, R3MeshIntersection *closest, 
  RNScalar min_distance, RNScalar max_distance,
  int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *), 
  void *compatible_data)
{
  // Create search tree
  if (!search_tree) {
    GSVMesh *mesh = (GSVMesh *) this;
    mesh->search_tree = new R3MeshSearchTree((R3Mesh *) this);
    if (!search_tree) {
      RNFail("Unable to build mesh search tree\n");
      return R3_MESH_NULL_TYPE;
    }
  }

  // Use search tree to find closest point
  R3MeshIntersection result;
  search_tree->FindClosest(query, result, min_distance, max_distance, IsCompatible, compatible_data);
  if (closest) *closest = result;
  return result.type;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movsd %xmm0, 0x80(%rsp)
movsd %xmm1, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %r8, 0x68(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x140(%rax)
jne 0x5c59a
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movl $0x18, %edi
callq 0x292e0
movq 0x8(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
callq 0xf9720
jmp 0x5c53d
movq 0x8(%rsp), %rax
movq (%rsp), %rdx
movq 0x60(%rsp), %rcx
movq %rdx, 0x140(%rcx)
cmpq $0x0, 0x140(%rax)
jne 0x5c598
leaq 0x20afbf(%rip), %rdi    # 0x267522
movb $0x0, %al
callq 0x1cbff0
movl $0x0, 0xa4(%rsp)
jmp 0x5c603
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
movl $0x18, %esi
callq 0x291f0
jmp 0x5c612
jmp 0x5c59a
leaq 0x10(%rsp), %rdi
callq 0x5e2e0
movq 0x8(%rsp), %rax
movq 0x140(%rax), %rdi
movq 0x90(%rsp), %rsi
movsd 0x80(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %r8
leaq 0x10(%rsp), %rdx
callq 0xfcb10
cmpq $0x0, 0x88(%rsp)
je 0x5c5f8
movq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5e300
movl 0x10(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x29c10
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPose.cpp
// Function: gaps::GSVPose::Towards() const
const R3Vector GSVPose::
Towards(void) const
{
  // Return vector along view direction
  R4Matrix rotation = orientation.Matrix();
  R3Vector towards = rotation * R3negz_vector;
  towards.Normalize();
  return towards;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0x98(%rsp), %rsi
addq $0x20, %rsi
leaq 0x18(%rsp), %rdi
callq 0x15f540
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x6a4d2d(%rip), %rdx    # 0x703438
callq 0x163bd0
movq 0x8(%rsp), %rdi
callq 0x181650
movq 0x10(%rsp), %rax
addq $0xa8, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPose.cpp
// Function: gaps::GSVPose::Up() const
const R3Vector GSVPose::
Up(void) const
{
  // Return up vector
  R4Matrix rotation = orientation.Matrix();
  R3Vector up = rotation * R3posy_vector;
  up.Normalize();
  return up;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0x98(%rsp), %rsi
addq $0x20, %rsi
leaq 0x18(%rsp), %rdi
callq 0x15f540
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x6a4c5d(%rip), %rdx    # 0x7033d8
callq 0x163bd0
movq 0x8(%rsp), %rdi
callq 0x181650
movq 0x10(%rsp), %rax
addq $0xa8, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPose.cpp
// Function: gaps::GSVPose::Right() const
const R3Vector GSVPose::
Right(void) const
{
  // Return up vector
  R4Matrix rotation = orientation.Matrix();
  R3Vector right = rotation * R3posx_vector;
  right.Normalize();
  return right;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0x98(%rsp), %rsi
addq $0x20, %rsi
leaq 0x18(%rsp), %rdi
callq 0x15f540
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x6a4bd5(%rip), %rdx    # 0x7033c0
callq 0x163bd0
movq 0x8(%rsp), %rdi
callq 0x181650
movq 0x10(%rsp), %rax
addq $0xa8, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPose.cpp
// Function: gaps::GSVPose::Matrix() const
const R4Matrix GSVPose::
Matrix(void) const
{
  // Return matrix (std -> pose)
  R4Matrix matrix = R4identity_matrix;
  matrix.Translate(viewpoint.Vector());
  matrix.Multiply(orientation.Matrix());
  return matrix;
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x2a40f8(%rip), %rsi    # 0x302940
callq 0x160750
movq 0x8(%rsp), %rsi
addq $0x8, %rsi
leaq 0xa0(%rsp), %rdi
callq 0x59a20
movq 0x10(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1620a0
movq 0x8(%rsp), %rsi
addq $0x20, %rsi
leaq 0x20(%rsp), %rdi
callq 0x15f540
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x59a60
movq 0x18(%rsp), %rax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPose.cpp
// Function: gaps::GSVPose::Draw(gaps::RNFlags) const
void GSVPose::
Draw(RNFlags flags) const
{
  // Draw viewpoint
  R3Sphere(viewpoint, 0.1).Draw();

  // Draw towards vector
  R3Span(viewpoint, viewpoint + Towards()).Draw();

  // Draw up vector
  R3Span(viewpoint, viewpoint + 0.5 * Up()).Draw();
}

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movq %rsi, 0x190(%rsp)
movq %rdi, 0x188(%rsp)
movq 0x188(%rsp), %rsi
movq %rsi, 0x28(%rsp)
addq $0x8, %rsi
leaq 0x160(%rsp), %rdi
movsd 0x207658(%rip), %xmm0   # 0x2660a0
callq 0x14d530
leaq 0x158(%rsp), %rdi
movl $0x772, %esi            # imm = 0x772
callq 0x38e50
jmp 0x5ea61
movq 0x158(%rsp), %rsi
leaq 0x160(%rsp), %rdi
callq 0xf8e00
jmp 0x5ea78
leaq 0x160(%rsp), %rdi
callq 0x398c0
movq 0x28(%rsp), %rsi
movq %rsi, %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq %rsi, %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x5e6c0
movq 0x8(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
leaq 0xc8(%rsp), %rdx
callq 0x180350
movq 0x10(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x17e7c0
leaq 0xf8(%rsp), %rdi
callq 0xf6860
movq 0x28(%rsp), %rsi
movq %rsi, %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq %rsi, %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x5e730
leaq 0x48(%rsp), %rdi
movsd 0x20752c(%rip), %xmm0   # 0x266050
leaq 0x30(%rsp), %rsi
callq 0x38f20
movq 0x18(%rsp), %rsi
leaq 0x60(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x180350
movq 0x20(%rsp), %rsi
leaq 0x78(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x17e7c0
leaq 0x78(%rsp), %rdi
callq 0xf6860
addq $0x198, %rsp            # imm = 0x198
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x398c0
movq 0x150(%rsp), %rdi
callq 0x29c10
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPose.cpp
// Function: gaps::GSVPose::Print(_IO_FILE*, char const*, char const*) const
void GSVPose::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print pose header
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "Pose:   %g %g %g   %g %g %g %g", 
    viewpoint[0], viewpoint[1], viewpoint[2], 
    orientation[0], orientation[1], orientation[2], orientation[3]);
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x5ebd9
movq 0x2903f7(%rip), %rax    # 0x2eefc8
movq (%rax), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x5ebf9
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x221635(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rdi
xorl %esi, %esi
callq 0x38ac0
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x38(%rsp)
addq $0x8, %rdi
movl $0x1, %esi
callq 0x38ac0
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
addq $0x8, %rdi
movl $0x2, %esi
callq 0x38ac0
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
addq $0x20, %rdi
xorl %esi, %esi
callq 0x5ee60
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
addq $0x20, %rdi
movl $0x1, %esi
callq 0x5ee60
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x28(%rsp)
addq $0x20, %rdi
movl $0x2, %esi
callq 0x5ee60
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x30(%rsp)
addq $0x20, %rdi
movl $0x3, %esi
callq 0x5ee60
movq 0x8(%rsp), %rdi
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movsd 0x20(%rsp), %xmm3
movsd 0x28(%rsp), %xmm4
movsd 0x30(%rsp), %xmm5
movaps %xmm0, %xmm6
movsd 0x38(%rsp), %xmm0
leaq 0x208c56(%rip), %rsi    # 0x26792f
movb $0x7, %al
callq 0x293c0
cmpq $0x0, 0x48(%rsp)
je 0x5ed00
movq 0x58(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0x22152e(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x58(%rsp), %rdi
leaq 0x2080fa(%rip), %rsi    # 0x266e06
movb $0x0, %al
callq 0x293c0
addq $0x68, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPoint.cpp
// Function: gaps::GSVPoint::GSVPoint()
GSVPoint::
GSVPoint(void)
  : timestamp(0),
    point_identifier(-1),
    cluster_identifier(-1),
    elevation(-1),
    beam_index(-1),
    reflectivity(1),
    category_identifier(0),
    category_confidence(0),
    flags(0)
{
  // Set position
  this->position[0] = 0;
  this->position[1] = 0;
  this->position[2] = 0;
  
  // Set normal
  this->normal[0] = 0;
  this->normal[1] = 0;
  this->normal[2] = 0;

  // Set tangent
  this->tangent[0] = 0;
  this->tangent[1] = 0;
  this->tangent[2] = 0;

  // Set radius
  this->radius[0] = 0;
  this->radius[1] = 0;

  // Set color
  this->color[0] = 0;
  this->color[1] = 0;
  this->color[2] = 0;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
movl $0xffffffff, 0x38(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x3c(%rax) # imm = 0xFFFFFFFF
movw $0xffff, 0x44(%rax)     # imm = 0xFFFF
movb $-0x1, 0x46(%rax)
movb $0x1, 0x47(%rax)
movb $0x0, 0x4b(%rax)
movb $0x0, 0x4c(%rax)
movb $0x0, 0x4d(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x20(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x24(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x28(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x30(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rax)
movw $0x0, 0x40(%rax)
movw $0x0, 0x42(%rax)
movb $0x0, 0x48(%rax)
movb $0x0, 0x49(%rax)
movb $0x0, 0x4a(%rax)
retq
nopw (%rax,%rax)
// File: vividvilla[P]hackerrank/src/flowers.cpp
// Function: getMinimumPrice(std::vector<int, std::allocator<int>>, int)
int getMinimumPrice(vector<int> flowers, int K) {
    int p = 0;
    int N = flowers.size();
    int x = 0;
    int c = 0;
    vector<int> m = vector<int>(N, 0);

    sort(flowers.begin(), flowers.end());
    for (int i = N - 1; i >= 0; i--) {
        m[i] = x;
        c++;
        if (c >= K) {
            x++;
            c = 0;
        }
    }

    for (int i = 0; i < N; i++)
        p += (m[i] + 1) * flowers[i];

    return p;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, 0x90(%rsp)
movl %esi, 0x8c(%rsp)
movl $0x0, 0x88(%rsp)
callq 0x1590
movl %eax, 0x84(%rsp)
movl $0x0, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
movslq 0x84(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x5c(%rsp)
leaq 0x5b(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x15b0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
leaq 0x60(%rsp), %rdi
leaq 0x5c(%rsp), %rdx
callq 0x15c0
jmp 0x12d4
leaq 0x5b(%rsp), %rdi
callq 0x1640
movq 0x18(%rsp), %rdi
callq 0x1690
movq 0x18(%rsp), %rdi
movq %rax, 0x40(%rsp)
callq 0x16c0
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x1650
jmp 0x130d
movl 0x84(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jl 0x13c5
movl 0x80(%rsp), %eax
movl %eax, 0x14(%rsp)
movslq 0x34(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x16f0
movl 0x14(%rsp), %ecx
movl %ecx, (%rax)
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
cmpl 0x8c(%rsp), %eax
jl 0x13b3
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
movl $0x0, 0x7c(%rsp)
jmp 0x13b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x5b(%rsp), %rdi
callq 0x1640
jmp 0x1447
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1710
jmp 0x1447
jmp 0x13b5
movl 0x34(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x131b
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x84(%rsp), %eax
jge 0x1426
movslq 0x30(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x16f0
movq 0x18(%rsp), %rdi
movl (%rax), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
movslq 0x30(%rsp), %rsi
callq 0x16f0
movq %rax, %rcx
movl 0x10(%rsp), %eax
imull (%rcx), %eax
addl 0x88(%rsp), %eax
movl %eax, 0x88(%rsp)
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x13cd
movl 0x88(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1710
movl 0xc(%rsp), %eax
addq $0x98, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x1100
nopw %cs:(%rax,%rax)