// File: tomfunkhouser[P]gaps/apps/mshparam/mshparam.cpp
// Function: WriteTextures(gaps::R3Mesh*, char const*, double)
static int
WriteTextures(R3Mesh *mesh, const char *directory_name, RNLength texel_spacing)
{
  // Check directory name
  if (!directory_name) return 1;
  
  // Compute bounding box of texture coordinates
  R2Box texcoords_bbox = R2null_box;
  for (int i = 0; i < mesh->NVertices(); i++) {
    R3MeshVertex *vertex = mesh->Vertex(i);
    const R2Point& texcoords = mesh->VertexTextureCoords(vertex);
    texcoords_bbox.Union(texcoords);
  }

  // Get useful variables for texcoords scaling
  R2Point t0, t1, t2;
  RNLength texcoords_xmin = texcoords_bbox.XMin();
  RNLength texcoords_ymin = texcoords_bbox.YMin();
  RNLength texcoords_xlength = texcoords_bbox.XLength();
  if (RNIsZero(texcoords_xlength)) return 0;
  RNLength texcoords_ylength = texcoords_bbox.YLength();
  if (RNIsZero(texcoords_ylength)) return 0;

  // Compute width and height from texel_spacing
  if (texel_spacing <= 0) texel_spacing = 1;
  int width = (int) (texcoords_bbox.XLength() / texel_spacing + 0.5);
  int height = (int) (texcoords_bbox.YLength() / texel_spacing + 0.5);
  if ((width <= 0) || (height == 0)) return 0;

  // Update bounding box from width and height 
  texcoords_bbox[1][0] = texcoords_xmin + texel_spacing*width;
  texcoords_bbox[1][1] = texcoords_ymin + texel_spacing*height;

  // Allocate images for texture channels (initialized with zeroes)
  R2Grid mask_channel(width, height, texcoords_bbox);
  R2Grid face_channel(mask_channel);
  R2Grid px_channel(mask_channel);
  R2Grid py_channel(mask_channel);
  R2Grid pz_channel(mask_channel);
  R2Grid nx_channel(mask_channel);
  R2Grid ny_channel(mask_channel);
  R2Grid nz_channel(mask_channel);
  R2Grid red_channel(mask_channel);
  R2Grid green_channel(mask_channel);
  R2Grid blue_channel(mask_channel);
  R2Grid curvature_channel(mask_channel);
  R2Grid category_channel(mask_channel);
  R2Grid segment_channel(mask_channel);
  R2Grid material_channel(mask_channel);

  // Rasterize mesh face properties into texture channels
  for (int i = 0; i < mesh->NFaces(); i++) {
    R3MeshFace *face = mesh->Face(i);
    int category = mesh->FaceCategory(face);
    int segment = mesh->FaceSegment(face);
    int material = mesh->FaceMaterial(face);
    R3Vector normal = mesh->FaceNormal(face);
    R3MeshVertex *v0 = mesh->VertexOnFace(face, 0);
    R3MeshVertex *v1 = mesh->VertexOnFace(face, 1);
    R3MeshVertex *v2 = mesh->VertexOnFace(face, 2);
    RNRgb rgb0 = mesh->VertexColor(v0);
    RNRgb rgb1 = mesh->VertexColor(v1);
    RNRgb rgb2 = mesh->VertexColor(v2);
    RNScalar curvature0 = mesh->VertexMeanCurvature(v0);
    RNScalar curvature1 = mesh->VertexMeanCurvature(v1);
    RNScalar curvature2 = mesh->VertexMeanCurvature(v2);
    R3Point p0 = mesh->VertexPosition(v0);
    R3Point p1 = mesh->VertexPosition(v1);
    R3Point p2 = mesh->VertexPosition(v2);
    R2Point uv0 = mesh->VertexTextureCoords(v0);
    R2Point uv1 = mesh->VertexTextureCoords(v1);
    R2Point uv2 = mesh->VertexTextureCoords(v2);
    t0[0] = width * (uv0[0] - texcoords_xmin) / texcoords_xlength;
    t0[1] = height * (uv0[1] - texcoords_ymin) / texcoords_ylength;
    t1[0] = width * (uv1[0] - texcoords_xmin) / texcoords_xlength;
    t1[1] = height * (uv1[1] - texcoords_ymin) / texcoords_ylength;
    t2[0] = width * (uv2[0] - texcoords_xmin) / texcoords_xlength;
    t2[1] = height * (uv2[1] - texcoords_ymin) / texcoords_ylength;
    mask_channel.RasterizeGridTriangle(t0, t1, t2, 1.0, R2_GRID_REPLACE_OPERATION);
    face_channel.RasterizeGridTriangle(t0, t1, t2, i+1, R2_GRID_REPLACE_OPERATION);
    category_channel.RasterizeGridTriangle(t0, t1, t2, category, category, category, R2_GRID_REPLACE_OPERATION);
    segment_channel.RasterizeGridTriangle(t0, t1, t2, segment, segment, segment, R2_GRID_REPLACE_OPERATION);
    material_channel.RasterizeGridTriangle(t0, t1, t2, material, material, material, R2_GRID_REPLACE_OPERATION);
    nx_channel.RasterizeGridTriangle(t0, t1, t2, normal.X(), R2_GRID_REPLACE_OPERATION);
    ny_channel.RasterizeGridTriangle(t0, t1, t2, normal.Y(), R2_GRID_REPLACE_OPERATION);
    nz_channel.RasterizeGridTriangle(t0, t1, t2, normal.Z(), R2_GRID_REPLACE_OPERATION);
    px_channel.RasterizeGridTriangle(t0, t1, t2, p0.X(), p1.X(), p2.X(), R2_GRID_REPLACE_OPERATION);
    py_channel.RasterizeGridTriangle(t0, t1, t2, p0.Y(), p1.Y(), p2.Y(), R2_GRID_REPLACE_OPERATION);
    pz_channel.RasterizeGridTriangle(t0, t1, t2, p0.Z(), p1.Z(), p2.Z(), R2_GRID_REPLACE_OPERATION);
    red_channel.RasterizeGridTriangle(t0, t1, t2, rgb0.R(), rgb1.R(), rgb2.R(), R2_GRID_REPLACE_OPERATION);
    green_channel.RasterizeGridTriangle(t0, t1, t2, rgb0.G(), rgb1.G(), rgb2.G(), R2_GRID_REPLACE_OPERATION);
    blue_channel.RasterizeGridTriangle(t0, t1, t2, rgb0.B(), rgb1.B(), rgb2.B(), R2_GRID_REPLACE_OPERATION);
    curvature_channel.RasterizeGridTriangle(t0, t1, t2, curvature0, curvature1, curvature2, R2_GRID_REPLACE_OPERATION);
  }

  // Create color image (combined 3 channels into a single png)
  RNRgb color(0,0,0);
  R2Image color_image(width, height, 3);
  for (int i = 0; i < width; i++) {
    for (int j = 0; j < height; j++) {
      color[0] = red_channel.GridValue(i, j);
      color[1] = green_channel.GridValue(i, j);
      color[2] = blue_channel.GridValue(i, j);
      color_image.SetPixelRGB(i, j, color);
    }
  }

  // Clamp category, segment, and material channels (for png output)
  category_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  segment_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  material_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  category_channel.Threshold(65536, R2_GRID_KEEP_VALUE, 65536);
  segment_channel.Threshold(65536, R2_GRID_KEEP_VALUE, 65536);
  material_channel.Threshold(65536, R2_GRID_KEEP_VALUE, 65536);

  // Scale normal channels = 65535 * (value+1.0)/2.0 (for png output)
  nx_channel.Add(1.0); nx_channel.Multiply(65535/2.0);
  ny_channel.Add(1.0); ny_channel.Multiply(65535/2.0);
  nz_channel.Add(1.0); nz_channel.Multiply(65535/2.0);
  nx_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  ny_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  nz_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  nx_channel.Threshold(65535, R2_GRID_KEEP_VALUE, 65535);
  ny_channel.Threshold(65535, R2_GRID_KEEP_VALUE, 65535);
  nz_channel.Threshold(65535, R2_GRID_KEEP_VALUE, 65535);

  // Scale position channel (for png output)
  px_channel.Multiply(1000);
  py_channel.Multiply(1000);
  pz_channel.Multiply(1000);
  px_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  py_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  pz_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  px_channel.Threshold(65535, R2_GRID_KEEP_VALUE, 65535);
  py_channel.Threshold(65535, R2_GRID_KEEP_VALUE, 65535);
  pz_channel.Threshold(65535, R2_GRID_KEEP_VALUE, 65535);

  // Scale curvature channel = 65535 * (value+100)/2.0 (for png output)
  curvature_channel.Threshold(-100, -100, R2_GRID_KEEP_VALUE);
  curvature_channel.Threshold(100, R2_GRID_KEEP_VALUE, 100);
  curvature_channel.Add(100);
  curvature_channel.Multiply(65535/200.0);
  curvature_channel.Threshold(0, 0, R2_GRID_KEEP_VALUE);
  curvature_channel.Threshold(65535, R2_GRID_KEEP_VALUE, 65535);

  // Create texture directory
  char cmd[1024];
  sprintf(cmd, "mkdir -p %s", directory_name);
  system(cmd);

  // Write channels
  char filename[1024];
  sprintf(filename, "%s/mask.png", directory_name);
  if (!mask_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/face.pfm", directory_name);
  if (!face_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/px.png", directory_name);
  if (!px_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/py.png", directory_name);
  if (!py_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/pz.png", directory_name);
  if (!pz_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/nx.png", directory_name);
  if (!nx_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/ny.png", directory_name);
  if (!ny_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/nz.png", directory_name);
  if (!nz_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/curvature.png", directory_name);
  if (!curvature_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/category.png", directory_name);
  if (!category_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/segment.png", directory_name);
  if (!segment_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/material.png", directory_name);
  if (!material_channel.WriteFile(filename)) return 0;
  sprintf(filename, "%s/color.png", directory_name);
  if (!color_image.Write(filename)) return 0;

  // Return success
  return 1;
}

// Assembly:
subq $0x1958, %rsp           # imm = 0x1958
movq %rdi, 0x1948(%rsp)
movq %rsi, 0x1940(%rsp)
movsd %xmm0, 0x1938(%rsp)
cmpq $0x0, 0x1940(%rsp)
jne 0x1309b
movl $0x1, 0x1954(%rsp)
jmp 0x15031
leaq 0x1910(%rsp), %rdi
leaq 0x14ccce(%rip), %rsi    # 0x15fd78
callq 0xac540
movl $0x0, 0x190c(%rsp)
movl 0x190c(%rsp), %eax
movl %eax, 0x2ec(%rsp)
movq 0x1948(%rsp), %rdi
callq 0x162a0
movl %eax, %ecx
movl 0x2ec(%rsp), %eax
cmpl %ecx, %eax
jge 0x13179
movq 0x1948(%rsp), %rdi
movl 0x190c(%rsp), %esi
callq 0x16300
movq %rax, 0x2e0(%rsp)
jmp 0x13104
movq 0x2e0(%rsp), %rax
movq %rax, 0x1900(%rsp)
movq 0x1948(%rsp), %rdi
movq 0x1900(%rsp), %rsi
callq 0x19b40
movq %rax, 0x18e8(%rsp)
movq 0x18e8(%rsp), %rsi
leaq 0x1910(%rsp), %rdi
callq 0xad5d0
jmp 0x13148
jmp 0x1314a
movl 0x190c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x190c(%rsp)
jmp 0x130ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x15022
leaq 0x18d8(%rsp), %rdi
callq 0xb2250
jmp 0x13188
leaq 0x18c8(%rsp), %rdi
callq 0xb2250
jmp 0x13197
leaq 0x18b8(%rsp), %rdi
callq 0xb2250
jmp 0x131a6
leaq 0x1910(%rsp), %rdi
movq %rdi, 0x2d0(%rsp)
callq 0x19a00
movq 0x2d0(%rsp), %rdi
movsd %xmm0, 0x18b0(%rsp)
callq 0x19a50
movq 0x2d0(%rsp), %rdi
movsd %xmm0, 0x18a8(%rsp)
callq 0x19870
movsd %xmm0, 0x2d8(%rsp)
jmp 0x131f2
movsd 0x2d8(%rsp), %xmm0
movsd %xmm0, 0x18a0(%rsp)
movsd 0x18a0(%rsp), %xmm0
leaq 0x14aa6c(%rip), %rax    # 0x15dc80
movsd (%rax), %xmm1
callq 0x19b60
movl %eax, 0x2cc(%rsp)
jmp 0x13226
movl 0x2cc(%rsp), %eax
cmpl $0x0, %eax
je 0x1324d
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x15013
leaq 0x1910(%rsp), %rdi
callq 0x19aa0
movsd %xmm0, 0x2c0(%rsp)
jmp 0x13265
movsd 0x2c0(%rsp), %xmm0
movsd %xmm0, 0x1890(%rsp)
movsd 0x1890(%rsp), %xmm0
leaq 0x14a9f9(%rip), %rax    # 0x15dc80
movsd (%rax), %xmm1
callq 0x19b60
movl %eax, 0x2bc(%rsp)
jmp 0x13299
movl 0x2bc(%rsp), %eax
cmpl $0x0, %eax
je 0x132c0
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x15013
xorps %xmm0, %xmm0
ucomisd 0x1938(%rsp), %xmm0
jb 0x132df
movsd 0x10ed32(%rip), %xmm0   # 0x122008
movsd %xmm0, 0x1938(%rsp)
leaq 0x1910(%rsp), %rdi
callq 0x19870
movsd %xmm0, 0x2b0(%rsp)
jmp 0x132f7
movsd 0x2b0(%rsp), %xmm0
movsd 0x1938(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd 0x10ecfb(%rip), %xmm1   # 0x122010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x188c(%rsp)
leaq 0x1910(%rsp), %rdi
callq 0x19aa0
movsd %xmm0, 0x2a8(%rsp)
jmp 0x1333c
movsd 0x2a8(%rsp), %xmm0
divsd 0x1938(%rsp), %xmm0
movsd 0x10ecba(%rip), %xmm1   # 0x122010
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x1888(%rsp)
cmpl $0x0, 0x188c(%rsp)
jle 0x13379
cmpl $0x0, 0x1888(%rsp)
jne 0x13394
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x15013
movsd 0x18b0(%rsp), %xmm1
movsd 0x1938(%rsp), %xmm0
cvtsi2sdl 0x188c(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x298(%rsp)
leaq 0x1910(%rsp), %rdi
movl $0x1, %esi
callq 0x19c30
movq %rax, 0x2a0(%rsp)
jmp 0x133dc
movq 0x2a0(%rsp), %rdi
xorl %esi, %esi
callq 0x19ac0
movsd 0x298(%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x18a8(%rsp), %xmm1
movsd 0x1938(%rsp), %xmm0
cvtsi2sdl 0x1888(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x288(%rsp)
leaq 0x1910(%rsp), %rdi
movl $0x1, %esi
callq 0x19c30
movq %rax, 0x290(%rsp)
jmp 0x13440
movq 0x290(%rsp), %rdi
movl $0x1, %esi
callq 0x19ac0
movsd 0x288(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0x188c(%rsp), %esi
movl 0x1888(%rsp), %edx
leaq 0x17b8(%rsp), %rdi
leaq 0x1910(%rsp), %rcx
callq 0x95480
jmp 0x13484
leaq 0x16e8(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x1349b
leaq 0x1618(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x134b2
leaq 0x1548(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x134c9
leaq 0x1478(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x134e0
leaq 0x13a8(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x134f7
leaq 0x12d8(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x1350e
leaq 0x1208(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x13525
leaq 0x1138(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x1353c
leaq 0x1068(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x13553
leaq 0xf98(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x1356a
leaq 0xec8(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x13581
leaq 0xdf8(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x13598
leaq 0xd28(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x135af
leaq 0xc58(%rsp), %rdi
leaq 0x17b8(%rsp), %rsi
callq 0x964a0
jmp 0x135c6
movl $0x0, 0xc54(%rsp)
movl 0xc54(%rsp), %eax
movl %eax, 0x280(%rsp)
movq 0x1948(%rsp), %rdi
callq 0x16260
movl %eax, 0x284(%rsp)
jmp 0x135f5
movl 0x280(%rsp), %eax
movl 0x284(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1437b
movq 0x1948(%rsp), %rdi
movl 0xc54(%rsp), %esi
callq 0x16370
movq %rax, 0x278(%rsp)
jmp 0x13629
movq 0x278(%rsp), %rax
movq %rax, 0xc48(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc48(%rsp), %rsi
callq 0x167f0
movl %eax, 0xc44(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc48(%rsp), %rsi
callq 0x16470
movl %eax, 0xc40(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc48(%rsp), %rsi
callq 0x16490
movl %eax, 0xc3c(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc48(%rsp), %rsi
callq 0x19c70
movq %rax, 0x270(%rsp)
jmp 0x136ac
movq 0x270(%rsp), %rsi
leaq 0xc20(%rsp), %rdi
callq 0x62970
jmp 0x136c3
movq 0x1948(%rsp), %rdi
movq 0xc48(%rsp), %rsi
xorl %edx, %edx
callq 0x166e0
movq %rax, 0xc18(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc48(%rsp), %rsi
movl $0x1, %edx
callq 0x166e0
movq %rax, 0xc10(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc48(%rsp), %rsi
movl $0x2, %edx
callq 0x166e0
movq %rax, 0xc08(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc18(%rsp), %rsi
callq 0x19ca0
movq %rax, 0x268(%rsp)
jmp 0x13745
movq 0x268(%rsp), %rsi
leaq 0xbf0(%rsp), %rdi
callq 0xc05b0
jmp 0x1375c
movq 0x1948(%rsp), %rdi
movq 0xc10(%rsp), %rsi
callq 0x19ca0
movq %rax, 0x260(%rsp)
jmp 0x1377b
movq 0x260(%rsp), %rsi
leaq 0xbd8(%rsp), %rdi
callq 0xc05b0
jmp 0x13792
movq 0x1948(%rsp), %rdi
movq 0xc08(%rsp), %rsi
callq 0x19ca0
movq %rax, 0x258(%rsp)
jmp 0x137b1
movq 0x258(%rsp), %rsi
leaq 0xbc0(%rsp), %rdi
callq 0xc05b0
jmp 0x137c8
movq 0x1948(%rsp), %rdi
movq 0xc18(%rsp), %rsi
callq 0x210b0
movsd %xmm0, 0x250(%rsp)
jmp 0x137e8
movsd 0x250(%rsp), %xmm0
movsd %xmm0, 0xbb8(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc10(%rsp), %rsi
callq 0x210b0
movsd %xmm0, 0x248(%rsp)
jmp 0x1381a
movsd 0x248(%rsp), %xmm0
movsd %xmm0, 0xbb0(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc08(%rsp), %rsi
callq 0x210b0
movsd %xmm0, 0x240(%rsp)
jmp 0x1384c
movsd 0x240(%rsp), %xmm0
movsd %xmm0, 0xba8(%rsp)
movq 0x1948(%rsp), %rdi
movq 0xc18(%rsp), %rsi
callq 0x16960
movq %rax, %rsi
leaq 0xb90(%rsp), %rdi
callq 0x61810
jmp 0x13885
movq 0x1948(%rsp), %rdi
movq 0xc10(%rsp), %rsi
callq 0x16960
movq %rax, %rsi
leaq 0xb78(%rsp), %rdi
callq 0x61810
jmp 0x138ac
movq 0x1948(%rsp), %rdi
movq 0xc08(%rsp), %rsi
callq 0x16960
movq %rax, %rsi
leaq 0xb60(%rsp), %rdi
callq 0x61810
jmp 0x138d3
movq 0x1948(%rsp), %rdi
movq 0xc18(%rsp), %rsi
callq 0x19b40
movq %rax, %rsi
leaq 0xb50(%rsp), %rdi
callq 0xb2290
jmp 0x138fa
movq 0x1948(%rsp), %rdi
movq 0xc10(%rsp), %rsi
callq 0x19b40
movq %rax, %rsi
leaq 0xb40(%rsp), %rdi
callq 0xb2290
jmp 0x13921
movq 0x1948(%rsp), %rdi
movq 0xc08(%rsp), %rsi
callq 0x19b40
movq %rax, %rsi
leaq 0xb30(%rsp), %rdi
callq 0xb2290
jmp 0x13948
cvtsi2sdl 0x188c(%rsp), %xmm0
movsd %xmm0, 0x1a0(%rsp)
leaq 0xb50(%rsp), %rdi
movq %rdi, 0x1b0(%rsp)
xorl %esi, %esi
movl %esi, 0x1fc(%rsp)
callq 0x19ac0
movsd 0x1a0(%rsp), %xmm0
movl 0x1fc(%rsp), %esi
movsd (%rax), %xmm1
movsd 0x18b0(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x18a0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1a8(%rsp)
leaq 0x18d8(%rsp), %rdi
movq %rdi, 0x228(%rsp)
callq 0x19ac0
movsd 0x1a8(%rsp), %xmm0
movq 0x1b0(%rsp), %rdi
movsd %xmm0, (%rax)
cvtsi2sdl 0x1888(%rsp), %xmm0
movsd %xmm0, 0x1b8(%rsp)
movl $0x1, %esi
movl %esi, 0x21c(%rsp)
callq 0x19ac0
movsd 0x1b8(%rsp), %xmm0
movl 0x21c(%rsp), %esi
movq 0x228(%rsp), %rdi
movsd (%rax), %xmm1
movsd 0x18a8(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x1890(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rsp)
callq 0x19ac0
movsd 0x1c0(%rsp), %xmm0
movl 0x1fc(%rsp), %esi
movsd %xmm0, (%rax)
cvtsi2sdl 0x188c(%rsp), %xmm0
movsd %xmm0, 0x1c8(%rsp)
leaq 0xb40(%rsp), %rdi
movq %rdi, 0x1d8(%rsp)
callq 0x19ac0
movsd 0x1c8(%rsp), %xmm0
movl 0x1fc(%rsp), %esi
movsd (%rax), %xmm1
movsd 0x18b0(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x18a0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1d0(%rsp)
leaq 0x18c8(%rsp), %rdi
movq %rdi, 0x230(%rsp)
callq 0x19ac0
movsd 0x1d0(%rsp), %xmm0
movq 0x1d8(%rsp), %rdi
movl 0x21c(%rsp), %esi
movsd %xmm0, (%rax)
cvtsi2sdl 0x1888(%rsp), %xmm0
movsd %xmm0, 0x1e0(%rsp)
callq 0x19ac0
movsd 0x1e0(%rsp), %xmm0
movl 0x21c(%rsp), %esi
movq 0x230(%rsp), %rdi
movsd (%rax), %xmm1
movsd 0x18a8(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x1890(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x1e8(%rsp)
callq 0x19ac0
movsd 0x1e8(%rsp), %xmm0
movl 0x1fc(%rsp), %esi
movsd %xmm0, (%rax)
cvtsi2sdl 0x188c(%rsp), %xmm0
movsd %xmm0, 0x1f0(%rsp)
leaq 0xb30(%rsp), %rdi
movq %rdi, 0x208(%rsp)
callq 0x19ac0
movsd 0x1f0(%rsp), %xmm0
movl 0x1fc(%rsp), %esi
movsd (%rax), %xmm1
movsd 0x18b0(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x18a0(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x200(%rsp)
leaq 0x18b8(%rsp), %rdi
movq %rdi, 0x238(%rsp)
callq 0x19ac0
movsd 0x200(%rsp), %xmm0
movq 0x208(%rsp), %rdi
movl 0x21c(%rsp), %esi
movsd %xmm0, (%rax)
cvtsi2sdl 0x1888(%rsp), %xmm0
movsd %xmm0, 0x210(%rsp)
callq 0x19ac0
movsd 0x210(%rsp), %xmm0
movl 0x21c(%rsp), %esi
movq 0x238(%rsp), %rdi
movsd (%rax), %xmm1
movsd 0x18a8(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x1890(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x220(%rsp)
callq 0x19ac0
movsd 0x220(%rsp), %xmm0
movq 0x228(%rsp), %rsi
movq 0x230(%rsp), %rdx
movq 0x238(%rsp), %rcx
movsd %xmm0, (%rax)
leaq 0x17b8(%rsp), %rdi
movsd 0x10e37f(%rip), %xmm0   # 0x122008
movl $0x2, %r8d
callq 0x19cc0
jmp 0x13c96
movl 0xc54(%rsp), %eax
incl %eax
cvtsi2sd %eax, %xmm0
leaq 0x16e8(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19cc0
jmp 0x13cd0
cvtsi2sdl 0xc44(%rsp), %xmm2
leaq 0xdf8(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x19d20
jmp 0x13d0c
cvtsi2sdl 0xc40(%rsp), %xmm2
leaq 0xd28(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x19d20
jmp 0x13d48
cvtsi2sdl 0xc3c(%rsp), %xmm2
leaq 0xc58(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x19d20
jmp 0x13d84
leaq 0xc20(%rsp), %rdi
callq 0x19e60
movsd %xmm0, 0x198(%rsp)
jmp 0x13d9c
movsd 0x198(%rsp), %xmm0
leaq 0x13a8(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19cc0
jmp 0x13dd2
leaq 0xc20(%rsp), %rdi
callq 0x19e70
movsd %xmm0, 0x190(%rsp)
jmp 0x13dea
movsd 0x190(%rsp), %xmm0
leaq 0x12d8(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19cc0
jmp 0x13e20
leaq 0xc20(%rsp), %rdi
callq 0x19e80
movsd %xmm0, 0x188(%rsp)
jmp 0x13e38
movsd 0x188(%rsp), %xmm0
leaq 0x1208(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19cc0
jmp 0x13e6e
leaq 0xb90(%rsp), %rdi
callq 0x169a0
movsd %xmm0, 0x180(%rsp)
leaq 0xb78(%rsp), %rdi
callq 0x169a0
movsd %xmm0, 0x178(%rsp)
leaq 0xb60(%rsp), %rdi
callq 0x169a0
movsd 0x178(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x180(%rsp), %xmm0
leaq 0x1618(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19d20
jmp 0x13ee9
leaq 0xb90(%rsp), %rdi
callq 0x169b0
movsd %xmm0, 0x170(%rsp)
leaq 0xb78(%rsp), %rdi
callq 0x169b0
movsd %xmm0, 0x168(%rsp)
leaq 0xb60(%rsp), %rdi
callq 0x169b0
movsd 0x168(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x170(%rsp), %xmm0
leaq 0x1548(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19d20
jmp 0x13f64
leaq 0xb90(%rsp), %rdi
callq 0x19e90
movsd %xmm0, 0x160(%rsp)
jmp 0x13f7c
leaq 0xb78(%rsp), %rdi
callq 0x19e90
movsd %xmm0, 0x158(%rsp)
jmp 0x13f94
leaq 0xb60(%rsp), %rdi
callq 0x19e90
movsd %xmm0, 0x150(%rsp)
jmp 0x13fac
movsd 0x150(%rsp), %xmm2
movsd 0x158(%rsp), %xmm1
movsd 0x160(%rsp), %xmm0
leaq 0x1478(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19d20
jmp 0x13ff4
leaq 0xbf0(%rsp), %rdi
callq 0x19ea0
movsd %xmm0, 0x148(%rsp)
jmp 0x1400c
leaq 0xbd8(%rsp), %rdi
callq 0x19ea0
movsd %xmm0, 0x140(%rsp)
jmp 0x14024
leaq 0xbc0(%rsp), %rdi
callq 0x19ea0
movsd %xmm0, 0x138(%rsp)
jmp 0x1403c
movsd 0x138(%rsp), %xmm2
movsd 0x140(%rsp), %xmm1
movsd 0x148(%rsp), %xmm0
leaq 0x1138(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19d20
jmp 0x14084
leaq 0xbf0(%rsp), %rdi
callq 0x19eb0
movsd %xmm0, 0x130(%rsp)
jmp 0x1409c
leaq 0xbd8(%rsp), %rdi
callq 0x19eb0
movsd %xmm0, 0x128(%rsp)
jmp 0x140b4
leaq 0xbc0(%rsp), %rdi
callq 0x19eb0
movsd %xmm0, 0x120(%rsp)
jmp 0x140cc
movsd 0x120(%rsp), %xmm2
movsd 0x128(%rsp), %xmm1
movsd 0x130(%rsp), %xmm0
leaq 0x1068(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19d20
jmp 0x14114
leaq 0xbf0(%rsp), %rdi
callq 0x19ec0
movsd %xmm0, 0x118(%rsp)
jmp 0x1412c
leaq 0xbd8(%rsp), %rdi
callq 0x19ec0
movsd %xmm0, 0x110(%rsp)
jmp 0x14144
leaq 0xbc0(%rsp), %rdi
callq 0x19ec0
movsd %xmm0, 0x108(%rsp)
jmp 0x1415c
movsd 0x108(%rsp), %xmm2
movsd 0x110(%rsp), %xmm1
movsd 0x118(%rsp), %xmm0
leaq 0xf98(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19d20
jmp 0x141a4
movsd 0xbb8(%rsp), %xmm0
movsd 0xbb0(%rsp), %xmm1
movsd 0xba8(%rsp), %xmm2
leaq 0xec8(%rsp), %rdi
leaq 0x18d8(%rsp), %rsi
leaq 0x18c8(%rsp), %rdx
leaq 0x18b8(%rsp), %rcx
movl $0x2, %r8d
callq 0x19d20
jmp 0x141ec
jmp 0x141ee
movl 0xc54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc54(%rsp)
jmp 0x135d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x15004
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14ff7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14fea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14fdd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14fd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14fc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14fb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14fa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14f9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14f8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14f82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14f75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14f68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14f5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
jmp 0x14f4e
leaq 0xb18(%rsp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0xc05f0
jmp 0x14393
movl 0x188c(%rsp), %esi
movl 0x1888(%rsp), %edx
leaq 0xb00(%rsp), %rdi
movl $0x3, %ecx
callq 0xb4120
jmp 0x143b5
movl $0x0, 0xafc(%rsp)
movl 0xafc(%rsp), %eax
cmpl 0x188c(%rsp), %eax
jge 0x14570
movl $0x0, 0xaf8(%rsp)
movl 0xaf8(%rsp), %eax
cmpl 0x1888(%rsp), %eax
jge 0x14558
movl 0xafc(%rsp), %esi
movl 0xaf8(%rsp), %edx
leaq 0x1138(%rsp), %rdi
callq 0x19ed0
movsd %xmm0, 0x100(%rsp)
jmp 0x14419
leaq 0xb18(%rsp), %rdi
xorl %esi, %esi
callq 0x19f10
movq %rax, 0xf8(%rsp)
jmp 0x14432
movq 0xf8(%rsp), %rax
movsd 0x100(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0xafc(%rsp), %esi
movl 0xaf8(%rsp), %edx
leaq 0x1068(%rsp), %rdi
callq 0x19ed0
movsd %xmm0, 0xf0(%rsp)
jmp 0x1446d
leaq 0xb18(%rsp), %rdi
movl $0x1, %esi
callq 0x19f10
movq %rax, 0xe8(%rsp)
jmp 0x14489
movq 0xe8(%rsp), %rax
movsd 0xf0(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0xafc(%rsp), %esi
movl 0xaf8(%rsp), %edx
leaq 0xf98(%rsp), %rdi
callq 0x19ed0
movsd %xmm0, 0xe0(%rsp)
jmp 0x144c4
leaq 0xb18(%rsp), %rdi
movl $0x2, %esi
callq 0x19f10
movq %rax, 0xd8(%rsp)
jmp 0x144e0
movq 0xd8(%rsp), %rax
movsd 0xe0(%rsp), %xmm0
movsd %xmm0, (%rax)
movl 0xafc(%rsp), %esi
movl 0xaf8(%rsp), %edx
leaq 0xb00(%rsp), %rdi
leaq 0xb18(%rsp), %rcx
callq 0xb4970
jmp 0x1451a
jmp 0x1451c
movl 0xaf8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xaf8(%rsp)
jmp 0x143df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18f8(%rsp)
movl %eax, 0x18f4(%rsp)
leaq 0xb00(%rsp), %rdi
callq 0xb4640
jmp 0x14f4e
jmp 0x1455a
movl 0xafc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xafc(%rsp)
jmp 0x143c0
leaq 0xdf8(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10da95(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x1458d
leaq 0xd28(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10da78(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x145aa
leaq 0xc58(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10da5b(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x145c7
leaq 0xdf8(%rsp), %rdi
movsd 0x10da41(%rip), %xmm1   # 0x122018
movsd 0x10da41(%rip), %xmm2   # 0x122020
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x145e9
leaq 0xd28(%rsp), %rdi
movsd 0x10da1f(%rip), %xmm1   # 0x122018
movsd 0x10da1f(%rip), %xmm2   # 0x122020
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x1460b
leaq 0xc58(%rsp), %rdi
movsd 0x10d9fd(%rip), %xmm1   # 0x122018
movsd 0x10d9fd(%rip), %xmm2   # 0x122020
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x1462d
leaq 0x13a8(%rsp), %rdi
movsd 0x10d9cb(%rip), %xmm0   # 0x122008
callq 0x9d5d0
jmp 0x14644
leaq 0x13a8(%rsp), %rdi
movsd 0x10d9d4(%rip), %xmm0   # 0x122028
callq 0x9d880
jmp 0x1465b
leaq 0x12d8(%rsp), %rdi
movsd 0x10d99d(%rip), %xmm0   # 0x122008
callq 0x9d5d0
jmp 0x14672
leaq 0x12d8(%rsp), %rdi
movsd 0x10d9a6(%rip), %xmm0   # 0x122028
callq 0x9d880
jmp 0x14689
leaq 0x1208(%rsp), %rdi
movsd 0x10d96f(%rip), %xmm0   # 0x122008
callq 0x9d5d0
jmp 0x146a0
leaq 0x1208(%rsp), %rdi
movsd 0x10d978(%rip), %xmm0   # 0x122028
callq 0x9d880
jmp 0x146b7
leaq 0x13a8(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10d94e(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x146d4
leaq 0x12d8(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10d931(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x146f1
leaq 0x1208(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10d914(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x1470e
leaq 0x13a8(%rsp), %rdi
movsd 0x10d8fa(%rip), %xmm1   # 0x122018
movsd 0x10d90a(%rip), %xmm2   # 0x122030
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x14730
leaq 0x12d8(%rsp), %rdi
movsd 0x10d8d8(%rip), %xmm1   # 0x122018
movsd 0x10d8e8(%rip), %xmm2   # 0x122030
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x14752
leaq 0x1208(%rsp), %rdi
movsd 0x10d8b6(%rip), %xmm1   # 0x122018
movsd 0x10d8c6(%rip), %xmm2   # 0x122030
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x14774
leaq 0x1618(%rsp), %rdi
movsd 0x10d8b4(%rip), %xmm0   # 0x122038
callq 0x9d880
jmp 0x1478b
leaq 0x1548(%rsp), %rdi
movsd 0x10d89d(%rip), %xmm0   # 0x122038
callq 0x9d880
jmp 0x147a2
leaq 0x1478(%rsp), %rdi
movsd 0x10d886(%rip), %xmm0   # 0x122038
callq 0x9d880
jmp 0x147b9
leaq 0x1618(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10d84c(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x147d6
leaq 0x1548(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10d82f(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x147f3
leaq 0x1478(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10d812(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x14810
leaq 0x1618(%rsp), %rdi
movsd 0x10d7f8(%rip), %xmm1   # 0x122018
movsd 0x10d808(%rip), %xmm2   # 0x122030
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x14832
leaq 0x1548(%rsp), %rdi
movsd 0x10d7d6(%rip), %xmm1   # 0x122018
movsd 0x10d7e6(%rip), %xmm2   # 0x122030
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x14854
leaq 0x1478(%rsp), %rdi
movsd 0x10d7b4(%rip), %xmm1   # 0x122018
movsd 0x10d7c4(%rip), %xmm2   # 0x122030
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x14876
leaq 0xec8(%rsp), %rdi
movsd 0x10d7ba(%rip), %xmm1   # 0x122040
movsd 0x10d78a(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x14898
leaq 0xec8(%rsp), %rdi
movsd 0x10d770(%rip), %xmm1   # 0x122018
movsd 0x10d798(%rip), %xmm2   # 0x122048
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x148ba
leaq 0xec8(%rsp), %rdi
movsd 0x10d77e(%rip), %xmm0   # 0x122048
callq 0x9d5d0
jmp 0x148d1
leaq 0xec8(%rsp), %rdi
movsd 0x10d76f(%rip), %xmm0   # 0x122050
callq 0x9d880
jmp 0x148e8
leaq 0xec8(%rsp), %rdi
xorps %xmm1, %xmm1
movsd 0x10d71d(%rip), %xmm2   # 0x122018
movaps %xmm1, %xmm0
callq 0x99680
jmp 0x14905
leaq 0xec8(%rsp), %rdi
movsd 0x10d703(%rip), %xmm1   # 0x122018
movsd 0x10d713(%rip), %xmm2   # 0x122030
movaps %xmm2, %xmm0
callq 0x99680
jmp 0x14927
movq 0x1940(%rsp), %rdx
leaq 0x10d894(%rip), %rsi    # 0x1221ca
xorl %eax, %eax
leaq 0x6f0(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0xf0f0
movq 0xd0(%rsp), %rdi
callq 0xf3e0
jmp 0x1495c
movq 0x1940(%rsp), %rdx
leaq 0x10d86b(%rip), %rsi    # 0x1221d6
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0xf0f0
movq 0xc0(%rsp), %rsi
leaq 0x17b8(%rsp), %rdi
callq 0xa67a0
movl %eax, 0xcc(%rsp)
jmp 0x149a0
movl 0xcc(%rsp), %eax
cmpl $0x0, %eax
jne 0x149c7
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d80c(%rip), %rsi    # 0x1221e2
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0xf0f0
movq 0xb0(%rsp), %rsi
leaq 0x16e8(%rsp), %rdi
callq 0xa67a0
movl %eax, 0xbc(%rsp)
jmp 0x14a0b
movl 0xbc(%rsp), %eax
cmpl $0x0, %eax
jne 0x14a32
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d7ad(%rip), %rsi    # 0x1221ee
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0xf0f0
movq 0xa0(%rsp), %rsi
leaq 0x1618(%rsp), %rdi
callq 0xa67a0
movl %eax, 0xac(%rsp)
jmp 0x14a76
movl 0xac(%rsp), %eax
cmpl $0x0, %eax
jne 0x14a9d
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d74c(%rip), %rsi    # 0x1221f8
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xf0f0
movq 0x90(%rsp), %rsi
leaq 0x1548(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x9c(%rsp)
jmp 0x14ae1
movl 0x9c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14b08
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d6eb(%rip), %rsi    # 0x122202
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0xf0f0
movq 0x80(%rsp), %rsi
leaq 0x1478(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x8c(%rsp)
jmp 0x14b4c
movl 0x8c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14b73
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d68a(%rip), %rsi    # 0x12220c
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0xf0f0
movq 0x70(%rsp), %rsi
leaq 0x13a8(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x7c(%rsp)
jmp 0x14bae
movl 0x7c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14bd2
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d635(%rip), %rsi    # 0x122216
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xf0f0
movq 0x60(%rsp), %rsi
leaq 0x12d8(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x6c(%rsp)
jmp 0x14c0d
movl 0x6c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14c31
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d5e0(%rip), %rsi    # 0x122220
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xf0f0
movq 0x50(%rsp), %rsi
leaq 0x1208(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x5c(%rsp)
jmp 0x14c6c
movl 0x5c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14c90
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d58b(%rip), %rsi    # 0x12222a
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xf0f0
movq 0x40(%rsp), %rsi
leaq 0xec8(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x4c(%rsp)
jmp 0x14ccb
movl 0x4c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14cef
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d53d(%rip), %rsi    # 0x12223b
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xf0f0
movq 0x30(%rsp), %rsi
leaq 0xdf8(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x3c(%rsp)
jmp 0x14d2a
movl 0x3c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14d4e
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d4ee(%rip), %rsi    # 0x12224b
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xf0f0
movq 0x20(%rsp), %rsi
leaq 0xd28(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x2c(%rsp)
jmp 0x14d89
movl 0x2c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14dad
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d49e(%rip), %rsi    # 0x12225a
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xf0f0
movq 0x10(%rsp), %rsi
leaq 0xc58(%rsp), %rdi
callq 0xa67a0
movl %eax, 0x1c(%rsp)
jmp 0x14de8
movl 0x1c(%rsp), %eax
cmpl $0x0, %eax
jne 0x14e09
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movq 0x1940(%rsp), %rdx
leaq 0x10d452(%rip), %rsi    # 0x12226a
xorl %eax, %eax
leaq 0x2f0(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xf0f0
movq (%rsp), %rsi
leaq 0xb00(%rsp), %rdi
callq 0x19f30
movl %eax, 0xc(%rsp)
jmp 0x14e42
movl 0xc(%rsp), %eax
cmpl $0x0, %eax
jne 0x14e63
movl $0x0, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
jmp 0x14e79
movl $0x1, 0x1954(%rsp)
movl $0x1, 0x189c(%rsp)
leaq 0xb00(%rsp), %rdi
callq 0xb4640
leaq 0xc58(%rsp), %rdi
callq 0x96790
leaq 0xd28(%rsp), %rdi
callq 0x96790
leaq 0xdf8(%rsp), %rdi
callq 0x96790
leaq 0xec8(%rsp), %rdi
callq 0x96790
leaq 0xf98(%rsp), %rdi
callq 0x96790
leaq 0x1068(%rsp), %rdi
callq 0x96790
leaq 0x1138(%rsp), %rdi
callq 0x96790
leaq 0x1208(%rsp), %rdi
callq 0x96790
leaq 0x12d8(%rsp), %rdi
callq 0x96790
leaq 0x13a8(%rsp), %rdi
callq 0x96790
leaq 0x1478(%rsp), %rdi
callq 0x96790
leaq 0x1548(%rsp), %rdi
callq 0x96790
leaq 0x1618(%rsp), %rdi
callq 0x96790
leaq 0x16e8(%rsp), %rdi
callq 0x96790
leaq 0x17b8(%rsp), %rdi
callq 0x96790
jmp 0x15013
leaq 0xc58(%rsp), %rdi
callq 0x96790
leaq 0xd28(%rsp), %rdi
callq 0x96790
leaq 0xdf8(%rsp), %rdi
callq 0x96790
leaq 0xec8(%rsp), %rdi
callq 0x96790
leaq 0xf98(%rsp), %rdi
callq 0x96790
leaq 0x1068(%rsp), %rdi
callq 0x96790
leaq 0x1138(%rsp), %rdi
callq 0x96790
leaq 0x1208(%rsp), %rdi
callq 0x96790
leaq 0x12d8(%rsp), %rdi
callq 0x96790
leaq 0x13a8(%rsp), %rdi
callq 0x96790
leaq 0x1478(%rsp), %rdi
callq 0x96790
leaq 0x1548(%rsp), %rdi
callq 0x96790
leaq 0x1618(%rsp), %rdi
callq 0x96790
leaq 0x16e8(%rsp), %rdi
callq 0x96790
leaq 0x17b8(%rsp), %rdi
callq 0x96790
jmp 0x15022
leaq 0x1910(%rsp), %rdi
callq 0x19b30
jmp 0x15031
leaq 0x1910(%rsp), %rdi
callq 0x19b30
jmp 0x15040
movl 0x1954(%rsp), %eax
addq $0x1958, %rsp           # imm = 0x1958
retq
movq 0x18f8(%rsp), %rdi
callq 0xf830
nopl (%rax)