// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::InsertScene(gaps::R3SurfelScene const&, gaps::R3SurfelObject*, gaps::R3SurfelLabel*, gaps::R3SurfelNode*)
void R3SurfelScene::
InsertScene(const R3SurfelScene& scene2, 
  R3SurfelObject *parent_object1, 
  R3SurfelLabel *parent_label1,
  R3SurfelNode *parent_node1)
{
  // Get convenient variables
  R3SurfelScene& scene1 = *this;
  R3SurfelTree *tree1 = scene1.Tree();
  R3SurfelTree *tree2 = scene2.Tree();
  R3SurfelDatabase *database1 = tree1->Database();
  R3SurfelDatabase *database2 = tree2->Database();

  // Find parents in scene1
  if (!parent_node1) parent_node1 = tree1->RootNode();
  if (!parent_object1) parent_object1 = scene1.RootObject();
  if (!parent_label1) parent_label1 = scene1.RootLabel();

 // COPY COMMENTS

  // Copy comments from scene2
  for (int i = 0; i < scene2.NComments(); i++) {
    const char *comment2 = scene2.Comment(i);
    scene1.InsertComment(comment2);
  }

 // COPY FEATURES

#if 0
  // Copy label features from scene2
  for (int i = 0; i < scene2.NFeatures(); i++) {
    R3SurfelFeature *feature2 = scene2.Feature(i);
    R3SurfelFeature *feature1 = new R3SurfelFeature(feature2->Name(), feature2->Minimum(), feature2->Maximum());
    scene1.InsertFeature(feature1);
  }
#endif

  // COPY NODES

  // Create surfel tree nodes in scene1
  RNArray<R3SurfelNode *> nodes1;
  nodes1.Insert(tree1->RootNode());
  for (int i = 1; i < tree2->NNodes(); i++) {
    R3SurfelNode *node1 = new R3SurfelNode();
    nodes1.Insert(node1);
  }

  // Copy node stuff from scene2
  for (int i = 1; i < tree2->NNodes(); i++) {
    R3SurfelNode *node1 = nodes1.Kth(i);
    R3SurfelNode *node2 = tree2->Node(i);
    R3SurfelNode *parent2 = node2->Parent();
    R3SurfelNode *parent1 = parent_node1;
    if (parent2 && (!parent2->Name() || strcmp(parent2->Name(), "Root")))
      parent1 = nodes1.Kth(parent2->TreeIndex());
    tree1->InsertNode(node1, parent1);
    node1->SetName(node2->Name());
    for (int j = 0; j < node2->NBlocks(); j++) {
      R3SurfelBlock *block2 = node2->Block(j);
      database2->ReadBlock(block2);
      R3SurfelBlock *block1 = new R3SurfelBlock(*block2);
      database1->InsertBlock(block1);
      node1->InsertBlock(block1);
      database1->ReleaseBlock(block1);
      database2->ReleaseBlock(block2);
    }      
  }

  // COPY OBJECTS

  // Create objects in scene1
  RNArray<R3SurfelObject *> objects1;
  objects1.Insert(scene1.RootObject());
  for (int i = 1; i < scene2.NObjects(); i++) {
    R3SurfelObject *object1 = new R3SurfelObject();
    objects1.Insert(object1);
  }

  // Copy object stuff from scene2
  for (int i = 1; i < scene2.NObjects(); i++) {
    R3SurfelObject *object1 = objects1.Kth(i);
    R3SurfelObject *object2 = scene2.Object(i);
    R3SurfelObject *parent2 = object2->Parent();
    R3SurfelObject *parent1 = parent_object1;
    if (parent2 && (!parent2->Name() || strcmp(parent2->Name(), "Root")))
      parent1 = objects1.Kth(parent2->SceneIndex());
    scene1.InsertObject(object1, parent1);
    object1->SetName(object2->Name());
    object1->SetIdentifier(object2->Identifier());
    object1->SetFeatureVector(object2->feature_vector);
    for (int j = 0; j < object2->NNodes(); j++) {
      R3SurfelNode *node2 = object2->Node(j);
      R3SurfelNode *node1 = nodes1.Kth(node2->TreeIndex());
      object1->InsertNode(node1);
    }
  }

  // COPY LABELS 

  // Create labels in scene1
  RNArray<R3SurfelLabel *> labels1;
  labels1.Insert(scene1.RootLabel());
  for (int i = 1; i < scene2.NLabels(); i++) {
    R3SurfelLabel *label1 = new R3SurfelLabel();
    labels1.Insert(label1);
  }

  // Copy label stuff from scene2
  for (int i = 1; i < scene2.NLabels(); i++) {
    R3SurfelLabel *label1 = labels1.Kth(i);
    R3SurfelLabel *label2 = scene2.Label(i);
    R3SurfelLabel *parent2 = label2->Parent();
    R3SurfelLabel *parent1 = parent_label1;
    if (parent2 && (!parent2->Name() || strcmp(parent2->Name(), "Root")))
      parent1 = labels1.Kth(parent2->SceneIndex());
    label1->SetName(label2->Name());
    label1->SetIdentifier(label2->Identifier());
    label1->SetAssignmentKeystroke(label2->AssignmentKeystroke());
    label1->SetColor(label2->Color());
    label1->SetFlags(label2->Flags());
    scene1.InsertLabel(label1, parent1);
  }

  // COPY OBJECT PROPERTIES

  // Copy object properties from scene2
  for (int i = 0; i < scene2.NObjectProperties(); i++) {
    R3SurfelObjectProperty *property2 = scene2.ObjectProperty(i);
    int type = property2->Type();
    RNArray<R3SurfelObject *> objects1;
    R3SurfelObject *object2 = property2->Object();
    R3SurfelObject *object1 = objects1.Kth(object2->SceneIndex());
    objects1.Insert(object1);
    int noperands1 = 0;
    RNScalar *operands1 = NULL;
    if (property2->NOperands() > 0) {
      noperands1 = property2->NOperands();
      operands1 = new RNScalar [ noperands1 ];
      for (int j = 0; j < noperands1; j++) {
        RNScalar operand2 = property2->Operand(j);
        operands1[j] = operand2;
      }
    }
    R3SurfelObjectProperty *property1 = new R3SurfelObjectProperty(type, object1, operands1, noperands1);
    scene1.InsertObjectProperty(property1);
    delete [] operands1;
  }

  // COPY LABEL PROPERTIES

  // Copy label properties from scene2
  for (int i = 0; i < scene2.NLabelProperties(); i++) {
    R3SurfelLabelProperty *property2 = scene2.LabelProperty(i);
    int type = property2->Type();
    RNArray<R3SurfelLabel *> labels1;
    R3SurfelLabel *label2 = property2->Label();
    R3SurfelLabel *label1 = labels1.Kth(label2->SceneIndex());
    labels1.Insert(label1);
    int noperands1 = 0;
    RNScalar *operands1 = NULL;
    if (property2->NOperands() > 0) {
      noperands1 = property2->NOperands();
      operands1 = new RNScalar [ noperands1 ];
      for (int j = 0; j < noperands1; j++) {
        RNScalar operand2 = property2->Operand(j);
        operands1[j] = operand2;
      }
    }
    R3SurfelLabelProperty *property1 = new R3SurfelLabelProperty(type, label1, operands1, noperands1);
    scene1.InsertLabelProperty(property1);
    delete [] operands1;
  }

  // COPY OBJECT RELATIONSHIPS

  // Copy object relationships from scene2
  for (int i = 0; i < scene2.NObjectRelationships(); i++) {
    R3SurfelObjectRelationship *relationship2 = scene2.ObjectRelationship(i);
    int type = relationship2->Type();
    RNArray<R3SurfelObject *> objects1;
    for (int j = 0; j < relationship2->NObjects(); j++) {
      R3SurfelObject *object2 = relationship2->Object(j);
      R3SurfelObject *object1 = objects1.Kth(object2->SceneIndex());
      objects1.Insert(object1);
    }
    int noperands1 = 0;
    RNScalar *operands1 = NULL;
    if (relationship2->NOperands() > 0) {
      noperands1 = relationship2->NOperands();
      operands1 = new RNScalar [ noperands1 ];
      for (int j = 0; j < noperands1; j++) {
        RNScalar operand2 = relationship2->Operand(j);
        operands1[j] = operand2;
      }
    }
    R3SurfelObjectRelationship *relationship1 = new R3SurfelObjectRelationship(type, objects1, operands1, noperands1);
    scene1.InsertObjectRelationship(relationship1);
    delete [] operands1;
  }

  // COPY LABEL RELATIONSHIPS

  // Copy label relationships from scene2
  for (int i = 0; i < scene2.NLabelRelationships(); i++) {
    R3SurfelLabelRelationship *relationship2 = scene2.LabelRelationship(i);
    int type = relationship2->Type();
    RNArray<R3SurfelLabel *> labels1;
    for (int j = 0; j < relationship2->NLabels(); j++) {
      R3SurfelLabel *label2 = relationship2->Label(j);
      R3SurfelLabel *label1 = labels1.Kth(label2->SceneIndex());
      labels1.Insert(label1);
    }
    int noperands1 = 0;
    RNScalar *operands1 = NULL;
    if (relationship2->NOperands() > 0) {
      noperands1 = relationship2->NOperands();
      operands1 = new RNScalar [ noperands1 ];
      for (int j = 0; j < noperands1; j++) {
        RNScalar operand2 = relationship2->Operand(j);
        operands1[j] = operand2;
      }
    }
    R3SurfelLabelRelationship *relationship1 = new R3SurfelLabelRelationship(type, labels1, operands1);
    scene1.InsertLabelRelationship(relationship1);
    delete [] operands1;
  }

  // COPY ASSIGNMENTS

  // Copy label assignments from scene2
  for (int i = 0; i < scene2.NLabelAssignments(); i++) {
    R3SurfelLabelAssignment *assignment2 = scene2.LabelAssignment(i);
    R3SurfelObject *object2 = assignment2->Object();
    R3SurfelLabel *label2 = assignment2->Label();
    R3SurfelObject *object1 = objects1.Kth(object2->SceneIndex());
    R3SurfelLabel *label1 = labels1.Kth(label2->SceneIndex());
    R3SurfelLabelAssignment *assignment1 = new R3SurfelLabelAssignment(object1, label1, assignment2->Confidence(), assignment2->Originator());
    scene1.InsertLabelAssignment(assignment1);
  }

  // COPY SCANS

  // Copy scans from scene2
  RNArray<R3SurfelScan *> scans1;
  for (int i = 0; i < scene2.NScans(); i++) {
    R3SurfelScan *scan2 = scene2.Scan(i);
    R3SurfelScan *scan1 = new R3SurfelScan(scan2->Name());
    scan1->SetPose(scan2->Pose());
    scan1->SetTimestamp(scan2->Timestamp());
    scan1->SetXFocal(scan2->XFocal());
    scan1->SetYFocal(scan2->YFocal());
    scan1->SetImageDimensions(scan2->ImageWidth(), scan2->ImageHeight());
    scan1->SetImageCenter(scan2->ImageCenter());
    scan1->SetFlags(scan2->Flags());
    R3SurfelNode *node2 = scan2->Node();
    R3SurfelNode *node1 = nodes1.Kth(node2->TreeIndex());
    scan1->SetNode(node1);
    scene1.InsertScan(scan1);
    scans1.Insert(scan1);
  }

  // COPY IMAGES
  
  // Copy images from scene2
  for (int i = 0; i < scene2.NImages(); i++) {
    R3SurfelImage *image2 = scene2.Image(i);
    R3SurfelImage *image1 = new R3SurfelImage(image2->Name());
    const R3CoordSystem *rolling_shutter_poses = image2->RollingShutterPoses();
    const RNScalar *rolling_shutter_timestamps = image2->RollingShutterTimestamps();
    image1->SetRollingShutterPoses(rolling_shutter_poses[0], rolling_shutter_poses[1]);
    image1->SetRollingShutterTimestamps(rolling_shutter_timestamps[0], rolling_shutter_timestamps[1]);
    image1->SetXFocal(image2->XFocal());
    image1->SetYFocal(image2->YFocal());
    image1->SetImageDimensions(image2->ImageWidth(), image2->ImageHeight());
    image1->SetImageCenter(image2->ImageCenter());
    image1->SetDistortionType(image2->DistortionType());
    image1->SetRadialDistortion(image2->RadialDistortion());
    image1->SetTangentialDistortion(image2->TangentialDistortion());
    image1->SetFlags(image2->Flags());
    R3SurfelScan *scan2 = image2->Scan();
    R3SurfelScan *scan1 = (scan2) ? scans1.Kth(scan2->SceneIndex()) : NULL;
    image1->SetScan(scan1);
    scene1.InsertImage(image1);

    // Copy image channels?
    // XXX
  }

  // Mark scene as dirty
  flags.Add(R3_SURFEL_SCENE_DIRTY_FLAG);
}

// Assembly:
subq $0x908, %rsp            # imm = 0x908
movq %rdi, 0x900(%rsp)
movq %rsi, 0x8f8(%rsp)
movq %rdx, 0x8f0(%rsp)
movq %rcx, 0x8e8(%rsp)
movq %r8, 0x8e0(%rsp)
movq 0x900(%rsp), %rax
movq %rax, 0x538(%rsp)
movq %rax, 0x8d8(%rsp)
movq 0x8d8(%rsp), %rdi
callq 0x16ce0
movq %rax, 0x8d0(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16ce0
movq %rax, 0x8c8(%rsp)
movq 0x8d0(%rsp), %rdi
callq 0x16d10
movq %rax, 0x8c0(%rsp)
movq 0x8c8(%rsp), %rdi
callq 0x16d10
movq %rax, 0x8b8(%rsp)
cmpq $0x0, 0x8e0(%rsp)
jne 0x1fc5b
movq 0x8d0(%rsp), %rdi
callq 0x31030
movq %rax, 0x8e0(%rsp)
cmpq $0x0, 0x8f0(%rsp)
jne 0x1fc7b
movq 0x8d8(%rsp), %rdi
callq 0x31050
movq %rax, 0x8f0(%rsp)
cmpq $0x0, 0x8e8(%rsp)
jne 0x1fc9b
movq 0x8d8(%rsp), %rdi
callq 0x31070
movq %rax, 0x8e8(%rsp)
movl $0x0, 0x8b4(%rsp)
movl 0x8b4(%rsp), %eax
movl %eax, 0x534(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x31090
movl %eax, %ecx
movl 0x534(%rsp), %eax
cmpl %ecx, %eax
jge 0x1fd16
movq 0x8f8(%rsp), %rdi
movl 0x8b4(%rsp), %esi
callq 0x310b0
movq %rax, 0x8a8(%rsp)
movq 0x8d8(%rsp), %rdi
movq 0x8a8(%rsp), %rsi
movq (%rdi), %rax
callq *0xc0(%rax)
movl 0x8b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8b4(%rsp)
jmp 0x1fca6
leaq 0x898(%rsp), %rdi
callq 0x1b960
movq 0x8d0(%rsp), %rdi
callq 0x31030
movq %rax, 0x528(%rsp)
jmp 0x1fd3a
movq 0x528(%rsp), %rsi
leaq 0x898(%rsp), %rdi
callq 0x1bee0
jmp 0x1fd51
movl $0x1, 0x888(%rsp)
movl 0x888(%rsp), %eax
movl %eax, 0x520(%rsp)
movq 0x8c8(%rsp), %rdi
callq 0x16cf0
movl %eax, 0x524(%rsp)
jmp 0x1fd80
movl 0x520(%rsp), %eax
movl 0x524(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1fe40
movl $0xd0, %edi
callq 0x13570
movq %rax, 0x518(%rsp)
jmp 0x1fdaa
movq 0x518(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5e770
jmp 0x1fdbd
movq 0x518(%rsp), %rax
movq %rax, 0x880(%rsp)
movq 0x880(%rsp), %rsi
leaq 0x898(%rsp), %rdi
callq 0x1bee0
jmp 0x1fde4
jmp 0x1fde6
movl 0x888(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x888(%rsp)
jmp 0x1fd5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x22371
movq 0x518(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0xd0, %esi
callq 0x13580
jmp 0x22371
movl $0x1, 0x87c(%rsp)
movl 0x87c(%rsp), %eax
movl %eax, 0x510(%rsp)
movq 0x8c8(%rsp), %rdi
callq 0x16cf0
movl %eax, 0x514(%rsp)
jmp 0x1fe6f
movl 0x510(%rsp), %eax
movl 0x514(%rsp), %ecx
cmpl %ecx, %eax
jge 0x201a5
movl 0x87c(%rsp), %esi
leaq 0x898(%rsp), %rdi
callq 0x310e0
movq %rax, 0x508(%rsp)
jmp 0x1fea3
movq 0x508(%rsp), %rax
movq %rax, 0x870(%rsp)
movq 0x8c8(%rsp), %rdi
movl 0x87c(%rsp), %esi
callq 0x30a90
movq %rax, 0x500(%rsp)
jmp 0x1fed1
movq 0x500(%rsp), %rax
movq %rax, 0x868(%rsp)
movq 0x868(%rsp), %rdi
callq 0x31100
movq %rax, 0x4f8(%rsp)
jmp 0x1fef8
movq 0x4f8(%rsp), %rax
movq %rax, 0x860(%rsp)
movq 0x8e0(%rsp), %rax
movq %rax, 0x858(%rsp)
cmpq $0x0, 0x860(%rsp)
je 0x1ffc0
movq 0x860(%rsp), %rdi
callq 0x31110
movq %rax, 0x4f0(%rsp)
jmp 0x1ff3e
movq 0x4f0(%rsp), %rax
cmpq $0x0, %rax
je 0x1ff7c
movq 0x860(%rsp), %rdi
callq 0x31110
movq %rax, 0x4e8(%rsp)
jmp 0x1ff63
movq 0x4e8(%rsp), %rdi
leaq 0x184466(%rip), %rsi    # 0x1a43d8
callq 0x137e0
cmpl $0x0, %eax
je 0x1ffc0
movq 0x860(%rsp), %rdi
callq 0x31130
movl %eax, 0x4e4(%rsp)
jmp 0x1ff92
movl 0x4e4(%rsp), %esi
leaq 0x898(%rsp), %rdi
callq 0x310e0
movq %rax, 0x4d8(%rsp)
jmp 0x1ffb0
movq 0x4d8(%rsp), %rax
movq %rax, 0x858(%rsp)
movq 0x8d0(%rsp), %rdi
movq 0x870(%rsp), %rsi
movq 0x858(%rsp), %rdx
callq 0x620c0
jmp 0x1ffdf
movq 0x870(%rsp), %rax
movq %rax, 0x4c8(%rsp)
movq 0x868(%rsp), %rdi
callq 0x31110
movq %rax, 0x4d0(%rsp)
jmp 0x20006
movq 0x4d0(%rsp), %rsi
movq 0x4c8(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x20021
movl $0x0, 0x854(%rsp)
movl 0x854(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movq 0x868(%rsp), %rdi
callq 0x186b0
movl %eax, 0x4c4(%rsp)
jmp 0x20050
movl 0x4c0(%rsp), %eax
movl 0x4c4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x2018d
movq 0x868(%rsp), %rdi
movl 0x854(%rsp), %esi
callq 0x186d0
movq %rax, 0x4b8(%rsp)
jmp 0x20084
movq 0x4b8(%rsp), %rax
movq %rax, 0x848(%rsp)
movq 0x8b8(%rsp), %rdi
movq 0x848(%rsp), %rsi
callq 0x31140
jmp 0x200ab
movl $0xc8, %edi
callq 0x13570
movq %rax, 0x4b0(%rsp)
jmp 0x200bf
movq 0x4b0(%rsp), %rdi
movq 0x848(%rsp), %rsi
callq 0x47f80
jmp 0x200d6
movq 0x4b0(%rsp), %rax
movq %rax, 0x840(%rsp)
movq 0x8c0(%rsp), %rdi
movq 0x840(%rsp), %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x20101
movq 0x870(%rsp), %rdi
movq 0x840(%rsp), %rsi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
jmp 0x2011c
movq 0x8c0(%rsp), %rdi
movq 0x840(%rsp), %rsi
callq 0x311c0
jmp 0x20133
movq 0x8b8(%rsp), %rdi
movq 0x848(%rsp), %rsi
callq 0x311c0
jmp 0x2014a
jmp 0x2014c
movl 0x854(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x854(%rsp)
jmp 0x2002c
movq 0x4b0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0xc8, %esi
callq 0x13580
jmp 0x22371
jmp 0x2018f
movl 0x87c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x87c(%rsp)
jmp 0x1fe4b
leaq 0x830(%rsp), %rdi
callq 0x1b920
jmp 0x201b4
movq 0x8d8(%rsp), %rdi
callq 0x31050
movq %rax, 0x4a8(%rsp)
jmp 0x201cb
movq 0x4a8(%rsp), %rsi
leaq 0x830(%rsp), %rdi
callq 0x1be70
jmp 0x201e2
movl $0x1, 0x82c(%rsp)
movl 0x82c(%rsp), %eax
movl %eax, 0x4a0(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16c20
movl %eax, 0x4a4(%rsp)
jmp 0x20211
movl 0x4a0(%rsp), %eax
movl 0x4a4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x202d1
movl $0xf8, %edi
callq 0x13570
movq %rax, 0x498(%rsp)
jmp 0x2023b
movq 0x498(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x189f0
jmp 0x2024e
movq 0x498(%rsp), %rax
movq %rax, 0x820(%rsp)
movq 0x820(%rsp), %rsi
leaq 0x830(%rsp), %rdi
callq 0x1be70
jmp 0x20275
jmp 0x20277
movl 0x82c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x82c(%rsp)
jmp 0x201ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x22364
movq 0x498(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0xf8, %esi
callq 0x13580
jmp 0x22364
movl $0x1, 0x81c(%rsp)
movl 0x81c(%rsp), %eax
movl %eax, 0x490(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16c20
movl %eax, 0x494(%rsp)
jmp 0x20300
movl 0x490(%rsp), %eax
movl 0x494(%rsp), %ecx
cmpl %ecx, %eax
jge 0x20613
movl 0x81c(%rsp), %esi
leaq 0x830(%rsp), %rdi
callq 0x18840
movq %rax, 0x488(%rsp)
jmp 0x20334
movq 0x488(%rsp), %rax
movq %rax, 0x810(%rsp)
movq 0x8f8(%rsp), %rdi
movl 0x81c(%rsp), %esi
callq 0x185f0
movq %rax, 0x480(%rsp)
jmp 0x20362
movq 0x480(%rsp), %rax
movq %rax, 0x808(%rsp)
movq 0x808(%rsp), %rdi
callq 0x312c0
movq %rax, 0x478(%rsp)
jmp 0x20389
movq 0x478(%rsp), %rax
movq %rax, 0x800(%rsp)
movq 0x8f0(%rsp), %rax
movq %rax, 0x7f8(%rsp)
cmpq $0x0, 0x800(%rsp)
je 0x20451
movq 0x800(%rsp), %rdi
callq 0x1bf70
movq %rax, 0x470(%rsp)
jmp 0x203cf
movq 0x470(%rsp), %rax
cmpq $0x0, %rax
je 0x2040d
movq 0x800(%rsp), %rdi
callq 0x1bf70
movq %rax, 0x468(%rsp)
jmp 0x203f4
movq 0x468(%rsp), %rdi
leaq 0x183fd5(%rip), %rsi    # 0x1a43d8
callq 0x137e0
cmpl $0x0, %eax
je 0x20451
movq 0x800(%rsp), %rdi
callq 0x1bf60
movl %eax, 0x464(%rsp)
jmp 0x20423
movl 0x464(%rsp), %esi
leaq 0x830(%rsp), %rdi
callq 0x18840
movq %rax, 0x458(%rsp)
jmp 0x20441
movq 0x458(%rsp), %rax
movq %rax, 0x7f8(%rsp)
movq 0x8d8(%rsp), %rdi
movq 0x810(%rsp), %rsi
movq 0x7f8(%rsp), %rdx
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0x20474
movq 0x810(%rsp), %rax
movq %rax, 0x448(%rsp)
movq 0x808(%rsp), %rdi
callq 0x1bf70
movq %rax, 0x450(%rsp)
jmp 0x2049b
movq 0x450(%rsp), %rsi
movq 0x448(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x204b6
movq 0x810(%rsp), %rax
movq %rax, 0x438(%rsp)
movq 0x808(%rsp), %rdi
callq 0x19370
movl %eax, 0x444(%rsp)
jmp 0x204dc
movl 0x444(%rsp), %esi
movq 0x438(%rsp), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0x204f6
movq 0x810(%rsp), %rdi
movq 0x808(%rsp), %rsi
addq $0x70, %rsi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
jmp 0x20515
movl $0x0, 0x7f4(%rsp)
movl 0x7f4(%rsp), %eax
movl %eax, 0x430(%rsp)
movq 0x808(%rsp), %rdi
callq 0x18660
movl %eax, 0x434(%rsp)
jmp 0x20544
movl 0x430(%rsp), %eax
movl 0x434(%rsp), %ecx
cmpl %ecx, %eax
jge 0x205fb
movq 0x808(%rsp), %rdi
movl 0x7f4(%rsp), %esi
callq 0x18680
movq %rax, 0x428(%rsp)
jmp 0x20578
movq 0x428(%rsp), %rax
movq %rax, 0x7e8(%rsp)
movq 0x7e8(%rsp), %rdi
callq 0x31130
movl %eax, 0x424(%rsp)
jmp 0x2059e
movl 0x424(%rsp), %esi
leaq 0x898(%rsp), %rdi
callq 0x310e0
movq %rax, 0x418(%rsp)
jmp 0x205bc
movq 0x418(%rsp), %rax
movq %rax, 0x7e0(%rsp)
movq 0x810(%rsp), %rdi
movq 0x7e0(%rsp), %rsi
callq 0x1ac10
jmp 0x205e3
jmp 0x205e5
movl 0x7f4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7f4(%rsp)
jmp 0x20520
jmp 0x205fd
movl 0x81c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x81c(%rsp)
jmp 0x202dc
leaq 0x7d0(%rsp), %rdi
callq 0x30550
jmp 0x20622
movq 0x8d8(%rsp), %rdi
callq 0x31070
movq %rax, 0x410(%rsp)
jmp 0x20639
movq 0x410(%rsp), %rsi
leaq 0x7d0(%rsp), %rdi
callq 0x30ae0
jmp 0x20650
movl $0x1, 0x7cc(%rsp)
movl 0x7cc(%rsp), %eax
movl %eax, 0x408(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16c40
movl %eax, 0x40c(%rsp)
jmp 0x2067f
movl 0x408(%rsp), %eax
movl 0x40c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x2073f
movl $0x98, %edi
callq 0x13570
movq %rax, 0x400(%rsp)
jmp 0x206a9
movq 0x400(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x700b0
jmp 0x206bc
movq 0x400(%rsp), %rax
movq %rax, 0x7c0(%rsp)
movq 0x7c0(%rsp), %rsi
leaq 0x7d0(%rsp), %rdi
callq 0x30ae0
jmp 0x206e3
jmp 0x206e5
movl 0x7cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7cc(%rsp)
jmp 0x2065b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x22357
movq 0x400(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0x98, %esi
callq 0x13580
jmp 0x22357
movl $0x1, 0x7bc(%rsp)
movl 0x7bc(%rsp), %eax
movl %eax, 0x3f8(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16c40
movl %eax, 0x3fc(%rsp)
jmp 0x2076e
movl 0x3f8(%rsp), %eax
movl 0x3fc(%rsp), %ecx
cmpl %ecx, %eax
jge 0x20a50
movl 0x7bc(%rsp), %esi
leaq 0x7d0(%rsp), %rdi
callq 0x312d0
movq %rax, 0x3f0(%rsp)
jmp 0x207a2
movq 0x3f0(%rsp), %rax
movq %rax, 0x7b0(%rsp)
movq 0x8f8(%rsp), %rdi
movl 0x7bc(%rsp), %esi
callq 0x307a0
movq %rax, 0x3e8(%rsp)
jmp 0x207d0
movq 0x3e8(%rsp), %rax
movq %rax, 0x7a8(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x312f0
movq %rax, 0x3e0(%rsp)
jmp 0x207f7
movq 0x3e0(%rsp), %rax
movq %rax, 0x7a0(%rsp)
movq 0x8e8(%rsp), %rax
movq %rax, 0x798(%rsp)
cmpq $0x0, 0x7a0(%rsp)
je 0x208bf
movq 0x7a0(%rsp), %rdi
callq 0x30850
movq %rax, 0x3d8(%rsp)
jmp 0x2083d
movq 0x3d8(%rsp), %rax
cmpq $0x0, %rax
je 0x2087b
movq 0x7a0(%rsp), %rdi
callq 0x30850
movq %rax, 0x3d0(%rsp)
jmp 0x20862
movq 0x3d0(%rsp), %rdi
leaq 0x183b67(%rip), %rsi    # 0x1a43d8
callq 0x137e0
cmpl $0x0, %eax
je 0x208bf
movq 0x7a0(%rsp), %rdi
callq 0x31300
movl %eax, 0x3cc(%rsp)
jmp 0x20891
movl 0x3cc(%rsp), %esi
leaq 0x7d0(%rsp), %rdi
callq 0x312d0
movq %rax, 0x3c0(%rsp)
jmp 0x208af
movq 0x3c0(%rsp), %rax
movq %rax, 0x798(%rsp)
movq 0x7b0(%rsp), %rax
movq %rax, 0x3b0(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x30850
movq %rax, 0x3b8(%rsp)
jmp 0x208e6
movq 0x3b8(%rsp), %rsi
movq 0x3b0(%rsp), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0x20901
movq 0x7b0(%rsp), %rax
movq %rax, 0x3a0(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x70720
movl %eax, 0x3ac(%rsp)
jmp 0x20927
movl 0x3ac(%rsp), %esi
movq 0x3a0(%rsp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
jmp 0x20941
movq 0x7b0(%rsp), %rax
movq %rax, 0x390(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x30860
movl %eax, 0x39c(%rsp)
jmp 0x20967
movl 0x39c(%rsp), %esi
movq 0x390(%rsp), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
jmp 0x20981
movq 0x7b0(%rsp), %rax
movq %rax, 0x380(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x31310
movq %rax, 0x388(%rsp)
jmp 0x209a8
movq 0x388(%rsp), %rsi
movq 0x380(%rsp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x209c3
movq 0x7b0(%rsp), %rax
movq %rax, 0x370(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x31320
movq %rax, 0x378(%rsp)
jmp 0x209ea
movq 0x370(%rsp), %rdi
movq 0x378(%rsp), %rax
movq %rax, 0x790(%rsp)
movq 0x790(%rsp), %rsi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
jmp 0x20a15
movq 0x8d8(%rsp), %rdi
movq 0x7b0(%rsp), %rsi
movq 0x798(%rsp), %rdx
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x20a38
jmp 0x20a3a
movl 0x7bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7bc(%rsp)
jmp 0x2074a
movl $0x0, 0x78c(%rsp)
movl 0x78c(%rsp), %eax
movl %eax, 0x368(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x30700
movl %eax, 0x36c(%rsp)
jmp 0x20a7f
movl 0x368(%rsp), %eax
movl 0x36c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x20d99
movq 0x8f8(%rsp), %rdi
movl 0x78c(%rsp), %esi
callq 0x30720
movq %rax, 0x360(%rsp)
jmp 0x20ab3
movq 0x360(%rsp), %rax
movq %rax, 0x780(%rsp)
movq 0x780(%rsp), %rdi
callq 0x1bc50
movl %eax, 0x35c(%rsp)
jmp 0x20ad9
movl 0x35c(%rsp), %eax
movl %eax, 0x77c(%rsp)
leaq 0x768(%rsp), %rdi
callq 0x1b920
jmp 0x20af6
movq 0x780(%rsp), %rdi
callq 0x30cc0
movq %rax, 0x350(%rsp)
jmp 0x20b0d
movq 0x350(%rsp), %rax
movq %rax, 0x760(%rsp)
movq 0x760(%rsp), %rdi
callq 0x1bf60
movl %eax, 0x34c(%rsp)
jmp 0x20b33
movl 0x34c(%rsp), %esi
leaq 0x768(%rsp), %rdi
callq 0x18840
movq %rax, 0x340(%rsp)
jmp 0x20b51
movq 0x340(%rsp), %rax
movq %rax, 0x758(%rsp)
movq 0x758(%rsp), %rsi
leaq 0x768(%rsp), %rdi
callq 0x1be70
jmp 0x20b78
movl $0x0, 0x754(%rsp)
movq $0x0, 0x748(%rsp)
movq 0x780(%rsp), %rdi
callq 0x1bcd0
movl %eax, 0x33c(%rsp)
jmp 0x20ba5
movl 0x33c(%rsp), %eax
cmpl $0x0, %eax
jle 0x20cae
movq 0x780(%rsp), %rdi
callq 0x1bcd0
movl %eax, 0x338(%rsp)
jmp 0x20bcb
movl 0x338(%rsp), %eax
movl %eax, 0x754(%rsp)
movslq 0x754(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x13030
movq %rax, 0x330(%rsp)
jmp 0x20c06
movq 0x330(%rsp), %rax
movq %rax, 0x748(%rsp)
movl $0x0, 0x744(%rsp)
movl 0x744(%rsp), %eax
cmpl 0x754(%rsp), %eax
jge 0x20cac
movq 0x780(%rsp), %rdi
movl 0x744(%rsp), %esi
callq 0x1bce0
movsd %xmm0, 0x328(%rsp)
jmp 0x20c50
movsd 0x328(%rsp), %xmm0
movsd %xmm0, 0x738(%rsp)
movsd 0x738(%rsp), %xmm0
movq 0x748(%rsp), %rax
movslq 0x744(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x744(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x744(%rsp)
jmp 0x20c21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x20d87
jmp 0x20cae
movl $0x30, %edi
callq 0x13570
movq %rax, 0x320(%rsp)
jmp 0x20cc2
movq 0x320(%rsp), %rdi
movl 0x77c(%rsp), %esi
movq 0x758(%rsp), %rdx
movq 0x748(%rsp), %rcx
movl 0x754(%rsp), %r8d
callq 0x6d830
jmp 0x20cf0
movq 0x320(%rsp), %rax
movq %rax, 0x730(%rsp)
movq 0x8d8(%rsp), %rdi
movq 0x730(%rsp), %rsi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
jmp 0x20d1b
movq 0x748(%rsp), %rax
movq %rax, 0x318(%rsp)
cmpq $0x0, %rax
je 0x20d3e
movq 0x318(%rsp), %rdi
callq 0x13750
leaq 0x768(%rsp), %rdi
callq 0x1b9e0
movl 0x78c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78c(%rsp)
jmp 0x20a5b
movq 0x320(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0x30, %esi
callq 0x13580
leaq 0x768(%rsp), %rdi
callq 0x1b9e0
jmp 0x22357
movl $0x0, 0x72c(%rsp)
movl 0x72c(%rsp), %eax
movl %eax, 0x310(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x30750
movl %eax, 0x314(%rsp)
jmp 0x20dc8
movl 0x310(%rsp), %eax
movl 0x314(%rsp), %ecx
cmpl %ecx, %eax
jge 0x210e2
movq 0x8f8(%rsp), %rdi
movl 0x72c(%rsp), %esi
callq 0x30770
movq %rax, 0x308(%rsp)
jmp 0x20dfc
movq 0x308(%rsp), %rax
movq %rax, 0x720(%rsp)
movq 0x720(%rsp), %rdi
callq 0x31340
movl %eax, 0x304(%rsp)
jmp 0x20e22
movl 0x304(%rsp), %eax
movl %eax, 0x71c(%rsp)
leaq 0x708(%rsp), %rdi
callq 0x30550
jmp 0x20e3f
movq 0x720(%rsp), %rdi
callq 0x30d40
movq %rax, 0x2f8(%rsp)
jmp 0x20e56
movq 0x2f8(%rsp), %rax
movq %rax, 0x700(%rsp)
movq 0x700(%rsp), %rdi
callq 0x31300
movl %eax, 0x2f4(%rsp)
jmp 0x20e7c
movl 0x2f4(%rsp), %esi
leaq 0x708(%rsp), %rdi
callq 0x312d0
movq %rax, 0x2e8(%rsp)
jmp 0x20e9a
movq 0x2e8(%rsp), %rax
movq %rax, 0x6f8(%rsp)
movq 0x6f8(%rsp), %rsi
leaq 0x708(%rsp), %rdi
callq 0x30ae0
jmp 0x20ec1
movl $0x0, 0x6f4(%rsp)
movq $0x0, 0x6e8(%rsp)
movq 0x720(%rsp), %rdi
callq 0x31350
movl %eax, 0x2e4(%rsp)
jmp 0x20eee
movl 0x2e4(%rsp), %eax
cmpl $0x0, %eax
jle 0x20ff7
movq 0x720(%rsp), %rdi
callq 0x31350
movl %eax, 0x2e0(%rsp)
jmp 0x20f14
movl 0x2e0(%rsp), %eax
movl %eax, 0x6f4(%rsp)
movslq 0x6f4(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x13030
movq %rax, 0x2d8(%rsp)
jmp 0x20f4f
movq 0x2d8(%rsp), %rax
movq %rax, 0x6e8(%rsp)
movl $0x0, 0x6e4(%rsp)
movl 0x6e4(%rsp), %eax
cmpl 0x6f4(%rsp), %eax
jge 0x20ff5
movq 0x720(%rsp), %rdi
movl 0x6e4(%rsp), %esi
callq 0x31360
movsd %xmm0, 0x2d0(%rsp)
jmp 0x20f99
movsd 0x2d0(%rsp), %xmm0
movsd %xmm0, 0x6d8(%rsp)
movsd 0x6d8(%rsp), %xmm0
movq 0x6e8(%rsp), %rax
movslq 0x6e4(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x6e4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6e4(%rsp)
jmp 0x20f6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x210d0
jmp 0x20ff7
movl $0x30, %edi
callq 0x13570
movq %rax, 0x2c8(%rsp)
jmp 0x2100b
movq 0x2c8(%rsp), %rdi
movl 0x71c(%rsp), %esi
movq 0x6f8(%rsp), %rdx
movq 0x6e8(%rsp), %rcx
movl 0x6f4(%rsp), %r8d
callq 0x70f90
jmp 0x21039
movq 0x2c8(%rsp), %rax
movq %rax, 0x6d0(%rsp)
movq 0x8d8(%rsp), %rdi
movq 0x6d0(%rsp), %rsi
movq (%rdi), %rax
movq 0x50(%rax), %rax
callq *%rax
jmp 0x21064
movq 0x6e8(%rsp), %rax
movq %rax, 0x2c0(%rsp)
cmpq $0x0, %rax
je 0x21087
movq 0x2c0(%rsp), %rdi
callq 0x13750
leaq 0x708(%rsp), %rdi
callq 0x30620
movl 0x72c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x72c(%rsp)
jmp 0x20da4
movq 0x2c8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0x30, %esi
callq 0x13580
leaq 0x708(%rsp), %rdi
callq 0x30620
jmp 0x22357
movl $0x0, 0x6cc(%rsp)
movl 0x6cc(%rsp), %eax
movl %eax, 0x2b8(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x30660
movl %eax, 0x2bc(%rsp)
jmp 0x21111
movl 0x2b8(%rsp), %eax
movl 0x2bc(%rsp), %ecx
cmpl %ecx, %eax
jge 0x2148f
movq 0x8f8(%rsp), %rdi
movl 0x6cc(%rsp), %esi
callq 0x30680
movq %rax, 0x2b0(%rsp)
jmp 0x21145
movq 0x2b0(%rsp), %rax
movq %rax, 0x6c0(%rsp)
movq 0x6c0(%rsp), %rdi
callq 0x31380
movl %eax, 0x2ac(%rsp)
jmp 0x2116b
movl 0x2ac(%rsp), %eax
movl %eax, 0x6bc(%rsp)
leaq 0x6a8(%rsp), %rdi
callq 0x1b920
jmp 0x21188
movl $0x0, 0x6a4(%rsp)
movl 0x6a4(%rsp), %eax
movl %eax, 0x2a4(%rsp)
movq 0x6c0(%rsp), %rdi
callq 0x30d80
movl %eax, 0x2a8(%rsp)
jmp 0x211b7
movl 0x2a4(%rsp), %eax
movl 0x2a8(%rsp), %ecx
cmpl %ecx, %eax
jge 0x21287
movq 0x6c0(%rsp), %rdi
movl 0x6a4(%rsp), %esi
callq 0x30da0
movq %rax, 0x298(%rsp)
jmp 0x211eb
movq 0x298(%rsp), %rax
movq %rax, 0x698(%rsp)
movq 0x698(%rsp), %rdi
callq 0x1bf60
movl %eax, 0x294(%rsp)
jmp 0x21211
movl 0x294(%rsp), %esi
leaq 0x6a8(%rsp), %rdi
callq 0x18840
movq %rax, 0x288(%rsp)
jmp 0x2122f
movq 0x288(%rsp), %rax
movq %rax, 0x690(%rsp)
movq 0x690(%rsp), %rsi
leaq 0x6a8(%rsp), %rdi
callq 0x1be70
jmp 0x21256
jmp 0x21258
movl 0x6a4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6a4(%rsp)
jmp 0x21193
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x2147d
movl $0x0, 0x68c(%rsp)
movq $0x0, 0x680(%rsp)
movq 0x6c0(%rsp), %rdi
callq 0x31390
movl %eax, 0x284(%rsp)
jmp 0x212b4
movl 0x284(%rsp), %eax
cmpl $0x0, %eax
jle 0x213a4
movq 0x6c0(%rsp), %rdi
callq 0x31390
movl %eax, 0x280(%rsp)
jmp 0x212da
movl 0x280(%rsp), %eax
movl %eax, 0x68c(%rsp)
movslq 0x68c(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x13030
movq %rax, 0x278(%rsp)
jmp 0x21315
movq 0x278(%rsp), %rax
movq %rax, 0x680(%rsp)
movl $0x0, 0x67c(%rsp)
movl 0x67c(%rsp), %eax
cmpl 0x68c(%rsp), %eax
jge 0x213a2
movq 0x6c0(%rsp), %rdi
movl 0x67c(%rsp), %esi
callq 0x313a0
movsd %xmm0, 0x270(%rsp)
jmp 0x2135f
movsd 0x270(%rsp), %xmm0
movsd %xmm0, 0x670(%rsp)
movsd 0x670(%rsp), %xmm0
movq 0x680(%rsp), %rax
movslq 0x67c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x67c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x67c(%rsp)
jmp 0x21330
jmp 0x213a4
movl $0x38, %edi
callq 0x13570
movq %rax, 0x268(%rsp)
jmp 0x213b8
movq 0x268(%rsp), %rdi
movl 0x6bc(%rsp), %esi
movq 0x680(%rsp), %rcx
movl 0x68c(%rsp), %r8d
leaq 0x6a8(%rsp), %rdx
callq 0x6f9a0
jmp 0x213e6
movq 0x268(%rsp), %rax
movq %rax, 0x668(%rsp)
movq 0x8d8(%rsp), %rdi
movq 0x668(%rsp), %rsi
movq (%rdi), %rax
movq 0x60(%rax), %rax
callq *%rax
jmp 0x21411
movq 0x680(%rsp), %rax
movq %rax, 0x260(%rsp)
cmpq $0x0, %rax
je 0x21434
movq 0x260(%rsp), %rdi
callq 0x13750
leaq 0x6a8(%rsp), %rdi
callq 0x1b9e0
movl 0x6cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6cc(%rsp)
jmp 0x210ed
movq 0x268(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0x38, %esi
callq 0x13580
leaq 0x6a8(%rsp), %rdi
callq 0x1b9e0
jmp 0x22357
movl $0x0, 0x664(%rsp)
movl 0x664(%rsp), %eax
movl %eax, 0x258(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x306b0
movl %eax, 0x25c(%rsp)
jmp 0x214be
movl 0x258(%rsp), %eax
movl 0x25c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x21837
movq 0x8f8(%rsp), %rdi
movl 0x664(%rsp), %esi
callq 0x306d0
movq %rax, 0x250(%rsp)
jmp 0x214f2
movq 0x250(%rsp), %rax
movq %rax, 0x658(%rsp)
movq 0x658(%rsp), %rdi
callq 0x313c0
movl %eax, 0x24c(%rsp)
jmp 0x21518
movl 0x24c(%rsp), %eax
movl %eax, 0x654(%rsp)
leaq 0x640(%rsp), %rdi
callq 0x30550
jmp 0x21535
movl $0x0, 0x63c(%rsp)
movl 0x63c(%rsp), %eax
movl %eax, 0x244(%rsp)
movq 0x658(%rsp), %rdi
callq 0x30e40
movl %eax, 0x248(%rsp)
jmp 0x21564
movl 0x244(%rsp), %eax
movl 0x248(%rsp), %ecx
cmpl %ecx, %eax
jge 0x21634
movq 0x658(%rsp), %rdi
movl 0x63c(%rsp), %esi
callq 0x30e60
movq %rax, 0x238(%rsp)
jmp 0x21598
movq 0x238(%rsp), %rax
movq %rax, 0x630(%rsp)
movq 0x630(%rsp), %rdi
callq 0x31300
movl %eax, 0x234(%rsp)
jmp 0x215be
movl 0x234(%rsp), %esi
leaq 0x640(%rsp), %rdi
callq 0x312d0
movq %rax, 0x228(%rsp)
jmp 0x215dc
movq 0x228(%rsp), %rax
movq %rax, 0x628(%rsp)
movq 0x628(%rsp), %rsi
leaq 0x640(%rsp), %rdi
callq 0x30ae0
jmp 0x21603
jmp 0x21605
movl 0x63c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x63c(%rsp)
jmp 0x21540
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x21825
movl $0x0, 0x624(%rsp)
movq $0x0, 0x618(%rsp)
movq 0x658(%rsp), %rdi
callq 0x313d0
movl %eax, 0x224(%rsp)
jmp 0x21661
movl 0x224(%rsp), %eax
cmpl $0x0, %eax
jle 0x21751
movq 0x658(%rsp), %rdi
callq 0x313d0
movl %eax, 0x220(%rsp)
jmp 0x21687
movl 0x220(%rsp), %eax
movl %eax, 0x624(%rsp)
movslq 0x624(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x13030
movq %rax, 0x218(%rsp)
jmp 0x216c2
movq 0x218(%rsp), %rax
movq %rax, 0x618(%rsp)
movl $0x0, 0x614(%rsp)
movl 0x614(%rsp), %eax
cmpl 0x624(%rsp), %eax
jge 0x2174f
movq 0x658(%rsp), %rdi
movl 0x614(%rsp), %esi
callq 0x313e0
movsd %xmm0, 0x210(%rsp)
jmp 0x2170c
movsd 0x210(%rsp), %xmm0
movsd %xmm0, 0x608(%rsp)
movsd 0x608(%rsp), %xmm0
movq 0x618(%rsp), %rax
movslq 0x614(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x614(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x614(%rsp)
jmp 0x216dd
jmp 0x21751
movl $0x38, %edi
callq 0x13570
movq %rax, 0x208(%rsp)
jmp 0x21765
movq 0x208(%rsp), %rdi
movl 0x654(%rsp), %esi
movq 0x618(%rsp), %rcx
leaq 0x640(%rsp), %rdx
xorl %r8d, %r8d
callq 0x71390
jmp 0x2178e
movq 0x208(%rsp), %rax
movq %rax, 0x600(%rsp)
movq 0x8d8(%rsp), %rdi
movq 0x600(%rsp), %rsi
movq (%rdi), %rax
movq 0x70(%rax), %rax
callq *%rax
jmp 0x217b9
movq 0x618(%rsp), %rax
movq %rax, 0x200(%rsp)
cmpq $0x0, %rax
je 0x217dc
movq 0x200(%rsp), %rdi
callq 0x13750
leaq 0x640(%rsp), %rdi
callq 0x30620
movl 0x664(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x664(%rsp)
jmp 0x2149a
movq 0x208(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0x38, %esi
callq 0x13580
leaq 0x640(%rsp), %rdi
callq 0x30620
jmp 0x22357
movl $0x0, 0x5fc(%rsp)
movl 0x5fc(%rsp), %eax
movl %eax, 0x1f8(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16c60
movl %eax, 0x1fc(%rsp)
jmp 0x21866
movl 0x1f8(%rsp), %eax
movl 0x1fc(%rsp), %ecx
cmpl %ecx, %eax
jge 0x21a82
movq 0x8f8(%rsp), %rdi
movl 0x5fc(%rsp), %esi
callq 0x30630
movq %rax, 0x1f0(%rsp)
jmp 0x2189a
movq 0x1f0(%rsp), %rax
movq %rax, 0x5f0(%rsp)
movq 0x5f0(%rsp), %rdi
callq 0x30ec0
movq %rax, 0x1e8(%rsp)
jmp 0x218c1
movq 0x1e8(%rsp), %rax
movq %rax, 0x5e8(%rsp)
movq 0x5f0(%rsp), %rdi
callq 0x1bca0
movq %rax, 0x1e0(%rsp)
jmp 0x218e8
movq 0x1e0(%rsp), %rax
movq %rax, 0x5e0(%rsp)
movq 0x5e8(%rsp), %rdi
callq 0x1bf60
movl %eax, 0x1dc(%rsp)
jmp 0x2190e
movl 0x1dc(%rsp), %esi
leaq 0x830(%rsp), %rdi
callq 0x18840
movq %rax, 0x1d0(%rsp)
jmp 0x2192c
movq 0x1d0(%rsp), %rax
movq %rax, 0x5d8(%rsp)
movq 0x5e0(%rsp), %rdi
callq 0x31300
movl %eax, 0x1cc(%rsp)
jmp 0x21952
movl 0x1cc(%rsp), %esi
leaq 0x7d0(%rsp), %rdi
callq 0x312d0
movq %rax, 0x1c0(%rsp)
jmp 0x21970
movq 0x1c0(%rsp), %rax
movq %rax, 0x5d0(%rsp)
movl $0x50, %edi
callq 0x13570
movq %rax, 0x1b8(%rsp)
jmp 0x21994
movq 0x5d8(%rsp), %rax
movq %rax, 0x1a0(%rsp)
movq 0x5d0(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movq 0x5f0(%rsp), %rdi
callq 0x1bc90
movsd %xmm0, 0x1b0(%rsp)
jmp 0x219cc
movq 0x5f0(%rsp), %rdi
callq 0x1bc80
movl %eax, 0x19c(%rsp)
jmp 0x219e2
movl 0x19c(%rsp), %ecx
movsd 0x1b0(%rsp), %xmm0
movq 0x1a8(%rsp), %rdx
movq 0x1a0(%rsp), %rsi
movq 0x1b8(%rsp), %rdi
callq 0x719c0
jmp 0x21a11
movq 0x1b8(%rsp), %rax
movq %rax, 0x5c8(%rsp)
movq 0x8d8(%rsp), %rdi
movq 0x5c8(%rsp), %rsi
movq (%rdi), %rax
movq 0x80(%rax), %rax
callq *%rax
jmp 0x21a3f
jmp 0x21a41
movl 0x5fc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5fc(%rsp)
jmp 0x21842
movq 0x1b8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0x50, %esi
callq 0x13580
jmp 0x22357
leaq 0x5b8(%rsp), %rdi
callq 0x30580
jmp 0x21a91
movl $0x0, 0x5b4(%rsp)
movl 0x5b4(%rsp), %eax
movl %eax, 0x194(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16ca0
movl %eax, 0x198(%rsp)
jmp 0x21ac0
movl 0x194(%rsp), %eax
movl 0x198(%rsp), %ecx
cmpl %ecx, %eax
jge 0x21e6c
movq 0x8f8(%rsp), %rdi
movl 0x5b4(%rsp), %esi
callq 0x307d0
movq %rax, 0x188(%rsp)
jmp 0x21af4
movq 0x188(%rsp), %rax
movq %rax, 0x5a8(%rsp)
movl $0xd0, %edi
callq 0x13570
movq %rax, 0x180(%rsp)
jmp 0x21b18
movq 0x5a8(%rsp), %rdi
callq 0x30870
movq %rax, 0x178(%rsp)
jmp 0x21b2f
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdi
callq 0x66400
jmp 0x21b46
movq 0x180(%rsp), %rax
movq %rax, 0x5a0(%rsp)
movq 0x5a0(%rsp), %rax
movq %rax, 0x168(%rsp)
movq 0x5a8(%rsp), %rdi
callq 0x31400
movq %rax, 0x170(%rsp)
jmp 0x21b7d
movq 0x170(%rsp), %rsi
movq 0x168(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x21b98
movq 0x5a0(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x5a8(%rsp), %rdi
callq 0x31410
movsd %xmm0, 0x160(%rsp)
jmp 0x21bc0
movsd 0x160(%rsp), %xmm0
movq 0x158(%rsp), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
jmp 0x21bdc
movq 0x5a0(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x5a8(%rsp), %rdi
callq 0x31430
movsd %xmm0, 0x150(%rsp)
jmp 0x21c04
movsd 0x150(%rsp), %xmm0
movq 0x148(%rsp), %rdi
movq (%rdi), %rax
movq 0x50(%rax), %rax
callq *%rax
jmp 0x21c20
movq 0x5a0(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x5a8(%rsp), %rdi
callq 0x31450
movsd %xmm0, 0x140(%rsp)
jmp 0x21c48
movsd 0x140(%rsp), %xmm0
movq 0x138(%rsp), %rdi
movq (%rdi), %rax
movq 0x58(%rax), %rax
callq *%rax
jmp 0x21c64
movq 0x5a0(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x5a8(%rsp), %rdi
callq 0x31470
movl %eax, 0x134(%rsp)
jmp 0x21c8a
movq 0x5a8(%rsp), %rdi
callq 0x31490
movl %eax, 0x124(%rsp)
jmp 0x21ca0
movl 0x124(%rsp), %edx
movl 0x134(%rsp), %esi
movq 0x128(%rsp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
jmp 0x21cc1
movq 0x5a0(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x5a8(%rsp), %rdi
callq 0x314b0
movq %rax, 0x118(%rsp)
jmp 0x21ce8
movq 0x118(%rsp), %rsi
movq 0x110(%rsp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
jmp 0x21d03
movq 0x5a0(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x5a8(%rsp), %rdi
callq 0x314d0
movq %rax, 0x108(%rsp)
jmp 0x21d2a
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rax
movq %rax, 0x598(%rsp)
movq 0x598(%rsp), %rsi
movq (%rdi), %rax
movq 0x60(%rax), %rax
callq *%rax
jmp 0x21d55
movq 0x5a8(%rsp), %rdi
callq 0x314f0
movq %rax, 0xf8(%rsp)
jmp 0x21d6c
movq 0xf8(%rsp), %rax
movq %rax, 0x590(%rsp)
movq 0x590(%rsp), %rdi
callq 0x31130
movl %eax, 0xf4(%rsp)
jmp 0x21d92
movl 0xf4(%rsp), %esi
leaq 0x898(%rsp), %rdi
callq 0x310e0
movq %rax, 0xe8(%rsp)
jmp 0x21db0
movq 0xe8(%rsp), %rax
movq %rax, 0x588(%rsp)
movq 0x5a0(%rsp), %rdi
movq 0x588(%rsp), %rsi
movq (%rdi), %rax
movq 0x78(%rax), %rax
callq *%rax
jmp 0x21ddb
movq 0x8d8(%rsp), %rdi
movq 0x5a0(%rsp), %rsi
movq (%rdi), %rax
movq 0x90(%rax), %rax
callq *%rax
jmp 0x21df9
movq 0x5a0(%rsp), %rsi
leaq 0x5b8(%rsp), %rdi
callq 0x30ef0
jmp 0x21e10
jmp 0x21e12
movl 0x5b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5b4(%rsp)
jmp 0x21a9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
jmp 0x2234a
movq 0x180(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0xd0, %esi
callq 0x13580
jmp 0x2234a
movl $0x0, 0x584(%rsp)
movl 0x584(%rsp), %eax
movl %eax, 0xe0(%rsp)
movq 0x8f8(%rsp), %rdi
callq 0x16cc0
movl %eax, 0xe4(%rsp)
jmp 0x21e9b
movl 0xe0(%rsp), %eax
movl 0xe4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x222d3
movq 0x8f8(%rsp), %rdi
movl 0x584(%rsp), %esi
callq 0x30800
movq %rax, 0xd8(%rsp)
jmp 0x21ecf
movq 0xd8(%rsp), %rax
movq %rax, 0x578(%rsp)
movl $0x1d8, %edi            # imm = 0x1D8
callq 0x13570
movq %rax, 0xd0(%rsp)
jmp 0x21ef3
movq 0x578(%rsp), %rdi
callq 0x30890
movq %rax, 0xc8(%rsp)
jmp 0x21f0a
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdi
callq 0x670b0
jmp 0x21f21
movq 0xd0(%rsp), %rax
movq %rax, 0x570(%rsp)
movq 0x578(%rsp), %rdi
callq 0x31500
movq %rax, 0xc0(%rsp)
jmp 0x21f48
movq 0xc0(%rsp), %rax
movq %rax, 0x568(%rsp)
movq 0x578(%rsp), %rdi
callq 0x31520
movq %rax, 0xb8(%rsp)
jmp 0x21f6f
movq 0xb8(%rsp), %rax
movq %rax, 0x560(%rsp)
movq 0x570(%rsp), %rdi
movq 0x568(%rsp), %rsi
movq %rsi, %rdx
addq $0x60, %rdx
movq (%rdi), %rax
movq 0xb8(%rax), %rax
callq *%rax
jmp 0x21fa4
movq 0x570(%rsp), %rdi
movq 0x560(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movq (%rdi), %rax
movq 0xc0(%rax), %rax
callq *%rax
jmp 0x21fcb
movq 0x570(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x578(%rsp), %rdi
callq 0x31540
movsd %xmm0, 0xb0(%rsp)
jmp 0x21ff3
movsd 0xb0(%rsp), %xmm0
movq 0xa8(%rsp), %rdi
movq (%rdi), %rax
movq 0x88(%rax), %rax
callq *%rax
jmp 0x22012
movq 0x570(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x578(%rsp), %rdi
callq 0x31560
movsd %xmm0, 0xa0(%rsp)
jmp 0x2203a
movsd 0xa0(%rsp), %xmm0
movq 0x98(%rsp), %rdi
movq (%rdi), %rax
movq 0x90(%rax), %rax
callq *%rax
jmp 0x22059
movq 0x570(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x578(%rsp), %rdi
callq 0x308f0
movl %eax, 0x94(%rsp)
jmp 0x2207f
movq 0x578(%rsp), %rdi
callq 0x30920
movl %eax, 0x84(%rsp)
jmp 0x22095
movl 0x84(%rsp), %edx
movl 0x94(%rsp), %esi
movq 0x88(%rsp), %rdi
movq (%rdi), %rax
movq 0x70(%rax), %rax
callq *%rax
jmp 0x220b6
movq 0x570(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x578(%rsp), %rdi
callq 0x31580
movq %rax, 0x78(%rsp)
jmp 0x220d7
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdi
movq (%rdi), %rax
movq 0x78(%rax), %rax
callq *%rax
jmp 0x220ec
movq 0x570(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x578(%rsp), %rdi
callq 0x315a0
movl %eax, 0x6c(%rsp)
jmp 0x2210c
movl 0x6c(%rsp), %esi
movq 0x60(%rsp), %rdi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x22123
movq 0x570(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x578(%rsp), %rdi
callq 0x315c0
movq %rax, 0x58(%rsp)
jmp 0x22144
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
movq 0xa8(%rax), %rax
callq *%rax
jmp 0x2215c
movq 0x570(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x578(%rsp), %rdi
callq 0x315e0
movq %rax, 0x48(%rsp)
jmp 0x2217d
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
movq 0xb0(%rax), %rax
callq *%rax
jmp 0x22195
movq 0x570(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x578(%rsp), %rdi
callq 0x31600
movq %rax, 0x38(%rsp)
jmp 0x221b6
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x558(%rsp)
movq 0x558(%rsp), %rsi
movq (%rdi), %rax
movq 0xd8(%rax), %rax
callq *%rax
jmp 0x221de
movq 0x578(%rsp), %rdi
callq 0x31620
movq %rax, 0x28(%rsp)
jmp 0x221f2
movq 0x28(%rsp), %rax
movq %rax, 0x550(%rsp)
cmpq $0x0, 0x550(%rsp)
je 0x22241
movq 0x550(%rsp), %rdi
callq 0x31650
movl %eax, 0x24(%rsp)
jmp 0x2221d
movl 0x24(%rsp), %esi
leaq 0x5b8(%rsp), %rdi
callq 0x31630
movq %rax, 0x18(%rsp)
jmp 0x22235
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x2224a
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x2224a
movq 0x10(%rsp), %rax
movq %rax, 0x548(%rsp)
movq 0x570(%rsp), %rdi
movq 0x548(%rsp), %rsi
movq (%rdi), %rax
movq 0xd0(%rax), %rax
callq *%rax
jmp 0x22275
movq 0x8d8(%rsp), %rdi
movq 0x570(%rsp), %rsi
movq (%rdi), %rax
movq 0xa0(%rax), %rax
callq *%rax
jmp 0x22293
jmp 0x22295
movl 0x584(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x584(%rsp)
jmp 0x21e77
movq 0xd0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x890(%rsp)
movl %eax, 0x88c(%rsp)
movl $0x1d8, %esi            # imm = 0x1D8
callq 0x13580
jmp 0x2234a
movq 0x538(%rsp), %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, 0x8(%rsp)
leaq 0x540(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
jmp 0x222fa
movq 0x8(%rsp), %rdi
movq 0x540(%rsp), %rsi
callq 0x1c2d0
jmp 0x2230e
leaq 0x5b8(%rsp), %rdi
callq 0x305f0
leaq 0x7d0(%rsp), %rdi
callq 0x30620
leaq 0x830(%rsp), %rdi
callq 0x1b9e0
leaq 0x898(%rsp), %rdi
callq 0x1b9a0
addq $0x908, %rsp            # imm = 0x908
retq
leaq 0x5b8(%rsp), %rdi
callq 0x305f0
leaq 0x7d0(%rsp), %rdi
callq 0x30620
leaq 0x830(%rsp), %rdi
callq 0x1b9e0
leaq 0x898(%rsp), %rdi
callq 0x1b9a0
movq 0x890(%rsp), %rdi
callq 0x13970
nopl (%rax,%rax)