// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::ReadObjFile(char const*)
int R3Mesh::
ReadObjFile(const char *filename)
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "r"))) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Read body
  char buffer[1024];
  int line_count = 0;
  int material_index = -1;
  int segment_index = -1;
  RNSymbolTable<int> material_table;
  RNArray<R2Point *> texture_coords;
  RNArray<R3Vector *> normals;
  RNArray<R3MeshVertex *> verts;
  RNArray<R3MeshVertex *> degenerate_triangle_vertices;
  std::vector<int> degenerate_triangle_materials;
  std::vector<int> degenerate_triangle_segments;
  while (fgets(buffer, 1023, fp)) {
    // Increment line counter
    line_count++;

    // Skip white space
    char *bufferp = buffer;
    while (isspace(*bufferp)) bufferp++;

    // Skip blank lines and comments
    if (*bufferp == '#') continue;
    if (*bufferp == '\0') continue;

    // Get keyword
    char keyword[80];
    if (sscanf(bufferp, "%s", keyword) != 1) {
      RNFail("Syntax error on line %d in file %s", line_count, filename);
      return 0;
    }

    // Check keyword
    if (!strcmp(keyword, "v")) {
      // Read vertex coordinates
      double x, y, z;
      if (sscanf(bufferp, "%s%lf%lf%lf", keyword, &x, &y, &z) != 4) {
        RNFail("Syntax error on line %d in file %s", line_count, filename);
        return 0;
      }

      // Create vertex
      R3MeshVertex *v = CreateVertex(R3Point(x, y, z));
      verts.Insert(v);
    }
    else if (!strcmp(keyword, "vt")) {
      // Read texture coordinates
      double u, v;
      if (sscanf(bufferp, "%s%lf%lf", keyword, &u, &v) != 3) {
        RNFail("Syntax error on line %d in OBJ file", line_count);
        return 0;
      }

      // Create texture coordinates
      R2Point *vt = new R2Point(u, v);
      texture_coords.Insert(vt);
    }
    else if (!strcmp(keyword, "vn")) {
      // Read texture coordinates
      double x, y, z;
      if (sscanf(bufferp, "%s%lf%lf%lf", keyword, &x, &y, &z) != 4) {
        RNFail("Syntax error on line %d in OBJ file", line_count);
        return 0;
      }

      // Create normal
      R3Vector *vn = new R3Vector(x, y, z);
      vn->Normalize();
      normals.Insert(vn);
    }
    else if (!strcmp(keyword, "f")) {
      // Read vertex indices
      int quad = 1;
      char s[4][128] = { { '\0' }, { '\0' }, { '\0' },{ '\0' } }; 
      if (sscanf(bufferp, "%s%s%s%s%s", keyword, s[0], s[1], s[2], s[3]) != 5) {
        quad = 0;;
        if (sscanf(bufferp, "%s%s%s%s", keyword, s[0], s[1], s[2]) != 4) {
          RNFail("Syntax error on line %d in OBJ file", line_count);
          return 0;
        }
      }

      // Parse vertex indices
      int n = (quad) ? 4 : 3;
      R3MeshVertex *v[4] = { NULL, NULL, NULL, NULL };
      for (int i = 0; i < n; i++) {
        char *sv = s[i];
        char *st = strchr(sv, '/');
        if (st) *(st++) = 0;
        char *sn = (st) ? strchr(st, '/') : NULL;
        if (sn) *(sn++) = 0;
        if (sn && (strlen(sn) == 0)) sn = NULL; 
        if (st && (strlen(st) == 0)) st = NULL;
        int vi = (sv) ? atoi(sv) : 0;
        int ti = (st) ? atoi(st) : 0;
        int ni = (sn) ? atoi(sn) : 0;
        v[i] = verts.Kth(vi-1);
        R2Point texcoords(0,0);
        R3Vector normal(0, 0, 0);
        if ((ti > 0) && ((ti-1) < texture_coords.NEntries())) texcoords = *(texture_coords.Kth(ti-1));
        if ((ni > 0) && ((ni-1) < normals.NEntries())) normal = *(normals.Kth(ni-1));
        if (((ti > 0) && !R2Contains(texcoords, VertexTextureCoords(v[i]))) ||
            ((ni > 0) && !R3Contains(normal, VertexNormal(v[i])))) {
          v[i] = CreateVertex(VertexPosition(v[i]), normal, RNgray_rgb, texcoords);
        }
      }

      // Check vertices
      if ((v[0] == v[1]) || (v[1] == v[2]) || (v[0] == v[2])) continue;
      if ((quad) && ((v[3] == v[0]) || (v[3] == v[1]) || (v[3] == v[2]))) quad = 0;

      // Create first triangle
      if (RNIsPositive(R3Distance(VertexPosition(v[0]), VertexPosition(v[1]))) &&
          RNIsPositive(R3Distance(VertexPosition(v[1]), VertexPosition(v[2]))) &&
          RNIsPositive(R3Distance(VertexPosition(v[2]), VertexPosition(v[0])))) {
        R3MeshFace *face = CreateFace(v[0], v[1], v[2]);
        if (face) {
          // Set segment and face
          SetFaceSegment(face, segment_index);
          SetFaceMaterial(face, material_index);
        }
        else {
          // Must have been degeneracy (e.g., flips or three faces sharing an edge)
          // Remember for later processing (to preserve vertex indices)
          degenerate_triangle_vertices.Insert(v[0]);
          degenerate_triangle_vertices.Insert(v[1]);
          degenerate_triangle_vertices.Insert(v[2]);
          degenerate_triangle_materials.push_back(material_index);
          degenerate_triangle_segments.push_back(segment_index);
        }
      }

      // Create second triangle
      if (quad) {
        if (RNIsPositive(R3Distance(VertexPosition(v[0]), VertexPosition(v[2]))) &&
            RNIsPositive(R3Distance(VertexPosition(v[2]), VertexPosition(v[3]))) &&
            RNIsPositive(R3Distance(VertexPosition(v[0]), VertexPosition(v[3])))) {
          R3MeshFace *face = CreateFace(v[0], v[2], v[3]);
          if (face) {
            // Set segment and face
            SetFaceSegment(face, segment_index);
            SetFaceMaterial(face, material_index);
          }
          else {
            // Must have been degeneracy (e.g., flips or three faces sharing an edge)
            // Remember for later processing (to preserve vertex indices)
            degenerate_triangle_vertices.Insert(v[0]);
            degenerate_triangle_vertices.Insert(v[2]);
            degenerate_triangle_vertices.Insert(v[3]);
            degenerate_triangle_materials.push_back(material_index);
            degenerate_triangle_segments.push_back(segment_index);
          }
        }
      }
    }
    else if (!strcmp(keyword, "usemtl")) {
      // Read fields
      char mtlname[1024];
      if (sscanf(bufferp, "%s%s", keyword, mtlname) != 2) {
        RNFail("Syntax error on line %d in OBJ file", line_count);
        return 0;
      }

      // Find/insert material index
      if (!material_table.Find(mtlname, &material_index)) {
        material_table.Insert(mtlname, ++material_index);
      }
    }
    else if (!strcmp(keyword, "g") || !strcmp(keyword, "o")) {
      // Read name
      char name[1024];
      if (sscanf(bufferp, "%s%s", keyword, name) != 2) {
        RNFail("Syntax error on line %d in OBJ file", line_count);
        return 0;
      }

      // Increment the segment index
      segment_index++;
    }
  }

  // Create degenerate triangles
  for (int i = 0; i <= degenerate_triangle_vertices.NEntries()-3; i+=3) {
    // Get vertices
    R3MeshVertex *v1 = degenerate_triangle_vertices.Kth(i+0);
    R3MeshVertex *v2 = degenerate_triangle_vertices.Kth(i+1);
    R3MeshVertex *v3 = degenerate_triangle_vertices.Kth(i+2);

    // Create face
    R3MeshFace *face = CreateFace(v1, v2, v3);
    if (!face) {
      face = CreateFace(v1, v3, v2);
      if (!face) {
        // Note: these vertices are allocated separately, and so they will not be deleted (memory leak)
        R3MeshVertex *v1a = CreateVertex(VertexPosition(v1));
        R3MeshVertex *v2a = CreateVertex(VertexPosition(v2));
        R3MeshVertex *v3a = CreateVertex(VertexPosition(v3));
        face = CreateFace(v1a, v2a, v3a);
      }
    }

    // Set material and segment
    if (face) {
      if ((int) degenerate_triangle_materials.size() > i/3) 
        SetFaceMaterial(face, degenerate_triangle_materials[i/3]);
      if ((int) degenerate_triangle_segments.size() > i/3) 
        SetFaceSegment(face, degenerate_triangle_segments[i/3]);
    }
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x12d8, %rsp           # imm = 0x12D8
movq %rdi, 0x12c8(%rsp)
movq %rsi, 0x12c0(%rsp)
movq 0x12c8(%rsp), %rax
movq %rax, 0x208(%rsp)
movq 0x12c0(%rsp), %rdi
leaq 0x10c44d(%rip), %rsi    # 0x138673
callq 0xf5e0
movq %rax, 0x12b8(%rsp)
cmpq $0x0, %rax
jne 0x2c25f
movq 0x12c0(%rsp), %rsi
leaq 0x107198(%rip), %rdi    # 0x1333e0
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x12d4(%rsp)
jmp 0x2db01
movl $0x0, 0xeac(%rsp)
movl $0xffffffff, 0xea8(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0xea4(%rsp) # imm = 0xFFFFFFFF
leaq 0xe98(%rsp), %rdi
callq 0x3a050
leaq 0xe88(%rsp), %rdi
callq 0x3a060
jmp 0x2c29c
leaq 0xe68(%rsp), %rdi
callq 0x3a070
jmp 0x2c2ab
leaq 0xe58(%rsp), %rdi
callq 0x36800
jmp 0x2c2ba
leaq 0xe48(%rsp), %rdi
callq 0x36800
jmp 0x2c2c9
leaq 0xe30(%rsp), %rdi
callq 0x3a080
leaq 0xe18(%rsp), %rdi
callq 0x3a080
movq 0x12b8(%rsp), %rdx
leaq 0xeb0(%rsp), %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0xf7e0
movq %rax, 0x200(%rsp)
jmp 0x2c307
movq 0x200(%rsp), %rax
cmpq $0x0, %rax
je 0x2d67a
movl 0xeac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xeac(%rsp)
leaq 0xeb0(%rsp), %rax
movq %rax, 0xe10(%rsp)
movq 0xe10(%rsp), %rax
movsbl (%rax), %edi
callq 0xf080
cmpl $0x0, %eax
je 0x2c3e6
movq 0xe10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xe10(%rsp)
jmp 0x2c33a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
jmp 0x2daf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
jmp 0x2dae5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
jmp 0x2dad8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
jmp 0x2dacb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
jmp 0x2daa4
movq 0xe10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x2c3fb
jmp 0x2c2e3
movq 0xe10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2c410
jmp 0x2c2e3
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0x1085c7(%rip), %rsi    # 0x1349ee
movb $0x0, %al
callq 0xf4a0
cmpl $0x1, %eax
je 0x2c46d
movl 0xeac(%rsp), %esi
movq 0x12c0(%rsp), %rdx
leaq 0x106fae(%rip), %rdi    # 0x1333f7
xorl %eax, %eax
callq 0xd4f30
jmp 0x2c452
movl $0x0, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
jmp 0x2da47
leaq 0xdc0(%rsp), %rdi
leaq 0x106bc5(%rip), %rsi    # 0x133041
callq 0xf700
cmpl $0x0, %eax
jne 0x2c57c
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0x106f79(%rip), %rsi    # 0x13341a
leaq 0xdb0(%rsp), %rcx
leaq 0xda8(%rsp), %r8
leaq 0xda0(%rsp), %r9
movb $0x0, %al
callq 0xf4a0
cmpl $0x4, %eax
je 0x2c4ff
movl 0xeac(%rsp), %esi
movq 0x12c0(%rsp), %rdx
leaq 0x106f1c(%rip), %rdi    # 0x1333f7
xorl %eax, %eax
callq 0xd4f30
jmp 0x2c4e4
movl $0x0, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
jmp 0x2da47
movsd 0xdb0(%rsp), %xmm0
movsd 0xda8(%rsp), %xmm1
movsd 0xda0(%rsp), %xmm2
leaq 0xd80(%rsp), %rdi
callq 0x6eb50
jmp 0x2c529
movq 0x208(%rsp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
leaq 0xd80(%rsp), %rsi
callq *%rax
movq %rax, 0x1f8(%rsp)
jmp 0x2c550
movq 0x1f8(%rsp), %rax
movq %rax, 0xd98(%rsp)
movq 0xd98(%rsp), %rsi
leaq 0xe58(%rsp), %rdi
callq 0x37410
jmp 0x2c577
jmp 0x2d675
leaq 0xdc0(%rsp), %rdi
leaq 0x106e9b(%rip), %rsi    # 0x133426
callq 0xf700
cmpl $0x0, %eax
jne 0x2c68a
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0x106e79(%rip), %rsi    # 0x133429
leaq 0xd78(%rsp), %rcx
leaq 0xd70(%rsp), %r8
movb $0x0, %al
callq 0xf4a0
cmpl $0x3, %eax
je 0x2c5fe
movl 0xeac(%rsp), %esi
leaq 0x106e58(%rip), %rdi    # 0x133432
xorl %eax, %eax
callq 0xd4f30
jmp 0x2c5e3
movl $0x0, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
jmp 0x2da47
movl $0x10, %edi
callq 0xf4c0
movq %rax, 0x1f0(%rsp)
jmp 0x2c612
movq 0x1f0(%rsp), %rdi
movsd 0xd78(%rsp), %xmm0
movsd 0xd70(%rsp), %xmm1
callq 0xc3140
jmp 0x2c633
movq 0x1f0(%rsp), %rax
movq %rax, 0xd68(%rsp)
movq 0xd68(%rsp), %rsi
leaq 0xe88(%rsp), %rdi
callq 0x3a090
jmp 0x2c65a
jmp 0x2d673
movq 0x1f0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
movl $0x10, %esi
callq 0xf4d0
jmp 0x2daa4
leaq 0xdc0(%rsp), %rdi
leaq 0x106dbd(%rip), %rsi    # 0x133456
callq 0xf700
cmpl $0x0, %eax
jne 0x2c7b8
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0x106d5c(%rip), %rsi    # 0x13341a
leaq 0xd60(%rsp), %rcx
leaq 0xd58(%rsp), %r8
leaq 0xd50(%rsp), %r9
movb $0x0, %al
callq 0xf4a0
cmpl $0x4, %eax
je 0x2c714
movl 0xeac(%rsp), %esi
leaq 0x106d42(%rip), %rdi    # 0x133432
xorl %eax, %eax
callq 0xd4f30
jmp 0x2c6f9
movl $0x0, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
jmp 0x2da47
movl $0x18, %edi
callq 0xf4c0
movq %rax, 0x1e8(%rsp)
jmp 0x2c728
movq 0x1e8(%rsp), %rdi
movsd 0xd60(%rsp), %xmm0
movsd 0xd58(%rsp), %xmm1
movsd 0xd50(%rsp), %xmm2
callq 0x6fcb0
jmp 0x2c752
movq 0x1e8(%rsp), %rax
movq %rax, 0xd48(%rsp)
movq 0xd48(%rsp), %rdi
callq 0x70410
jmp 0x2c771
movq 0xd48(%rsp), %rsi
leaq 0xe68(%rsp), %rdi
callq 0x3a0c0
jmp 0x2c788
jmp 0x2d671
movq 0x1e8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
movl $0x18, %esi
callq 0xf4d0
jmp 0x2daa4
leaq 0xdc0(%rsp), %rdi
leaq 0x10687f(%rip), %rsi    # 0x133046
callq 0xf700
cmpl $0x0, %eax
jne 0x2d3a6
movl $0x1, 0xd44(%rsp)
leaq 0xb40(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0xf280
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0xb40(%rsp), %rcx
leaq 0xb40(%rsp), %r8
addq $0x80, %r8
leaq 0xb40(%rsp), %r9
addq $0x100, %r9             # imm = 0x100
leaq 0xb40(%rsp), %rax
addq $0x180, %rax            # imm = 0x180
leaq 0x106c1a(%rip), %rsi    # 0x133459
movq %rax, (%rsp)
movb $0x0, %al
callq 0xf4a0
cmpl $0x5, %eax
je 0x2c8db
movl $0x0, 0xd44(%rsp)
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0xb40(%rsp), %rcx
leaq 0xb40(%rsp), %r8
addq $0x80, %r8
leaq 0xb40(%rsp), %r9
addq $0x100, %r9             # imm = 0x100
leaq 0x106bc0(%rip), %rsi    # 0x13345b
movb $0x0, %al
callq 0xf4a0
cmpl $0x4, %eax
je 0x2c8d9
movl 0xeac(%rsp), %esi
leaq 0x106b7d(%rip), %rdi    # 0x133432
xorl %eax, %eax
callq 0xd4f30
jmp 0x2c8be
movl $0x0, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
jmp 0x2da47
jmp 0x2c8db
movl 0xd44(%rsp), %edx
movl $0x3, %eax
movl $0x4, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0xb3c(%rsp)
leaq 0xb10(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xf280
movl $0x0, 0xb0c(%rsp)
movl 0xb0c(%rsp), %eax
cmpl 0xb3c(%rsp), %eax
jge 0x2cd9f
movslq 0xb0c(%rsp), %rcx
leaq 0xb40(%rsp), %rax
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, 0xb00(%rsp)
movq 0xb00(%rsp), %rdi
movl $0x2f, %esi
callq 0xf1b0
movq %rax, 0xaf8(%rsp)
cmpq $0x0, 0xaf8(%rsp)
je 0x2c98a
movq 0xaf8(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xaf8(%rsp)
movb $0x0, (%rax)
cmpq $0x0, 0xaf8(%rsp)
je 0x2c9b1
movq 0xaf8(%rsp), %rdi
movl $0x2f, %esi
callq 0xf1b0
movq %rax, 0x1e0(%rsp)
jmp 0x2c9bd
xorl %eax, %eax
movq %rax, 0x1e0(%rsp)
jmp 0x2c9bd
movq 0x1e0(%rsp), %rax
movq %rax, 0xaf0(%rsp)
cmpq $0x0, 0xaf0(%rsp)
je 0x2c9f2
movq 0xaf0(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xaf0(%rsp)
movb $0x0, (%rax)
cmpq $0x0, 0xaf0(%rsp)
je 0x2ca1c
movq 0xaf0(%rsp), %rdi
callq 0xf200
cmpq $0x0, %rax
jne 0x2ca1c
movq $0x0, 0xaf0(%rsp)
cmpq $0x0, 0xaf8(%rsp)
je 0x2ca46
movq 0xaf8(%rsp), %rdi
callq 0xf200
cmpq $0x0, %rax
jne 0x2ca46
movq $0x0, 0xaf8(%rsp)
cmpq $0x0, 0xb00(%rsp)
je 0x2ca67
movq 0xb00(%rsp), %rdi
callq 0xf7b0
movl %eax, 0x1dc(%rsp)
jmp 0x2ca72
xorl %eax, %eax
movl %eax, 0x1dc(%rsp)
jmp 0x2ca72
movl 0x1dc(%rsp), %eax
movl %eax, 0xaec(%rsp)
cmpq $0x0, 0xaf8(%rsp)
je 0x2caa1
movq 0xaf8(%rsp), %rdi
callq 0xf7b0
movl %eax, 0x1d8(%rsp)
jmp 0x2caac
xorl %eax, %eax
movl %eax, 0x1d8(%rsp)
jmp 0x2caac
movl 0x1d8(%rsp), %eax
movl %eax, 0xae8(%rsp)
cmpq $0x0, 0xaf0(%rsp)
je 0x2cadb
movq 0xaf0(%rsp), %rdi
callq 0xf7b0
movl %eax, 0x1d4(%rsp)
jmp 0x2cae6
xorl %eax, %eax
movl %eax, 0x1d4(%rsp)
jmp 0x2cae6
movl 0x1d4(%rsp), %eax
movl %eax, 0xae4(%rsp)
movl 0xaec(%rsp), %esi
decl %esi
leaq 0xe58(%rsp), %rdi
callq 0x377e0
movq %rax, 0x1c8(%rsp)
jmp 0x2cb14
movq 0x1c8(%rsp), %rcx
movslq 0xb0c(%rsp), %rax
movq %rcx, 0xb10(%rsp,%rax,8)
leaq 0xad0(%rsp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xc3140
jmp 0x2cb41
leaq 0xab8(%rsp), %rdi
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x6fcb0
jmp 0x2cb59
cmpl $0x0, 0xae8(%rsp)
jle 0x2cbd4
movl 0xae8(%rsp), %eax
decl %eax
movl %eax, 0x1c0(%rsp)
leaq 0xe88(%rsp), %rdi
callq 0x13600
movl %eax, 0x1c4(%rsp)
jmp 0x2cb89
movl 0x1c0(%rsp), %eax
movl 0x1c4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x2cbd4
movl 0xae8(%rsp), %esi
decl %esi
leaq 0xe88(%rsp), %rdi
callq 0x3a0f0
movq %rax, 0x1b8(%rsp)
jmp 0x2cbbb
movq 0x1b8(%rsp), %rsi
leaq 0xad0(%rsp), %rdi
callq 0xc33e0
jmp 0x2cbd2
jmp 0x2cbd4
cmpl $0x0, 0xae4(%rsp)
jle 0x2cc4f
movl 0xae4(%rsp), %eax
decl %eax
movl %eax, 0x1b0(%rsp)
leaq 0xe68(%rsp), %rdi
callq 0x13600
movl %eax, 0x1b4(%rsp)
jmp 0x2cc04
movl 0x1b0(%rsp), %eax
movl 0x1b4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x2cc4f
movl 0xae4(%rsp), %esi
decl %esi
leaq 0xe68(%rsp), %rdi
callq 0x3a110
movq %rax, 0x1a8(%rsp)
jmp 0x2cc36
movq 0x1a8(%rsp), %rsi
leaq 0xab8(%rsp), %rdi
callq 0x70970
jmp 0x2cc4d
jmp 0x2cc4f
cmpl $0x0, 0xae8(%rsp)
jle 0x2ccaa
movq 0x208(%rsp), %rdi
movslq 0xb0c(%rsp), %rax
movq 0xb10(%rsp,%rax,8), %rsi
callq 0x368f0
movq %rax, 0x1a0(%rsp)
jmp 0x2cc80
movq 0x1a0(%rsp), %rsi
leaq 0xad0(%rsp), %rdi
callq 0xa17a0
movl %eax, 0x19c(%rsp)
jmp 0x2cc9e
movl 0x19c(%rsp), %eax
cmpl $0x0, %eax
je 0x2cd09
cmpl $0x0, 0xae4(%rsp)
jle 0x2cd87
movq 0x208(%rsp), %rdi
movslq 0xb0c(%rsp), %rax
movq 0xb10(%rsp,%rax,8), %rsi
callq 0x36860
movq %rax, 0x190(%rsp)
jmp 0x2ccdf
movq 0x190(%rsp), %rsi
leaq 0xab8(%rsp), %rdi
callq 0x820a0
movl %eax, 0x18c(%rsp)
jmp 0x2ccfd
movl 0x18c(%rsp), %eax
cmpl $0x0, %eax
jne 0x2cd87
movq 0x208(%rsp), %rdi
movslq 0xb0c(%rsp), %rax
movq 0xb10(%rsp,%rax,8), %rsi
callq 0x13660
movq %rax, 0x180(%rsp)
jmp 0x2cd30
movq 0x180(%rsp), %rsi
movq 0x208(%rsp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
leaq 0x54e622(%rip), %rcx    # 0x57b370
xorl %edx, %edx
movl %edx, %r9d
leaq 0xab8(%rsp), %rdx
leaq 0xad0(%rsp), %r8
callq *%rax
movq %rax, 0x178(%rsp)
jmp 0x2cd6f
movq 0x178(%rsp), %rcx
movslq 0xb0c(%rsp), %rax
movq %rcx, 0xb10(%rsp,%rax,8)
jmp 0x2cd89
movl 0xb0c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb0c(%rsp)
jmp 0x2c918
movq 0xb10(%rsp), %rax
cmpq 0xb18(%rsp), %rax
je 0x2cdd5
movq 0xb18(%rsp), %rax
cmpq 0xb20(%rsp), %rax
je 0x2cdd5
movq 0xb10(%rsp), %rax
cmpq 0xb20(%rsp), %rax
jne 0x2cdda
jmp 0x2c2e3
cmpl $0x0, 0xd44(%rsp)
je 0x2ce25
movq 0xb28(%rsp), %rax
cmpq 0xb10(%rsp), %rax
je 0x2ce1a
movq 0xb28(%rsp), %rax
cmpq 0xb18(%rsp), %rax
je 0x2ce1a
movq 0xb28(%rsp), %rax
cmpq 0xb20(%rsp), %rax
jne 0x2ce25
movl $0x0, 0xd44(%rsp)
movq 0x208(%rsp), %rdi
movq 0xb10(%rsp), %rsi
callq 0x13660
movq %rax, 0x170(%rsp)
jmp 0x2ce44
movq 0x208(%rsp), %rdi
movq 0xb18(%rsp), %rsi
callq 0x13660
movq %rax, 0x168(%rsp)
jmp 0x2ce63
movq 0x168(%rsp), %rsi
movq 0x170(%rsp), %rdi
callq 0x86c40
movsd %xmm0, 0x160(%rsp)
jmp 0x2ce83
movsd 0x160(%rsp), %xmm0
leaq 0x14b64d(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
movl %eax, 0x15c(%rsp)
jmp 0x2cea5
movl 0x15c(%rsp), %eax
cmpl $0x0, %eax
je 0x2d0db
movq 0x208(%rsp), %rdi
movq 0xb18(%rsp), %rsi
callq 0x13660
movq %rax, 0x150(%rsp)
jmp 0x2ced4
movq 0x208(%rsp), %rdi
movq 0xb20(%rsp), %rsi
callq 0x13660
movq %rax, 0x148(%rsp)
jmp 0x2cef3
movq 0x148(%rsp), %rsi
movq 0x150(%rsp), %rdi
callq 0x86c40
movsd %xmm0, 0x140(%rsp)
jmp 0x2cf13
movsd 0x140(%rsp), %xmm0
leaq 0x14b5bd(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
movl %eax, 0x13c(%rsp)
jmp 0x2cf35
movl 0x13c(%rsp), %eax
cmpl $0x0, %eax
je 0x2d0db
movq 0x208(%rsp), %rdi
movq 0xb20(%rsp), %rsi
callq 0x13660
movq %rax, 0x130(%rsp)
jmp 0x2cf64
movq 0x208(%rsp), %rdi
movq 0xb10(%rsp), %rsi
callq 0x13660
movq %rax, 0x128(%rsp)
jmp 0x2cf83
movq 0x128(%rsp), %rsi
movq 0x130(%rsp), %rdi
callq 0x86c40
movsd %xmm0, 0x120(%rsp)
jmp 0x2cfa3
movsd 0x120(%rsp), %xmm0
leaq 0x14b52d(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
movl %eax, 0x11c(%rsp)
jmp 0x2cfc5
movl 0x11c(%rsp), %eax
cmpl $0x0, %eax
je 0x2d0db
movq 0x208(%rsp), %rdi
movq 0xb10(%rsp), %rsi
movq 0xb18(%rsp), %rdx
movq 0xb20(%rsp), %rcx
movq (%rdi), %rax
movq 0x48(%rax), %rax
xorl %r8d, %r8d
callq *%rax
movq %rax, 0x110(%rsp)
jmp 0x2d00b
movq 0x110(%rsp), %rax
movq %rax, 0xab0(%rsp)
cmpq $0x0, 0xab0(%rsp)
je 0x2d064
movq 0x208(%rsp), %rdi
movq 0xab0(%rsp), %rsi
movl 0xea4(%rsp), %edx
callq 0x36a00
jmp 0x2d044
movq 0x208(%rsp), %rdi
movq 0xab0(%rsp), %rsi
movl 0xea8(%rsp), %edx
callq 0x369c0
jmp 0x2d062
jmp 0x2d0d9
movq 0xb10(%rsp), %rsi
leaq 0xe48(%rsp), %rdi
callq 0x37410
jmp 0x2d07b
movq 0xb18(%rsp), %rsi
leaq 0xe48(%rsp), %rdi
callq 0x37410
jmp 0x2d092
movq 0xb20(%rsp), %rsi
leaq 0xe48(%rsp), %rdi
callq 0x37410
jmp 0x2d0a9
leaq 0xe30(%rsp), %rdi
leaq 0xea8(%rsp), %rsi
callq 0x3a130
jmp 0x2d0c0
leaq 0xe18(%rsp), %rdi
leaq 0xea4(%rsp), %rsi
callq 0x3a130
jmp 0x2d0d7
jmp 0x2d0d9
jmp 0x2d0db
cmpl $0x0, 0xd44(%rsp)
je 0x2d3a1
movq 0x208(%rsp), %rdi
movq 0xb10(%rsp), %rsi
callq 0x13660
movq %rax, 0x108(%rsp)
jmp 0x2d108
movq 0x208(%rsp), %rdi
movq 0xb20(%rsp), %rsi
callq 0x13660
movq %rax, 0x100(%rsp)
jmp 0x2d127
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdi
callq 0x86c40
movsd %xmm0, 0xf8(%rsp)
jmp 0x2d147
movsd 0xf8(%rsp), %xmm0
leaq 0x14b389(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
movl %eax, 0xf4(%rsp)
jmp 0x2d169
movl 0xf4(%rsp), %eax
cmpl $0x0, %eax
je 0x2d39f
movq 0x208(%rsp), %rdi
movq 0xb20(%rsp), %rsi
callq 0x13660
movq %rax, 0xe8(%rsp)
jmp 0x2d198
movq 0x208(%rsp), %rdi
movq 0xb28(%rsp), %rsi
callq 0x13660
movq %rax, 0xe0(%rsp)
jmp 0x2d1b7
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdi
callq 0x86c40
movsd %xmm0, 0xd8(%rsp)
jmp 0x2d1d7
movsd 0xd8(%rsp), %xmm0
leaq 0x14b2f9(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
movl %eax, 0xd4(%rsp)
jmp 0x2d1f9
movl 0xd4(%rsp), %eax
cmpl $0x0, %eax
je 0x2d39f
movq 0x208(%rsp), %rdi
movq 0xb10(%rsp), %rsi
callq 0x13660
movq %rax, 0xc8(%rsp)
jmp 0x2d228
movq 0x208(%rsp), %rdi
movq 0xb28(%rsp), %rsi
callq 0x13660
movq %rax, 0xc0(%rsp)
jmp 0x2d247
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdi
callq 0x86c40
movsd %xmm0, 0xb8(%rsp)
jmp 0x2d267
movsd 0xb8(%rsp), %xmm0
leaq 0x14b269(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
movl %eax, 0xb4(%rsp)
jmp 0x2d289
movl 0xb4(%rsp), %eax
cmpl $0x0, %eax
je 0x2d39f
movq 0x208(%rsp), %rdi
movq 0xb10(%rsp), %rsi
movq 0xb20(%rsp), %rdx
movq 0xb28(%rsp), %rcx
movq (%rdi), %rax
movq 0x48(%rax), %rax
xorl %r8d, %r8d
callq *%rax
movq %rax, 0xa8(%rsp)
jmp 0x2d2cf
movq 0xa8(%rsp), %rax
movq %rax, 0xaa8(%rsp)
cmpq $0x0, 0xaa8(%rsp)
je 0x2d328
movq 0x208(%rsp), %rdi
movq 0xaa8(%rsp), %rsi
movl 0xea4(%rsp), %edx
callq 0x36a00
jmp 0x2d308
movq 0x208(%rsp), %rdi
movq 0xaa8(%rsp), %rsi
movl 0xea8(%rsp), %edx
callq 0x369c0
jmp 0x2d326
jmp 0x2d39d
movq 0xb10(%rsp), %rsi
leaq 0xe48(%rsp), %rdi
callq 0x37410
jmp 0x2d33f
movq 0xb20(%rsp), %rsi
leaq 0xe48(%rsp), %rdi
callq 0x37410
jmp 0x2d356
movq 0xb28(%rsp), %rsi
leaq 0xe48(%rsp), %rdi
callq 0x37410
jmp 0x2d36d
leaq 0xe30(%rsp), %rdi
leaq 0xea8(%rsp), %rsi
callq 0x3a130
jmp 0x2d384
leaq 0xe18(%rsp), %rdi
leaq 0xea4(%rsp), %rsi
callq 0x3a130
jmp 0x2d39b
jmp 0x2d39d
jmp 0x2d39f
jmp 0x2d3a1
jmp 0x2d66f
leaq 0xdc0(%rsp), %rdi
leaq 0x1060af(%rip), %rsi    # 0x133464
callq 0xf700
cmpl $0x0, %eax
jne 0x2d5cb
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0x6a0(%rsp), %rcx
leaq 0x1062c9(%rip), %rsi    # 0x1336ab
movb $0x0, %al
callq 0xf4a0
cmpl $0x2, %eax
je 0x2d420
movl 0xeac(%rsp), %esi
leaq 0x106036(%rip), %rdi    # 0x133432
xorl %eax, %eax
callq 0xd4f30
jmp 0x2d405
movl $0x0, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
jmp 0x2da47
leaq 0x67f(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0xf8a0
movq 0xa0(%rsp), %rdx
leaq 0x680(%rsp), %rdi
leaq 0x6a0(%rsp), %rsi
callq 0x3a230
jmp 0x2d454
leaq 0xe98(%rsp), %rdi
leaq 0x680(%rsp), %rsi
leaq 0xea8(%rsp), %rdx
callq 0x3a1a0
movl %eax, 0x9c(%rsp)
jmp 0x2d47a
movl 0x9c(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, 0x9b(%rsp)
leaq 0x680(%rsp), %rdi
callq 0xf2d0
leaq 0x67f(%rsp), %rdi
callq 0xf540
movb 0x9b(%rsp), %al
testb $0x1, %al
jne 0x2d4ba
jmp 0x2d5c6
leaq 0x657(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xf8a0
movq 0x90(%rsp), %rdx
leaq 0x658(%rsp), %rdi
leaq 0x6a0(%rsp), %rsi
callq 0x3a230
jmp 0x2d4ee
movl 0xea8(%rsp), %edx
incl %edx
movl %edx, 0xea8(%rsp)
leaq 0xe98(%rsp), %rdi
leaq 0x658(%rsp), %rsi
callq 0x3a2f0
jmp 0x2d515
leaq 0x658(%rsp), %rdi
callq 0xf2d0
leaq 0x657(%rsp), %rdi
callq 0xf540
jmp 0x2d5c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
jmp 0x2d56b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
leaq 0x680(%rsp), %rdi
callq 0xf2d0
leaq 0x67f(%rsp), %rdi
callq 0xf540
jmp 0x2daa4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
jmp 0x2d5b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe80(%rsp)
movl %eax, 0xe7c(%rsp)
leaq 0x658(%rsp), %rdi
callq 0xf2d0
leaq 0x657(%rsp), %rdi
callq 0xf540
jmp 0x2daa4
jmp 0x2d66d
leaq 0xdc0(%rsp), %rdi
leaq 0x108e58(%rip), %rsi    # 0x136432
callq 0xf700
cmpl $0x0, %eax
je 0x2d5fd
leaq 0xdc0(%rsp), %rdi
leaq 0x108014(%rip), %rsi    # 0x135607
callq 0xf700
cmpl $0x0, %eax
jne 0x2d66b
movq 0xe10(%rsp), %rdi
leaq 0xdc0(%rsp), %rdx
leaq 0x250(%rsp), %rcx
leaq 0x10608f(%rip), %rsi    # 0x1336ab
movb $0x0, %al
callq 0xf4a0
cmpl $0x2, %eax
je 0x2d65a
movl 0xeac(%rsp), %esi
leaq 0x105dfc(%rip), %rdi    # 0x133432
xorl %eax, %eax
callq 0xd4f30
jmp 0x2d63f
movl $0x0, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
jmp 0x2da47
movl 0xea4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xea4(%rsp)
jmp 0x2d66d
jmp 0x2d66f
jmp 0x2d671
jmp 0x2d673
jmp 0x2d675
jmp 0x2c2e3
movl $0x0, 0x24c(%rsp)
movl 0x24c(%rsp), %eax
movl %eax, 0x88(%rsp)
leaq 0xe48(%rsp), %rdi
callq 0x13600
movl %eax, 0x8c(%rsp)
jmp 0x2d6a9
movl 0x88(%rsp), %eax
movl 0x8c(%rsp), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jg 0x2da22
movl 0x24c(%rsp), %esi
leaq 0xe48(%rsp), %rdi
callq 0x377e0
movq %rax, 0x80(%rsp)
jmp 0x2d6e0
movq 0x80(%rsp), %rax
movq %rax, 0x240(%rsp)
movl 0x24c(%rsp), %esi
incl %esi
leaq 0xe48(%rsp), %rdi
callq 0x377e0
movq %rax, 0x78(%rsp)
jmp 0x2d70d
movq 0x78(%rsp), %rax
movq %rax, 0x238(%rsp)
movl 0x24c(%rsp), %esi
addl $0x2, %esi
leaq 0xe48(%rsp), %rdi
callq 0x377e0
movq %rax, 0x70(%rsp)
jmp 0x2d738
movq 0x208(%rsp), %rdi
movq 0x70(%rsp), %rax
movq %rax, 0x230(%rsp)
movq 0x240(%rsp), %rsi
movq 0x238(%rsp), %rdx
movq 0x230(%rsp), %rcx
movq (%rdi), %rax
movq 0x48(%rax), %rax
xorl %r8d, %r8d
callq *%rax
movq %rax, 0x68(%rsp)
jmp 0x2d778
movq 0x68(%rsp), %rax
movq %rax, 0x228(%rsp)
cmpq $0x0, 0x228(%rsp)
jne 0x2d903
movq 0x208(%rsp), %rdi
movq 0x240(%rsp), %rsi
movq 0x230(%rsp), %rdx
movq 0x238(%rsp), %rcx
movq (%rdi), %rax
movq 0x48(%rax), %rax
xorl %r8d, %r8d
callq *%rax
movq %rax, 0x60(%rsp)
jmp 0x2d7c7
movq 0x60(%rsp), %rax
movq %rax, 0x228(%rsp)
cmpq $0x0, 0x228(%rsp)
jne 0x2d901
movq 0x208(%rsp), %rdi
movq 0x240(%rsp), %rsi
callq 0x13660
movq %rax, 0x58(%rsp)
jmp 0x2d7ff
movq 0x58(%rsp), %rsi
movq 0x208(%rsp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq %rax, 0x50(%rsp)
jmp 0x2d820
movq 0x208(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x238(%rsp), %rsi
callq 0x13660
movq %rax, 0x48(%rsp)
jmp 0x2d849
movq 0x48(%rsp), %rsi
movq 0x208(%rsp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq %rax, 0x40(%rsp)
jmp 0x2d86a
movq 0x208(%rsp), %rdi
movq 0x40(%rsp), %rax
movq %rax, 0x218(%rsp)
movq 0x230(%rsp), %rsi
callq 0x13660
movq %rax, 0x38(%rsp)
jmp 0x2d893
movq 0x38(%rsp), %rsi
movq 0x208(%rsp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq %rax, 0x30(%rsp)
jmp 0x2d8b4
movq 0x208(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x210(%rsp)
movq 0x220(%rsp), %rsi
movq 0x218(%rsp), %rdx
movq 0x210(%rsp), %rcx
movq (%rdi), %rax
movq 0x48(%rax), %rax
xorl %r8d, %r8d
callq *%rax
movq %rax, 0x28(%rsp)
jmp 0x2d8f4
movq 0x28(%rsp), %rax
movq %rax, 0x228(%rsp)
jmp 0x2d903
cmpq $0x0, 0x228(%rsp)
je 0x2da0a
leaq 0xe30(%rsp), %rdi
callq 0x3a320
movl %eax, 0x24(%rsp)
movl 0x24c(%rsp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jle 0x2d98d
movq 0x228(%rsp), %rax
movq %rax, 0x18(%rsp)
movslq 0x24c(%rsp), %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movslq %eax, %rsi
leaq 0xe30(%rsp), %rdi
callq 0x3a340
movq 0x208(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl (%rax), %edx
callq 0x369c0
jmp 0x2d98b
jmp 0x2d98d
leaq 0xe18(%rsp), %rdi
callq 0x3a320
movl %eax, 0x14(%rsp)
movl 0x24c(%rsp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jle 0x2da08
movq 0x228(%rsp), %rax
movq %rax, 0x8(%rsp)
movslq 0x24c(%rsp), %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movslq %eax, %rsi
leaq 0xe18(%rsp), %rdi
callq 0x3a340
movq 0x208(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl (%rax), %edx
callq 0x36a00
jmp 0x2da06
jmp 0x2da08
jmp 0x2da0a
jmp 0x2da0c
movl 0x24c(%rsp), %eax
addl $0x3, %eax
movl %eax, 0x24c(%rsp)
jmp 0x2d685
movq 0x12b8(%rsp), %rdi
callq 0xf4b0
jmp 0x2da31
movl $0x1, 0x12d4(%rsp)
movl $0x1, 0xdbc(%rsp)
leaq 0xe18(%rsp), %rdi
callq 0x3a360
leaq 0xe30(%rsp), %rdi
callq 0x3a360
leaq 0xe48(%rsp), %rdi
callq 0x36850
leaq 0xe58(%rsp), %rdi
callq 0x36850
leaq 0xe68(%rsp), %rdi
callq 0x3a3c0
leaq 0xe88(%rsp), %rdi
callq 0x3a3d0
leaq 0xe98(%rsp), %rdi
callq 0x3a3e0
jmp 0x2db01
leaq 0xe18(%rsp), %rdi
callq 0x3a360
leaq 0xe30(%rsp), %rdi
callq 0x3a360
leaq 0xe48(%rsp), %rdi
callq 0x36850
leaq 0xe58(%rsp), %rdi
callq 0x36850
leaq 0xe68(%rsp), %rdi
callq 0x3a3c0
leaq 0xe88(%rsp), %rdi
callq 0x3a3d0
leaq 0xe98(%rsp), %rdi
callq 0x3a3e0
jmp 0x2db10
movl 0x12d4(%rsp), %eax
addq $0x12d8, %rsp           # imm = 0x12D8
retq
movq 0xe80(%rsp), %rdi
callq 0xf890
nopl (%rax)