// File: tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::ReadObj(gaps::R3Scene*, gaps::R3SceneNode*, char const*, _IO_FILE*, gaps::RNArray<gaps::R3Material*>*)
static int
ReadObj(R3Scene *scene, R3SceneNode *node, const char *dirname, FILE *fp, RNArray<R3Material *> *returned_materials = NULL)
{
  // Read body
  char buffer[1024];
  int line_count = 0;
  RNBoolean smooth_normals = FALSE;
  R3Material *material = NULL;
  RNSymbolTable<R3Material *> material_symbol_table;
  RNArray<R2Point *> texture_coords;
  RNArray<R3Vector *> normals;
  RNArray<R3Triangle *> tris;
  RNArray<R3TriangleVertex *> verts;
  RNArray<R3TriangleVertex *> tmp_verts;
  R3SceneNode *top_node = node;
  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 OBJ file", line_count);
      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 OBJ file", line_count);
        return 0;
      }

      // Create vertex
      R3TriangleVertex *vertex = new R3TriangleVertex(R3Point(x, y, z));
      vertex->SetSharedFlag();
      verts.Insert(vertex);
    }
    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);

      // Not sure about this ...
      if (texture_coords.NEntries() == verts.NEntries()) {
        verts.Tail()->SetTextureCoords(*vt);
      }
    }
    else if (!strcmp(keyword, "vn")) {
      // Read normal
      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);

      // Not sure about this ...
      if (normals.NEntries() == verts.NEntries()) {
        verts.Tail()->SetNormal(*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;
      R3TriangleVertex *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);
        if ((ti > 0) && ((ti-1) < texture_coords.NEntries())) {
          R2Point texcoords = *(texture_coords.Kth(ti-1));
          if (!(v[i]->Flags()[R3_VERTEX_TEXTURE_COORDS_DRAW_FLAG])) v[i]->SetTextureCoords(texcoords);
          else if (!R2Contains(texcoords, v[i]->TextureCoords())) {
            v[i] = new R3TriangleVertex(v[i]->Position(), texcoords); 
            v[i]->SetSharedFlag();
            tmp_verts.Insert(v[i]);
          }
        }
        if ((ni > 0) && ((ni-1) < normals.NEntries())) {
          R3Vector normal = *(normals.Kth(ni-1));
          if (!(v[i]->Flags()[R3_VERTEX_NORMALS_DRAW_FLAG])) v[i]->SetNormal(normal);
          else if (!R3Contains(normal, v[i]->Normal())) {
            v[i] = new R3TriangleVertex(v[i]->Position(), normal, v[i]->TextureCoords());
            v[i]->SetSharedFlag();
            tmp_verts.Insert(v[i]);
          }
        }
      }

      // 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(v[0]->Position(), v[1]->Position())) &&
          RNIsPositive(R3Distance(v[1]->Position(), v[2]->Position())) &&
          RNIsPositive(R3Distance(v[2]->Position(), v[0]->Position()))) {
        R3Triangle *triangle = new R3Triangle(v[0], v[1], v[2]);
        tris.Insert(triangle);
      }

      // Create second triangle
      if (quad) {
        if (RNIsPositive(R3Distance(v[0]->Position(), v[2]->Position())) &&
            RNIsPositive(R3Distance(v[2]->Position(), v[3]->Position())) &&
            RNIsPositive(R3Distance(v[0]->Position(), v[3]->Position()))) {
          R3Triangle *triangle = new R3Triangle(v[0], v[2], v[3]);
          tris.Insert(triangle);
        }
      }
    }
    else if (!strcmp(keyword, "mtllib")) {
      // 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;
      }

      // Read materials
      RNArray<R3Material *> parsed_materials;
      if (!ReadObjMtlFile(scene, dirname, mtlname, &parsed_materials)) return 0;
      if (returned_materials) *returned_materials = parsed_materials;

      // Fill symbol table
      material_symbol_table.Empty();
      for (int i = 0; i < parsed_materials.NEntries(); i++) {
        R3Material *material = parsed_materials.Kth(i);
        if (!material->Name()) continue;
        material_symbol_table.Insert(material->Name(), material);
      }
    }
    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;
      }

      // Process triangles from previous material
      if ((verts.NEntries() > 0) && (tris.NEntries() > 0)) {
        InsertSceneElement(scene, node, material, verts, tris, smooth_normals);
        for (int i = 0; i < tris.NEntries(); i++) delete tris[i];
        tris.Empty();
      }

      // Find material
      if (!material_symbol_table.Find(mtlname, &material)) {
        RNFail("Unable to find material %s at on line %d in OBJ file\n", mtlname, line_count);
        return 0;
      }
    }
    else if (!strcmp(keyword, "g") || !strcmp(keyword, "o") || !strcmp(keyword, "s")) {
      // 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;
      }

      // Process triangles from previous object
      if ((verts.NEntries() > 0) && (tris.NEntries() > 0)) {
        InsertSceneElement(scene, node, material, verts, tris, smooth_normals);
        for (int i = 0; i < tris.NEntries(); i++) delete tris[i];
        tris.Empty();
      }

      // Create child node
      if (!strcmp(keyword, "g") || !strcmp(keyword, "o")) {
        node = new R3SceneNode(scene);
        node->SetName(name);
        top_node->InsertChild(node);
      }

      // Update smooth normal parameter
      if (!strcmp(keyword, "s")) {
        if (!strcmp(name, "off")) smooth_normals = FALSE;
        else if (!strcmp(name, "0")) smooth_normals = FALSE;
        else smooth_normals = TRUE; 
      }
    }
  }

  // Process triangles from previous material
  if ((verts.NEntries() > 0) && (tris.NEntries() > 0)) {
    InsertSceneElement(scene, node, material, verts, tris, smooth_normals);
    for (int i = 0; i < tris.NEntries(); i++) delete tris[i];
    tris.Empty();
  }

  // Delete texture coordinates
  for (int i = 0; i < texture_coords.NEntries(); i++) {
    delete texture_coords.Kth(i);
  }

  // Delete normals
  for (int i = 0; i < normals.NEntries(); i++) {
    delete normals.Kth(i);
  }

  // Delete verts (copied in InsertSceneElement)
  for (int i = 0; i < verts.NEntries(); i++) {
    delete verts.Kth(i);
  }

  // Delete tmp verts (copied in InsertSceneElement)
  for (int i = 0; i < tmp_verts.NEntries(); i++) {
    delete tmp_verts.Kth(i);
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x1778, %rsp           # imm = 0x1778
movq %rdi, 0x1768(%rsp)
movq %rsi, 0x1760(%rsp)
movq %rdx, 0x1758(%rsp)
movq %rcx, 0x1750(%rsp)
movq %r8, 0x1748(%rsp)
movl $0x0, 0x133c(%rsp)
movl $0x0, 0x1338(%rsp)
movq $0x0, 0x1330(%rsp)
leaq 0x1328(%rsp), %rdi
callq 0x49eb0
leaq 0x1318(%rsp), %rdi
callq 0x49ec0
jmp 0x43bcd
leaq 0x12f8(%rsp), %rdi
callq 0x49ed0
jmp 0x43bdc
leaq 0x12e8(%rsp), %rdi
callq 0x49140
jmp 0x43beb
leaq 0x12d8(%rsp), %rdi
callq 0x48d30
jmp 0x43bfa
leaq 0x12c8(%rsp), %rdi
callq 0x48d30
jmp 0x43c09
movq 0x1760(%rsp), %rax
movq %rax, 0x12c0(%rsp)
movq 0x1750(%rsp), %rdx
leaq 0x1340(%rsp), %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x230f0
movq %rax, 0x280(%rsp)
jmp 0x43c3d
movq 0x280(%rsp), %rax
cmpq $0x0, %rax
je 0x45706
movl 0x133c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x133c(%rsp)
leaq 0x1340(%rsp), %rax
movq %rax, 0x12b8(%rsp)
movq 0x12b8(%rsp), %rax
movsbl (%rax), %edi
callq 0x220c0
cmpl $0x0, %eax
je 0x43d35
movq 0x12b8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x12b8(%rsp)
jmp 0x43c70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45a87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45a7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45a6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45a60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45a53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45a46
movq 0x12b8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x43d4a
jmp 0x43c19
movq 0x12b8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x43d5f
jmp 0x43c19
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0x16a4d1(%rip), %rsi    # 0x1ae247
movb $0x0, %al
callq 0x229a0
cmpl $0x1, %eax
je 0x43db4
movl 0x133c(%rsp), %esi
leaq 0x14b8e5(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x43d99
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
leaq 0x1260(%rsp), %rdi
leaq 0x14a4d7(%rip), %rsi    # 0x18e29a
callq 0x22ec0
cmpl $0x0, %eax
jne 0x43ef9
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0x14b8b1(%rip), %rsi    # 0x18f699
leaq 0x1250(%rsp), %rcx
leaq 0x1248(%rsp), %r8
leaq 0x1240(%rsp), %r9
movb $0x0, %al
callq 0x229a0
cmpl $0x4, %eax
je 0x43e3e
movl 0x133c(%rsp), %esi
leaq 0x14b85b(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x43e23
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
movl $0x68, %edi
callq 0x229e0
movq %rax, 0x278(%rsp)
jmp 0x43e52
movsd 0x1250(%rsp), %xmm0
movsd 0x1248(%rsp), %xmm1
movsd 0x1240(%rsp), %xmm2
leaq 0x1220(%rsp), %rdi
callq 0xcc870
jmp 0x43e7c
movq 0x278(%rsp), %rdi
leaq 0x1220(%rsp), %rsi
callq 0xb06c0
jmp 0x43e93
movq 0x278(%rsp), %rax
movq %rax, 0x1238(%rsp)
movq 0x1238(%rsp), %rdi
callq 0x48f20
jmp 0x43eb2
movq 0x1238(%rsp), %rsi
leaq 0x12d8(%rsp), %rdi
callq 0x48f60
jmp 0x43ec9
jmp 0x45701
movq 0x278(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x68, %esi
callq 0x22a00
jmp 0x45a46
leaq 0x1260(%rsp), %rdi
leaq 0x14b79d(%rip), %rsi    # 0x18f6a5
callq 0x22ec0
cmpl $0x0, %eax
jne 0x44065
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0x14b77b(%rip), %rsi    # 0x18f6a8
leaq 0x1218(%rsp), %rcx
leaq 0x1210(%rsp), %r8
movb $0x0, %al
callq 0x229a0
cmpl $0x3, %eax
je 0x43f7b
movl 0x133c(%rsp), %esi
leaq 0x14b71e(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x43f60
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
movl $0x10, %edi
callq 0x229e0
movq %rax, 0x270(%rsp)
jmp 0x43f8f
movq 0x270(%rsp), %rdi
movsd 0x1218(%rsp), %xmm0
movsd 0x1210(%rsp), %xmm1
callq 0xe3d80
jmp 0x43fb0
movq 0x270(%rsp), %rax
movq %rax, 0x1208(%rsp)
movq 0x1208(%rsp), %rsi
leaq 0x1318(%rsp), %rdi
callq 0x49ee0
jmp 0x43fd7
leaq 0x1318(%rsp), %rdi
callq 0x2b8b0
movl %eax, 0x26c(%rsp)
leaq 0x12d8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x26c(%rsp), %eax
cmpl %ecx, %eax
jne 0x44060
leaq 0x12d8(%rsp), %rdi
callq 0x49f10
movq %rax, 0x260(%rsp)
jmp 0x4401c
movq 0x260(%rsp), %rdi
movq 0x1208(%rsp), %rsi
callq 0x48ea0
jmp 0x44033
jmp 0x44060
movq 0x270(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x10, %esi
callq 0x22a00
jmp 0x45a46
jmp 0x456ff
leaq 0x1260(%rsp), %rdi
leaq 0x14b63d(%rip), %rsi    # 0x18f6b1
callq 0x22ec0
cmpl $0x0, %eax
jne 0x441f1
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0x14b600(%rip), %rsi    # 0x18f699
leaq 0x1200(%rsp), %rcx
leaq 0x11f8(%rsp), %r8
leaq 0x11f0(%rsp), %r9
movb $0x0, %al
callq 0x229a0
cmpl $0x4, %eax
je 0x440ef
movl 0x133c(%rsp), %esi
leaq 0x14b5aa(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x440d4
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
movl $0x18, %edi
callq 0x229e0
movq %rax, 0x258(%rsp)
jmp 0x44103
movq 0x258(%rsp), %rdi
movsd 0x1200(%rsp), %xmm0
movsd 0x11f8(%rsp), %xmm1
movsd 0x11f0(%rsp), %xmm2
callq 0xcd9d0
jmp 0x4412d
movq 0x258(%rsp), %rax
movq %rax, 0x11e8(%rsp)
movq 0x11e8(%rsp), %rdi
callq 0xce130
jmp 0x4414c
movq 0x11e8(%rsp), %rsi
leaq 0x12f8(%rsp), %rdi
callq 0x49f20
jmp 0x44163
leaq 0x12f8(%rsp), %rdi
callq 0x2b8b0
movl %eax, 0x254(%rsp)
leaq 0x12d8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x254(%rsp), %eax
cmpl %ecx, %eax
jne 0x441ec
leaq 0x12d8(%rsp), %rdi
callq 0x49f10
movq %rax, 0x248(%rsp)
jmp 0x441a8
movq 0x248(%rsp), %rdi
movq 0x11e8(%rsp), %rsi
callq 0x49f50
jmp 0x441bf
jmp 0x441ec
movq 0x258(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x18, %esi
callq 0x22a00
jmp 0x45a46
jmp 0x456fd
leaq 0x1260(%rsp), %rdi
leaq 0x14b514(%rip), %rsi    # 0x18f714
callq 0x22ec0
cmpl $0x0, %eax
jne 0x44eb5
movl $0x1, 0x11e4(%rsp)
leaq 0xfe0(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x224f0
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0xfe0(%rsp), %rcx
leaq 0xfe0(%rsp), %r8
addq $0x80, %r8
leaq 0xfe0(%rsp), %r9
addq $0x100, %r9             # imm = 0x100
leaq 0xfe0(%rsp), %rax
addq $0x180, %rax            # imm = 0x180
leaq 0x14b43c(%rip), %rsi    # 0x18f6b4
movq %rax, (%rsp)
movb $0x0, %al
callq 0x229a0
cmpl $0x5, %eax
je 0x44314
movl $0x0, 0x11e4(%rsp)
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0xfe0(%rsp), %rcx
leaq 0xfe0(%rsp), %r8
addq $0x80, %r8
leaq 0xfe0(%rsp), %r9
addq $0x100, %r9             # imm = 0x100
leaq 0x14b3e2(%rip), %rsi    # 0x18f6b6
movb $0x0, %al
callq 0x229a0
cmpl $0x4, %eax
je 0x44312
movl 0x133c(%rsp), %esi
leaq 0x14b387(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x442f7
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
jmp 0x44314
movl 0x11e4(%rsp), %edx
movl $0x3, %eax
movl $0x4, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0xfdc(%rsp)
leaq 0xfb0(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x224f0
movl $0x0, 0xfac(%rsp)
movl 0xfac(%rsp), %eax
cmpl 0xfdc(%rsp), %eax
jge 0x449fc
movslq 0xfac(%rsp), %rcx
leaq 0xfe0(%rsp), %rax
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, 0xfa0(%rsp)
movq 0xfa0(%rsp), %rdi
movl $0x2f, %esi
callq 0x22350
movq %rax, 0xf98(%rsp)
cmpq $0x0, 0xf98(%rsp)
je 0x443c3
movq 0xf98(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf98(%rsp)
movb $0x0, (%rax)
cmpq $0x0, 0xf98(%rsp)
je 0x443ea
movq 0xf98(%rsp), %rdi
movl $0x2f, %esi
callq 0x22350
movq %rax, 0x240(%rsp)
jmp 0x443f6
xorl %eax, %eax
movq %rax, 0x240(%rsp)
jmp 0x443f6
movq 0x240(%rsp), %rax
movq %rax, 0xf90(%rsp)
cmpq $0x0, 0xf90(%rsp)
je 0x4442b
movq 0xf90(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf90(%rsp)
movb $0x0, (%rax)
cmpq $0x0, 0xf90(%rsp)
je 0x44455
movq 0xf90(%rsp), %rdi
callq 0x223d0
cmpq $0x0, %rax
jne 0x44455
movq $0x0, 0xf90(%rsp)
cmpq $0x0, 0xf98(%rsp)
je 0x4447f
movq 0xf98(%rsp), %rdi
callq 0x223d0
cmpq $0x0, %rax
jne 0x4447f
movq $0x0, 0xf98(%rsp)
cmpq $0x0, 0xfa0(%rsp)
je 0x444a0
movq 0xfa0(%rsp), %rdi
callq 0x23090
movl %eax, 0x23c(%rsp)
jmp 0x444ab
xorl %eax, %eax
movl %eax, 0x23c(%rsp)
jmp 0x444ab
movl 0x23c(%rsp), %eax
movl %eax, 0xf8c(%rsp)
cmpq $0x0, 0xf98(%rsp)
je 0x444da
movq 0xf98(%rsp), %rdi
callq 0x23090
movl %eax, 0x238(%rsp)
jmp 0x444e5
xorl %eax, %eax
movl %eax, 0x238(%rsp)
jmp 0x444e5
movl 0x238(%rsp), %eax
movl %eax, 0xf88(%rsp)
cmpq $0x0, 0xf90(%rsp)
je 0x44514
movq 0xf90(%rsp), %rdi
callq 0x23090
movl %eax, 0x234(%rsp)
jmp 0x4451f
xorl %eax, %eax
movl %eax, 0x234(%rsp)
jmp 0x4451f
movl 0x234(%rsp), %eax
movl %eax, 0xf84(%rsp)
movl 0xf8c(%rsp), %esi
decl %esi
leaq 0x12d8(%rsp), %rdi
callq 0x49090
movq %rax, 0x228(%rsp)
jmp 0x4454d
movq 0x228(%rsp), %rcx
movslq 0xfac(%rsp), %rax
movq %rcx, 0xfb0(%rsp,%rax,8)
cmpl $0x0, 0xf88(%rsp)
jle 0x44791
movl 0xf88(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x224(%rsp)
leaq 0x1318(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x224(%rsp), %eax
cmpl %ecx, %eax
jge 0x44791
movl 0xf88(%rsp), %esi
decl %esi
leaq 0x1318(%rsp), %rdi
callq 0x49fc0
movq %rax, 0x218(%rsp)
jmp 0x445c2
movq 0x218(%rsp), %rsi
leaq 0xf70(%rsp), %rdi
callq 0xe3db0
jmp 0x445d9
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x48bd0
movq %rax, 0x210(%rsp)
jmp 0x445f8
movq 0x210(%rsp), %rax
movq %rax, 0xf68(%rsp)
leaq 0xf60(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x2b520
jmp 0x4461c
movq 0xf60(%rsp), %rsi
leaq 0xf68(%rsp), %rdi
callq 0x2bdb0
movl %eax, 0x20c(%rsp)
jmp 0x4463a
movl 0x20c(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4464f
jmp 0x44673
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
leaq 0xf70(%rsp), %rsi
callq 0x48ea0
jmp 0x4466e
jmp 0x4478f
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x48bf0
movq %rax, 0x200(%rsp)
jmp 0x44692
movq 0x200(%rsp), %rsi
leaq 0xf70(%rsp), %rdi
callq 0xdb5b0
movl %eax, 0x1fc(%rsp)
jmp 0x446b0
movl 0x1fc(%rsp), %eax
cmpl $0x0, %eax
jne 0x4478d
movl $0x68, %edi
callq 0x229e0
movq %rax, 0x1f0(%rsp)
jmp 0x446d4
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x2bcf0
movq %rax, 0x1e8(%rsp)
jmp 0x446f3
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rdi
leaq 0xf70(%rsp), %rdx
callq 0xb08d0
jmp 0x44712
movq 0x1f0(%rsp), %rcx
movslq 0xfac(%rsp), %rax
movq %rcx, 0xfb0(%rsp,%rax,8)
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x48f20
jmp 0x44741
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rsi
leaq 0x12c8(%rsp), %rdi
callq 0x48f60
jmp 0x44760
jmp 0x4478d
movq 0x1f0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x68, %esi
callq 0x22a00
jmp 0x45a46
jmp 0x4478f
jmp 0x44791
cmpl $0x0, 0xf84(%rsp)
jle 0x449e4
movl 0xf84(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x1e4(%rsp)
leaq 0x12f8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x1e4(%rsp), %eax
cmpl %ecx, %eax
jge 0x449e4
movl 0xf84(%rsp), %esi
decl %esi
leaq 0x12f8(%rsp), %rdi
callq 0x49fe0
movq %rax, 0x1d8(%rsp)
jmp 0x447ee
movq 0x1d8(%rsp), %rsi
leaq 0xf48(%rsp), %rdi
callq 0xcda10
jmp 0x44805
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x48bd0
movq %rax, 0x1d0(%rsp)
jmp 0x44824
movq 0x1d0(%rsp), %rax
movq %rax, 0xf40(%rsp)
leaq 0xf38(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2b520
jmp 0x44848
movq 0xf38(%rsp), %rsi
leaq 0xf40(%rsp), %rdi
callq 0x2bdb0
movl %eax, 0x1cc(%rsp)
jmp 0x44866
movl 0x1cc(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4487b
jmp 0x4489f
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
leaq 0xf48(%rsp), %rsi
callq 0x49f50
jmp 0x4489a
jmp 0x449e2
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x2bd00
movq %rax, 0x1c0(%rsp)
jmp 0x448be
movq 0x1c0(%rsp), %rsi
leaq 0xf48(%rsp), %rdi
callq 0x72d70
movl %eax, 0x1bc(%rsp)
jmp 0x448dc
movl 0x1bc(%rsp), %eax
cmpl $0x0, %eax
jne 0x449e0
movl $0x68, %edi
callq 0x229e0
movq %rax, 0x1b0(%rsp)
jmp 0x44900
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x2bcf0
movq %rax, 0x1a8(%rsp)
jmp 0x4491f
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x48bf0
movq %rax, 0x1a0(%rsp)
jmp 0x4493e
movq 0x1a0(%rsp), %rcx
movq 0x1a8(%rsp), %rsi
movq 0x1b0(%rsp), %rdi
leaq 0xf48(%rsp), %rdx
callq 0xb0b00
jmp 0x44965
movq 0x1b0(%rsp), %rcx
movslq 0xfac(%rsp), %rax
movq %rcx, 0xfb0(%rsp,%rax,8)
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rdi
callq 0x48f20
jmp 0x44994
movslq 0xfac(%rsp), %rax
movq 0xfb0(%rsp,%rax,8), %rsi
leaq 0x12c8(%rsp), %rdi
callq 0x48f60
jmp 0x449b3
jmp 0x449e0
movq 0x1b0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x68, %esi
callq 0x22a00
jmp 0x45a46
jmp 0x449e2
jmp 0x449e4
jmp 0x449e6
movl 0xfac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xfac(%rsp)
jmp 0x44351
movq 0xfb0(%rsp), %rax
cmpq 0xfb8(%rsp), %rax
je 0x44a32
movq 0xfb8(%rsp), %rax
cmpq 0xfc0(%rsp), %rax
je 0x44a32
movq 0xfb0(%rsp), %rax
cmpq 0xfc0(%rsp), %rax
jne 0x44a37
jmp 0x43c19
cmpl $0x0, 0x11e4(%rsp)
je 0x44a82
movq 0xfc8(%rsp), %rax
cmpq 0xfb0(%rsp), %rax
je 0x44a77
movq 0xfc8(%rsp), %rax
cmpq 0xfb8(%rsp), %rax
je 0x44a77
movq 0xfc8(%rsp), %rax
cmpq 0xfc0(%rsp), %rax
jne 0x44a82
movl $0x0, 0x11e4(%rsp)
movq 0xfb0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x198(%rsp)
jmp 0x44a99
movq 0xfb8(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x190(%rsp)
jmp 0x44ab0
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdi
callq 0x779c0
movsd %xmm0, 0x188(%rsp)
jmp 0x44ad0
movsd 0x188(%rsp), %xmm0
leaq 0x1b17c8(%rip), %rax    # 0x1f62a8
movsd (%rax), %xmm1
callq 0x4a000
movl %eax, 0x184(%rsp)
jmp 0x44af2
movl 0x184(%rsp), %eax
cmpl $0x0, %eax
je 0x44c91
movq 0xfb8(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x178(%rsp)
jmp 0x44b19
movq 0xfc0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x170(%rsp)
jmp 0x44b30
movq 0x170(%rsp), %rsi
movq 0x178(%rsp), %rdi
callq 0x779c0
movsd %xmm0, 0x168(%rsp)
jmp 0x44b50
movsd 0x168(%rsp), %xmm0
leaq 0x1b1748(%rip), %rax    # 0x1f62a8
movsd (%rax), %xmm1
callq 0x4a000
movl %eax, 0x164(%rsp)
jmp 0x44b72
movl 0x164(%rsp), %eax
cmpl $0x0, %eax
je 0x44c91
movq 0xfc0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x158(%rsp)
jmp 0x44b99
movq 0xfb0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x150(%rsp)
jmp 0x44bb0
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rdi
callq 0x779c0
movsd %xmm0, 0x148(%rsp)
jmp 0x44bd0
movsd 0x148(%rsp), %xmm0
leaq 0x1b16c8(%rip), %rax    # 0x1f62a8
movsd (%rax), %xmm1
callq 0x4a000
movl %eax, 0x144(%rsp)
jmp 0x44bf2
movl 0x144(%rsp), %eax
cmpl $0x0, %eax
je 0x44c91
movl $0x88, %edi
callq 0x229e0
movq %rax, 0x138(%rsp)
jmp 0x44c16
movq 0x138(%rsp), %rdi
movq 0xfb0(%rsp), %rsi
movq 0xfb8(%rsp), %rdx
movq 0xfc0(%rsp), %rcx
callq 0xb1110
jmp 0x44c3d
movq 0x138(%rsp), %rax
movq %rax, 0xf30(%rsp)
movq 0xf30(%rsp), %rsi
leaq 0x12e8(%rsp), %rdi
callq 0x49190
jmp 0x44c64
jmp 0x44c91
movq 0x138(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x88, %esi
callq 0x22a00
jmp 0x45a46
cmpl $0x0, 0x11e4(%rsp)
je 0x44eb0
movq 0xfb0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x130(%rsp)
jmp 0x44cb6
movq 0xfc0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x128(%rsp)
jmp 0x44ccd
movq 0x128(%rsp), %rsi
movq 0x130(%rsp), %rdi
callq 0x779c0
movsd %xmm0, 0x120(%rsp)
jmp 0x44ced
movsd 0x120(%rsp), %xmm0
leaq 0x1b15ab(%rip), %rax    # 0x1f62a8
movsd (%rax), %xmm1
callq 0x4a000
movl %eax, 0x11c(%rsp)
jmp 0x44d0f
movl 0x11c(%rsp), %eax
cmpl $0x0, %eax
je 0x44eae
movq 0xfc0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x110(%rsp)
jmp 0x44d36
movq 0xfc8(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0x108(%rsp)
jmp 0x44d4d
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdi
callq 0x779c0
movsd %xmm0, 0x100(%rsp)
jmp 0x44d6d
movsd 0x100(%rsp), %xmm0
leaq 0x1b152b(%rip), %rax    # 0x1f62a8
movsd (%rax), %xmm1
callq 0x4a000
movl %eax, 0xfc(%rsp)
jmp 0x44d8f
movl 0xfc(%rsp), %eax
cmpl $0x0, %eax
je 0x44eae
movq 0xfb0(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0xf0(%rsp)
jmp 0x44db6
movq 0xfc8(%rsp), %rdi
callq 0x2bcf0
movq %rax, 0xe8(%rsp)
jmp 0x44dcd
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdi
callq 0x779c0
movsd %xmm0, 0xe0(%rsp)
jmp 0x44ded
movsd 0xe0(%rsp), %xmm0
leaq 0x1b14ab(%rip), %rax    # 0x1f62a8
movsd (%rax), %xmm1
callq 0x4a000
movl %eax, 0xdc(%rsp)
jmp 0x44e0f
movl 0xdc(%rsp), %eax
cmpl $0x0, %eax
je 0x44eae
movl $0x88, %edi
callq 0x229e0
movq %rax, 0xd0(%rsp)
jmp 0x44e33
movq 0xd0(%rsp), %rdi
movq 0xfb0(%rsp), %rsi
movq 0xfc0(%rsp), %rdx
movq 0xfc8(%rsp), %rcx
callq 0xb1110
jmp 0x44e5a
movq 0xd0(%rsp), %rax
movq %rax, 0xf28(%rsp)
movq 0xf28(%rsp), %rsi
leaq 0x12e8(%rsp), %rdi
callq 0x49190
jmp 0x44e81
jmp 0x44eae
movq 0xd0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x88, %esi
callq 0x22a00
jmp 0x45a46
jmp 0x44eb0
jmp 0x456fb
leaq 0x1260(%rsp), %rdi
leaq 0x14a7fb(%rip), %rsi    # 0x18f6bf
callq 0x22ec0
cmpl $0x0, %eax
jne 0x4517a
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0xb20(%rsp), %rcx
leaq 0x14b3e0(%rip), %rsi    # 0x1902d1
movb $0x0, %al
callq 0x229a0
cmpl $0x2, %eax
je 0x44f2f
movl 0x133c(%rsp), %esi
leaq 0x14a76a(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x44f14
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
leaq 0xb10(%rsp), %rdi
callq 0x48160
jmp 0x44f3e
movq 0x1768(%rsp), %rdi
movq 0x1758(%rsp), %rsi
leaq 0xb20(%rsp), %rdx
leaq 0xb10(%rsp), %rcx
callq 0x45ab0
movl %eax, 0xcc(%rsp)
jmp 0x44f6c
movl 0xcc(%rsp), %eax
cmpl $0x0, %eax
jne 0x44fac
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x45145
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45168
cmpq $0x0, 0x1748(%rsp)
je 0x44fd0
movq 0x1748(%rsp), %rdi
leaq 0xb10(%rsp), %rsi
callq 0x4a030
jmp 0x44fce
jmp 0x44fd0
leaq 0x1328(%rsp), %rdi
callq 0x4a060
jmp 0x44fdf
movl $0x0, 0xb0c(%rsp)
movl 0xb0c(%rsp), %eax
movl %eax, 0xc8(%rsp)
leaq 0xb10(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0xc8(%rsp), %eax
cmpl %ecx, %eax
jge 0x4513a
movl 0xb0c(%rsp), %esi
leaq 0xb10(%rsp), %rdi
callq 0x49ca0
movq %rax, 0xc0(%rsp)
jmp 0x45034
movq 0xc0(%rsp), %rax
movq %rax, 0xb00(%rsp)
movq 0xb00(%rsp), %rdi
callq 0x48250
cmpq $0x0, %rax
jne 0x4505c
jmp 0x450de
movq 0xb00(%rsp), %rdi
callq 0x48250
movq %rax, 0xb0(%rsp)
leaq 0xadf(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x232a0
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
leaq 0xae0(%rsp), %rdi
callq 0x485b0
jmp 0x450a5
movq 0xb00(%rsp), %rdx
leaq 0x1328(%rsp), %rdi
leaq 0xae0(%rsp), %rsi
callq 0x4a080
jmp 0x450c4
leaq 0xae0(%rsp), %rdi
callq 0x22610
leaq 0xadf(%rsp), %rdi
callq 0x22ab0
movl 0xb0c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb0c(%rsp)
jmp 0x44fea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x4512b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
leaq 0xae0(%rsp), %rdi
callq 0x22610
leaq 0xadf(%rsp), %rdi
callq 0x22ab0
jmp 0x45168
movl $0x0, 0x125c(%rsp)
leaq 0xb10(%rsp), %rdi
callq 0x481f0
movl 0x125c(%rsp), %eax
testl %eax, %eax
jne 0x459e9
jmp 0x45163
jmp 0x456f9
leaq 0xb10(%rsp), %rdi
callq 0x481f0
jmp 0x45a46
leaq 0x1260(%rsp), %rdi
leaq 0x14a53d(%rip), %rsi    # 0x18f6c6
callq 0x22ec0
cmpl $0x0, %eax
jne 0x4541c
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0x6d0(%rsp), %rcx
leaq 0x14b11b(%rip), %rsi    # 0x1902d1
movb $0x0, %al
callq 0x229a0
cmpl $0x2, %eax
je 0x451f4
movl 0x133c(%rsp), %esi
leaq 0x14a4a5(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x451d9
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
leaq 0x12d8(%rsp), %rdi
callq 0x2b8b0
cmpl $0x0, %eax
jle 0x452fa
leaq 0x12e8(%rsp), %rdi
callq 0x2b8b0
cmpl $0x0, %eax
jle 0x452fa
movq 0x1768(%rsp), %rdi
movq 0x1760(%rsp), %rsi
movq 0x1330(%rsp), %rdx
movl 0x1338(%rsp), %r9d
leaq 0x12d8(%rsp), %rcx
leaq 0x12e8(%rsp), %r8
callq 0x3c760
jmp 0x45257
movl $0x0, 0x6cc(%rsp)
movl 0x6cc(%rsp), %eax
movl %eax, 0xac(%rsp)
leaq 0x12e8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0xac(%rsp), %eax
cmpl %ecx, %eax
jge 0x452e7
movl 0x6cc(%rsp), %esi
leaq 0x12e8(%rsp), %rdi
callq 0x4a0c0
movq %rax, 0xa0(%rsp)
jmp 0x452a8
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x98(%rsp)
cmpq $0x0, %rax
je 0x452cf
movq 0x98(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x452d1
movl 0x6cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6cc(%rsp)
jmp 0x45262
leaq 0x12e8(%rsp), %rdi
xorl %esi, %esi
callq 0xefba0
jmp 0x452f8
jmp 0x452fa
leaq 0x6a7(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x232a0
movq 0x90(%rsp), %rdx
leaq 0x6a8(%rsp), %rdi
leaq 0x6d0(%rsp), %rsi
callq 0x485b0
jmp 0x4532e
leaq 0x1328(%rsp), %rdi
leaq 0x6a8(%rsp), %rsi
leaq 0x1330(%rsp), %rdx
callq 0x4a0e0
movl %eax, 0x8c(%rsp)
jmp 0x45354
movl 0x8c(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, 0x8b(%rsp)
leaq 0x6a8(%rsp), %rdi
callq 0x22610
leaq 0x6a7(%rsp), %rdi
callq 0x22ab0
movb 0x8b(%rsp), %al
testb $0x1, %al
jne 0x45394
jmp 0x45417
movl 0x133c(%rsp), %edx
leaq 0x14a32b(%rip), %rdi    # 0x18f6cd
xorl %eax, %eax
leaq 0x6d0(%rsp), %rsi
callq 0xf3b00
jmp 0x453b3
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
jmp 0x45405
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
leaq 0x6a8(%rsp), %rdi
callq 0x22610
leaq 0x6a7(%rsp), %rdi
callq 0x22ab0
jmp 0x45a46
jmp 0x456f7
leaq 0x1260(%rsp), %rdi
leaq 0x14a7ad(%rip), %rsi    # 0x18fbd8
callq 0x22ec0
cmpl $0x0, %eax
je 0x4546b
leaq 0x1260(%rsp), %rdi
leaq 0x168f56(%rip), %rsi    # 0x1ae39a
callq 0x22ec0
cmpl $0x0, %eax
je 0x4546b
leaq 0x1260(%rsp), %rdi
leaq 0x168deb(%rip), %rsi    # 0x1ae248
callq 0x22ec0
cmpl $0x0, %eax
jne 0x456f5
movq 0x12b8(%rsp), %rdi
leaq 0x1260(%rsp), %rdx
leaq 0x2a0(%rsp), %rcx
leaq 0x14ae47(%rip), %rsi    # 0x1902d1
movb $0x0, %al
callq 0x229a0
cmpl $0x2, %eax
je 0x454c8
movl 0x133c(%rsp), %esi
leaq 0x14a1d1(%rip), %rdi    # 0x18f675
xorl %eax, %eax
callq 0xf3b00
jmp 0x454ad
movl $0x0, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
jmp 0x459e9
leaq 0x12d8(%rsp), %rdi
callq 0x2b8b0
cmpl $0x0, %eax
jle 0x455bf
leaq 0x12e8(%rsp), %rdi
callq 0x2b8b0
cmpl $0x0, %eax
jle 0x455bf
movq 0x1768(%rsp), %rdi
movq 0x1760(%rsp), %rsi
movq 0x1330(%rsp), %rdx
movl 0x1338(%rsp), %r9d
leaq 0x12d8(%rsp), %rcx
leaq 0x12e8(%rsp), %r8
callq 0x3c760
jmp 0x4552b
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
movl %eax, 0x84(%rsp)
leaq 0x12e8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x84(%rsp), %eax
cmpl %ecx, %eax
jge 0x455ac
movl 0x29c(%rsp), %esi
leaq 0x12e8(%rsp), %rdi
callq 0x4a0c0
movq %rax, 0x78(%rsp)
jmp 0x45579
movq 0x78(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x70(%rsp)
cmpq $0x0, %rax
je 0x45597
movq 0x70(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x45599
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x45536
leaq 0x12e8(%rsp), %rdi
xorl %esi, %esi
callq 0xefba0
jmp 0x455bd
jmp 0x455bf
leaq 0x1260(%rsp), %rdi
leaq 0x14a60a(%rip), %rsi    # 0x18fbd8
callq 0x22ec0
cmpl $0x0, %eax
je 0x455f5
leaq 0x1260(%rsp), %rdi
leaq 0x168db3(%rip), %rsi    # 0x1ae39a
callq 0x22ec0
cmpl $0x0, %eax
jne 0x4567f
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x229e0
movq %rax, 0x68(%rsp)
jmp 0x45606
movq 0x68(%rsp), %rdi
movq 0x1768(%rsp), %rsi
callq 0x555e0
jmp 0x4561a
movq 0x68(%rsp), %rax
movq %rax, 0x1760(%rsp)
movq 0x1760(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
callq 0x57850
jmp 0x4563e
movq 0x12c0(%rsp), %rdi
movq 0x1760(%rsp), %rsi
callq 0x57450
jmp 0x45655
jmp 0x4567f
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1310(%rsp)
movl %eax, 0x130c(%rsp)
movl $0x1b0, %esi            # imm = 0x1B0
callq 0x22a00
jmp 0x45a46
leaq 0x1260(%rsp), %rdi
leaq 0x168bba(%rip), %rsi    # 0x1ae248
callq 0x22ec0
cmpl $0x0, %eax
jne 0x456f3
leaq 0x2a0(%rsp), %rdi
leaq 0x149949(%rip), %rsi    # 0x18eff0
callq 0x22ec0
cmpl $0x0, %eax
jne 0x456be
movl $0x0, 0x1338(%rsp)
jmp 0x456f1
leaq 0x2a0(%rsp), %rdi
leaq 0x1509da(%rip), %rsi    # 0x1960a7
callq 0x22ec0
cmpl $0x0, %eax
jne 0x456e4
movl $0x0, 0x1338(%rsp)
jmp 0x456ef
movl $0x1, 0x1338(%rsp)
jmp 0x456f1
jmp 0x456f3
jmp 0x456f5
jmp 0x456f7
jmp 0x456f9
jmp 0x456fb
jmp 0x456fd
jmp 0x456ff
jmp 0x45701
jmp 0x43c19
leaq 0x12d8(%rsp), %rdi
callq 0x2b8b0
cmpl $0x0, %eax
jle 0x457f7
leaq 0x12e8(%rsp), %rdi
callq 0x2b8b0
cmpl $0x0, %eax
jle 0x457f7
movq 0x1768(%rsp), %rdi
movq 0x1760(%rsp), %rsi
movq 0x1330(%rsp), %rdx
movl 0x1338(%rsp), %r9d
leaq 0x12d8(%rsp), %rcx
leaq 0x12e8(%rsp), %r8
callq 0x3c760
jmp 0x45769
movl $0x0, 0x298(%rsp)
movl 0x298(%rsp), %eax
movl %eax, 0x64(%rsp)
leaq 0x12e8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x64(%rsp), %eax
cmpl %ecx, %eax
jge 0x457e4
movl 0x298(%rsp), %esi
leaq 0x12e8(%rsp), %rdi
callq 0x4a0c0
movq %rax, 0x58(%rsp)
jmp 0x457b1
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
je 0x457cf
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x457d1
movl 0x298(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x298(%rsp)
jmp 0x45774
leaq 0x12e8(%rsp), %rdi
xorl %esi, %esi
callq 0xefba0
jmp 0x457f5
jmp 0x457f7
movl $0x0, 0x294(%rsp)
movl 0x294(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0x1318(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x4c(%rsp), %eax
cmpl %ecx, %eax
jge 0x4586e
movl 0x294(%rsp), %esi
leaq 0x1318(%rsp), %rdi
callq 0x49fc0
movq %rax, 0x40(%rsp)
jmp 0x4583f
movq 0x40(%rsp), %rax
cmpq $0x0, %rax
je 0x45859
movq 0x40(%rsp), %rdi
movl $0x10, %esi
callq 0x22a00
jmp 0x4585b
movl 0x294(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x294(%rsp)
jmp 0x45802
movl $0x0, 0x290(%rsp)
movl 0x290(%rsp), %eax
movl %eax, 0x3c(%rsp)
leaq 0x12f8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x3c(%rsp), %eax
cmpl %ecx, %eax
jge 0x458e5
movl 0x290(%rsp), %esi
leaq 0x12f8(%rsp), %rdi
callq 0x49fe0
movq %rax, 0x30(%rsp)
jmp 0x458b6
movq 0x30(%rsp), %rax
cmpq $0x0, %rax
je 0x458d0
movq 0x30(%rsp), %rdi
movl $0x18, %esi
callq 0x22a00
jmp 0x458d2
movl 0x290(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x290(%rsp)
jmp 0x45879
movl $0x0, 0x28c(%rsp)
movl 0x28c(%rsp), %eax
movl %eax, 0x2c(%rsp)
leaq 0x12d8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0x4595c
movl 0x28c(%rsp), %esi
leaq 0x12d8(%rsp), %rdi
callq 0x49090
movq %rax, 0x20(%rsp)
jmp 0x4592d
movq 0x20(%rsp), %rax
cmpq $0x0, %rax
je 0x45947
movq 0x20(%rsp), %rdi
movl $0x68, %esi
callq 0x22a00
jmp 0x45949
movl 0x28c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28c(%rsp)
jmp 0x458f0
movl $0x0, 0x288(%rsp)
movl 0x288(%rsp), %eax
movl %eax, 0x1c(%rsp)
leaq 0x12c8(%rsp), %rdi
callq 0x2b8b0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x459d3
movl 0x288(%rsp), %esi
leaq 0x12c8(%rsp), %rdi
callq 0x49090
movq %rax, 0x10(%rsp)
jmp 0x459a4
movq 0x10(%rsp), %rax
cmpq $0x0, %rax
je 0x459be
movq 0x10(%rsp), %rdi
movl $0x68, %esi
callq 0x22a00
jmp 0x459c0
movl 0x288(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x288(%rsp)
jmp 0x45967
movl $0x1, 0x1774(%rsp)
movl $0x1, 0x125c(%rsp)
leaq 0x12c8(%rsp), %rdi
callq 0x49340
leaq 0x12d8(%rsp), %rdi
callq 0x49340
leaq 0x12e8(%rsp), %rdi
callq 0x492a0
leaq 0x12f8(%rsp), %rdi
callq 0x4a170
leaq 0x1318(%rsp), %rdi
callq 0x4a180
leaq 0x1328(%rsp), %rdi
callq 0x4a190
movl 0x1774(%rsp), %eax
addq $0x1778, %rsp           # imm = 0x1778
retq
leaq 0x12c8(%rsp), %rdi
callq 0x49340
leaq 0x12d8(%rsp), %rdi
callq 0x49340
leaq 0x12e8(%rsp), %rdi
callq 0x492a0
leaq 0x12f8(%rsp), %rdi
callq 0x4a170
leaq 0x1318(%rsp), %rdi
callq 0x4a180
leaq 0x1328(%rsp), %rdi
callq 0x4a190
movq 0x1310(%rsp), %rdi
callq 0x23290
nopw %cs:(%rax,%rax)