// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::RenderImage(gaps::R2Image*, gaps::R2Grid*, gaps::R2Grid*, gaps::R2Grid*, gaps::R2Grid*, gaps::R2Grid*, gaps::R2Grid*, gaps::R2Grid*, gaps::R2Grid*, gaps::R2Grid*) const
int R3SurfelImage::
RenderImage(R2Image *color_image,
  R2Grid *depth_image, R2Grid *height_image,
  R2Grid *xnormal_image, R2Grid *ynormal_image, R2Grid *znormal_image,
  R2Grid *label_image, R2Grid *object_image,
  R2Grid *node_image, R2Grid *block_image) const
{
  // Only for scans now
  R3SurfelScan *scan = Scan();
  if (!scan) return 0;
  R3SurfelNode *node = scan->Node();
  if (!node) return 0;
  
  // Initialize images
  R2Grid tmp_image(ImageWidth(), ImageHeight());
  tmp_image.Clear(R2_GRID_UNKNOWN_VALUE);
  if (color_image) *color_image = R2Image(ImageWidth(), ImageHeight());
  if (depth_image) *depth_image = tmp_image;
  if (height_image) *height_image = tmp_image;
  if (xnormal_image) *xnormal_image = tmp_image;
  if (ynormal_image) *ynormal_image = tmp_image;
  if (znormal_image) *znormal_image = tmp_image;
  if (label_image) *label_image = tmp_image;
  if (object_image) *object_image = tmp_image;
  if (node_image) *node_image = tmp_image;
  if (block_image) *block_image = tmp_image;

  // Check stuff
  if (!scene || !scene->Tree()) return 0;

  // Visit leaf nodes
  RNArray<const R3SurfelNode *> stack;
  stack.Insert(node);
  while (!stack.IsEmpty()) {
    const R3SurfelNode *decendent = stack.Tail();
    stack.RemoveTail();
    if (decendent->NParts() > 0) {
      // Visit decendent nodes
      for (int i = 0; i < decendent->NParts(); i++) {
        R3SurfelNode *part = decendent->Part(i);
        stack.Insert(part);
      }
    }
    else {
      // Render all blocks of leaf node
      for (int i = 0; i < decendent->NBlocks(); i++) {
        R3SurfelBlock *block = decendent->Block(i);
        R3SurfelNode *node = (block) ? block->Node() : NULL;
        R3SurfelObject *object = (node) ? node->Object(TRUE) : NULL;
        R3SurfelLabel *label = (object) ? object->CurrentLabel() : NULL;

        // Read block
        scene->Tree()->Database()->ReadBlock(block);

        // Render block
        for (int j = 0; j < block->NSurfels(); j++) {
          const R3Surfel *surfel = block->Surfel(j);

          // Get image position
          R2Point image_position = TransformFromWorldToImage(block->SurfelPosition(j));
          if (!ContainsImagePosition(image_position)) continue;
          int ix = (int) (image_position.X() + 0.5);
          int iy = (int) (image_position.Y() + 0.5);

          // Fill pixel at image index
          if (color_image) color_image->SetPixelRGB(ix, iy, block->SurfelColor(j));
          if (depth_image) depth_image->SetGridValue(ix, iy, (block->SurfelPosition(j) - Viewpoint()).Dot(Towards()));
          if (height_image) height_image->SetGridValue(ix, iy, block->SurfelPosition(j).Z() - Viewpoint().Z());
          if (xnormal_image) xnormal_image->SetGridValue(ix, iy, surfel->NX());
          if (ynormal_image) ynormal_image->SetGridValue(ix, iy, surfel->NY());
          if (znormal_image) znormal_image->SetGridValue(ix, iy, surfel->NZ());
          if (block_image) block_image->SetGridValue(ix, iy, block->DatabaseIndex());
          if (node_image && node) node_image->SetGridValue(ix, iy, node->TreeIndex());
          if (object_image && object) object_image->SetGridValue(ix, iy, object->SceneIndex());
          if (label_image && label) label_image->SetGridValue(ix, iy, label->SceneIndex());
        }

        // Release block
        scene->Tree()->Database()->ReleaseBlock(block);
      }
    }
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x428, %rsp            # imm = 0x428
movq 0x450(%rsp), %rax
movq 0x448(%rsp), %rax
movq 0x440(%rsp), %rax
movq 0x438(%rsp), %rax
movq 0x430(%rsp), %rax
movq %rdi, 0x418(%rsp)
movq %rsi, 0x410(%rsp)
movq %rdx, 0x408(%rsp)
movq %rcx, 0x400(%rsp)
movq %r8, 0x3f8(%rsp)
movq %r9, 0x3f0(%rsp)
movq 0x418(%rsp), %rdi
movq %rdi, 0x1d0(%rsp)
callq 0x31620
movq %rax, 0x3e8(%rsp)
cmpq $0x0, 0x3e8(%rsp)
jne 0x6aaa7
movl $0x0, 0x424(%rsp)
jmp 0x6b7fb
movq 0x3e8(%rsp), %rdi
callq 0x314f0
movq %rax, 0x3e0(%rsp)
cmpq $0x0, 0x3e0(%rsp)
jne 0x6aad7
movl $0x0, 0x424(%rsp)
jmp 0x6b7fb
movq 0x1d0(%rsp), %rdi
callq 0x308f0
movq 0x1d0(%rsp), %rdi
movl %eax, 0x1c4(%rsp)
callq 0x30920
movl 0x1c4(%rsp), %esi
movl %eax, %edx
leaq 0x310(%rsp), %rdi
movq %rdi, 0x1c8(%rsp)
callq 0x111300
movq 0x1c8(%rsp), %rdi
movsd 0x13a8aa(%rip), %xmm0   # 0x1a53d0
callq 0x114e40
jmp 0x6ab2d
cmpq $0x0, 0x410(%rsp)
je 0x6abef
movq 0x1d0(%rsp), %rdi
callq 0x308f0
movl %eax, 0x1c0(%rsp)
jmp 0x6ab52
movq 0x1d0(%rsp), %rdi
callq 0x30920
movl %eax, 0x1bc(%rsp)
jmp 0x6ab68
movl 0x1bc(%rsp), %edx
movl 0x1c0(%rsp), %esi
leaq 0x2e8(%rsp), %rdi
movl $0x3, %ecx
callq 0x135820
jmp 0x6ab8a
movq 0x410(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x135ef0
jmp 0x6aba1
leaq 0x2e8(%rsp), %rdi
callq 0x135d40
jmp 0x6abef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x6b7ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x135d40
jmp 0x6b7ec
cmpq $0x0, 0x408(%rsp)
je 0x6ac13
movq 0x408(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6ac11
jmp 0x6ac13
cmpq $0x0, 0x400(%rsp)
je 0x6ac37
movq 0x400(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6ac35
jmp 0x6ac37
cmpq $0x0, 0x3f8(%rsp)
je 0x6ac5b
movq 0x3f8(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6ac59
jmp 0x6ac5b
cmpq $0x0, 0x3f0(%rsp)
je 0x6ac7f
movq 0x3f0(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6ac7d
jmp 0x6ac7f
cmpq $0x0, 0x430(%rsp)
je 0x6aca3
movq 0x430(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6aca1
jmp 0x6aca3
cmpq $0x0, 0x438(%rsp)
je 0x6acc7
movq 0x438(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6acc5
jmp 0x6acc7
cmpq $0x0, 0x440(%rsp)
je 0x6aceb
movq 0x440(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6ace9
jmp 0x6aceb
cmpq $0x0, 0x448(%rsp)
je 0x6ad0f
movq 0x448(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6ad0d
jmp 0x6ad0f
cmpq $0x0, 0x450(%rsp)
je 0x6ad33
movq 0x450(%rsp), %rdi
leaq 0x310(%rsp), %rsi
callq 0x112340
jmp 0x6ad31
jmp 0x6ad33
movq 0x1d0(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6ad6b
movq 0x1d0(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x16ce0
movq %rax, 0x1b0(%rsp)
jmp 0x6ad5d
movq 0x1b0(%rsp), %rax
cmpq $0x0, %rax
jne 0x6ad86
movl $0x0, 0x424(%rsp)
movl $0x1, 0x2e4(%rsp)
jmp 0x6b7dd
leaq 0x2d0(%rsp), %rdi
callq 0x6baa0
jmp 0x6ad95
movq 0x3e0(%rsp), %rsi
leaq 0x2d0(%rsp), %rdi
callq 0x6bab0
jmp 0x6adac
jmp 0x6adae
leaq 0x2d0(%rsp), %rdi
callq 0x31da0
movl %eax, 0x1ac(%rsp)
jmp 0x6adc4
movl 0x1ac(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6addc
jmp 0x6b7ba
leaq 0x2d0(%rsp), %rdi
callq 0x6bae0
movq %rax, 0x1a0(%rsp)
jmp 0x6adf3
movq 0x1a0(%rsp), %rax
movq %rax, 0x2c8(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x1c0c0
jmp 0x6ae12
movq 0x2c8(%rsp), %rdi
callq 0x31660
movl %eax, 0x19c(%rsp)
jmp 0x6ae28
movl 0x19c(%rsp), %eax
cmpl $0x0, %eax
jle 0x6af05
movl $0x0, 0x2c4(%rsp)
movl 0x2c4(%rsp), %eax
movl %eax, 0x194(%rsp)
movq 0x2c8(%rsp), %rdi
callq 0x31660
movl %eax, 0x198(%rsp)
jmp 0x6ae67
movl 0x194(%rsp), %eax
movl 0x198(%rsp), %ecx
cmpl %ecx, %eax
jge 0x6af00
movq 0x2c8(%rsp), %rdi
movl 0x2c4(%rsp), %esi
callq 0x43680
movq %rax, 0x188(%rsp)
jmp 0x6ae9b
movq 0x188(%rsp), %rax
movq %rax, 0x2b8(%rsp)
movq 0x2b8(%rsp), %rsi
leaq 0x2d0(%rsp), %rdi
callq 0x6bab0
jmp 0x6aec2
jmp 0x6aec4
movl 0x2c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c4(%rsp)
jmp 0x6ae43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x6baf0
jmp 0x6b7ec
jmp 0x6b7b5
movl $0x0, 0x2b4(%rsp)
movl 0x2b4(%rsp), %eax
movl %eax, 0x180(%rsp)
movq 0x2c8(%rsp), %rdi
callq 0x186b0
movl %eax, 0x184(%rsp)
jmp 0x6af34
movl 0x180(%rsp), %eax
movl 0x184(%rsp), %ecx
cmpl %ecx, %eax
jge 0x6b7b3
movq 0x2c8(%rsp), %rdi
movl 0x2b4(%rsp), %esi
callq 0x186d0
movq %rax, 0x178(%rsp)
jmp 0x6af68
movq 0x178(%rsp), %rax
movq %rax, 0x2a8(%rsp)
cmpq $0x0, 0x2a8(%rsp)
je 0x6afac
movq 0x2a8(%rsp), %rdi
callq 0x43710
movq %rax, 0x170(%rsp)
jmp 0x6af9a
movq 0x170(%rsp), %rax
movq %rax, 0x168(%rsp)
jmp 0x6afb8
xorl %eax, %eax
movq %rax, 0x168(%rsp)
jmp 0x6afb8
movq 0x168(%rsp), %rax
movq %rax, 0x2a0(%rsp)
cmpq $0x0, 0x2a0(%rsp)
je 0x6b003
movq 0x2a0(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5f2c0
movq %rax, 0x160(%rsp)
jmp 0x6aff1
movq 0x160(%rsp), %rax
movq %rax, 0x158(%rsp)
jmp 0x6b00f
xorl %eax, %eax
movq %rax, 0x158(%rsp)
jmp 0x6b00f
movq 0x158(%rsp), %rax
movq %rax, 0x298(%rsp)
cmpq $0x0, 0x298(%rsp)
je 0x6b053
movq 0x298(%rsp), %rdi
callq 0x1a020
movq %rax, 0x150(%rsp)
jmp 0x6b041
movq 0x150(%rsp), %rax
movq %rax, 0x148(%rsp)
jmp 0x6b05f
xorl %eax, %eax
movq %rax, 0x148(%rsp)
jmp 0x6b05f
movq 0x1d0(%rsp), %rax
movq 0x148(%rsp), %rcx
movq %rcx, 0x290(%rsp)
movq 0x8(%rax), %rdi
callq 0x16ce0
movq %rax, 0x140(%rsp)
jmp 0x6b08a
movq 0x140(%rsp), %rdi
callq 0x16d10
movq %rax, 0x138(%rsp)
jmp 0x6b0a1
movq 0x138(%rsp), %rdi
movq 0x2a8(%rsp), %rsi
callq 0x31140
jmp 0x6b0b8
movl $0x0, 0x28c(%rsp)
movl 0x28c(%rsp), %eax
movl %eax, 0x130(%rsp)
movq 0x2a8(%rsp), %rdi
callq 0x1c0e0
movl %eax, 0x134(%rsp)
jmp 0x6b0e7
movl 0x130(%rsp), %eax
movl 0x134(%rsp), %ecx
cmpl %ecx, %eax
jge 0x6b760
movq 0x2a8(%rsp), %rdi
movl 0x28c(%rsp), %esi
callq 0x43660
movq %rax, 0x128(%rsp)
jmp 0x6b11b
movq 0x128(%rsp), %rax
movq %rax, 0x280(%rsp)
movq 0x2a8(%rsp), %rsi
movl 0x28c(%rsp), %edx
leaq 0x258(%rsp), %rdi
callq 0x316c0
jmp 0x6b149
movq 0x1d0(%rsp), %rsi
leaq 0x270(%rsp), %rdi
leaq 0x258(%rsp), %rdx
callq 0x69780
jmp 0x6b168
movq 0x1d0(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x6a480
movl %eax, 0x124(%rsp)
jmp 0x6b186
movl 0x124(%rsp), %eax
cmpl $0x0, %eax
jne 0x6b197
jmp 0x6b74a
leaq 0x270(%rsp), %rdi
callq 0x308e0
movsd %xmm0, 0x118(%rsp)
jmp 0x6b1af
movsd 0x118(%rsp), %xmm0
movsd 0x138f98(%rip), %xmm1   # 0x1a4158
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x254(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x30910
movsd %xmm0, 0x110(%rsp)
jmp 0x6b1e7
movsd 0x110(%rsp), %xmm0
movsd 0x138f60(%rip), %xmm1   # 0x1a4158
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x250(%rsp)
cmpq $0x0, 0x410(%rsp)
je 0x6b283
movq 0x410(%rsp), %rax
movq %rax, 0x100(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0x108(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x10c(%rsp)
movq 0x2a8(%rsp), %rsi
movl 0x28c(%rsp), %edx
leaq 0x238(%rsp), %rdi
callq 0x317c0
jmp 0x6b25c
movl 0x10c(%rsp), %edx
movl 0x108(%rsp), %esi
movq 0x100(%rsp), %rdi
leaq 0x238(%rsp), %rcx
callq 0x136070
jmp 0x6b281
jmp 0x6b283
cmpq $0x0, 0x408(%rsp)
je 0x6b371
movq 0x408(%rsp), %rax
movq %rax, 0xf0(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0xf8(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0xfc(%rsp)
movq 0x2a8(%rsp), %rsi
movl 0x28c(%rsp), %edx
leaq 0x208(%rsp), %rdi
callq 0x316c0
jmp 0x6b2dc
movq 0x1d0(%rsp), %rdi
callq 0x30940
movq %rax, 0xe8(%rsp)
jmp 0x6b2f3
movq 0xe8(%rsp), %rdx
leaq 0x220(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0xf86b0
jmp 0x6b312
movq 0x1d0(%rsp), %rsi
leaq 0x1f0(%rsp), %rdi
callq 0x31ca0
jmp 0x6b329
leaq 0x220(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0xf9ac0
movsd %xmm0, 0xe0(%rsp)
jmp 0x6b349
movsd 0xe0(%rsp), %xmm0
movl 0xfc(%rsp), %edx
movl 0xf8(%rsp), %esi
movq 0xf0(%rsp), %rdi
callq 0x6b9a0
jmp 0x6b36f
jmp 0x6b371
cmpq $0x0, 0x400(%rsp)
je 0x6b446
movq 0x400(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0xd8(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0xdc(%rsp)
movq 0x2a8(%rsp), %rsi
movl 0x28c(%rsp), %edx
leaq 0x1d8(%rsp), %rdi
callq 0x316c0
jmp 0x6b3ca
leaq 0x1d8(%rsp), %rdi
callq 0x187a0
movsd %xmm0, 0xc8(%rsp)
jmp 0x6b3e2
movq 0x1d0(%rsp), %rdi
callq 0x30940
movq %rax, 0xc0(%rsp)
jmp 0x6b3f9
movq 0xc0(%rsp), %rdi
callq 0x187a0
movsd %xmm0, 0xb8(%rsp)
jmp 0x6b411
movl 0xdc(%rsp), %edx
movl 0xd8(%rsp), %esi
movq 0xd0(%rsp), %rdi
movsd 0xb8(%rsp), %xmm1
movsd 0xc8(%rsp), %xmm0
subsd %xmm1, %xmm0
callq 0x6b9a0
jmp 0x6b444
jmp 0x6b446
cmpq $0x0, 0x3f8(%rsp)
je 0x6b4c1
movq 0x3f8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0xac(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0xb0(%rsp)
movq 0x280(%rsp), %rdi
callq 0x31fb0
movss %xmm0, 0xb4(%rsp)
jmp 0x6b495
movl 0xb0(%rsp), %edx
movl 0xac(%rsp), %esi
movq 0xa0(%rsp), %rdi
movss 0xb4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6b9a0
jmp 0x6b4bf
jmp 0x6b4c1
cmpq $0x0, 0x3f0(%rsp)
je 0x6b53c
movq 0x3f0(%rsp), %rax
movq %rax, 0x88(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x98(%rsp)
movq 0x280(%rsp), %rdi
callq 0x31fd0
movss %xmm0, 0x9c(%rsp)
jmp 0x6b510
movl 0x98(%rsp), %edx
movl 0x94(%rsp), %esi
movq 0x88(%rsp), %rdi
movss 0x9c(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6b9a0
jmp 0x6b53a
jmp 0x6b53c
cmpq $0x0, 0x430(%rsp)
je 0x6b5ab
movq 0x430(%rsp), %rax
movq %rax, 0x70(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x80(%rsp)
movq 0x280(%rsp), %rdi
callq 0x31ff0
movss %xmm0, 0x84(%rsp)
jmp 0x6b585
movl 0x80(%rsp), %edx
movl 0x7c(%rsp), %esi
movq 0x70(%rsp), %rdi
movss 0x84(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6b9a0
jmp 0x6b5a9
jmp 0x6b5ab
cmpq $0x0, 0x450(%rsp)
je 0x6b60a
movq 0x450(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x68(%rsp)
movq 0x2a8(%rsp), %rdi
callq 0x31b10
movl %eax, 0x6c(%rsp)
jmp 0x6b5ec
movl 0x68(%rsp), %edx
movl 0x64(%rsp), %esi
movq 0x58(%rsp), %rdi
movl 0x6c(%rsp), %eax
cvtsi2sd %eax, %xmm0
callq 0x6b9a0
jmp 0x6b608
jmp 0x6b60a
cmpq $0x0, 0x448(%rsp)
je 0x6b674
cmpq $0x0, 0x2a0(%rsp)
je 0x6b674
movq 0x448(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0x4c(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x50(%rsp)
movq 0x2a0(%rsp), %rdi
callq 0x31130
movl %eax, 0x54(%rsp)
jmp 0x6b656
movl 0x50(%rsp), %edx
movl 0x4c(%rsp), %esi
movq 0x40(%rsp), %rdi
movl 0x54(%rsp), %eax
cvtsi2sd %eax, %xmm0
callq 0x6b9a0
jmp 0x6b672
jmp 0x6b674
cmpq $0x0, 0x440(%rsp)
je 0x6b6de
cmpq $0x0, 0x298(%rsp)
je 0x6b6de
movq 0x440(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x38(%rsp)
movq 0x298(%rsp), %rdi
callq 0x1bf60
movl %eax, 0x3c(%rsp)
jmp 0x6b6c0
movl 0x38(%rsp), %edx
movl 0x34(%rsp), %esi
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %eax
cvtsi2sd %eax, %xmm0
callq 0x6b9a0
jmp 0x6b6dc
jmp 0x6b6de
cmpq $0x0, 0x438(%rsp)
je 0x6b748
cmpq $0x0, 0x290(%rsp)
je 0x6b748
movq 0x438(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x254(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x290(%rsp), %rdi
callq 0x31300
movl %eax, 0x24(%rsp)
jmp 0x6b72a
movl 0x20(%rsp), %edx
movl 0x1c(%rsp), %esi
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
cvtsi2sd %eax, %xmm0
callq 0x6b9a0
jmp 0x6b746
jmp 0x6b748
jmp 0x6b74a
movl 0x28c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28c(%rsp)
jmp 0x6b0c3
movq 0x1d0(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x16ce0
movq %rax, 0x8(%rsp)
jmp 0x6b778
movq 0x8(%rsp), %rdi
callq 0x16d10
movq %rax, (%rsp)
jmp 0x6b788
movq (%rsp), %rdi
movq 0x2a8(%rsp), %rsi
callq 0x311c0
jmp 0x6b79b
jmp 0x6b79d
movl 0x2b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2b4(%rsp)
jmp 0x6af10
jmp 0x6b7b5
jmp 0x6adae
movl $0x1, 0x424(%rsp)
movl $0x1, 0x2e4(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x6baf0
leaq 0x310(%rsp), %rdi
callq 0x1127b0
jmp 0x6b7fb
leaq 0x310(%rsp), %rdi
callq 0x1127b0
jmp 0x6b80a
movl 0x424(%rsp), %eax
addq $0x428, %rsp            # imm = 0x428
retq
movq 0x308(%rsp), %rdi
callq 0x13970
nopw (%rax,%rax)