// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::ReadGSVStreamFromOldVersion(_IO_FILE*, int)
int GSVScene::
ReadGSVStreamFromOldVersion(FILE *fp, RNBoolean read_points)
{
  // Convenient variables
  int dummy = 0;

  // Read magic keyword
  char magic[16] = { '\0' };
  if (fread(magic, sizeof(char), 16, fp) != (unsigned int) 16) {
    RNFail("Unable to read first bytes from GSV scene file\n");
    fclose(fp);
    return 0;
  }

  // Check magic keyword
  if (strcmp(magic, "GSV")) {
    RNFail("Invalid file format for GSV scene file\n");
    fclose(fp);
    return 0;
  }

  // Read header
  int endian_test;
  int major_version;
  int minor_version;
  unsigned long long scene_file_offset = 0;
  fread(&dummy, sizeof(int), 1, fp);
  fread(&dummy, sizeof(int), 1, fp);
  fread(&scene_file_offset, sizeof(unsigned long long), 1, fp);
  fread(&endian_test, sizeof(int), 1, fp);
  fread(&major_version, sizeof(int), 1, fp);
  fread(&minor_version, sizeof(int), 1, fp);
  if ((major_version != 0) || (minor_version != 1)) {
    for (int j = 0; j < 53; j++) {
      fread(&dummy, sizeof(int), 1, fp);
    }
  }

  // Seek to beginning of scene stuff
  assert(((major_version != 0) || (minor_version != 1)) || (scene_file_offset == 0));
  assert(((major_version == 0) && (minor_version == 1)) || (scene_file_offset > 0));
  unsigned long long point_file_offset = RNFileTell(fp);
  if (scene_file_offset > 0) {
    if (!RNFileSeek(fp, scene_file_offset, RN_FILE_SEEK_SET)) {
      RNFail("Unable to seek to scene file offset\n");
      fclose(fp);
      return 0;
    }
  }

  // Read scene stuff
  int scene_nruns;
  R3Box scene_bbox;
  fread(&scene_nruns, sizeof(int), 1, fp);
  fread(&(scene_bbox[0][0]), sizeof(RNCoord), 6, fp);
  for (int j = 0; j < 121; j++) {
    fread(&dummy, sizeof(int), 1, fp);
  }
  
  // Read runs
  for (int ir = 0; ir < scene_nruns; ir++) {
    // Create run
    GSVRun *run = new GSVRun();

    // Read run stuff
    int run_ncameras;
    int run_nlasers;
    int run_nsegments;
    R3Box run_bbox;
    char run_name[256];
    fread(run_name, sizeof(char), 256, fp);
    fread(&run_ncameras, sizeof(int), 1, fp);
    fread(&run_nlasers, sizeof(int), 1, fp);
    fread(&run_nsegments, sizeof(int), 1, fp);
    fread(&(run_bbox[0][0]), sizeof(RNCoord), 6, fp);
    for (int j = 0; j < 23; j++) {
      fread(&dummy, sizeof(int), 1, fp);
    }

    // Read cameras
    for (int ic = 0; ic < run_ncameras; ic++) {
      GSVCamera *camera = new GSVCamera();

      // Read camera stuff
      int camera_ntapestries;
      int camera_distortion_type;
      RNLength camera_focal_x;
      RNLength camera_focal_y;
      RNCoord camera_center_x;
      RNCoord camera_center_y;
      RNScalar camera_k1;
      RNScalar camera_k2;
      RNScalar camera_k3;
      RNScalar camera_p1;
      RNScalar camera_p2;
      RNAngle camera_fov_max;
      R3Box camera_bbox;
      fread(&camera_ntapestries, sizeof(int), 1, fp);
      fread(&camera_distortion_type, sizeof(int), 1, fp);
      fread(&camera_focal_x, sizeof(RNLength), 1, fp);
      fread(&camera_focal_y, sizeof(RNLength), 1, fp);
      fread(&camera_center_x, sizeof(RNCoord), 1, fp);
      fread(&camera_center_y, sizeof(RNCoord), 1, fp);
      fread(&camera_k1, sizeof(RNScalar), 1, fp);
      fread(&camera_k2, sizeof(RNScalar), 1, fp);
      fread(&camera_k3, sizeof(RNScalar), 1, fp);
      fread(&camera_p1, sizeof(RNScalar), 1, fp);
      fread(&camera_p2, sizeof(RNScalar), 1, fp);
      fread(&camera_fov_max, sizeof(RNAngle), 1, fp);
      fread(&(camera_bbox[0][0]), sizeof(RNCoord), 6, fp);
      for (int j = 0; j < 15; j++) {
        fread(&dummy, sizeof(int), 1, fp);
      }

      // Set camera stuff
      camera->SetDistortionType(camera_distortion_type);
      camera->SetXFocal(camera_focal_x);
      camera->SetYFocal(camera_focal_y);
      camera->SetXCenter(camera_center_x);
      camera->SetYCenter(camera_center_y);
      camera->SetK1(camera_k1);
      camera->SetK2(camera_k2);
      camera->SetK3(camera_k3);
      camera->SetP1(camera_p1);
      camera->SetP2(camera_p2);
      camera->SetMaxFov(camera_fov_max);
      camera->SetBBox(camera_bbox);
      run->InsertCamera(camera);
    }

    // Read lasers
    for (int il = 0; il < run_nlasers; il++) {
      GSVLaser *laser = new GSVLaser();

      // Read laser stuff
      int laser_nscans;
      R3Box laser_bbox;
      fread(&laser_nscans, sizeof(int), 1, fp);
      fread(&(laser_bbox[0][0]), sizeof(RNCoord), 6, fp);
      for (int j = 0; j < 25; j++) {
        fread(&dummy, sizeof(int), 1, fp);
      }

      // Set laser stuff
      laser->SetBBox(laser_bbox);
      run->InsertLaser(laser);
    }

    // Read segments
    for (int is = 0; is < run_nsegments; is++) {
      GSVSegment *segment = new GSVSegment();

      // Read segment stuff
      int segment_nscans;
      int segment_ntapestries;
      int segment_npanoramas;
      R3Box segment_bbox;
      fread(&segment_nscans, sizeof(int), 1, fp);
      fread(&segment_ntapestries, sizeof(int), 1, fp);
      fread(&segment_npanoramas, sizeof(int), 1, fp);
      fread(&(segment_bbox[0][0]), sizeof(RNCoord), 6, fp);
      for (int j = 0; j < 23; j++) {
        fread(&dummy, sizeof(int), 1, fp);
      }

      // Read scans
      for (int ia = 0; ia < segment_nscans; ia++) {
        GSVScan *scan = new GSVScan();

        // Read scan stuff
        int scan_laser_index;
        int scan_nscanlines;
        R3Box scan_bbox;
        fread(&scan_laser_index, sizeof(int), 1, fp);
        fread(&scan_nscanlines, sizeof(int), 1, fp);
        fread(&(scan_bbox[0][0]), sizeof(RNCoord), 6, fp);
        for (int j = 0; j < 24; j++) {
          fread(&dummy, sizeof(int), 1, fp);
        }

        // Read scanlines
        for (int ie = 0; ie < scan_nscanlines; ie++) {
          GSVScanline *scanline = new GSVScanline();

          // Read scanline stuff
          int scanline_npoints;
          R3Point scanline_viewpoint;
          R3Quaternion scanline_orientation;
          RNScalar scanline_timestamp;
          R3Box scanline_bbox;
          unsigned long long scanline_file_offset;
          fread(&(scanline_npoints), sizeof(int), 1, fp);
          fread(&(scanline_viewpoint[0]), sizeof(RNCoord), 3, fp);
          fread(&(scanline_orientation[0]), sizeof(RNCoord), 4, fp);
          fread(&scanline_timestamp, sizeof(RNScalar), 1, fp);
          fread(&(scanline_bbox[0][0]), sizeof(RNCoord), 6, fp);
          fread(&(scanline_file_offset), sizeof(unsigned long long), 1, fp);
          for (int j = 0; j < 15; j++) {
            fread(&dummy, sizeof(int), 1, fp);
          }

          // Read points
          if ((major_version == 0) && (minor_version == 1)) {
            ReadScanlinePointsFromOldVersion(fp, scanline);
          }

          // Set scanline stuff
          GSVPose scanline_pose(scanline_viewpoint, scanline_orientation);
          scanline->SetPose(scanline_pose);
          scanline->SetTimestamp(scanline_timestamp);
          scanline->SetBBox(scanline_bbox);
          scanline->SetNPoints(scanline_npoints);
          scanline->SetFileOffset(scanline_file_offset);
          scan->InsertScanline(scanline);
        }

        // Set scan stuff
        scan->SetBBox(scan_bbox);

        // Create survey
        GSVSurvey *survey = new GSVSurvey();
        survey->InsertScan(scan);
        segment->InsertSurvey(survey);
        
        // Insert survey into laser
        if (scan_laser_index >= 0) {
          GSVLaser *scan_laser = run->Laser(scan_laser_index);
          scan_laser->InsertSurvey(survey);
        }
      }

      // Read tapestries
      for (int it = 0; it < segment_ntapestries; it++) {
        GSVTapestry *tapestry = new GSVTapestry();

        // Read tapestry stuff
        int tapestry_camera_index;
        int tapestry_nimages;
        R3Box tapestry_bbox;
        fread(&tapestry_camera_index, sizeof(int), 1, fp);
        fread(&tapestry_nimages, sizeof(int), 1, fp);
        fread(&(tapestry_bbox[0][0]), sizeof(RNCoord), 6, fp);
        for (int j = 0; j < 24; j++) {
          fread(&dummy, sizeof(int), 1, fp);
        }

        // Set tapestry stuff
        tapestry->SetBBox(tapestry_bbox);
        segment->InsertTapestry(tapestry);
        if (tapestry_camera_index >= 0) {
          GSVCamera *camera = run->Camera(tapestry_camera_index);
          camera->InsertTapestry(tapestry);
        }
      }

      // Read panoramas
      for (int ip = 0; ip < segment_npanoramas; ip++) {
        GSVPanorama *panorama = new GSVPanorama();

        // Read panorama stuff
        int panorama_nimages;
        R3Point panorama_viewpoint;
        RNScalar panorama_timestamp;
        fread(&panorama_nimages, sizeof(int), 1, fp);
        fread(&(panorama_viewpoint[0]), sizeof(RNCoord), 3, fp);
        fread(&panorama_timestamp, sizeof(RNScalar), 1, fp);
        for (int j = 0; j < 22; j++) {
          fread(&dummy, sizeof(int), 1, fp);
        }

        // Read images
        for (int ii = 0; ii < panorama_nimages; ii++) {
          GSVImage *image = new GSVImage();

          // Read image stuff
          int image_tapestry_index, image_ncolumns;
          R3Point image_viewpoint0, image_viewpoint1;
          R3Quaternion image_orientation0, image_orientation1;
          RNScalar image_timestamp0, image_timestamp1;
          fread(&image_tapestry_index, sizeof(int), 1, fp);
          fread(&image_ncolumns, sizeof(int), 1, fp);
          fread(&(image_viewpoint0[0]), sizeof(RNCoord), 3, fp);
          fread(&(image_viewpoint1[0]), sizeof(RNCoord), 3, fp);
          fread(&(image_orientation0[0]), sizeof(RNCoord), 4, fp);
          fread(&(image_orientation1[0]), sizeof(RNCoord), 4, fp);
          fread(&image_timestamp0, sizeof(RNScalar), 1, fp);
          fread(&image_timestamp1, sizeof(RNScalar), 1, fp);
          for (int j = 0; j < 14; j++) {
            fread(&dummy, sizeof(int), 1, fp);
          }

          // Set image stuff
          GSVPose image_pose0(image_viewpoint0, image_orientation0);
          GSVPose image_pose1(image_viewpoint1, image_orientation1);
          image->SetPose(image_pose0, image_pose1);
          image->SetTimestamp(image_timestamp0, image_timestamp1);
          panorama->InsertImage(image);

          // Insert image into tapestry
          if (image_tapestry_index >= 0) {
            GSVTapestry *tapestry = segment->Tapestry(image_tapestry_index);
            tapestry->InsertImage(image);
          }
        }

        // Set panorama stuff
        panorama->SetViewpoint(panorama_viewpoint);
        panorama->SetTimestamp(panorama_timestamp);
        segment->InsertPanorama(panorama);
      }

      // Set segment stuff
      segment->SetBBox(segment_bbox);
      run->InsertSegment(segment);
    }

    // Set run stuff
    run->SetName(run_name);
    run->SetBBox(run_bbox);
    InsertRun(run);
  }

  // Get end of file offset
  unsigned long long end_of_file_offset = RNFileTell(fp);

  // Read points
  if (read_points) {
    if ((major_version == 0) && (minor_version == 2)) {
      if (!RNFileSeek(fp, point_file_offset, RN_FILE_SEEK_SET)) {
        RNFail("Unable to seek to point file offset\n");
        fclose(fp);
        return 0;
      }
      for (int ir = 0; ir < NRuns(); ir++) {
        GSVRun *run = Run(ir);
        for (int is = 0; is < run->NSegments(); is++) {
          GSVSegment *segment = run->Segment(is);
          for (int ia = 0; ia < segment->NScans(); ia++) {
            GSVScan *scan = segment->Scan(ia);
            for (int ie = 0; ie < scan->NScanlines(); ie++) {
              GSVScanline *scanline = scan->Scanline(ie);
              ReadScanlinePointsFromOldVersion(fp, scanline);
            }
          }
        }
      }
    }
  }

  // Seek to end of file
  RNFileSeek(fp, end_of_file_offset, RN_FILE_SEEK_SET);

  // Set scene stuff
  // SetBBox(scene_bbox);

  // Return success
  return 1;
}

// Assembly:
subq $0x818, %rsp            # imm = 0x818
movq %rdi, 0x808(%rsp)
movq %rsi, 0x800(%rsp)
movl %edx, 0x7fc(%rsp)
movq 0x808(%rsp), %rax
movq %rax, 0x178(%rsp)
movl $0x0, 0x7f8(%rsp)
leaq 0x7e0(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x295e0
leaq 0x7e0(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x1, %esi
movl $0x10, %edx
callq 0x299d0
cmpq $0x10, %rax
je 0x3d3fd
leaq 0x2298ee(%rip), %rdi    # 0x266cc7
movb $0x0, %al
callq 0x1cbff0
movq 0x800(%rsp), %rdi
callq 0x297e0
movl $0x0, 0x814(%rsp)
jmp 0x3f1c3
leaq 0x7e0(%rsp), %rdi
leaq 0x2298eb(%rip), %rsi    # 0x266cf7
callq 0x29f00
cmpl $0x0, %eax
je 0x3d441
leaq 0x2298de(%rip), %rdi    # 0x266cfb
movb $0x0, %al
callq 0x1cbff0
movq 0x800(%rsp), %rdi
callq 0x297e0
movl $0x0, 0x814(%rsp)
jmp 0x3f1c3
movq $0x0, 0x7c8(%rsp)
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
movq 0x800(%rsp), %rcx
leaq 0x7c8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
movq 0x800(%rsp), %rcx
leaq 0x7dc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
movq 0x800(%rsp), %rcx
leaq 0x7d8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
movq 0x800(%rsp), %rcx
leaq 0x7d4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
cmpl $0x0, 0x7d8(%rsp)
jne 0x3d51b
cmpl $0x1, 0x7d4(%rsp)
je 0x3d564
movl $0x0, 0x7c4(%rsp)
cmpl $0x35, 0x7c4(%rsp)
jge 0x3d562
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
movl 0x7c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c4(%rsp)
jmp 0x3d526
jmp 0x3d564
movq 0x800(%rsp), %rdi
callq 0x1caef0
movq %rax, 0x7b8(%rsp)
cmpq $0x0, 0x7c8(%rsp)
jbe 0x3d5cd
movq 0x800(%rsp), %rdi
movq 0x7c8(%rsp), %rsi
xorl %edx, %edx
callq 0x1caea0
cmpl $0x0, %eax
jne 0x3d5cb
leaq 0x22977c(%rip), %rdi    # 0x266d23
movb $0x0, %al
callq 0x1cbff0
movq 0x800(%rsp), %rdi
callq 0x297e0
movl $0x0, 0x814(%rsp)
jmp 0x3f1c3
jmp 0x3d5cd
leaq 0x778(%rsp), %rdi
callq 0x151a20
movq 0x800(%rsp), %rcx
leaq 0x7b4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d5fb
leaq 0x778(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0x170(%rsp)
jmp 0x3d614
movq 0x170(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x168(%rsp)
jmp 0x3d62d
movq 0x168(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3d64e
movl $0x0, 0x768(%rsp)
cmpl $0x79, 0x768(%rsp)
jge 0x3d6b2
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d684
jmp 0x3d686
movl 0x768(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x768(%rsp)
jmp 0x3d659
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
jmp 0x3f1b4
movl $0x0, 0x764(%rsp)
movl 0x764(%rsp), %eax
cmpl 0x7b4(%rsp), %eax
jge 0x3eec8
movl $0x90, %edi
callq 0x292e0
movq %rax, 0x160(%rsp)
jmp 0x3d6e5
movq 0x160(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x45090
jmp 0x3d6f8
movq 0x160(%rsp), %rax
movq %rax, 0x758(%rsp)
leaq 0x710(%rsp), %rdi
callq 0x151a20
jmp 0x3d717
movq 0x800(%rsp), %rcx
leaq 0x610(%rsp), %rdi
movl $0x1, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x299d0
jmp 0x3d738
movq 0x800(%rsp), %rcx
leaq 0x754(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d759
movq 0x800(%rsp), %rcx
leaq 0x750(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d77a
movq 0x800(%rsp), %rcx
leaq 0x74c(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d79b
leaq 0x710(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0x158(%rsp)
jmp 0x3d7b4
movq 0x158(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x150(%rsp)
jmp 0x3d7cd
movq 0x150(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3d7ee
movl $0x0, 0x60c(%rsp)
cmpl $0x17, 0x60c(%rsp)
jge 0x3d87d
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d824
jmp 0x3d826
movl 0x60c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60c(%rsp)
jmp 0x3d7f9
movq 0x160(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0x90, %esi
callq 0x291f0
jmp 0x3f1b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
jmp 0x3eeb6
movl $0x0, 0x608(%rsp)
movl 0x608(%rsp), %eax
cmpl 0x754(%rsp), %eax
jge 0x3dcb4
movl $0xc8, %edi
callq 0x292e0
movq %rax, 0x148(%rsp)
jmp 0x3d8b0
movq 0x148(%rsp), %rdi
callq 0x4c610
jmp 0x3d8bf
movq 0x148(%rsp), %rax
movq %rax, 0x600(%rsp)
leaq 0x570(%rsp), %rdi
callq 0x151a20
jmp 0x3d8de
movq 0x800(%rsp), %rcx
leaq 0x5fc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d8ff
movq 0x800(%rsp), %rcx
leaq 0x5f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d920
movq 0x800(%rsp), %rcx
leaq 0x5f0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d941
movq 0x800(%rsp), %rcx
leaq 0x5e8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d962
movq 0x800(%rsp), %rcx
leaq 0x5e0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d983
movq 0x800(%rsp), %rcx
leaq 0x5d8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d9a4
movq 0x800(%rsp), %rcx
leaq 0x5d0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d9c5
movq 0x800(%rsp), %rcx
leaq 0x5c8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3d9e6
movq 0x800(%rsp), %rcx
leaq 0x5c0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3da07
movq 0x800(%rsp), %rcx
leaq 0x5b8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3da28
movq 0x800(%rsp), %rcx
leaq 0x5b0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3da49
movq 0x800(%rsp), %rcx
leaq 0x5a8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3da6a
leaq 0x570(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0x140(%rsp)
jmp 0x3da83
movq 0x140(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x138(%rsp)
jmp 0x3da9c
movq 0x138(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3dabd
movl $0x0, 0x56c(%rsp)
cmpl $0xf, 0x56c(%rsp)
jge 0x3db5d
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3daf7
jmp 0x3daf9
movl 0x56c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x56c(%rsp)
jmp 0x3dac8
movq 0x148(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0xc8, %esi
callq 0x291f0
jmp 0x3eeb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
leaq 0x570(%rsp), %rdi
callq 0x386c0
jmp 0x3eeb6
movq 0x600(%rsp), %rdi
movl 0x5f8(%rsp), %esi
callq 0x4cab0
jmp 0x3db73
movq 0x600(%rsp), %rdi
movsd 0x5f0(%rsp), %xmm0
callq 0x4cb10
jmp 0x3db8b
movq 0x600(%rsp), %rdi
movsd 0x5e8(%rsp), %xmm0
callq 0x4cb30
jmp 0x3dba3
movq 0x600(%rsp), %rdi
movsd 0x5e0(%rsp), %xmm0
callq 0x4cb50
jmp 0x3dbbb
movq 0x600(%rsp), %rdi
movsd 0x5d8(%rsp), %xmm0
callq 0x4cb70
jmp 0x3dbd3
movq 0x600(%rsp), %rdi
movsd 0x5d0(%rsp), %xmm0
callq 0x4cb90
jmp 0x3dbeb
movq 0x600(%rsp), %rdi
movsd 0x5c8(%rsp), %xmm0
callq 0x4cbb0
jmp 0x3dc03
movq 0x600(%rsp), %rdi
movsd 0x5c0(%rsp), %xmm0
callq 0x4cbd0
jmp 0x3dc1b
movq 0x600(%rsp), %rdi
movsd 0x5b8(%rsp), %xmm0
callq 0x4cbf0
jmp 0x3dc33
movq 0x600(%rsp), %rdi
movsd 0x5b0(%rsp), %xmm0
callq 0x4cc10
jmp 0x3dc4b
movq 0x600(%rsp), %rdi
movsd 0x5a8(%rsp), %xmm0
callq 0x4cc30
jmp 0x3dc63
movq 0x600(%rsp), %rdi
leaq 0x570(%rsp), %rsi
callq 0x445b0
jmp 0x3dc7a
movq 0x758(%rsp), %rdi
movq 0x600(%rsp), %rsi
callq 0x45990
jmp 0x3dc91
leaq 0x570(%rsp), %rdi
callq 0x386c0
movl 0x608(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x608(%rsp)
jmp 0x3d888
movl $0x0, 0x568(%rsp)
movl 0x568(%rsp), %eax
cmpl 0x750(%rsp), %eax
jge 0x3de7c
movl $0x78, %edi
callq 0x292e0
movq %rax, 0x130(%rsp)
jmp 0x3dce7
movq 0x130(%rsp), %rdi
xorl %esi, %esi
callq 0x52880
jmp 0x3dcf8
movq 0x130(%rsp), %rax
movq %rax, 0x560(%rsp)
leaq 0x520(%rsp), %rdi
callq 0x151a20
jmp 0x3dd17
movq 0x800(%rsp), %rcx
leaq 0x55c(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3dd38
leaq 0x520(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0x128(%rsp)
jmp 0x3dd51
movq 0x128(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x120(%rsp)
jmp 0x3dd6a
movq 0x120(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3dd8b
movl $0x0, 0x51c(%rsp)
cmpl $0x19, 0x51c(%rsp)
jge 0x3de2b
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3ddc5
jmp 0x3ddc7
movl 0x51c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x51c(%rsp)
jmp 0x3dd96
movq 0x130(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0x78, %esi
callq 0x291f0
jmp 0x3eeb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
leaq 0x520(%rsp), %rdi
callq 0x386c0
jmp 0x3eeb6
movq 0x560(%rsp), %rdi
leaq 0x520(%rsp), %rsi
callq 0x44620
jmp 0x3de42
movq 0x758(%rsp), %rdi
movq 0x560(%rsp), %rsi
callq 0x45aa0
jmp 0x3de59
leaq 0x520(%rsp), %rdi
callq 0x386c0
movl 0x568(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x568(%rsp)
jmp 0x3dcbf
movl $0x0, 0x518(%rsp)
movl 0x518(%rsp), %eax
cmpl 0x74c(%rsp), %eax
jge 0x3ee4e
movl $0x98, %edi
callq 0x292e0
movq %rax, 0x118(%rsp)
jmp 0x3deaf
movq 0x118(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x47df0
jmp 0x3dec2
movq 0x118(%rsp), %rax
movq %rax, 0x510(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0x151a20
jmp 0x3dee1
movq 0x800(%rsp), %rcx
leaq 0x50c(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3df02
movq 0x800(%rsp), %rcx
leaq 0x508(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3df23
movq 0x800(%rsp), %rcx
leaq 0x504(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3df44
leaq 0x4c8(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0x110(%rsp)
jmp 0x3df5d
movq 0x110(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x108(%rsp)
jmp 0x3df76
movq 0x108(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3df97
movl $0x0, 0x4c4(%rsp)
cmpl $0x17, 0x4c4(%rsp)
jge 0x3e026
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3dfcd
jmp 0x3dfcf
movl 0x4c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c4(%rsp)
jmp 0x3dfa2
movq 0x118(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0x98, %esi
callq 0x291f0
jmp 0x3eeb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
jmp 0x3ee3f
movl $0x0, 0x4c0(%rsp)
movl 0x4c0(%rsp), %eax
cmpl 0x50c(%rsp), %eax
jge 0x3e64a
movl $0x78, %edi
callq 0x292e0
movq %rax, 0x100(%rsp)
jmp 0x3e059
movq 0x100(%rsp), %rdi
callq 0x54060
jmp 0x3e068
movq 0x100(%rsp), %rax
movq %rax, 0x4b8(%rsp)
leaq 0x478(%rsp), %rdi
callq 0x151a20
jmp 0x3e087
movq 0x800(%rsp), %rcx
leaq 0x4b4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e0a8
movq 0x800(%rsp), %rcx
leaq 0x4b0(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e0c9
leaq 0x478(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0xf8(%rsp)
jmp 0x3e0e2
movq 0xf8(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0xf0(%rsp)
jmp 0x3e0fb
movq 0xf0(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3e11c
movl $0x0, 0x474(%rsp)
cmpl $0x18, 0x474(%rsp)
jge 0x3e1ab
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e152
jmp 0x3e154
movl 0x474(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x474(%rsp)
jmp 0x3e127
movq 0x100(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0x78, %esi
callq 0x291f0
jmp 0x3ee3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
jmp 0x3e638
movl $0x0, 0x470(%rsp)
movl 0x470(%rsp), %eax
cmpl 0x4b0(%rsp), %eax
jge 0x3e524
movl $0xc8, %edi
callq 0x292e0
movq %rax, 0xe8(%rsp)
jmp 0x3e1de
movq 0xe8(%rsp), %rdi
callq 0x56820
jmp 0x3e1ed
movq 0xe8(%rsp), %rax
movq %rax, 0x468(%rsp)
leaq 0x448(%rsp), %rdi
callq 0x17fd80
jmp 0x3e20c
leaq 0x428(%rsp), %rdi
callq 0x15e2c0
jmp 0x3e21b
leaq 0x3e8(%rsp), %rdi
callq 0x151a20
jmp 0x3e22a
movq 0x800(%rsp), %rcx
leaq 0x464(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e24b
leaq 0x448(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0xe0(%rsp)
jmp 0x3e264
movq 0xe0(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x3, %edx
callq 0x299d0
jmp 0x3e285
leaq 0x428(%rsp), %rdi
xorl %esi, %esi
callq 0x44650
movq %rax, 0xd8(%rsp)
jmp 0x3e29e
movq 0xd8(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x4, %edx
callq 0x299d0
jmp 0x3e2bf
movq 0x800(%rsp), %rcx
leaq 0x420(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e2e0
leaq 0x3e8(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0xd0(%rsp)
jmp 0x3e2f9
movq 0xd0(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0xc8(%rsp)
jmp 0x3e312
movq 0xc8(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3e333
movq 0x800(%rsp), %rcx
leaq 0x3e0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e354
movl $0x0, 0x3dc(%rsp)
cmpl $0xf, 0x3dc(%rsp)
jge 0x3e3e3
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e38a
jmp 0x3e38c
movl 0x3dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3dc(%rsp)
jmp 0x3e35f
movq 0xe8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0xc8, %esi
callq 0x291f0
jmp 0x3e638
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
jmp 0x3e512
cmpl $0x0, 0x7d8(%rsp)
jne 0x3e418
cmpl $0x1, 0x7d4(%rsp)
jne 0x3e418
movq 0x178(%rsp), %rdi
movq 0x800(%rsp), %rsi
movq 0x468(%rsp), %rdx
callq 0x440f0
jmp 0x3e416
jmp 0x3e418
leaq 0x398(%rsp), %rdi
leaq 0x448(%rsp), %rsi
leaq 0x428(%rsp), %rdx
callq 0x5e450
jmp 0x3e437
movq 0x468(%rsp), %rdi
leaq 0x398(%rsp), %rsi
callq 0x57740
jmp 0x3e44e
movq 0x468(%rsp), %rdi
movsd 0x420(%rsp), %xmm0
callq 0x44670
jmp 0x3e466
movq 0x468(%rsp), %rdi
leaq 0x3e8(%rsp), %rsi
callq 0x446b0
jmp 0x3e47d
movq 0x468(%rsp), %rdi
movl 0x464(%rsp), %esi
callq 0x446e0
jmp 0x3e493
movq 0x468(%rsp), %rdi
movq 0x3e0(%rsp), %rsi
callq 0x44700
jmp 0x3e4aa
movq 0x4b8(%rsp), %rdi
movq 0x468(%rsp), %rsi
callq 0x55a00
jmp 0x3e4c1
leaq 0x398(%rsp), %rdi
callq 0x5e680
leaq 0x3e8(%rsp), %rdi
callq 0x386c0
movl 0x470(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x470(%rsp)
jmp 0x3e1b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
leaq 0x398(%rsp), %rdi
callq 0x5e680
leaq 0x3e8(%rsp), %rdi
callq 0x386c0
jmp 0x3e638
movq 0x4b8(%rsp), %rdi
leaq 0x478(%rsp), %rsi
callq 0x44720
jmp 0x3e53b
movl $0x80, %edi
callq 0x292e0
movq %rax, 0xc0(%rsp)
jmp 0x3e54f
movq 0xc0(%rsp), %rdi
callq 0x52fc0
jmp 0x3e55e
movq 0xc0(%rsp), %rax
movq %rax, 0x390(%rsp)
movq 0x390(%rsp), %rdi
movq 0x4b8(%rsp), %rsi
callq 0x53950
jmp 0x3e585
movq 0x510(%rsp), %rdi
movq 0x390(%rsp), %rsi
callq 0x48e60
jmp 0x3e59c
cmpl $0x0, 0x4b4(%rsp)
jl 0x3e615
movq 0x758(%rsp), %rdi
movl 0x4b4(%rsp), %esi
callq 0x44780
movq %rax, 0xb8(%rsp)
jmp 0x3e5c4
movq 0xb8(%rsp), %rax
movq %rax, 0x388(%rsp)
movq 0x388(%rsp), %rdi
movq 0x390(%rsp), %rsi
callq 0x52bf0
jmp 0x3e5eb
jmp 0x3e615
movq 0xc0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0x80, %esi
callq 0x291f0
jmp 0x3e638
leaq 0x478(%rsp), %rdi
callq 0x386c0
movl 0x4c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c0(%rsp)
jmp 0x3e031
leaq 0x478(%rsp), %rdi
callq 0x386c0
jmp 0x3ee3f
movl $0x0, 0x384(%rsp)
movl 0x384(%rsp), %eax
cmpl 0x508(%rsp), %eax
jge 0x3e882
movl $0x78, %edi
callq 0x292e0
movq %rax, 0xb0(%rsp)
jmp 0x3e67d
movq 0xb0(%rsp), %rdi
callq 0x519f0
jmp 0x3e68c
movq 0xb0(%rsp), %rax
movq %rax, 0x378(%rsp)
leaq 0x338(%rsp), %rdi
callq 0x151a20
jmp 0x3e6ab
movq 0x800(%rsp), %rcx
leaq 0x374(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e6cc
movq 0x800(%rsp), %rcx
leaq 0x370(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e6ed
leaq 0x338(%rsp), %rdi
xorl %esi, %esi
callq 0x444f0
movq %rax, 0xa8(%rsp)
jmp 0x3e706
movq 0xa8(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0xa0(%rsp)
jmp 0x3e71f
movq 0xa0(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x299d0
jmp 0x3e740
movl $0x0, 0x334(%rsp)
cmpl $0x18, 0x334(%rsp)
jge 0x3e7e0
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e77a
jmp 0x3e77c
movl 0x334(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x334(%rsp)
jmp 0x3e74b
movq 0xb0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0x78, %esi
callq 0x291f0
jmp 0x3ee3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
leaq 0x338(%rsp), %rdi
callq 0x386c0
jmp 0x3ee3f
movq 0x378(%rsp), %rdi
leaq 0x338(%rsp), %rsi
callq 0x447b0
jmp 0x3e7f7
movq 0x510(%rsp), %rdi
movq 0x378(%rsp), %rsi
callq 0x49040
jmp 0x3e80e
cmpl $0x0, 0x374(%rsp)
jl 0x3e85f
movq 0x758(%rsp), %rdi
movl 0x374(%rsp), %esi
callq 0x447e0
movq %rax, 0x98(%rsp)
jmp 0x3e836
movq 0x98(%rsp), %rax
movq %rax, 0x328(%rsp)
movq 0x328(%rsp), %rdi
movq 0x378(%rsp), %rsi
callq 0x4c980
jmp 0x3e85d
jmp 0x3e85f
leaq 0x338(%rsp), %rdi
callq 0x386c0
movl 0x384(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x384(%rsp)
jmp 0x3e655
movl $0x0, 0x324(%rsp)
movl 0x324(%rsp), %eax
cmpl 0x504(%rsp), %eax
jge 0x3edee
movl $0x88, %edi
callq 0x292e0
movq %rax, 0x90(%rsp)
jmp 0x3e8b5
movq 0x90(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4e450
jmp 0x3e8c8
movq 0x90(%rsp), %rax
movq %rax, 0x318(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0x17fd80
jmp 0x3e8e7
movq 0x800(%rsp), %rcx
leaq 0x314(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e908
leaq 0x2f8(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x88(%rsp)
jmp 0x3e921
movq 0x88(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x3, %edx
callq 0x299d0
jmp 0x3e942
movq 0x800(%rsp), %rcx
leaq 0x2f0(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e963
movl $0x0, 0x2ec(%rsp)
cmpl $0x16, 0x2ec(%rsp)
jge 0x3e9d9
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3e999
jmp 0x3e99b
movl 0x2ec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2ec(%rsp)
jmp 0x3e96e
movq 0x90(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0x88, %esi
callq 0x291f0
jmp 0x3ee3f
movl $0x0, 0x2e8(%rsp)
movl 0x2e8(%rsp), %eax
cmpl 0x314(%rsp), %eax
jge 0x3ed90
movl $0xc8, %edi
callq 0x292e0
movq %rax, 0x80(%rsp)
jmp 0x3ea0c
movq 0x80(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4f450
jmp 0x3ea1f
movq 0x80(%rsp), %rax
movq %rax, 0x2e0(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x17fd80
jmp 0x3ea3e
leaq 0x2a8(%rsp), %rdi
callq 0x17fd80
jmp 0x3ea4d
leaq 0x288(%rsp), %rdi
callq 0x15e2c0
jmp 0x3ea5c
leaq 0x268(%rsp), %rdi
callq 0x15e2c0
jmp 0x3ea6b
movq 0x800(%rsp), %rcx
leaq 0x2dc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3ea8c
movq 0x800(%rsp), %rcx
leaq 0x2d8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3eaad
leaq 0x2c0(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x78(%rsp)
jmp 0x3eac3
movq 0x78(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x3, %edx
callq 0x299d0
jmp 0x3eae1
leaq 0x2a8(%rsp), %rdi
xorl %esi, %esi
callq 0x44530
movq %rax, 0x70(%rsp)
jmp 0x3eaf7
movq 0x70(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x3, %edx
callq 0x299d0
jmp 0x3eb15
leaq 0x288(%rsp), %rdi
xorl %esi, %esi
callq 0x44650
movq %rax, 0x68(%rsp)
jmp 0x3eb2b
movq 0x68(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x4, %edx
callq 0x299d0
jmp 0x3eb49
leaq 0x268(%rsp), %rdi
xorl %esi, %esi
callq 0x44650
movq %rax, 0x60(%rsp)
jmp 0x3eb5f
movq 0x60(%rsp), %rdi
movq 0x800(%rsp), %rcx
movl $0x8, %esi
movl $0x4, %edx
callq 0x299d0
jmp 0x3eb7d
movq 0x800(%rsp), %rcx
leaq 0x260(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3eb9e
movq 0x800(%rsp), %rcx
leaq 0x258(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3ebbf
movl $0x0, 0x254(%rsp)
cmpl $0xe, 0x254(%rsp)
jge 0x3ec35
movq 0x800(%rsp), %rcx
leaq 0x7f8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x299d0
jmp 0x3ebf5
jmp 0x3ebf7
movl 0x254(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x254(%rsp)
jmp 0x3ebca
movq 0x80(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
movl $0xc8, %esi
callq 0x291f0
jmp 0x3ee3f
leaq 0x210(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
leaq 0x288(%rsp), %rdx
callq 0x5e450
jmp 0x3ec54
leaq 0x1d0(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
leaq 0x268(%rsp), %rdx
callq 0x5e450
jmp 0x3ec73
movq 0x2e0(%rsp), %rdi
leaq 0x210(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
callq 0x50640
jmp 0x3ec92
movq 0x2e0(%rsp), %rdi
movsd 0x260(%rsp), %xmm0
movsd 0x258(%rsp), %xmm1
callq 0x506a0
jmp 0x3ecb3
movq 0x318(%rsp), %rdi
movq 0x2e0(%rsp), %rsi
callq 0x4e970
jmp 0x3ecca
cmpl $0x0, 0x2dc(%rsp)
jl 0x3ed4e
movq 0x510(%rsp), %rdi
movl 0x2dc(%rsp), %esi
callq 0x44810
movq %rax, 0x58(%rsp)
jmp 0x3ecef
movq 0x58(%rsp), %rax
movq %rax, 0x1c8(%rsp)
movq 0x1c8(%rsp), %rdi
movq 0x2e0(%rsp), %rsi
callq 0x523c0
jmp 0x3ed13
jmp 0x3ed4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
jmp 0x3ed7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x770(%rsp)
movl %eax, 0x76c(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0x5e680
jmp 0x3ed7e
leaq 0x1d0(%rsp), %rdi
callq 0x5e680
leaq 0x210(%rsp), %rdi
callq 0x5e680
movl 0x2e8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2e8(%rsp)
jmp 0x3e9e4
leaq 0x210(%rsp), %rdi
callq 0x5e680
jmp 0x3ee3f
movq 0x318(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0x44840
jmp 0x3eda7
movq 0x318(%rsp), %rdi
movsd 0x2f0(%rsp), %xmm0
callq 0x44870
jmp 0x3edbf
movq 0x510(%rsp), %rdi
movq 0x318(%rsp), %rsi
callq 0x49150
jmp 0x3edd6
jmp 0x3edd8
movl 0x324(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x324(%rsp)
jmp 0x3e88d
movq 0x510(%rsp), %rdi
leaq 0x4c8(%rsp), %rsi
callq 0x44890
jmp 0x3ee05
movq 0x758(%rsp), %rdi
movq 0x510(%rsp), %rsi
callq 0x457b0
jmp 0x3ee1c
leaq 0x4c8(%rsp), %rdi
callq 0x386c0
movl 0x518(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x518(%rsp)
jmp 0x3de87
leaq 0x4c8(%rsp), %rdi
callq 0x386c0
jmp 0x3eeb6
movq 0x758(%rsp), %rdi
leaq 0x610(%rsp), %rsi
callq 0x45bb0
jmp 0x3ee65
movq 0x758(%rsp), %rdi
leaq 0x710(%rsp), %rsi
callq 0x448c0
jmp 0x3ee7c
movq 0x178(%rsp), %rdi
movq 0x758(%rsp), %rsi
callq 0x3b700
jmp 0x3ee93
leaq 0x710(%rsp), %rdi
callq 0x386c0
movl 0x764(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x764(%rsp)
jmp 0x3d6bd
leaq 0x710(%rsp), %rdi
callq 0x386c0
jmp 0x3f1b4
movq 0x800(%rsp), %rdi
callq 0x1caef0
movq %rax, 0x50(%rsp)
jmp 0x3eedc
movq 0x50(%rsp), %rax
movq %rax, 0x1c0(%rsp)
cmpl $0x0, 0x7fc(%rsp)
je 0x3f176
cmpl $0x0, 0x7d8(%rsp)
jne 0x3f174
cmpl $0x2, 0x7d4(%rsp)
jne 0x3f174
movq 0x800(%rsp), %rdi
movq 0x7b8(%rsp), %rsi
xorl %edx, %edx
callq 0x1caea0
movl %eax, 0x4c(%rsp)
jmp 0x3ef30
movl 0x4c(%rsp), %eax
cmpl $0x0, %eax
jne 0x3ef73
leaq 0x227e08(%rip), %rdi    # 0x266d48
xorl %eax, %eax
callq 0x1cbff0
jmp 0x3ef49
movq 0x800(%rsp), %rdi
callq 0x297e0
jmp 0x3ef58
movl $0x0, 0x814(%rsp)
movl $0x1, 0x1bc(%rsp)
jmp 0x3f1a5
movl $0x0, 0x1b8(%rsp)
movq 0x178(%rsp), %rdi
movl 0x1b8(%rsp), %eax
movl %eax, 0x44(%rsp)
callq 0x39f90
movl %eax, 0x48(%rsp)
jmp 0x3ef9c
movl 0x44(%rsp), %eax
movl 0x48(%rsp), %ecx
cmpl %ecx, %eax
jge 0x3f172
movq 0x178(%rsp), %rdi
movl 0x1b8(%rsp), %esi
callq 0x39fb0
movq %rax, 0x38(%rsp)
jmp 0x3efc7
movq 0x38(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movl $0x0, 0x1ac(%rsp)
movl 0x1ac(%rsp), %eax
movl %eax, 0x30(%rsp)
movq 0x1b0(%rsp), %rdi
callq 0x39fe0
movl %eax, 0x34(%rsp)
jmp 0x3effd
movl 0x30(%rsp), %eax
movl 0x34(%rsp), %ecx
cmpl %ecx, %eax
jge 0x3f15a
movq 0x1b0(%rsp), %rdi
movl 0x1ac(%rsp), %esi
callq 0x3a000
movq %rax, 0x28(%rsp)
jmp 0x3f028
movq 0x28(%rsp), %rax
movq %rax, 0x1a0(%rsp)
movl $0x0, 0x19c(%rsp)
movl 0x19c(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x1a0(%rsp), %rdi
callq 0x48350
movl %eax, 0x24(%rsp)
jmp 0x3f05e
movl 0x20(%rsp), %eax
movl 0x24(%rsp), %ecx
cmpl %ecx, %eax
jge 0x3f142
movq 0x1a0(%rsp), %rdi
movl 0x19c(%rsp), %esi
callq 0x483d0
movq %rax, 0x18(%rsp)
jmp 0x3f089
movq 0x18(%rsp), %rax
movq %rax, 0x190(%rsp)
movl $0x0, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x190(%rsp), %rdi
callq 0x3a0d0
movl %eax, 0x14(%rsp)
jmp 0x3f0bf
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jge 0x3f12a
movq 0x190(%rsp), %rdi
movl 0x18c(%rsp), %esi
callq 0x3a0f0
movq %rax, 0x8(%rsp)
jmp 0x3f0e6
movq 0x178(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x180(%rsp)
movq 0x800(%rsp), %rsi
movq 0x180(%rsp), %rdx
callq 0x440f0
jmp 0x3f112
jmp 0x3f114
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x3f0a1
jmp 0x3f12c
movl 0x19c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x19c(%rsp)
jmp 0x3f040
jmp 0x3f144
movl 0x1ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1ac(%rsp)
jmp 0x3efdf
jmp 0x3f15c
movl 0x1b8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1b8(%rsp)
jmp 0x3ef7e
jmp 0x3f174
jmp 0x3f176
movq 0x800(%rsp), %rdi
movq 0x1c0(%rsp), %rsi
xorl %edx, %edx
callq 0x1caea0
jmp 0x3f18f
movl $0x1, 0x814(%rsp)
movl $0x1, 0x1bc(%rsp)
leaq 0x778(%rsp), %rdi
callq 0x386c0
jmp 0x3f1c3
leaq 0x778(%rsp), %rdi
callq 0x386c0
jmp 0x3f1d2
movl 0x814(%rsp), %eax
addq $0x818, %rsp            # imm = 0x818
retq
movq 0x770(%rsp), %rdi
callq 0x29c10
nop