LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::R3Scene::WriteFile(char const*) const
int R3Scene::
WriteFile(const char *filename) const
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    RNFail("Filename %s has no extension (e.g., .txt)\n", filename);
    return 0;
  }

  // Write file of appropriate type
  if (!strncmp(extension, ".scn", 4)) {
    if (!WritePrincetonFile(filename)) return 0;
  }
  else if (!strncmp(extension, ".obj", 4)) {
    if (!WriteObjFile(filename)) return 0;
  }
  else if (!strncmp(extension, ".json", 4)) {
    if (!WriteSUNCGFile(filename)) return 0;
  }
  else {
    RNFail("Unable to write file %s (unrecognized extension: %s)\n", filename, extension);
    return 0;
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movl $0x2e, %esi
callq 0x22b10
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x3a031
movq 0x10(%rsp), %rsi
leaq 0x1545eb(%rip), %rdi    # 0x18e608
movb $0x0, %al
callq 0xf3b00
movl $0x0, 0x24(%rsp)
jmp 0x3a113
movq 0x8(%rsp), %rdi
leaq 0x1545f6(%rip), %rsi    # 0x18e633
movl $0x4, %edx
callq 0x22450
cmpl $0x0, %eax
jne 0x3a071
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3a120
cmpl $0x0, %eax
jne 0x3a06c
movl $0x0, 0x24(%rsp)
jmp 0x3a113
jmp 0x3a10b
movq 0x8(%rsp), %rdi
leaq 0x1552d4(%rip), %rsi    # 0x18f351
movl $0x4, %edx
callq 0x22450
cmpl $0x0, %eax
jne 0x3a0ab
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3a7e0
cmpl $0x0, %eax
jne 0x3a0a9
movl $0x0, 0x24(%rsp)
jmp 0x3a113
jmp 0x3a109
movq 0x8(%rsp), %rdi
leaq 0x1545a0(%rip), %rsi    # 0x18e657
movl $0x4, %edx
callq 0x22450
cmpl $0x0, %eax
jne 0x3a0e5
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3a820
cmpl $0x0, %eax
jne 0x3a0e3
movl $0x0, 0x24(%rsp)
jmp 0x3a113
jmp 0x3a107
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x15459c(%rip), %rdi    # 0x18e692
movb $0x0, %al
callq 0xf3b00
movl $0x0, 0x24(%rsp)
jmp 0x3a113
jmp 0x3a109
jmp 0x3a10b
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::R3Scene::WriteSUNCGFile(char const*) const
int R3Scene::
WriteSUNCGFile(const char *filename) const
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "w"))) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Write header
  fprintf(fp, "{\n");
  fprintf(fp, "  \"version\":\"suncg@1.0.0\",\n");
  if (root->Name()) fprintf(fp, "  \"id\":\"%s\",\n", root->Name());
  fprintf(fp, "  \"up\":[0,1,0],\n");
  fprintf(fp, "  \"front\":[0,0,1],\n");
  fprintf(fp, "  \"scaleToMeters\":1,\n");  
  fprintf(fp, "  \"levels\":[\n");  

  // Write nodes recursively
  for (int i = 0; i < root->NChildren(); i++) {
    R3SceneNode *child = root->Child(i);
    if (!WriteSUNCGNode(this, child, fp)) {
      fclose(fp);
      return 0;
    }
  }

  // Write trailer
  fprintf(fp, "\n  ]\n");
  fprintf(fp, "}\n");
  
  // Close file
  fclose(fp);
  
  // Return success
  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x156d36(%rip), %rsi    # 0x19157a
callq 0x22c10
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
jne 0x3a874
movq 0x30(%rsp), %rsi
leaq 0x153e6e(%rip), %rdi    # 0x18e6ce
movb $0x0, %al
callq 0xf3b00
movl $0x0, 0x44(%rsp)
jmp 0x3a9d7
movq 0x28(%rsp), %rdi
leaq 0x1551f4(%rip), %rsi    # 0x18fa74
movb $0x0, %al
callq 0x22f30
movq 0x28(%rsp), %rdi
leaq 0x154b08(%rip), %rsi    # 0x18f39b
movb $0x0, %al
callq 0x22f30
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x2b800
cmpq $0x0, %rax
je 0x3a8da
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rdi
callq 0x2b800
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x1551aa(%rip), %rsi    # 0x18fa7d
movb $0x0, %al
callq 0x22f30
movq 0x28(%rsp), %rdi
leaq 0x154ad1(%rip), %rsi    # 0x18f3b7
movb $0x0, %al
callq 0x22f30
movq 0x28(%rsp), %rdi
leaq 0x154acf(%rip), %rsi    # 0x18f3c8
movb $0x0, %al
callq 0x22f30
movq 0x28(%rsp), %rdi
leaq 0x154ad0(%rip), %rsi    # 0x18f3dc
movb $0x0, %al
callq 0x22f30
movq 0x28(%rsp), %rdi
leaq 0x154ad3(%rip), %rsi    # 0x18f3f2
movb $0x0, %al
callq 0x22f30
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rax
movl 0x24(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq (%rax), %rdi
callq 0x2baf0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x3a99f
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x2bb10
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x3feb0
cmpl $0x0, %eax
jne 0x3a990
movq 0x28(%rsp), %rdi
callq 0x229d0
movl $0x0, 0x44(%rsp)
jmp 0x3a9d7
jmp 0x3a992
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x3a92e
movq 0x28(%rsp), %rdi
leaq 0x154a55(%rip), %rsi    # 0x18f400
movb $0x0, %al
callq 0x22f30
movq 0x28(%rsp), %rdi
leaq 0x155141(%rip), %rsi    # 0x18faff
movb $0x0, %al
callq 0x22f30
movq 0x28(%rsp), %rdi
callq 0x229d0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::ReadObj(gaps::R3Scene*, gaps::R3SceneNode*, char const*, gaps::RNArray<gaps::R3Material*>*)
static int
ReadObj(R3Scene *scene, R3SceneNode *node, const char *filename, RNArray<R3Material *> *returned_materials = NULL)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Determine directory name (for texture image files)
  char *dirname = NULL;
  char buffer[1024];
  strncpy(buffer, filename, 1023);
  char *endp = strrchr(buffer, '/');
  if (!endp) endp = strrchr(buffer, '\\');
  if (endp) { *endp = '\0'; dirname = buffer; }

  // Read file
  if (!ReadObj(scene, node, dirname, fp, returned_materials)) {
    RNFail("Unable to read OBJ file %s\n", filename);
    fclose(fp);
    return 0;
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x448, %rsp            # imm = 0x448
movq %rdi, 0x438(%rsp)
movq %rsi, 0x430(%rsp)
movq %rdx, 0x428(%rsp)
movq %rcx, 0x420(%rsp)
movq 0x428(%rsp), %rdi
leaq 0x15a88d(%rip), %rsi    # 0x1952a3
callq 0x22c10
movq %rax, 0x418(%rsp)
cmpq $0x0, 0x418(%rsp)
jne 0x3aa54
movq 0x428(%rsp), %rsi
leaq 0x153c91(%rip), %rdi    # 0x18e6ce
movb $0x0, %al
callq 0xf3b00
movl $0x0, 0x444(%rsp)
jmp 0x3ab3e
movq $0x0, 0x410(%rsp)
leaq 0x10(%rsp), %rdi
movq 0x428(%rsp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x224b0
leaq 0x10(%rsp), %rdi
movl $0x2f, %esi
callq 0x22b10
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x3aaa7
leaq 0x10(%rsp), %rdi
movl $0x5c, %esi
callq 0x22b10
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x3aac4
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
leaq 0x10(%rsp), %rax
movq %rax, 0x410(%rsp)
movq 0x438(%rsp), %rdi
movq 0x430(%rsp), %rsi
movq 0x410(%rsp), %rdx
movq 0x418(%rsp), %rcx
movq 0x420(%rsp), %r8
callq 0x43b60
cmpl $0x0, %eax
jne 0x3ab26
movq 0x428(%rsp), %rsi
leaq 0x154b54(%rip), %rdi    # 0x18f659
movb $0x0, %al
callq 0xf3b00
movq 0x418(%rsp), %rdi
callq 0x229d0
movl $0x0, 0x444(%rsp)
jmp 0x3ab3e
movq 0x418(%rsp), %rdi
callq 0x229d0
movl $0x1, 0x444(%rsp)
movl 0x444(%rsp), %eax
addq $0x448, %rsp            # imm = 0x448
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::ReadMesh(char const*)
static R3TriangleArray *
ReadMesh(const char *filename)
{
  // Read mesh file
  R3Mesh mesh;
  if (!mesh.ReadFile(filename)) {
    RNFail("Unable to read mesh %s\n", filename);
    return NULL;
  }

  // Allocate triangle array
  R3TriangleArray *array = new R3TriangleArray();
  if (!array) {
    RNFail("Unable to allocate triangle array");
    return NULL;
  }

  // Load mesh into triangle array
  array->LoadMesh(mesh);

  // Return triangle array
  return array;
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x168(%rsp)
leaq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x7dac0
movq 0x8(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x95b20
movl %eax, 0x14(%rsp)
jmp 0x3cd86
movl 0x14(%rsp), %eax
cmpl $0x0, %eax
jne 0x3cdd3
movq 0x168(%rsp), %rsi
leaq 0x151af9(%rip), %rdi    # 0x18e897
xorl %eax, %eax
callq 0xf3b00
jmp 0x3cda7
movq $0x0, 0x170(%rsp)
movl $0x1, 0x20(%rsp)
jmp 0x3ce70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x3ce8a
movl $0x70, %edi
callq 0x229e0
movq %rax, (%rsp)
jmp 0x3cde3
movq (%rsp), %rdi
callq 0xac670
jmp 0x3cdee
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x3ce43
leaq 0x15292e(%rip), %rdi    # 0x18f734
xorl %eax, %eax
callq 0xf3b00
jmp 0x3ce0f
movq $0x0, 0x170(%rsp)
movl $0x1, 0x20(%rsp)
jmp 0x3ce70
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0x70, %esi
callq 0x22a00
jmp 0x3ce8a
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq 0x240(%rax), %rax
leaq 0x30(%rsp), %rsi
callq *%rax
jmp 0x3ce5b
movq 0x18(%rsp), %rax
movq %rax, 0x170(%rsp)
movl $0x1, 0x20(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x7e9c0
movq 0x170(%rsp), %rax
addq $0x178, %rsp            # imm = 0x178
retq
leaq 0x30(%rsp), %rdi
callq 0x7e9c0
movq 0x28(%rsp), %rdi
callq 0x23290
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::InsertCopiesOfLight(gaps::R3Scene*, gaps::R3Light*, char const*)
static int
InsertCopiesOfLight(R3Scene *scene, R3Light *original, const char *reference_frame)
{
  // Iniitalize return status
  int status = 0;
  
  // Insert copies of light into scene
  if (!strcmp(reference_frame, "world")) {
    // Insert one copy of light 
    R3Light *light = original->Copy();
    scene->InsertLight(light);
    status++;
  }
  else {
    // Insert copy of light for each matching node with name matching reference frame
    for (int i = 0; i < scene->NNodes(); i++) {
      R3SceneNode *node = scene->Node(i);
      if (!MatchReferencedSceneName(node, reference_frame)) continue;
      R3Light *light = original->Copy();
      R3Affine transformation_to_world = node->CumulativeTransformation();
      light->Transform(node->CumulativeTransformation());
      scene->InsertLight(light);
      status++;
    }
  }

  // Return whether inserted any lights
  return status;
}

// Assembly:
subq $0x278, %rsp            # imm = 0x278
movq %rdi, 0x270(%rsp)
movq %rsi, 0x268(%rsp)
movq %rdx, 0x260(%rsp)
movl $0x0, 0x25c(%rsp)
movq 0x260(%rsp), %rdi
leaq 0x14dd9f(%rip), %rsi    # 0x18fc08
callq 0x22ec0
cmpl $0x0, %eax
jne 0x41eb3
movq 0x268(%rsp), %rdi
callq 0x63000
movq %rax, 0x250(%rsp)
movq 0x270(%rsp), %rdi
movq 0x250(%rsp), %rsi
callq 0x2cad0
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
jmp 0x4200b
movl $0x0, 0x24c(%rsp)
movl 0x24c(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x270(%rsp), %rdi
callq 0x2bf50
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x42009
movq 0x270(%rsp), %rdi
movl 0x24c(%rsp), %esi
callq 0x2bf70
movq %rax, 0x240(%rsp)
movq 0x240(%rsp), %rdi
movq 0x260(%rsp), %rsi
callq 0x48050
cmpl $0x0, %eax
jne 0x41f1f
jmp 0x41fbc
movq 0x268(%rsp), %rdi
callq 0x63000
movq %rax, 0x238(%rsp)
movq 0x240(%rsp), %rsi
leaq 0x128(%rsp), %rdi
callq 0x57180
movq 0x238(%rsp), %rax
movq %rax, (%rsp)
movq 0x240(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x57180
jmp 0x41f69
movq (%rsp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
leaq 0x18(%rsp), %rsi
callq *%rax
jmp 0x41f7d
leaq 0x18(%rsp), %rdi
callq 0xc1b00
movq 0x270(%rsp), %rdi
movq 0x238(%rsp), %rsi
callq 0x2cad0
jmp 0x41f9e
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
leaq 0x128(%rsp), %rdi
callq 0xc1b00
movl 0x24c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24c(%rsp)
jmp 0x41ebe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
jmp 0x41ffa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xc1b00
leaq 0x128(%rsp), %rdi
callq 0xc1b00
jmp 0x4201a
jmp 0x4200b
movl 0x25c(%rsp), %eax
addq $0x278, %rsp            # imm = 0x278
retq
movq 0x10(%rsp), %rdi
callq 0x23290
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::WritePrincetonReference(gaps::R3Scene const*, gaps::R3SceneReference*, gaps::R3Affine const&, _IO_FILE*, char const*)
static int
WritePrincetonReference(const R3Scene *scene, R3SceneReference *reference,
  const R3Affine& transformation, FILE *fp, const char *indent)
{
  // Get referenced scene
  R3Scene *referenced_scene = reference->ReferencedScene();

  // Check if referenced scene has a file to reference
  if (!referenced_scene->Filename()) {
    // The materials will not be right if simply write referenced scene!!!
    // So WritePrincetonFile should have removed references 
    RNAbort("Should never get here");
    return 0;
  }

  // Write include statement
  fprintf(fp, "%sinclude %s\n", indent, referenced_scene->Filename());

  // Return success
  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2bb90
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x49420
cmpq $0x0, %rax
jne 0x48004
leaq 0x1479e3(%rip), %rdi    # 0x18f9d6
movb $0x0, %al
callq 0xf39f0
movl $0x0, 0x44(%rsp)
jmp 0x48043
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x49420
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0x1479b8(%rip), %rsi    # 0x18f9ec
movb $0x0, %al
callq 0x22f30
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::MatchReferencedSceneName(gaps::R3SceneNode*, char const*)
static RNBoolean
MatchReferencedSceneName(R3SceneNode *node, const char *name)
{
  // Check node name
  if (node->Name() && !strcmp(node->Name(), name)) return TRUE;

  // Check referenced node names
  for (int i = 0; i < node->NReferences(); i++) {
    R3SceneReference *reference = node->Reference(i);
    R3Scene *referenced_scene = reference->ReferencedScene();
    if (referenced_scene->Name() && !strcmp(referenced_scene->Name(), name)) {
      return TRUE;
    }
  }

  // No match
  return FALSE;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2b800
cmpq $0x0, %rax
je 0x48097
movq 0x28(%rsp), %rdi
callq 0x2b800
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x22ec0
cmpl $0x0, %eax
jne 0x48097
movl $0x1, 0x34(%rsp)
jmp 0x4812d
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2bb40
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x48125
movq 0x28(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x2bb60
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2bb90
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x48320
cmpq $0x0, %rax
je 0x48113
movq 0x8(%rsp), %rdi
callq 0x48320
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x22ec0
cmpl $0x0, %eax
jne 0x48113
movl $0x1, 0x34(%rsp)
jmp 0x4812d
jmp 0x48115
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4809f
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/./R3Scene.h
// Function: gaps::R3Scene::SetFilename(char const*)
inline void R3Scene::
SetFilename(const char *filename)
{
  // Set filename
  if (this->filename) free(this->filename);
  if (filename) this->filename = RNStrdup(filename);
  else this->filename = NULL;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x148(%rax)
je 0x48861
movq (%rsp), %rax
movq 0x148(%rax), %rdi
callq 0x22c30
cmpq $0x0, 0x8(%rsp)
je 0x48883
movq 0x8(%rsp), %rdi
callq 0xf3800
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x148(%rax)
jmp 0x48892
movq (%rsp), %rax
movq $0x0, 0x148(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/./R3SceneNode.h
// Function: gaps::R3SceneNode::Info(char const*) const
inline const char *R3SceneNode::
Info(const char *key) const
{
  // Return info associated with key
  const char *value = NULL;
  if (!info.Find(key, &value)) return NULL;
  return value;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq 0x68(%rsp), %rax
movq $0x0, 0x58(%rsp)
addq $0x50, %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x232a0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x485b0
jmp 0x49894
movq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x4fde0
movl %eax, 0x4(%rsp)
jmp 0x498ae
movl 0x4(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, 0x3(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x22610
leaq 0x37(%rsp), %rdi
callq 0x22ab0
movb 0x3(%rsp), %al
testb $0x1, %al
jne 0x498dc
jmp 0x4991b
movq $0x0, 0x70(%rsp)
jmp 0x49925
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x4990f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x22610
leaq 0x37(%rsp), %rdi
callq 0x22ab0
jmp 0x4992f
movq 0x58(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x23290
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::RemoveChild(gaps::R3SceneNode*)
void R3SceneNode::
RemoveChild(R3SceneNode *node) 
{
  // Remove node from children
  assert(node->parent == this);
  RNArrayEntry *entry = children.KthEntry(node->parent_index);
  assert(children.EntryContents(entry) == node);
  R3SceneNode *tail = children.Tail();
  children.EntryContents(entry) = tail;
  tail->parent_index = node->parent_index;
  children.RemoveTail();
  node->parent = NULL;
  node->parent_index = -1;

  // Invalidate bounding box
  InvalidateBBox();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x20, %rdi
movq 0x28(%rsp), %rax
movl 0x18(%rax), %esi
callq 0x48370
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x20, %rdi
callq 0x48390
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x20, %rdi
movq 0x20(%rsp), %rsi
callq 0x483a0
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movl 0x18(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x18(%rax)
addq $0x20, %rdi
callq 0x483b0
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x28(%rsp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
callq 0x574b0
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::NFacets() const
const RNInterval R3SceneNode::
NFacets(void) const
{
  // Initialize nfacets
  RNInterval nfacets(0,0);
  
  // Add facets from elements
  for (int i = 0; i < NElements(); i++) {
    R3SceneElement *element = Element(i);
    nfacets += element->NFacets();
  }
  
  // Add facets from references
  for (int i = 0; i < NReferences(); i++) {
    R3SceneReference *reference = Reference(i);
    R3Scene *referenced_scene = reference->ReferencedScene();
    if (referenced_scene) nfacets += referenced_scene->NFacets();
  }
  
  // Add facets from children
  for (int i = 0; i < NChildren(); i++) {
    R3SceneNode *child = Child(i);
    nfacets += child->NFacets();
  }

  // Return nfacets
  return nfacets;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xf23e0
movl $0x0, 0x94(%rsp)
movq 0x28(%rsp), %rdi
movl 0x94(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x2bba0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x55e73
movq 0x28(%rsp), %rdi
movl 0x94(%rsp), %esi
callq 0x2bbc0
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x59100
movq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x58360
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x55e07
movl $0x0, 0x74(%rsp)
movq 0x28(%rsp), %rdi
movl 0x74(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x2bb40
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x55eee
movq 0x28(%rsp), %rdi
movl 0x74(%rsp), %esi
callq 0x2bb60
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0x2bb90
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x55edf
movq 0x60(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x583a0
movq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x58360
jmp 0x55ee1
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x55e7b
movl $0x0, 0x4c(%rsp)
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2baf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x55f50
movq 0x28(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x2bb10
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x55dc0
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x58360
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x55ef6
movq 0x20(%rsp), %rax
addq $0xa8, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::Length() const
const RNLength R3SceneNode::
Length(void) const
{
  // Initialize length
  RNLength length = 0;
  
  // Add length from elements
  for (int i = 0; i < NElements(); i++) {
    R3SceneElement *element = Element(i);
    length += element->Length();
  }
  
  // Add length from references
  for (int i = 0; i < NReferences(); i++) {
    R3SceneReference *reference = Reference(i);
    R3Scene *referenced_scene = reference->ReferencedScene();
    if (referenced_scene) length += referenced_scene->Length();
  }
  
  // Add length from children
  for (int i = 0; i < NChildren(); i++) {
    R3SceneNode *child = Child(i);
    length += child->Length();
  }

  // Return length
  return length;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x58(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x2bba0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x55fd6
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x2bbc0
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x591a0
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x55f84
movl $0x0, 0x44(%rsp)
movq 0x18(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x2bb40
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x56049
movq 0x18(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x2bb60
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2bb90
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x5603a
movq 0x30(%rsp), %rdi
callq 0x583d0
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
jmp 0x5603c
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x55fde
movl $0x0, 0x2c(%rsp)
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2baf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x560a3
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x2bb10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x55f60
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x56051
movsd 0x58(%rsp), %xmm0
addq $0x68, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::Area() const
const RNArea R3SceneNode::
Area(void) const
{
  // Initialize area
  RNArea area = 0;
  
  // Add area from elements
  for (int i = 0; i < NElements(); i++) {
    R3SceneElement *element = Element(i);
    area += element->Area();
  }
  
  // Add area from references
  for (int i = 0; i < NReferences(); i++) {
    R3SceneReference *reference = Reference(i);
    R3Scene *referenced_scene = reference->ReferencedScene();
    if (referenced_scene) area += referenced_scene->Area();
  }
  
  // Add area from children
  for (int i = 0; i < NChildren(); i++) {
    R3SceneNode *child = Child(i);
    area += child->Area();
  }

  // Return area
  return area;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x58(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x2bba0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x56126
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x2bbc0
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x59230
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x560d4
movl $0x0, 0x44(%rsp)
movq 0x18(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x2bb40
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x56199
movq 0x18(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x2bb60
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2bb90
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x5618a
movq 0x30(%rsp), %rdi
callq 0x583f0
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
jmp 0x5618c
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x5612e
movl $0x0, 0x2c(%rsp)
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2baf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x561f3
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x2bb10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x560b0
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x561a1
movsd 0x58(%rsp), %xmm0
addq $0x68, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::Volume() const
const RNVolume R3SceneNode::
Volume(void) const
{
  // Initialize volume
  RNVolume volume = 0;
  
  // Add volume from elements
  for (int i = 0; i < NElements(); i++) {
    R3SceneElement *element = Element(i);
    volume += element->Volume();
  }
  
  // Add volume from references
  for (int i = 0; i < NReferences(); i++) {
    R3SceneReference *reference = Reference(i);
    R3Scene *referenced_scene = reference->ReferencedScene();
    if (referenced_scene) volume += referenced_scene->Volume();
  }
  
  // Add volume from children
  for (int i = 0; i < NChildren(); i++) {
    R3SceneNode *child = Child(i);
    volume += child->Volume();
  }

  // Return volume
  return volume;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x58(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x2bba0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x56276
movq 0x18(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x2bbc0
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x592c0
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x56224
movl $0x0, 0x44(%rsp)
movq 0x18(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x2bb40
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x562e9
movq 0x18(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x2bb60
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2bb90
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x562da
movq 0x30(%rsp), %rdi
callq 0x58410
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
jmp 0x562dc
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x5627e
movl $0x0, 0x2c(%rsp)
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2baf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x56343
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x2bb10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x56200
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x562f1
movsd 0x58(%rsp), %xmm0
addq $0x68, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::ClosestPoint(gaps::R3Point const&) const
R3Point R3SceneNode::
ClosestPoint(const R3Point& point) const
{
  // Return closest point
  R3Point result;
  if (!FindClosest(point, NULL, NULL, NULL, &result)) return R3unknown_point;
  else return result;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xcc860
movq 0x20(%rsp), %rdi
movq 0x40(%rsp), %rsi
leaq 0x19ff23(%rip), %rax    # 0x1f62b8
movsd (%rax), %xmm1
xorl %eax, %eax
movl %eax, %r8d
leaq 0x28(%rsp), %r9
xorps %xmm0, %xmm0
movq %r8, %rdx
movq %r8, %rcx
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x56400
cmpl $0x0, %eax
jne 0x563da
movq 0x10(%rsp), %rdi
leaq 0x1a8ee5(%rip), %rsi    # 0x1ff2b8
callq 0xcc8b0
jmp 0x563e9
movq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xcc8b0
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::WorldBBox() const
R3Box R3SceneNode::
WorldBBox(void) const
{
  // This returns bounding box in world coordinate frame
  // Note that BBox() returns bounding box after xform (in parent's coordinate frame)
  // Note that this bbox will be over-estimating, since it is a transformed AABB

  // Start for bbox in parent's coordinate frame
  R3Box box = BBox();

  // Transform box
  R3SceneNode *ancestor = Parent();
  while (ancestor) {
    box.Transform(ancestor->Transformation());
    ancestor = ancestor->Parent();
  }

  // Return box;
  return bbox;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x56d40
movq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0xb72c0
movq 0x28(%rsp), %rdi
callq 0x49480
movq %rax, 0x30(%rsp)
jmp 0x56df4
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x56e5f
movq 0x48(%rsp), %rdi
callq 0x2bae0
movq %rax, 0x10(%rsp)
jmp 0x56e17
movq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0xb9650
jmp 0x56e28
movq 0x48(%rsp), %rdi
callq 0x49480
movq %rax, 0x8(%rsp)
jmp 0x56e39
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x56dfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x2c1a0
jmp 0x56e8e
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x168, %rsi            # imm = 0x168
callq 0xb72c0
jmp 0x56e77
leaq 0x50(%rsp), %rdi
callq 0x2c1a0
movq 0x20(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x23290
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::LocalBBox() const
R3Box R3SceneNode::
LocalBBox(void) const
{
  // This returns bounding box in this node's coordinate frame (before transformation)
  // Note that BBox() returns bounding box after xform (in parent's coordinate frame)
  
  // Compute bounding box in local coordinates
  R3Box bbox = R3null_box;

  // Include elements
  for (int i = 0; i < NElements(); i++) {
    R3SceneElement *element = Element(i);
    bbox.Union(element->BBox());
  }

  // Include references
  for (int i = 0; i < NReferences(); i++) {
    R3SceneReference *reference = Reference(i);
    bbox.Union(reference->BBox());
  }

  // Include children
  for (int i = 0; i < NChildren(); i++) {
    R3SceneNode *child = Child(i);
    bbox.Union(child->BBox());
  }

  // Return box
  return bbox;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x50(%rsp)
movq %rdi, %rax
movq %rax, 0x58(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x60(%rsp)
movb $0x0, 0xa7(%rsp)
leaq 0x1a7988(%rip), %rsi    # 0x1fe868
callq 0xb72c0
movl $0x0, 0xa0(%rsp)
movq 0x60(%rsp), %rdi
movl 0xa0(%rsp), %eax
movl %eax, 0x48(%rsp)
callq 0x2bba0
movl %eax, 0x4c(%rsp)
jmp 0x56f0b
movl 0x48(%rsp), %eax
movl 0x4c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x56fa0
movq 0x60(%rsp), %rdi
movl 0xa0(%rsp), %esi
callq 0x2bbc0
movq %rax, 0x40(%rsp)
jmp 0x56f33
movq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0x58430
movq %rax, 0x38(%rsp)
jmp 0x56f54
movq 0x38(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0xb9110
jmp 0x56f65
jmp 0x56f67
movl 0xa0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa0(%rsp)
jmp 0x56ef0
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x2c1a0
jmp 0x570d0
movl $0x0, 0x84(%rsp)
movq 0x60(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, 0x30(%rsp)
callq 0x2bb40
movl %eax, 0x34(%rsp)
jmp 0x56fc6
movl 0x30(%rsp), %eax
movl 0x34(%rsp), %ecx
cmpl %ecx, %eax
jge 0x5702b
movq 0x60(%rsp), %rdi
movl 0x84(%rsp), %esi
callq 0x2bb60
movq %rax, 0x28(%rsp)
jmp 0x56fea
movq 0x28(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x59d30
movq %rax, 0x20(%rsp)
jmp 0x57005
movq 0x20(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0xb9110
jmp 0x57016
jmp 0x57018
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x56fab
movl $0x0, 0x74(%rsp)
movq 0x60(%rsp), %rdi
movl 0x74(%rsp), %eax
movl %eax, 0x18(%rsp)
callq 0x2baf0
movl %eax, 0x1c(%rsp)
jmp 0x5704b
movl 0x18(%rsp), %eax
movl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x570a7
movq 0x60(%rsp), %rdi
movl 0x74(%rsp), %esi
callq 0x2bb10
movq %rax, 0x10(%rsp)
jmp 0x5706c
movq 0x10(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0x56d40
movq %rax, 0x8(%rsp)
jmp 0x57087
movq 0x8(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0xb9110
jmp 0x57098
jmp 0x5709a
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x57033
movb $0x1, 0xa7(%rsp)
testb $0x1, 0xa7(%rsp)
jne 0x570c3
movq 0x50(%rsp), %rdi
callq 0x2c1a0
movq 0x58(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x23290
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::IsDecendent(gaps::R3SceneNode const*) const
RNBoolean R3SceneNode::
IsDecendent(const R3SceneNode *node) const
{
  // Return whether this is an decendent of node
  const R3SceneNode *ancestor = this;
  while (ancestor) {
    if (ancestor == node) return TRUE;
    ancestor = ancestor->Parent();
  }

  // Node not found
  return FALSE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x57167
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x57156
movl $0x1, 0x24(%rsp)
jmp 0x5716f
movq 0x8(%rsp), %rdi
callq 0x49480
movq %rax, 0x8(%rsp)
jmp 0x57138
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::CumulativeTransformation() const
R3Affine R3SceneNode::
CumulativeTransformation(void) const
{
  // Initialize cumulative transformation
  R3Affine cumulative_transformation(R3identity_affine);

  // Concatenate transformations back to the root
  const R3SceneNode *ancestor = this;
  while (ancestor) {
    R3Affine t(R3identity_affine);
    t.Transform(ancestor->Transformation());
    t.Transform(cumulative_transformation);
    cumulative_transformation = t;
    ancestor = ancestor->Parent();
  }

  // Return cumulative transformation from root to node (including node's transformation)
  return cumulative_transformation;
}

// Assembly:
subq $0x168, %rsp            # imm = 0x168
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x160(%rsp)
movq %rsi, 0x158(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x157(%rsp)
leaq 0x1a7810(%rip), %rsi    # 0x1fe9d0
callq 0x48c80
movq 0x20(%rsp), %rax
movq %rax, 0x148(%rsp)
cmpq $0x0, 0x148(%rsp)
je 0x57293
leaq 0x1a77e8(%rip), %rsi    # 0x1fe9d0
leaq 0x38(%rsp), %rdi
callq 0x48c80
jmp 0x571f4
movq 0x148(%rsp), %rdi
callq 0x2bae0
movq %rax, 0x8(%rsp)
jmp 0x57208
movq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xc1dd0
jmp 0x57219
movq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xc1dd0
jmp 0x5722a
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x58480
jmp 0x5723b
movq 0x148(%rsp), %rdi
callq 0x49480
movq %rax, (%rsp)
jmp 0x5724e
movq (%rsp), %rax
movq %rax, 0x148(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xc1b00
jmp 0x571d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x572bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xc1b00
jmp 0x572bc
movb $0x1, 0x157(%rsp)
testb $0x1, 0x157(%rsp)
jne 0x572af
movq 0x10(%rsp), %rdi
callq 0xc1b00
movq 0x18(%rsp), %rax
addq $0x168, %rsp            # imm = 0x168
retq
movq 0x10(%rsp), %rdi
callq 0xc1b00
movq 0x30(%rsp), %rdi
callq 0x23290
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::CumulativeParentTransformation() const
R3Affine R3SceneNode::
CumulativeParentTransformation(void) const
{
  // Initialize cumulative transformation
  R3Affine cumulative_transformation(R3identity_affine);

  // Concatenate transformations back to the root
  const R3SceneNode *ancestor = Parent();
  while (ancestor) {
    R3Affine t(R3identity_affine);
    t.Transform(ancestor->Transformation());
    t.Transform(cumulative_transformation);
    cumulative_transformation = t;
    ancestor = ancestor->Parent();
  }

  // Return cumulative transformation from root to parent (not including node's transformation)
  return cumulative_transformation;
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x170(%rsp)
movq %rsi, 0x168(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x28(%rsp)
movb $0x0, 0x167(%rsp)
leaq 0x1a76c0(%rip), %rsi    # 0x1fe9d0
callq 0x48c80
movq 0x28(%rsp), %rdi
callq 0x49480
movq %rax, 0x30(%rsp)
jmp 0x57326
movq 0x30(%rsp), %rax
movq %rax, 0x158(%rsp)
cmpq $0x0, 0x158(%rsp)
je 0x57402
leaq 0x1a7687(%rip), %rsi    # 0x1fe9d0
leaq 0x38(%rsp), %rdi
callq 0x48c80
jmp 0x57355
movq 0x158(%rsp), %rdi
callq 0x2bae0
movq %rax, 0x10(%rsp)
jmp 0x57369
movq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xc1dd0
jmp 0x5737a
movq 0x18(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xc1dd0
jmp 0x5738b
movq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x58480
jmp 0x5739c
movq 0x158(%rsp), %rdi
callq 0x49480
movq %rax, 0x8(%rsp)
jmp 0x573b0
movq 0x8(%rsp), %rax
movq %rax, 0x158(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xc1b00
jmp 0x57333
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x5742b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xc1b00
jmp 0x5742b
movb $0x1, 0x167(%rsp)
testb $0x1, 0x167(%rsp)
jne 0x5741e
movq 0x18(%rsp), %rdi
callq 0xc1b00
movq 0x20(%rsp), %rax
addq $0x178, %rsp            # imm = 0x178
retq
movq 0x18(%rsp), %rdi
callq 0xc1b00
movq 0x150(%rsp), %rdi
callq 0x23290
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::InsertChild(gaps::R3SceneNode*)
void R3SceneNode::
InsertChild(R3SceneNode *node) 
{
  // Check scene
  assert(node->scene == scene);
  assert(node->scene_index >= 0);

  // Insert node into children
  assert(!node->parent);
  assert(node->parent_index == -1);
  node->parent = this;
  node->parent_index = children.NEntries();
  children.Insert(node);

  // Invalidate bounding box
  InvalidateBBox();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x8(%rsp), %rax
movq %rdi, 0x10(%rax)
addq $0x20, %rdi
callq 0x2b8b0
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
addq $0x20, %rdi
movq 0x8(%rsp), %rsi
callq 0x48340
movq (%rsp), %rdi
callq 0x574b0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneNode.cpp
// Function: gaps::R3SceneNode::Draw(gaps::RNFlags, gaps::RNArray<gaps::R3Material*> const*) const
void R3SceneNode::
Draw(const R3DrawFlags draw_flags, const RNArray<R3Material *> *materials) const
{
  // Push transformation
  transformation.Push();

  // Draw elements
  for (int i = 0; i < elements.NEntries(); i++) {
    R3SceneElement *element = elements.Kth(i);
    element->Draw(draw_flags, materials);
  }

  // Draw references
  for (int i = 0; i < references.NEntries(); i++) {
    R3SceneReference *reference = references.Kth(i);
    reference->Draw(draw_flags, materials);
  }

  // Draw children
  for (int i = 0; i < children.NEntries(); i++) {
    R3SceneNode *child = children.Kth(i);
    child->Draw(draw_flags, materials);
  }

  // Pop transformation
  transformation.Pop();
}

// Assembly:
subq $0x78, %rsp
movq %rsi, 0x70(%rsp)
movq %rdi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x68(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x58, %rdi
callq 0x66690
movl $0x0, 0x5c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x5c(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x30, %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x58200
movq 0x10(%rsp), %rdi
addq $0x30, %rdi
movl 0x5c(%rsp), %esi
callq 0x2bd50
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq 0x70(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdx
movq 0x48(%rsp), %rsi
callq 0x59950
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x5819e
movl $0x0, 0x44(%rsp)
movq 0x10(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x8(%rsp)
addq $0x40, %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x5826a
movq 0x10(%rsp), %rdi
addq $0x40, %rdi
movl 0x44(%rsp), %esi
callq 0x2bd30
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rdx
movq 0x30(%rsp), %rsi
callq 0x5a1b0
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x58208
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0x4(%rsp)
addq $0x20, %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x582d4
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
movl 0x2c(%rsp), %esi
callq 0x2bd10
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rdx
movq 0x18(%rsp), %rsi
callq 0x58170
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x58272
movq 0x10(%rsp), %rdi
addq $0x58, %rdi
callq 0x66700
addq $0x78, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneElement.cpp
// Function: gaps::R3SceneElement::~R3SceneElement()
R3SceneElement::
~R3SceneElement(void)
{
  // Delete display list
  if (opengl_id > 0) glDeleteLists(opengl_id, 1); 

  // Remove from node
  if (node) node->RemoveElement(this);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x20(%rax)
jbe 0x5906f
movq 0x8(%rsp), %rax
movl 0x20(%rax), %edi
movl $0x1, %esi
callq 0x23540
jmp 0x5906d
jmp 0x5906f
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x5908b
movq 0x8(%rsp), %rsi
movq (%rsi), %rdi
callq 0x55c90
jmp 0x59089
jmp 0x5908b
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
callq 0x2c1a0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
callq 0x494f0
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x49a50
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneElement.cpp
// Function: gaps::R3SceneElement::NFacets() const
const RNInterval R3SceneElement::
NFacets(void) const
{
  // Initialize nfacets
  RNInterval nfacets(0,0);
  
  // Add facets from shapes
  for (int i = 0; i < NShapes(); i++) {
    R3Shape *shape = Shape(i);
    nfacets += shape->NFacets();
  }
  
  // Return nfacets
  return nfacets;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xf23e0
movl $0x0, 0x44(%rsp)
movq 0x20(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2bbf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x59193
movq 0x20(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x2bc10
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
movq (%rsi), %rax
leaq 0x28(%rsp), %rdi
callq *0x48(%rax)
movq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x58360
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x59138
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneElement.cpp
// Function: gaps::R3SceneElement::Length() const
const RNLength R3SceneElement::
Length(void) const
{
  // Initialize length
  RNLength length = 0;
  
  // Add length from shapes
  for (int i = 0; i < NShapes(); i++) {
    R3Shape *shape = Shape(i);
    length += shape->Length();
  }
  
  // Return length
  return length;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2bbf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x59217
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x2bc10
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
addsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x591c4
movsd 0x28(%rsp), %xmm0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneElement.cpp
// Function: gaps::R3SceneElement::Area() const
const RNArea R3SceneElement::
Area(void) const
{
  // Initialize area
  RNArea area = 0;
  
  // Add area from shapes
  for (int i = 0; i < NShapes(); i++) {
    R3Shape *shape = Shape(i);
    area += shape->Area();
  }
  
  // Return area
  return area;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2bbf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x592a7
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x2bc10
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
addsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x59254
movsd 0x28(%rsp), %xmm0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneElement.cpp
// Function: gaps::R3SceneElement::Volume() const
const RNVolume R3SceneElement::
Volume(void) const
{
  // Initialize volume
  RNVolume volume = 0;
  
  // Add volume from shapes
  for (int i = 0; i < NShapes(); i++) {
    R3Shape *shape = Shape(i);
    volume += shape->Volume();
  }

  // Return volume
  return volume;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2bbf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x59337
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x2bc10
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
addsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x592e4
movsd 0x28(%rsp), %xmm0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3SceneElement.cpp
// Function: gaps::R3SceneElement::Transform(gaps::R3Transformation const&)
void R3SceneElement::
Transform(const R3Transformation& transformation)
{
  // Transform all shapes
  for (int i = 0; i < NShapes(); i++) {
    R3Shape *shape = Shape(i);
    shape->Transform(transformation);
  }


  // Invalidate bounding box
  InvalidateBBox();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2bbf0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x594bf
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x2bc10
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq (%rdi), %rax
callq *0xa0(%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x59470
movq 0x10(%rsp), %rdi
callq 0x593b0
addq $0x38, %rsp
retq
nop