// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: GLUTMainLoop()
void GLUTMainLoop(void)
{
 // Set world bbbox
  world_bbox = R3null_box;
  for (int i = 0; i < scenes.NEntries(); i++) world_bbox.Union(scenes[i]->BBox());
  for (int i = 0; i < meshes.NEntries(); i++) world_bbox.Union(meshes[i]->BBox());
  for (int i = 0; i < pointsets.NEntries(); i++) world_bbox.Union(pointsets[i]->BBox());
  for (int i = 0; i < grids.NEntries(); i++) world_bbox.Union(grids[i]->WorldBox());
  for (int i = 0; i < sfls.NEntries(); i++) world_bbox.Union(sfls[i]->BBox());
  for (int i = 0; i < gsvs.NEntries(); i++) world_bbox.Union(gsvs[i]->BBox());

  // Set world origin
  world_origin = world_bbox.Centroid();

  // Set slice coords to middle of grid
  if (grids.NEntries() > 0) {
    grid_slice_coords[RN_X] = grids[0]->XResolution()/2;
    grid_slice_coords[RN_Y] = grids[0]->YResolution()/2;
    grid_slice_coords[RN_Z] = grids[0]->ZResolution()/2;
  }

  // Create viewer
  viewer = CreateViewer();
  if (!viewer) exit(-1);

   // Run main loop -- never returns 
  glutMainLoop();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
leaq 0x199079(%rip), %rbx    # 0x1c3d18
leaq 0x19cd12(%rip), %rsi    # 0x1c79b8
movq %rbx, %rdi
callq 0x30d44
xorl %r14d, %r14d
movslq 0x19900c(%rip), %rax    # 0x1c3cc4
cmpq %rax, %r14
jge 0x2acdd
movq 0x198ff4(%rip), %rax    # 0x1c3cb8
movq (%rax,%r14,8), %rdi
callq 0x30d76
movq %rbx, %rdi
movq %rax, %rsi
callq 0xad3ba
incq %r14
jmp 0x2acb1
xorl %r14d, %r14d
movl $0xf8, %r15d
leaq 0x19902b(%rip), %rbx    # 0x1c3d18
movslq 0x198fe0(%rip), %rax    # 0x1c3cd4
cmpq %rax, %r14
jge 0x2ad14
movq 0x198fc8(%rip), %rax    # 0x1c3cc8
movq (%rax,%r14,8), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0xad3ba
incq %r14
jmp 0x2aced
xorl %r14d, %r14d
movl $0x118, %r15d           # imm = 0x118
leaq 0x198ff4(%rip), %rbx    # 0x1c3d18
movslq 0x198fb9(%rip), %rax    # 0x1c3ce4
cmpq %rax, %r14
jge 0x2ad4b
movq 0x198fa1(%rip), %rax    # 0x1c3cd8
movq (%rax,%r14,8), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0xad3ba
incq %r14
jmp 0x2ad24
xorl %r15d, %r15d
leaq 0x80(%rsp), %rbx
leaq 0x198fbb(%rip), %r14    # 0x1c3d18
movslq 0x198f90(%rip), %rax    # 0x1c3cf4
cmpq %rax, %r15
jge 0x2ad94
movq 0x198f78(%rip), %rax    # 0x1c3ce8
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x30d7e
movq %r14, %rdi
movq %rbx, %rsi
callq 0xad3ba
movq %rbx, %rdi
callq 0xad65a
incq %r15
jmp 0x2ad5d
xorl %r14d, %r14d
leaq 0x198f7a(%rip), %rbx    # 0x1c3d18
movslq 0x198f5f(%rip), %rax    # 0x1c3d04
cmpq %rax, %r14
jge 0x2adca
movq 0x198f47(%rip), %rax    # 0x1c3cf8
movq (%rax,%r14,8), %rdi
callq 0x30e1e
movq %rbx, %rdi
movq %rax, %rsi
callq 0xad3ba
incq %r14
jmp 0x2ad9e
xorl %r14d, %r14d
leaq 0x198f44(%rip), %rbx    # 0x1c3d18
movslq 0x198f39(%rip), %rax    # 0x1c3d14
cmpq %rax, %r14
jge 0x2ae00
movq 0x198f21(%rip), %rax    # 0x1c3d08
movq (%rax,%r14,8), %rdi
callq 0x30e28
movq %rbx, %rdi
movq %rax, %rsi
callq 0xad3ba
incq %r14
jmp 0x2add4
leaq 0x198f11(%rip), %rsi    # 0x1c3d18
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0xad17e
leaq 0x198f32(%rip), %rdi    # 0x1c3d50
movq %rbx, %rsi
callq 0xc10e6
cmpl $0x0, 0x198ec7(%rip)    # 0x1c3cf4
jle 0x2ae69
movq 0x198eb2(%rip), %rax    # 0x1c3ce8
movq (%rax), %rcx
movl 0x238(%rcx), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, 0x199335(%rip)    # 0x1c4180
movl 0x23c(%rcx), %eax
cltd
idivl %esi
movl %eax, 0x19932a(%rip)    # 0x1c4184
movl 0x240(%rcx), %eax
cltd
idivl %esi
movl %eax, 0x19931f(%rip)    # 0x1c4188
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xe178a
movq %rbx, %rdi
callq 0x30e82
leaq 0x198e93(%rip), %rdi    # 0x1c3d18
callq 0x30e8a
movapd %xmm0, %xmm3
cmpb $0x0, 0x199303(%rip)    # 0x1c4198
jne 0x2aefe
leaq 0x198e7a(%rip), %rsi    # 0x1c3d18
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movsd %xmm3, 0x8(%rsp)
callq 0xad17e
movsd 0x10014f(%rip), %xmm0   # 0x12b008
mulsd 0x8(%rsp), %xmm0
leaq 0x198dc2(%rip), %rsi    # 0x1c3c88
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xc1cb2
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc154d
leaq 0x198d80(%rip), %rdi    # 0x1c3c70
movq %r15, %rsi
callq 0xc10e6
movsd 0x8(%rsp), %xmm3
movsd 0x10010a(%rip), %xmm2   # 0x12b010
mulsd %xmm3, %xmm2
mulsd 0x100106(%rip), %xmm3   # 0x12b018
leaq 0x198d57(%rip), %rsi    # 0x1c3c70
leaq 0x198d68(%rip), %rdx    # 0x1c3c88
leaq 0x198d79(%rip), %rcx    # 0x1c3ca0
leaq 0x80(%rsp), %r14
movsd 0x1000e9(%rip), %xmm0   # 0x12b020
movq %r14, %rdi
movaps %xmm0, %xmm1
callq 0x7ebd2
movl 0x193ac8(%rip), %ecx    # 0x1bea10
movl 0x193ac5(%rip), %r8d    # 0x1bea14
leaq 0x58(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7f7cc
movl $0xa8, %edi
callq 0x27940
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7d33e
cmpb $0x1, 0x19921a(%rip)    # 0x1c419c
jne 0x2b0ac
leaq 0x100a49(%rip), %rdi    # 0x12b9d8
callq 0x27f50
leaq 0x18(%rsp), %rdi
callq 0xe17c4
leaq 0x1003eb(%rip), %rdi    # 0x12b390
movb $0x1, %al
callq 0x27080
leaq 0xc8(%rsp), %r14
movsd -0x48(%r14), %xmm0
movsd -0x40(%r14), %xmm1
movsd -0x38(%r14), %xmm2
leaq 0x1003da(%rip), %rdi    # 0x12b3a7
movb $0x3, %al
callq 0x27080
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xc1f22
movsd (%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xc1f22
movsd 0x8(%r15), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xc1f22
movsd 0x10(%r15), %xmm2
leaq 0x100394(%rip), %rdi    # 0x12b3bc
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movb $0x3, %al
callq 0x27080
movsd -0x18(%r14), %xmm0
movsd -0x10(%r14), %xmm1
movsd -0x8(%r14), %xmm2
leaq 0x10037e(%rip), %rdi    # 0x12b3d2
movb $0x3, %al
callq 0x27080
movsd 0x18(%r14), %xmm0
movsd 0x20(%r14), %xmm1
leaq 0x100375(%rip), %rdi    # 0x12b3e3
movb $0x2, %al
callq 0x27080
movsd 0x28(%r14), %xmm0
leaq 0x100370(%rip), %rdi    # 0x12b3f2
movb $0x1, %al
callq 0x27080
movsd 0x30(%r14), %xmm0
leaq 0x100369(%rip), %rdi    # 0x12b3ff
movb $0x1, %al
callq 0x27080
movq 0x192e9c(%rip), %rax    # 0x1bdf40
movq (%rax), %rdi
callq 0x27b10
movq %rbx, 0x1990dd(%rip)    # 0x1c4190
callq 0xf680b
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0xa8, %esi
movq %rbx, %rdi
callq 0x27960
jmp 0x2b0e7
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0xad65a
movq %r14, %rdi
callq 0x28170