// File: tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadConfigurationStream(_IO_FILE*, int)
int RGBDConfiguration::
ReadConfigurationStream(FILE *fp, int read_every_kth_image)
{
  // Initialize stuff
  int image_count = 0;
  R3Matrix intrinsics_matrix = R3identity_matrix;
  int image_width = 0;
  int image_height = 0;
  
  // Parse file
  char buffer[4096];
  int line_number = 0;
  while (fgets(buffer, 4096, fp)) {
    char cmd[1024];
    line_number++;
    if (sscanf(buffer, "%s", cmd) != (unsigned int) 1) continue;
    if (cmd[0] == '#') continue;

    // Check cmd
    if (!strcmp(cmd, "dataset")) {
      // Parse dataset format
      char name[1024] = { '\0' };
      if (sscanf(buffer, "%s%s", cmd, name) != (unsigned int) 2) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Set dataset format
      SetDatasetFormat(name);
    }
    else if (!strcmp(cmd, "sequence") || !strcmp(cmd, "name")) {
      // Parse name
      char name[1024] = { '\0' };
      if (sscanf(buffer, "%s%s", cmd, name) != (unsigned int) 2) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Set dataset format
      SetName(name);
    }
    else if (!strcmp(cmd, "depth_resolution")) {
      // Parse dimensions
      if (sscanf(buffer, "%s%d%d", cmd, &image_width, &image_height) != (unsigned int) 3) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }
    }
    else if (!strcmp(cmd, "color_resolution")) {
      // Parse dimensions
      if ((image_width == 0) || (image_height == 0)) {
        if (sscanf(buffer, "%s%d%d", cmd, &image_width, &image_height) != (unsigned int) 3) {
          RNFail("Error parsing line %d of configuration file\n", line_number);
          return 0;
        }
      }
    }
    else if (!strcmp(cmd, "depth_directory") || !strcmp(cmd, "color_directory") ||
             !strcmp(cmd, "category_directory") || !strcmp(cmd, "instance_directory") ||
             !strcmp(cmd, "texture_directory") || !strcmp(cmd, "image_directory")) {
      // Parse directory name
      char dirname[1024];
      if (sscanf(buffer, "%s%s", cmd, dirname) != (unsigned int) 2) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Assign directory name (this leaks memory, but who cares)
      if (!strcmp(cmd, "color_directory")) SetColorDirectory(dirname);
      else if (!strcmp(cmd, "depth_directory")) SetDepthDirectory(dirname);
      else if (!strcmp(cmd, "category_directory")) SetCategoryDirectory(dirname);
      else if (!strcmp(cmd, "instance_directory")) SetInstanceDirectory(dirname);
      else if (!strcmp(cmd, "image_directory")) SetColorDirectory(dirname);
      else if (!strcmp(cmd, "texture_directory")) SetTextureDirectory(dirname);
    }
    else if (!strcmp(cmd, "intrinsics") || !strcmp(cmd, "depth_intrinsics")) { // || !strcmp(cmd, "color_intrinsics")) {
      // Parse intrinsics filename
      char intrinsics_filename[2048];
      if (sscanf(buffer, "%s%s", cmd, intrinsics_filename) != (unsigned int) 2) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Open intrinsics file
      FILE *intrinsics_fp = fopen(intrinsics_filename, "r");
      if (!intrinsics_fp) {
        RNFail("Unable to open intrinsics file %s\n", intrinsics_filename);
        return 0;
      }

      // Read intrinsics file
      if (dataset_format && !strcmp(dataset_format, "matterport")) {
        // Read matterport intrinsics
        double width, height, fx, fy, cx, cy, k1, k2, p1, p2, k3;
        if (fscanf(intrinsics_fp, "%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", &width, &height,
          &fx, &fy, &cx, &cy, &k1, &k2, &p1, &p2, &k3) != (unsigned int) 11) {
          RNFail("Unable to read Matterport intrinsics matrix.\n");
          return 0;
        }

        // Assign intrinsics matrix
        intrinsics_matrix = R3Matrix(fx, 0, cx,   0, fy, cy,   0, 0, 1);
      }
      else {
        // Read matrix
        RNScalar m[9];
        if (fscanf(intrinsics_fp, "%lf%lf%lf%lf%lf%lf%lf%lf%lf", &m[0], &m[1], &m[2], &m[3], &m[4], &m[5], &m[6], &m[7], &m[8]) != (unsigned int) 9) {
          RNFail("Unable to read intrinsics file %s\n", intrinsics_filename);
          return 0;
        }

        // Assign intrinsics matrix
        intrinsics_matrix = R3Matrix(m);
      }

      // Close intrinsics file
      fclose(intrinsics_fp);
    }
    else if (!strcmp(cmd, "intrinsics_matrix") || !strcmp(cmd, "depth_intrinsics_matrix")) { // || !strcmp(cmd, "color_intrinsics_matrix")) {
      // Parse matrix
      double m[9];
      if (sscanf(buffer, "%s%lf%lf%lf%lf%lf%lf%lf%lf%lf", cmd, &m[0], &m[1], &m[2], &m[3], &m[4], &m[5], &m[6], &m[7], &m[8]) != (unsigned int) 10) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Assign intrinsics matrix
      intrinsics_matrix = R3Matrix(m);
    }
    else if (!strcmp(cmd, "scan") || !strcmp(cmd, "image")) {
      // Update/check image count
      if ((read_every_kth_image > 1) && ((++image_count % read_every_kth_image) != 1)) continue;

      // Check intrinsics matrix
      if (intrinsics_matrix.IsIdentity()) {
        RNFail("Unable to process scan without prior setting of intrinsics matrix in configuration file\n");
        return 0;
      }
      
      // Parse image names and alignment transformation
      RNScalar m[16];
      char depth_filename[2048], color_filename[2048];
      if (sscanf(buffer, "%s%s%s%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", cmd, 
         depth_filename, color_filename,
         &m[0], &m[1], &m[2], &m[3], &m[4], &m[5], &m[6], &m[7], 
         &m[8], &m[9], &m[10], &m[11], &m[12], &m[13], &m[14], &m[15]) != (unsigned int) 19) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Create RGBD image
      // RGBDImage *image = new RGBDImage(color_filename, depth_filename, intrinsics_matrix, R4Matrix(m), image_width, image_height);
      RGBDImage *image = AllocateImage();
      image->SetNPixels(image_width, image_height);
      image->SetColorFilename(color_filename);
      image->SetDepthFilename(depth_filename);
      image->SetIntrinsics(intrinsics_matrix);
      image->SetCameraToWorld(R3Affine(R4Matrix(m), 0));
      InsertImage(image);
    }
    else if (!strcmp(cmd, "labeled_image")) {
      // Update/check image count
      if ((read_every_kth_image > 1) && ((++image_count % read_every_kth_image) != 1)) continue;

      // Check intrinsics matrix
      if (intrinsics_matrix.IsIdentity()) {
        RNFail("Unable to process scan without prior setting of intrinsics matrix in configuration file\n");
        return 0;
      }
      
      // Parse image names and alignment transformation
      RNScalar m[16];
      char depth_filename[2048], color_filename[2048], category_filename[2048], instance_filename[2048];
      if (sscanf(buffer, "%s%s%s%s%s%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", cmd, 
         depth_filename, color_filename, category_filename, instance_filename,
         &m[0], &m[1], &m[2], &m[3], &m[4], &m[5], &m[6], &m[7], 
         &m[8], &m[9], &m[10], &m[11], &m[12], &m[13], &m[14], &m[15]) != (unsigned int) 21) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Create RGBD image
      // RGBDImage *image = new RGBDImage(color_filename, depth_filename, intrinsics_matrix, R4Matrix(m), image_width, image_height);
      RGBDImage *image = AllocateImage();
      image->SetNPixels(image_width, image_height);
      image->SetColorFilename(color_filename);
      image->SetDepthFilename(depth_filename);
      image->SetCategoryFilename(category_filename);
      image->SetInstanceFilename(instance_filename);
      image->SetIntrinsics(intrinsics_matrix);
      image->SetCameraToWorld(R3Affine(R4Matrix(m), 0));
      InsertImage(image);
    }
    else if (!strcmp(cmd, "frame")) {
      // Update/check image count
      if ((read_every_kth_image > 1) && ((++image_count % read_every_kth_image) != 1)) continue;

      // Check intrinsics matrix
      if (intrinsics_matrix.IsIdentity()) {
        RNFail("Unable to process scan without prior setting of intrinsics matrix in configuration file\n");
        return 0;
      }
      
      // Parse image names and alignment transformation
      RNScalar m[16];
      double depth_timestamp, color_timestamp;
      char depth_filename[2048], color_filename[2048];
      if (sscanf(buffer, "%s%s%lf%s%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", cmd, 
         depth_filename, &depth_timestamp, color_filename, &color_timestamp,
         &m[0], &m[1], &m[2], &m[3], &m[4], &m[5], &m[6], &m[7], 
         &m[8], &m[9], &m[10], &m[11], &m[12], &m[13], &m[14], &m[15]) != (unsigned int) 21) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Create RGBD image
      // RGBDImage *image = new RGBDImage(color_filename, depth_filename, intrinsics_matrix, R4Matrix(m), image_width, image_height);
      RGBDImage *image = AllocateImage();
      image->SetNPixels(image_width, image_height);
      image->SetColorFilename(color_filename);
      image->SetDepthFilename(depth_filename);
      image->SetIntrinsics(intrinsics_matrix);
      image->SetCameraToWorld(R3Affine(R4Matrix(m), 0));
      InsertImage(image);
    }
    else if (!strcmp(cmd, "rectangle")) {
      // Parse surface
      char texture_filename[2048];
      RNScalar pixel_spacing, c[3], n[3], u[3], r[3];
      if (sscanf(buffer, "%s%s%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", cmd, texture_filename, &pixel_spacing, 
        &c[0], &c[1], &c[2], &n[0], &n[1], &n[2], &u[0], &u[1], &u[2], &r[0], &r[1], &r[2]) != (unsigned int) 15) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Create RGBD surface
      R3Point center(c);
      R3Vector axis1(u); axis1.Normalize();
      R3Vector normal(n); normal.Normalize();
      R3Vector axis0 = axis1 % normal; axis0.Normalize();
      // R3Mesh *mesh = new R3Mesh();
      // R3MeshVertex *v00 = mesh->CreateVertex(center - r[0]*axis0 - r[1]*axis1, normal, RNblack_rgb, R2Point(0,0));
      // R3MeshVertex *v10 = mesh->CreateVertex(center + r[0]*axis0 - r[1]*axis1, normal, RNblack_rgb, R2Point(r[0],0));
      // R3MeshVertex *v01 = mesh->CreateVertex(center - r[0]*axis0 + r[1]*axis1, normal, RNblack_rgb, R2Point(0,r[1]));
      // R3MeshVertex *v11 = mesh->CreateVertex(center + r[0]*axis0 + r[1]*axis1, normal, RNblack_rgb, R2Point(r[0],r[1]));
      // mesh->CreateFace(v00, v10, v11);
      // mesh->CreateFace(v00, v11, v01);
      // RGBDSurface *surface = new RGBDSurface(texture_filename, mesh, pixel_spacing);
      R3Rectangle *rectangle = new R3Rectangle(center, axis0, axis1, r[0], r[1]);
      RGBDSurface *surface = new RGBDSurface(texture_filename, rectangle, pixel_spacing);
      surface->thickness = r[2];
      InsertSurface(surface);
    }
    else if (!strcmp(cmd, "mesh")) {
      // Parse surface
      char texture_filename[2048], mesh_filename[2048];
      RNScalar pixel_spacing;
      if (sscanf(buffer, "%s%s%s%lf", cmd, texture_filename, mesh_filename, &pixel_spacing) != (unsigned int) 4) {
        RNFail("Error parsing line %d of configuration file\n", line_number);
        return 0;
      }

      // Read mesh
      R3Mesh *mesh = new R3Mesh();
      if (!mesh->ReadFile(mesh_filename)) {
        RNFail("Unable to read mesh file %s at line %d of configuration file\n", mesh_filename, line_number);
        return 0;
      }

      // Create surface      
      RGBDSurface *surface = new RGBDSurface(texture_filename, mesh, pixel_spacing);
      surface->SetMeshFilename(mesh_filename);
      InsertSurface(surface);
    }
  }

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8bb8, %rsp           # imm = 0x8BB8
movq %rdi, 0x8ba8(%rsp)
movq %rsi, 0x8ba0(%rsp)
movl %edx, 0x8b9c(%rsp)
movq 0x8ba8(%rsp), %rax
movq %rax, 0x1d0(%rsp)
movl $0x0, 0x8b98(%rsp)
leaq 0x8b50(%rsp), %rdi
leaq 0x1985f6(%rip), %rsi    # 0x1b4598
callq 0xcc3e0
movl $0x0, 0x8b4c(%rsp)
movl $0x0, 0x8b48(%rsp)
movl $0x0, 0x7b3c(%rsp)
leaq 0x7b40(%rsp), %rdi
movq 0x8ba0(%rsp), %rdx
movl $0x1000, %esi           # imm = 0x1000
callq 0x12b10
cmpq $0x0, %rax
je 0x1d922
movl 0x7b3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7b3c(%rsp)
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x14d0f7(%rip), %rsi    # 0x16910b
movb $0x0, %al
callq 0x126a0
cmpl $0x1, %eax
je 0x1c022
jmp 0x1bfc8
movsbl 0x7730(%rsp), %eax
cmpl $0x23, %eax
jne 0x1c031
jmp 0x1bfc8
leaq 0x7730(%rsp), %rdi
leaq 0x14a62d(%rip), %rsi    # 0x16666d
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c0c9
leaq 0x7330(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x12370
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x7330(%rsp), %rcx
leaq 0x14b5ad(%rip), %rsi    # 0x16762a
movb $0x0, %al
callq 0x126a0
cmpl $0x2, %eax
je 0x1c0ae
movl 0x7b3c(%rsp), %esi
leaq 0x14a5de(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movq 0x1d0(%rsp), %rdi
leaq 0x7330(%rsp), %rsi
movq (%rdi), %rax
callq *0x68(%rax)
jmp 0x1d91d
leaq 0x7730(%rsp), %rdi
leaq 0x14a5ca(%rip), %rsi    # 0x1666a2
callq 0x12a00
cmpl $0x0, %eax
je 0x1c0fb
leaq 0x7730(%rsp), %rdi
leaq 0x14e22c(%rip), %rsi    # 0x16a31d
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c17a
leaq 0x6f30(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x12370
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x6f30(%rsp), %rcx
leaq 0x14b4fc(%rip), %rsi    # 0x16762a
movb $0x0, %al
callq 0x126a0
cmpl $0x2, %eax
je 0x1c15f
movl 0x7b3c(%rsp), %esi
leaq 0x14a52d(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movq 0x1d0(%rsp), %rdi
leaq 0x6f30(%rsp), %rsi
movq (%rdi), %rax
callq *0x38(%rax)
jmp 0x1d91b
leaq 0x7730(%rsp), %rdi
leaq 0x14a522(%rip), %rsi    # 0x1666ab
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c1f0
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x14a512(%rip), %rsi    # 0x1666bc
leaq 0x8b4c(%rsp), %rcx
leaq 0x8b48(%rsp), %r8
movb $0x0, %al
callq 0x126a0
cmpl $0x3, %eax
je 0x1c1eb
movl 0x7b3c(%rsp), %esi
leaq 0x14a4a1(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
jmp 0x1d919
leaq 0x7730(%rsp), %rdi
leaq 0x14a4c4(%rip), %rsi    # 0x1666c3
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c27c
cmpl $0x0, 0x8b4c(%rsp)
je 0x1c21d
cmpl $0x0, 0x8b48(%rsp)
jne 0x1c277
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x14a488(%rip), %rsi    # 0x1666bc
leaq 0x8b4c(%rsp), %rcx
leaq 0x8b48(%rsp), %r8
movb $0x0, %al
callq 0x126a0
cmpl $0x3, %eax
je 0x1c275
movl 0x7b3c(%rsp), %esi
leaq 0x14a417(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
jmp 0x1c277
jmp 0x1d917
leaq 0x7730(%rsp), %rdi
leaq 0x149de6(%rip), %rsi    # 0x166071
callq 0x12a00
cmpl $0x0, %eax
je 0x1c31a
leaq 0x7730(%rsp), %rdi
leaq 0x149de0(%rip), %rsi    # 0x166088
callq 0x12a00
cmpl $0x0, %eax
je 0x1c31a
leaq 0x7730(%rsp), %rdi
leaq 0x14a413(%rip), %rsi    # 0x1666d4
callq 0x12a00
cmpl $0x0, %eax
je 0x1c31a
leaq 0x7730(%rsp), %rdi
leaq 0x14a40d(%rip), %rsi    # 0x1666e7
callq 0x12a00
cmpl $0x0, %eax
je 0x1c31a
leaq 0x7730(%rsp), %rdi
leaq 0x149dac(%rip), %rsi    # 0x16609f
callq 0x12a00
cmpl $0x0, %eax
je 0x1c31a
leaq 0x7730(%rsp), %rdi
leaq 0x14a3ee(%rip), %rsi    # 0x1666fa
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c4a6
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x6b30(%rsp), %rcx
leaq 0x14b2f1(%rip), %rsi    # 0x16762a
movb $0x0, %al
callq 0x126a0
cmpl $0x2, %eax
je 0x1c36a
movl 0x7b3c(%rsp), %esi
leaq 0x14a322(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x7730(%rsp), %rdi
leaq 0x149d0f(%rip), %rsi    # 0x166088
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c39e
movq 0x1d0(%rsp), %rdi
leaq 0x6b30(%rsp), %rsi
movq (%rdi), %rax
callq *0x40(%rax)
jmp 0x1c4a1
leaq 0x7730(%rsp), %rdi
leaq 0x149cc4(%rip), %rsi    # 0x166071
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c3d2
movq 0x1d0(%rsp), %rdi
leaq 0x6b30(%rsp), %rsi
movq (%rdi), %rax
callq *0x48(%rax)
jmp 0x1c49f
leaq 0x7730(%rsp), %rdi
leaq 0x14a2f3(%rip), %rsi    # 0x1666d4
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c406
movq 0x1d0(%rsp), %rdi
leaq 0x6b30(%rsp), %rsi
movq (%rdi), %rax
callq *0x50(%rax)
jmp 0x1c49d
leaq 0x7730(%rsp), %rdi
leaq 0x14a2d2(%rip), %rsi    # 0x1666e7
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c437
movq 0x1d0(%rsp), %rdi
leaq 0x6b30(%rsp), %rsi
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x1c49b
leaq 0x7730(%rsp), %rdi
leaq 0x14a2b4(%rip), %rsi    # 0x1666fa
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c468
movq 0x1d0(%rsp), %rdi
leaq 0x6b30(%rsp), %rsi
movq (%rdi), %rax
callq *0x40(%rax)
jmp 0x1c499
leaq 0x7730(%rsp), %rdi
leaq 0x149c28(%rip), %rsi    # 0x16609f
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c497
movq 0x1d0(%rsp), %rdi
leaq 0x6b30(%rsp), %rsi
movq (%rdi), %rax
callq *0x60(%rax)
jmp 0x1c499
jmp 0x1c49b
jmp 0x1c49d
jmp 0x1c49f
jmp 0x1c4a1
jmp 0x1d915
leaq 0x7730(%rsp), %rdi
leaq 0x14a25b(%rip), %rsi    # 0x166710
callq 0x12a00
cmpl $0x0, %eax
je 0x1c4dc
leaq 0x7730(%rsp), %rdi
leaq 0x14a23c(%rip), %rsi    # 0x16670a
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c7c3
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x6330(%rsp), %rcx
leaq 0x14b12f(%rip), %rsi    # 0x16762a
movb $0x0, %al
callq 0x126a0
cmpl $0x2, %eax
je 0x1c52c
movl 0x7b3c(%rsp), %esi
leaq 0x14a160(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x6330(%rsp), %rdi
leaq 0x150668(%rip), %rsi    # 0x16cba3
callq 0x12860
movq %rax, 0x6328(%rsp)
cmpq $0x0, 0x6328(%rsp)
jne 0x1c579
leaq 0x6330(%rsp), %rsi
leaq 0x14a1b9(%rip), %rdi    # 0x16671b
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movq 0x1d0(%rsp), %rax
cmpq $0x0, 0x58(%rax)
je 0x1c6c6
movq 0x1d0(%rsp), %rax
movq 0x58(%rax), %rdi
leaq 0x14a19f(%rip), %rsi    # 0x16673e
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c6c6
movq 0x6328(%rsp), %rdi
leaq 0x14a557(%rip), %rsi    # 0x166b13
leaq 0x6320(%rsp), %rdx
leaq 0x6318(%rsp), %rcx
leaq 0x6310(%rsp), %r8
leaq 0x6308(%rsp), %r9
leaq 0x6300(%rsp), %r12
leaq 0x62f8(%rsp), %r15
leaq 0x62f0(%rsp), %r14
leaq 0x62e8(%rsp), %rbx
leaq 0x62e0(%rsp), %r11
leaq 0x62d8(%rsp), %r10
leaq 0x62d0(%rsp), %rax
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movb $0x0, %al
callq 0x12cb0
cmpl $0xb, %eax
je 0x1c660
leaq 0x14a100(%rip), %rdi    # 0x166749
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movsd 0x6310(%rsp), %xmm0
movsd 0x6300(%rsp), %xmm2
movsd 0x6308(%rsp), %xmm4
movsd 0x62f8(%rsp), %xmm5
leaq 0x6288(%rsp), %rdi
xorps %xmm7, %xmm7
movsd 0x149998(%rip), %xmm8   # 0x166030
movaps %xmm7, %xmm1
movaps %xmm7, %xmm3
movaps %xmm7, %xmm6
movsd %xmm8, (%rsp)
callq 0xcc480
leaq 0x8b50(%rsp), %rdi
leaq 0x6288(%rsp), %rsi
callq 0xcd370
jmp 0x1c7b1
movq 0x6328(%rsp), %rdi
leaq 0x6240(%rsp), %rdx
leaq 0x6240(%rsp), %rcx
addq $0x8, %rcx
leaq 0x6240(%rsp), %r8
addq $0x10, %r8
leaq 0x6240(%rsp), %r9
addq $0x18, %r9
leaq 0x6240(%rsp), %r14
addq $0x20, %r14
leaq 0x6240(%rsp), %rbx
addq $0x28, %rbx
leaq 0x6240(%rsp), %r11
addq $0x30, %r11
leaq 0x6240(%rsp), %r10
addq $0x38, %r10
leaq 0x6240(%rsp), %rax
addq $0x40, %rax
leaq 0x14a3dc(%rip), %rsi    # 0x166b19
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x12cb0
cmpl $0x9, %eax
je 0x1c787
leaq 0x6330(%rsp), %rsi
leaq 0x14a007(%rip), %rdi    # 0x166777
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x6240(%rsp), %rsi
leaq 0x61f8(%rsp), %rdi
callq 0xcc530
leaq 0x8b50(%rsp), %rdi
leaq 0x61f8(%rsp), %rsi
callq 0xcd370
movq 0x6328(%rsp), %rdi
callq 0x126c0
jmp 0x1d913
leaq 0x7730(%rsp), %rdi
leaq 0x149fce(%rip), %rsi    # 0x1667a0
callq 0x12a00
cmpl $0x0, %eax
je 0x1c7f9
leaq 0x7730(%rsp), %rdi
leaq 0x149faf(%rip), %rsi    # 0x16679a
callq 0x12a00
cmpl $0x0, %eax
jne 0x1c8f5
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x61b0(%rsp), %rcx
leaq 0x61b0(%rsp), %r8
addq $0x8, %r8
leaq 0x61b0(%rsp), %r9
addq $0x10, %r9
leaq 0x61b0(%rsp), %r15
addq $0x18, %r15
leaq 0x61b0(%rsp), %r14
addq $0x20, %r14
leaq 0x61b0(%rsp), %rbx
addq $0x28, %rbx
leaq 0x61b0(%rsp), %r11
addq $0x30, %r11
leaq 0x61b0(%rsp), %r10
addq $0x38, %r10
leaq 0x61b0(%rsp), %rax
addq $0x40, %rax
leaq 0x149f3a(%rip), %rsi    # 0x1667b2
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movb $0x0, %al
callq 0x126a0
cmpl $0xa, %eax
je 0x1c8c6
movl 0x7b3c(%rsp), %esi
leaq 0x149dc6(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x61b0(%rsp), %rsi
leaq 0x6168(%rsp), %rdi
callq 0xcc530
leaq 0x8b50(%rsp), %rdi
leaq 0x6168(%rsp), %rsi
callq 0xcd370
jmp 0x1d911
leaq 0x7730(%rsp), %rdi
leaq 0x14f4a6(%rip), %rsi    # 0x16bdaa
callq 0x12a00
cmpl $0x0, %eax
je 0x1c92b
leaq 0x7730(%rsp), %rdi
leaq 0x1581cd(%rip), %rsi    # 0x174aea
callq 0x12a00
cmpl $0x0, %eax
jne 0x1cc87
cmpl $0x1, 0x8b9c(%rsp)
jle 0x1c958
movl 0x8b98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8b98(%rsp)
cltd
idivl 0x8b9c(%rsp)
cmpl $0x1, %edx
je 0x1c958
jmp 0x1bfc8
leaq 0x8b50(%rsp), %rdi
callq 0xcc5f0
cmpl $0x0, %eax
je 0x1c988
leaq 0x149e5f(%rip), %rdi    # 0x1667d0
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x58e0(%rsp), %rcx
leaq 0x50e0(%rsp), %r8
leaq 0x60e0(%rsp), %r9
leaq 0x60e0(%rsp), %rax
addq $0x8, %rax
leaq 0x60e0(%rsp), %rsi
addq $0x10, %rsi
movq %rsi, 0x1a0(%rsp)
leaq 0x60e0(%rsp), %rsi
addq $0x18, %rsi
movq %rsi, 0x1a8(%rsp)
leaq 0x60e0(%rsp), %rsi
addq $0x20, %rsi
movq %rsi, 0x1b0(%rsp)
leaq 0x60e0(%rsp), %rsi
addq $0x28, %rsi
movq %rsi, 0x1b8(%rsp)
leaq 0x60e0(%rsp), %rsi
addq $0x30, %rsi
movq %rsi, 0x1c0(%rsp)
leaq 0x60e0(%rsp), %rbp
addq $0x38, %rbp
leaq 0x60e0(%rsp), %r13
addq $0x40, %r13
leaq 0x60e0(%rsp), %r12
addq $0x48, %r12
leaq 0x60e0(%rsp), %r15
addq $0x50, %r15
leaq 0x60e0(%rsp), %r14
addq $0x58, %r14
leaq 0x60e0(%rsp), %rbx
addq $0x60, %rbx
leaq 0x60e0(%rsp), %r11
addq $0x68, %r11
leaq 0x60e0(%rsp), %r10
addq $0x70, %r10
leaq 0x60e0(%rsp), %rsi
addq $0x78, %rsi
movq %rsi, 0x1c8(%rsp)
leaq 0x149da0(%rip), %rsi    # 0x16683b
movq %rax, (%rsp)
movq 0x1a0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x1b0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x1b8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x1c0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x1c8(%rsp), %rax
movq %rbp, 0x30(%rsp)
movq %r13, 0x38(%rsp)
movq %r12, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movq %r14, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movq %r11, 0x60(%rsp)
movq %r10, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movb $0x0, %al
callq 0x126a0
cmpl $0x13, %eax
je 0x1cb46
movl 0x7b3c(%rsp), %esi
leaq 0x149b46(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movq 0x1d0(%rsp), %rdi
movq (%rdi), %rax
movq 0xd0(%rax), %rax
callq *%rax
movq %rax, 0x50d8(%rsp)
movq 0x50d8(%rsp), %rdi
movl 0x8b4c(%rsp), %esi
movl 0x8b48(%rsp), %edx
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x50d8(%rsp), %rdi
movq (%rdi), %rax
movq 0x1a0(%rax), %rax
leaq 0x50e0(%rsp), %rsi
callq *%rax
movq 0x50d8(%rsp), %rdi
movq (%rdi), %rax
movq 0x1a8(%rax), %rax
leaq 0x58e0(%rsp), %rsi
callq *%rax
movq 0x50d8(%rsp), %rdi
movq (%rdi), %rax
movq 0x78(%rax), %rax
leaq 0x8b50(%rsp), %rsi
callq *%rax
movq 0x50d8(%rsp), %rax
movq %rax, 0x190(%rsp)
leaq 0x4f48(%rsp), %rdi
movq %rdi, 0x188(%rsp)
leaq 0x60e0(%rsp), %rsi
callq 0x844a0
movq 0x188(%rsp), %rsi
leaq 0x4fc8(%rsp), %rdi
movq %rdi, 0x198(%rsp)
xorl %edx, %edx
callq 0x7fbb0
movq 0x190(%rsp), %rdi
movq 0x198(%rsp), %rsi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
jmp 0x1cc39
leaq 0x4fc8(%rsp), %rdi
callq 0x7fc50
movq 0x1d0(%rsp), %rdi
movq 0x50d8(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1d90f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f40(%rsp)
movl %eax, 0x4f3c(%rsp)
leaq 0x4fc8(%rsp), %rdi
callq 0x7fc50
jmp 0x1d946
leaq 0x7730(%rsp), %rdi
leaq 0x149b93(%rip), %rsi    # 0x166829
callq 0x12a00
cmpl $0x0, %eax
jne 0x1d075
cmpl $0x1, 0x8b9c(%rsp)
jle 0x1ccd1
movl 0x8b98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8b98(%rsp)
cltd
idivl 0x8b9c(%rsp)
cmpl $0x1, %edx
je 0x1ccd1
jmp 0x1bfc8
leaq 0x8b50(%rsp), %rdi
callq 0xcc5f0
cmpl $0x0, %eax
je 0x1cd01
leaq 0x149ae6(%rip), %rdi    # 0x1667d0
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x46b0(%rsp), %rcx
leaq 0x3eb0(%rsp), %r8
leaq 0x36b0(%rsp), %r9
leaq 0x2eb0(%rsp), %rax
leaq 0x4eb0(%rsp), %rsi
movq %rsi, 0x148(%rsp)
leaq 0x4eb0(%rsp), %rsi
addq $0x8, %rsi
movq %rsi, 0x150(%rsp)
leaq 0x4eb0(%rsp), %rsi
addq $0x10, %rsi
movq %rsi, 0x158(%rsp)
leaq 0x4eb0(%rsp), %rsi
addq $0x18, %rsi
movq %rsi, 0x160(%rsp)
leaq 0x4eb0(%rsp), %rsi
addq $0x20, %rsi
movq %rsi, 0x168(%rsp)
leaq 0x4eb0(%rsp), %rsi
addq $0x28, %rsi
movq %rsi, 0x170(%rsp)
leaq 0x4eb0(%rsp), %rsi
addq $0x30, %rsi
movq %rsi, 0x178(%rsp)
leaq 0x4eb0(%rsp), %rbp
addq $0x38, %rbp
leaq 0x4eb0(%rsp), %r13
addq $0x40, %r13
leaq 0x4eb0(%rsp), %r12
addq $0x48, %r12
leaq 0x4eb0(%rsp), %r15
addq $0x50, %r15
leaq 0x4eb0(%rsp), %r14
addq $0x58, %r14
leaq 0x4eb0(%rsp), %rbx
addq $0x60, %rbx
leaq 0x4eb0(%rsp), %r11
addq $0x68, %r11
leaq 0x4eb0(%rsp), %r10
addq $0x70, %r10
leaq 0x4eb0(%rsp), %rsi
addq $0x78, %rsi
movq %rsi, 0x180(%rsp)
leaq 0x149a03(%rip), %rsi    # 0x166837
movq %rax, (%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x178(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x180(%rsp), %rax
movq %rbp, 0x40(%rsp)
movq %r13, 0x48(%rsp)
movq %r12, 0x50(%rsp)
movq %r15, 0x58(%rsp)
movq %r14, 0x60(%rsp)
movq %rbx, 0x68(%rsp)
movq %r11, 0x70(%rsp)
movq %r10, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movb $0x0, %al
callq 0x126a0
cmpl $0x15, %eax
je 0x1cefc
movl 0x7b3c(%rsp), %esi
leaq 0x149790(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movq 0x1d0(%rsp), %rdi
movq (%rdi), %rax
movq 0xd0(%rax), %rax
callq *%rax
movq %rax, 0x2ea8(%rsp)
movq 0x2ea8(%rsp), %rdi
movl 0x8b4c(%rsp), %esi
movl 0x8b48(%rsp), %edx
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x2ea8(%rsp), %rdi
movq (%rdi), %rax
movq 0x1a0(%rax), %rax
leaq 0x3eb0(%rsp), %rsi
callq *%rax
movq 0x2ea8(%rsp), %rdi
movq (%rdi), %rax
movq 0x1a8(%rax), %rax
leaq 0x46b0(%rsp), %rsi
callq *%rax
movq 0x2ea8(%rsp), %rdi
movq (%rdi), %rax
movq 0x1b0(%rax), %rax
leaq 0x36b0(%rsp), %rsi
callq *%rax
movq 0x2ea8(%rsp), %rdi
movq (%rdi), %rax
movq 0x1b8(%rax), %rax
leaq 0x2eb0(%rsp), %rsi
callq *%rax
movq 0x2ea8(%rsp), %rdi
movq (%rdi), %rax
movq 0x78(%rax), %rax
leaq 0x8b50(%rsp), %rsi
callq *%rax
movq 0x2ea8(%rsp), %rax
movq %rax, 0x138(%rsp)
leaq 0x2d18(%rsp), %rdi
movq %rdi, 0x130(%rsp)
leaq 0x4eb0(%rsp), %rsi
callq 0x844a0
movq 0x130(%rsp), %rsi
leaq 0x2d98(%rsp), %rdi
movq %rdi, 0x140(%rsp)
xorl %edx, %edx
callq 0x7fbb0
movq 0x138(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
jmp 0x1d027
leaq 0x2d98(%rsp), %rdi
callq 0x7fc50
movq 0x1d0(%rsp), %rdi
movq 0x2ea8(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1d90d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f40(%rsp)
movl %eax, 0x4f3c(%rsp)
leaq 0x2d98(%rsp), %rdi
callq 0x7fc50
jmp 0x1d946
leaq 0x7730(%rsp), %rdi
leaq 0x1497ee(%rip), %rsi    # 0x166872
callq 0x12a00
cmpl $0x0, %eax
jne 0x1d42b
cmpl $0x1, 0x8b9c(%rsp)
jle 0x1d0bf
movl 0x8b98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8b98(%rsp)
cltd
idivl 0x8b9c(%rsp)
cmpl $0x1, %edx
je 0x1d0bf
jmp 0x1bfc8
leaq 0x8b50(%rsp), %rdi
callq 0xcc5f0
cmpl $0x0, %eax
je 0x1d0ef
leaq 0x1496f8(%rip), %rdi    # 0x1667d0
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x2480(%rsp), %rcx
leaq 0x1c80(%rsp), %r9
leaq 0x2c90(%rsp), %rax
movq %rax, 0xf0(%rsp)
leaq 0x2c90(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xf8(%rsp)
leaq 0x2c90(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x100(%rsp)
leaq 0x2c90(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x108(%rsp)
leaq 0x2c90(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x110(%rsp)
leaq 0x2c90(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x118(%rsp)
leaq 0x2c90(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x120(%rsp)
leaq 0x2c90(%rsp), %rbp
addq $0x38, %rbp
leaq 0x2c90(%rsp), %r13
addq $0x40, %r13
leaq 0x2c90(%rsp), %r12
addq $0x48, %r12
leaq 0x2c90(%rsp), %r15
addq $0x50, %r15
leaq 0x2c90(%rsp), %r14
addq $0x58, %r14
leaq 0x2c90(%rsp), %rbx
addq $0x60, %rbx
leaq 0x2c90(%rsp), %r11
addq $0x68, %r11
leaq 0x2c90(%rsp), %r10
addq $0x70, %r10
leaq 0x2c90(%rsp), %rax
addq $0x78, %rax
movq %rax, 0x128(%rsp)
leaq 0x149666(%rip), %rsi    # 0x166878
leaq 0x2c88(%rsp), %r8
leaq 0x2c80(%rsp), %rax
movq %rax, (%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x128(%rsp), %rax
movq %rbp, 0x40(%rsp)
movq %r13, 0x48(%rsp)
movq %r12, 0x50(%rsp)
movq %r15, 0x58(%rsp)
movq %r14, 0x60(%rsp)
movq %rbx, 0x68(%rsp)
movq %r11, 0x70(%rsp)
movq %r10, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movb $0x0, %al
callq 0x126a0
cmpl $0x15, %eax
je 0x1d2ea
movl 0x7b3c(%rsp), %esi
leaq 0x1493a2(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movq 0x1d0(%rsp), %rdi
movq (%rdi), %rax
movq 0xd0(%rax), %rax
callq *%rax
movq %rax, 0x1c78(%rsp)
movq 0x1c78(%rsp), %rdi
movl 0x8b4c(%rsp), %esi
movl 0x8b48(%rsp), %edx
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x1c78(%rsp), %rdi
movq (%rdi), %rax
movq 0x1a0(%rax), %rax
leaq 0x1c80(%rsp), %rsi
callq *%rax
movq 0x1c78(%rsp), %rdi
movq (%rdi), %rax
movq 0x1a8(%rax), %rax
leaq 0x2480(%rsp), %rsi
callq *%rax
movq 0x1c78(%rsp), %rdi
movq (%rdi), %rax
movq 0x78(%rax), %rax
leaq 0x8b50(%rsp), %rsi
callq *%rax
movq 0x1c78(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x1ae8(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
leaq 0x2c90(%rsp), %rsi
callq 0x844a0
movq 0xd8(%rsp), %rsi
leaq 0x1b68(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
xorl %edx, %edx
callq 0x7fbb0
movq 0xe0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq (%rdi), %rax
movq 0x68(%rax), %rax
callq *%rax
jmp 0x1d3dd
leaq 0x1b68(%rsp), %rdi
callq 0x7fc50
movq 0x1d0(%rsp), %rdi
movq 0x1c78(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1d90b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f40(%rsp)
movl %eax, 0x4f3c(%rsp)
leaq 0x1b68(%rsp), %rdi
callq 0x7fc50
jmp 0x1d946
leaq 0x7730(%rsp), %rdi
leaq 0x14947b(%rip), %rsi    # 0x1668b5
callq 0x12a00
cmpl $0x0, %eax
jne 0x1d744
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x12e0(%rsp), %rcx
leaq 0x12c0(%rsp), %r9
leaq 0x12c0(%rsp), %rax
addq $0x8, %rax
leaq 0x12c0(%rsp), %rsi
addq $0x10, %rsi
movq %rsi, 0xc8(%rsp)
leaq 0x12a0(%rsp), %rbp
leaq 0x12a0(%rsp), %r13
addq $0x8, %r13
leaq 0x12a0(%rsp), %r12
addq $0x10, %r12
leaq 0x1280(%rsp), %r15
leaq 0x1280(%rsp), %r14
addq $0x8, %r14
leaq 0x1280(%rsp), %rbx
addq $0x10, %rbx
leaq 0x1260(%rsp), %r11
leaq 0x1260(%rsp), %r10
addq $0x8, %r10
leaq 0x1260(%rsp), %rsi
addq $0x10, %rsi
movq %rsi, 0xd0(%rsp)
leaq 0x1493c8(%rip), %rsi    # 0x1668bf
leaq 0x12d8(%rsp), %r8
movq %rax, (%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xd0(%rsp), %rax
movq %rbp, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movb $0x0, %al
callq 0x126a0
cmpl $0xf, %eax
je 0x1d576
movl 0x7b3c(%rsp), %esi
leaq 0x149116(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
leaq 0x1248(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
leaq 0x12c0(%rsp), %rsi
callq 0x8aa20
leaq 0x1230(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
leaq 0x1280(%rsp), %rsi
callq 0x8bc30
movq 0xb8(%rsp), %rdi
callq 0x8c260
leaq 0x1218(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
leaq 0x12a0(%rsp), %rsi
callq 0x8bc30
movq 0xa0(%rsp), %rdi
callq 0x8c260
movq 0xa0(%rsp), %rdx
movq 0xb8(%rsp), %rsi
leaq 0x1200(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0x8c940
movq 0xb0(%rsp), %rdi
callq 0x8c260
movl $0x78, %edi
callq 0x126d0
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0xb8(%rsp), %rcx
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0xc0(%rsp)
movsd 0x1260(%rsp), %xmm0
movsd 0x1268(%rsp), %xmm1
callq 0x711f0
jmp 0x1d662
movq 0xc0(%rsp), %rax
movq %rax, 0x11f8(%rsp)
movl $0xa0, %edi
callq 0x126d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x98(%rsp)
movq 0x11f8(%rsp), %rdx
movsd 0x12d8(%rsp), %xmm0
leaq 0x12e0(%rsp), %rsi
callq 0x23ce0
jmp 0x1d6aa
movq 0x1d0(%rsp), %rdi
movq 0x98(%rsp), %rax
movq %rax, 0x11f0(%rsp)
movsd 0x1270(%rsp), %xmm0
movq 0x11f0(%rsp), %rax
movsd %xmm0, 0x98(%rax)
movq 0x11f0(%rsp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
jmp 0x1d909
movq 0xc0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f40(%rsp)
movl %eax, 0x4f3c(%rsp)
movl $0x78, %esi
callq 0x126e0
jmp 0x1d946
movq 0x98(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f40(%rsp)
movl %eax, 0x4f3c(%rsp)
movl $0xa0, %esi
callq 0x126e0
jmp 0x1d946
leaq 0x7730(%rsp), %rdi
leaq 0x148912(%rip), %rsi    # 0x166065
callq 0x12a00
cmpl $0x0, %eax
jne 0x1d907
leaq 0x7b40(%rsp), %rdi
leaq 0x7730(%rsp), %rdx
leaq 0x9f0(%rsp), %rcx
leaq 0x1f0(%rsp), %r8
leaq 0x149163(%rip), %rsi    # 0x1668eb
leaq 0x1e8(%rsp), %r9
movb $0x0, %al
callq 0x126a0
cmpl $0x4, %eax
je 0x1d7c1
movl 0x7b3c(%rsp), %esi
leaq 0x148ecb(%rip), %rdi    # 0x166675
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movl $0x138, %edi            # imm = 0x138
callq 0x126d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x90(%rsp)
callq 0x442e0
jmp 0x1d7e0
movq 0x90(%rsp), %rax
movq %rax, 0x1e0(%rsp)
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
movq (%rdi), %rax
callq *0x180(%rax)
cmpl $0x0, %eax
jne 0x1d866
leaq 0x1f0(%rsp), %rsi
movl 0x7b3c(%rsp), %edx
leaq 0x1490d1(%rip), %rdi    # 0x1668f5
movb $0x0, %al
callq 0xdf990
movl $0x0, 0x8bb4(%rsp)
jmp 0x1d92d
movq 0x90(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f40(%rsp)
movl %eax, 0x4f3c(%rsp)
movl $0x138, %esi            # imm = 0x138
callq 0x126e0
jmp 0x1d946
movl $0xa0, %edi
callq 0x126d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x88(%rsp)
movq 0x1e0(%rsp), %rdx
movsd 0x1e8(%rsp), %xmm0
leaq 0x9f0(%rsp), %rsi
callq 0x23f50
jmp 0x1d89e
movq 0x88(%rsp), %rax
movq %rax, 0x1d8(%rsp)
movq 0x1d8(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
movq (%rdi), %rax
callq *0xc8(%rax)
movq 0x1d0(%rsp), %rdi
movq 0x1d8(%rsp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
jmp 0x1d907
movq 0x88(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f40(%rsp)
movl %eax, 0x4f3c(%rsp)
movl $0xa0, %esi
callq 0x126e0
jmp 0x1d946
jmp 0x1d909
jmp 0x1d90b
jmp 0x1d90d
jmp 0x1d90f
jmp 0x1d911
jmp 0x1d913
jmp 0x1d915
jmp 0x1d917
jmp 0x1d919
jmp 0x1d91b
jmp 0x1d91d
jmp 0x1bfc8
movl $0x1, 0x8bb4(%rsp)
movl 0x8bb4(%rsp), %eax
addq $0x8bb8, %rsp           # imm = 0x8BB8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4f40(%rsp), %rdi
callq 0x12c20
nopw %cs:(%rax,%rax)