// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::Empty()
void R3Mesh::
Empty(void)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Delete all faces, edges, vertices
  while (NFaces() > 0) DeleteFace(Face(0));
  while (NEdges() > 0) DeleteEdge(Edge(0));
  while (NVertices() > 0) DeleteVertex(Vertex(0));

  // Delete the blocks of data
  if (vertex_block) { delete [] vertex_block; vertex_block = NULL; }
  if (edge_block) { delete [] edge_block; edge_block = NULL; }
  if (face_block) { delete [] face_block; face_block = NULL; }

  // Reset bounding box
  bbox = R3null_box;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x78(%rsp)
movq (%rdi), %rax
callq *0x290(%rax)
movq 0x78(%rsp), %rdi
callq 0x135a0
cmpl $0x0, %eax
jle 0x19030
movq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x136d0
movq 0x78(%rsp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
callq *0x70(%rax)
jmp 0x19005
jmp 0x19032
movq 0x78(%rsp), %rdi
callq 0x135c0
cmpl $0x0, %eax
jle 0x1905d
movq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x36930
movq 0x78(%rsp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
callq *0x68(%rax)
jmp 0x19032
jmp 0x1905f
movq 0x78(%rsp), %rdi
callq 0x135e0
cmpl $0x0, %eax
jle 0x1908a
movq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x13630
movq 0x78(%rsp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
callq *0x60(%rax)
jmp 0x1905f
movq 0x78(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x19130
movq 0x78(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x70(%rsp)
cmpq $0x0, %rax
je 0x19123
movq 0x70(%rsp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, 0x58(%rsp)
movq -0x8(%rcx), %rax
movq %rax, 0x60(%rsp)
imulq $0x98, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, 0x68(%rsp)
je 0x19109
movq 0x68(%rsp), %rdi
addq $-0x98, %rdi
movq %rdi, 0x50(%rsp)
callq 0x36560
movq 0x70(%rsp), %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x68(%rsp)
jne 0x190df
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rax
imulq $0x98, %rax, %rsi
addq $0x8, %rsi
callq 0xf990
movq 0x78(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x78(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x191cd
movq 0x78(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x191c0
movq 0x48(%rsp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, 0x30(%rsp)
movq -0x8(%rcx), %rax
movq %rax, 0x38(%rsp)
imulq $0x58, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, 0x40(%rsp)
je 0x191a9
movq 0x40(%rsp), %rdi
addq $-0x58, %rdi
movq %rdi, 0x28(%rsp)
callq 0x36640
movq 0x48(%rsp), %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x40(%rsp)
jne 0x19182
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
imulq $0x58, %rax, %rsi
addq $0x8, %rsi
callq 0xf990
movq 0x78(%rsp), %rax
movq $0x0, 0x40(%rax)
movq 0x78(%rsp), %rax
cmpq $0x0, 0x48(%rax)
je 0x19271
movq 0x78(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x19264
movq 0x20(%rsp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
movq -0x8(%rcx), %rax
movq %rax, 0x10(%rsp)
imulq $0xc8, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, 0x18(%rsp)
je 0x1924a
movq 0x18(%rsp), %rdi
addq $-0xc8, %rdi
movq %rdi, (%rsp)
callq 0x367a0
movq 0x20(%rsp), %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0x19222
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
imulq $0xc8, %rax, %rsi
addq $0x8, %rsi
callq 0xf990
movq 0x78(%rsp), %rax
movq $0x0, 0x48(%rax)
movq 0x78(%rsp), %rdi
addq $0xf8, %rdi
leaq 0x15f564(%rip), %rsi    # 0x1787e8
callq 0x37500
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)