// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Graphics/R3Scene.cpp
// Function: gaps::R3Scene::ReadSUNCGFile(char const*, gaps::R3SceneNode*)
int R3Scene::
ReadSUNCGFile(const char *filename, R3SceneNode *parent_node)
{
  // Useful variables
  const char *input_data_directory = "../..";
  RNSymbolTable<R2Texture *> texture_symbol_table;
  RNSymbolTable<R3Scene *> model_symbol_table;
  if (!parent_node) parent_node = root;
  
  // Open file
  FILE* fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open SUNCG file %s\n", filename);
    return 0;
  }

  // Read file 
  std::string text;
  fseek(fp, 0, SEEK_END);
  long const size = ftell(fp);
  fseek(fp, 0, SEEK_SET);
  char* buffer = new char[size + 1];
  unsigned long const usize = static_cast<unsigned long const>(size);
  if (fread(buffer, 1, usize, fp) != usize) { RNFail("Unable to read %s\n", filename); return 0; }
  else { buffer[size] = 0; text = buffer; }
  delete[] buffer;

  // Close file
  fclose(fp);

  // Digest file
  Json::Value json_root;
  Json::Reader json_reader;
  Json::Value *json_items, *json_item, *json_value;
  if (!json_reader.parse(text, json_root, false)) {
    RNFail("Unable to parse %s\n", filename);
    return 0;
  }

  // Get/check version
  char version[1024];
  strncpy(version, "suncg@1.0.0", 1023);
  if (GetJsonObjectMember(json_value, &json_root, "version", Json::stringValue)) {
    strncpy(version, json_value->asString().c_str(), 1023);
    if (strncmp(version, "suncg", 5)) {
      RNFail("Unrecognized version %s in SUNCG file %s\n", version, filename);
      return 0;
    }
  }
  
  // Get scene id
  char scene_id[1024];
  strncpy(scene_id, "NoName", 1023);
  if (GetJsonObjectMember(json_value, &json_root, "id", Json::stringValue)) {
    strncpy(scene_id, json_value->asString().c_str(), 1023);
  }
  
  // Get scene up direction
  R3Vector scene_up(0, 1, 0);
  if (GetJsonObjectMember(json_items, &json_root, "up", Json::arrayValue)) {
    if (json_items->size() >= 3) {
      if (GetJsonArrayEntry(json_item, json_items, 0))
        scene_up[0] = json_item->asDouble();
      if (GetJsonArrayEntry(json_item, json_items, 1))
        scene_up[1] = json_item->asDouble();
      if (GetJsonArrayEntry(json_item, json_items, 2))
        scene_up[2] = json_item->asDouble();
      scene_up.Normalize();
    }
  }

  // Get scene front direction
  R3Vector scene_front(0, 0, 1);
  if (GetJsonObjectMember(json_items, &json_root, "front", Json::arrayValue)) {
    if (json_items->size() >= 3) {
      if (GetJsonArrayEntry(json_item, json_items, 0))
        scene_front[0] = json_item->asDouble();
      if (GetJsonArrayEntry(json_item, json_items, 1))
        scene_front[1] = json_item->asDouble();
      if (GetJsonArrayEntry(json_item, json_items, 2))
        scene_front[2] = json_item->asDouble();
      scene_front.Normalize();
    }
  }

  // Get scene scale factor (to convert to meters)
  double scaleToMeters = 1.0;
  if (GetJsonObjectMember(json_value, &json_root, "scaleToMeters")) {
    scaleToMeters = json_value->asDouble();
  }
  
  // Create scene node 
  R3SceneNode *scene_node = parent_node;
  scene_node->SetName(scene_id);

  // Set scene transformation
  R3Affine scene_transformation = R3identity_affine;
  // Set up and front directions
  scene_transformation.Scale(scaleToMeters);
  scene_node->SetTransformation(scene_transformation);

  // Parse levels
  Json::Value *json_levels, *json_level;
  if (!GetJsonObjectMember(json_levels, &json_root, "levels", Json::arrayValue)) return 0;
  for (Json::ArrayIndex index = 0; index < json_levels->size(); index++) {
    if (!GetJsonArrayEntry(json_level, json_levels, index)) return 0;
    if (json_level->type() != Json::objectValue) continue;
           
    // Parse level attributes
    int level_id = index;
    if (GetJsonObjectMember(json_value, json_level, "valid"))
      if (json_value->asString() == std::string("0"))  continue;
    if (GetJsonObjectMember(json_value, json_level, "id"))
      level_id = atoi(json_value->asString().c_str());

    // Create level node
    char level_name[1024];
    sprintf(level_name, "Level#%d", level_id);
    R3SceneNode *level_node = new R3SceneNode(this);
    level_node->SetName(level_name);
    scene_node->InsertChild(level_node);

    // Parse nodes
    Json::Value *json_nodes, *json_node, *json_materials;
    if (GetJsonObjectMember(json_nodes, json_level, "nodes", Json::arrayValue)) {
      if (json_nodes->size() == 0) continue;
      R3SceneNode **created_nodes = new R3SceneNode * [ json_nodes->size() ];
      for (unsigned int i = 0; i < json_nodes->size(); i++) created_nodes[i] = NULL;
      for (Json::ArrayIndex index = 0; index < json_nodes->size(); index++) {
        if (!GetJsonArrayEntry(json_node, json_nodes, index)) continue; 
        if (json_node->type() != Json::objectValue) continue;
 
        // Parse node attributes
        char node_id[1024] = { '\0' };;
        char modelId[1024] = { '\0' };;
        char node_type[1024] = { '\0' };
        int hideCeiling = 0, hideFloor = 0, hideWalls = 0;
        int isMirrored = 0, state = 0;
        if (GetJsonObjectMember(json_value, json_node, "valid"))
          if (json_value->asString() == std::string("0"))  continue;
        if (GetJsonObjectMember(json_value, json_node, "id"))
          strncpy(node_id, json_value->asString().c_str(), 1023);
        if (GetJsonObjectMember(json_value, json_node, "type")) 
          strncpy(node_type, json_value->asString().c_str(), 1023);
        if (GetJsonObjectMember(json_value, json_node, "modelId"))
          strncpy(modelId, json_value->asString().c_str(), 1023);
        if (GetJsonObjectMember(json_value, json_node, "hideCeiling")) 
          if (json_value->asString() == std::string("1")) hideCeiling = 1;
        if (GetJsonObjectMember(json_value, json_node, "hideFloor")) 
          if (json_value->asString() == std::string("1")) hideFloor = 1;
        if (GetJsonObjectMember(json_value, json_node, "hideWalls")) 
          if (json_value->asString() == std::string("1")) hideWalls = 1;
        if (GetJsonObjectMember(json_value, json_node, "isMirrored")) 
          if (json_value->asString() == std::string("1")) isMirrored = 1;
        if (GetJsonObjectMember(json_value, json_node, "state")) 
          if (json_value->asString() == std::string("1")) state = 1;

        // Parse node transformation
        R3Affine transformation = R3identity_affine;
        if (GetJsonObjectMember(json_items, json_node, "transform", Json::arrayValue)) {
          if (json_items->size() >= 16) {
            R4Matrix matrix = R4identity_matrix;
            for (Json::ArrayIndex index = 0; index < json_items->size(); index++) {
              if (!GetJsonArrayEntry(json_item, json_items, index)) continue;
              matrix[index%4][index/4] = json_item->asDouble();
            }
            transformation.Reset(matrix, isMirrored);
          }
        }

        // Create scene node(s) based on type
        char obj_name[4096], node_name[4096];
        if (!strcmp(node_type, "Ground")) {
          // Create node for ground
          sprintf(obj_name, "%s/room/%s/%sf.obj", input_data_directory, scene_id, modelId); 
          if (!hideFloor && RNFileExists(obj_name)) {
            R3Scene *model = new R3Scene();
            if (!ReadObj(model, model->Root(), obj_name)) return 0;
            sprintf(node_name, "Ground#%s", node_id);
            model->SetName(node_name);
            model->Root()->SetName(node_name);
            model->SetFilename(obj_name);
            InsertReferencedScene(model);
            R3SceneNode *node = new R3SceneNode(this);
            node->InsertReference(new R3SceneReference(model, materials));
            node->SetName(node_name);
            node->SetTransformation(transformation);
            level_node->InsertChild(node);
            // R3SceneNode *node = new R3SceneNode(this);
            // sprintf(node_name, "Ground#%s", node_id);
            // node->SetName(node_name);
            // if (!ReadObj(this, node, obj_name)) return 0;
            // level_node->InsertChild(node);
            created_nodes[index] = node;
          }
        }
        else if (!strcmp(node_type, "Room")) {
          // Create room node
          R3SceneNode *room_node = new R3SceneNode(this);
          sprintf(node_name, "Room#%s", node_id);
          room_node->SetName(node_name);
          // room_node->SetTransformation(transformation);
          level_node->InsertChild(room_node);
          created_nodes[index] = room_node;
          RNArray<R3Material *> materials;
          
           // Create node for floor
          sprintf(obj_name, "%s/room/%s/%sf.obj", input_data_directory, scene_id, modelId); 
          if (!hideFloor && RNFileExists(obj_name)) {
            R3Scene *model = new R3Scene();
            if (!ReadObj(model, model->Root(), obj_name)) return 0;
            sprintf(node_name, "Floor#%s", node_id);
            model->SetName(node_name);
            model->Root()->SetName(node_name);
            model->SetFilename(obj_name);
            InsertReferencedScene(model);
            R3SceneNode *node = new R3SceneNode(this);
            node->InsertReference(new R3SceneReference(model, materials));
            node->SetName(node_name);
            room_node->InsertChild(node);
            // R3SceneNode *node = new R3SceneNode(this);
            // sprintf(node_name, "Floor#%s", node_id);
            // node->SetName(node_name);
            // if (!ReadObj(this, node, obj_name)) return 0;
            // room_node->InsertChild(node);
          }

          // Create node for ceiling
          sprintf(obj_name, "%s/room/%s/%sc.obj", input_data_directory, scene_id, modelId); 
          if (!hideCeiling && RNFileExists(obj_name)) {
            R3Scene *model = new R3Scene();
            if (!ReadObj(model, model->Root(), obj_name)) return 0;
            sprintf(node_name, "Ceiling#%s", node_id);
            model->SetName(node_name);
            model->Root()->SetName(node_name);
            model->SetFilename(obj_name);
            InsertReferencedScene(model);
            R3SceneNode *node = new R3SceneNode(this);
            node->InsertReference(new R3SceneReference(model, materials));
            node->SetName(node_name);
            room_node->InsertChild(node);
            // R3SceneNode *node = new R3SceneNode(this);
            // sprintf(node_name, "Ceiling#%s", node_id);
            // node->SetName(node_name);
            // if (!ReadObj(this, node, obj_name)) return 0;
            // room_node->InsertChild(node);
          }
          
          // Create node for walls
          sprintf(obj_name, "%s/room/%s/%sw.obj", input_data_directory, scene_id, modelId); 
          if (!hideWalls && RNFileExists(obj_name)) {
            R3Scene *model = new R3Scene();
            if (!ReadObj(model, model->Root(), obj_name)) return 0;
            sprintf(node_name, "Wall#%s", node_id);
            model->SetName(node_name);
            model->Root()->SetName(node_name);
            model->SetFilename(obj_name);
            InsertReferencedScene(model);
            R3SceneNode *node = new R3SceneNode(this);
            node->InsertReference(new R3SceneReference(model, materials));
            node->SetName(node_name);
            room_node->InsertChild(node);
            // R3SceneNode *node = new R3SceneNode(this);
            // sprintf(node_name, "Wall#%s", node_id);
            // node->SetName(node_name);
            // if (!ReadObj(this, node, obj_name)) return 0;
            // room_node->InsertChild(node);
          }        
        }
        else if (!strcmp(node_type, "Object")) {
          // Read/get model 
          R3Scene *model = NULL;
          if (state) sprintf(obj_name, "%s/object/%s/%s_0.obj", input_data_directory, modelId, modelId); 
          else sprintf(obj_name, "%s/object/%s/%s.obj", input_data_directory, modelId, modelId); 
          if (!model_symbol_table.Find(obj_name, &model)) {
            model = new R3Scene();
            if (!ReadObj(model, model->Root(), obj_name)) return 0;
            sprintf(node_name, "Model#%s", modelId);
            model->SetName(modelId);
            model->Root()->SetName(node_name);
            model->SetFilename(obj_name);
            InsertReferencedScene(model);
            model_symbol_table.Insert(obj_name, model);
          }

          // Read materials
          RNArray<R3Material *> materials;
          if (GetJsonObjectMember(json_materials, json_node, "materials", Json::arrayValue)) {
            if (!ParseSUNCGMaterials(this, texture_symbol_table, model->materials, materials, json_materials)) return 0;
          }

          // Create node with reference to model
          R3SceneNode *node = new R3SceneNode(this);
          sprintf(node_name, "Object#%s", node_id);
          node->InsertReference(new R3SceneReference(model, materials));
          node->SetName(node_name);
          node->SetTransformation(transformation);
          level_node->InsertChild(node);
          created_nodes[index] = node;
        }
        else if (!strcmp(node_type, "Box")) {
          // Parse box dimensions
          RNScalar box_dimensions[3] = { 1, 1, 1 };
          if (GetJsonObjectMember(json_items, json_node, "dimensions", Json::arrayValue)) {
            if (json_items->size() >= 3) {
              if (GetJsonArrayEntry(json_item, json_items, 0))
                box_dimensions[0] = json_item->asDouble();
              if (GetJsonArrayEntry(json_item, json_items, 1))
                box_dimensions[1] = json_item->asDouble();
              if (GetJsonArrayEntry(json_item, json_items, 2))
                box_dimensions[2] = json_item->asDouble();
            }
          }

          // Read materials
          RNArray<R3Material *> materials;
          if (GetJsonObjectMember(json_materials, json_node, "materials", Json::arrayValue)) {
            if (!ParseSUNCGMaterials(this, texture_symbol_table, materials, materials, json_materials)) return 0;
          }

          // Create node for box
          R3SceneNode *node = new R3SceneNode(this);
          sprintf(node_name, "Box#%s", node_id);
          node->SetName(node_name);
          node->SetTransformation(transformation);
          if (!CreateBox(this, node, box_dimensions, materials)) return 0;
          level_node->InsertChild(node);
          created_nodes[index] = node;
        }
      }

      // Move created nodes to be children of room nodes
      for (Json::ArrayIndex index = 0; index < json_nodes->size(); index++) {
        if (!GetJsonArrayEntry(json_node, json_nodes, index)) continue; 
        if (json_node->type() != Json::objectValue) continue;
        if (!GetJsonObjectMember(json_value, json_node, "type")) continue;
        if (strcmp(json_value->asString().c_str(), "Room")) continue;
        R3SceneNode *room_node = created_nodes[index];
        if (!room_node) continue;
        if (GetJsonObjectMember(json_items, json_node, "nodeIndices", Json::arrayValue)) {
          for (Json::ArrayIndex room_index = 0; room_index < json_items->size(); room_index++) {
            GetJsonArrayEntry(json_item, json_items, room_index);
            if (json_item->isNumeric()) {
              int node_index = json_item->asInt();
              if ((node_index >= 0) && ((unsigned int) node_index < json_nodes->size())) {
                R3SceneNode *node = created_nodes[node_index];
                if (node) {
                  level_node->RemoveChild(node);
                  room_node->InsertChild(node); 
                }
              }
            }
          }
        }
      }
      
      // Delete array of created nodes
      delete [] created_nodes;
    }
  }
    
  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e58, %rsp           # imm = 0x3E58
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, 0x20(%rsp)
movl $0x30, %edi
callq 0x218c0
leaq 0x8(%rax), %rcx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %rax, 0xa0(%rsp)
movl $0x30, %edi
callq 0x218c0
movq %rax, %rcx
addq $0x8, %rcx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %rax, 0x70(%rsp)
testq %r14, %r14
jne 0x2df51
movq 0x20(%rsp), %rax
movq (%rax), %r14
movq %r14, 0xa8(%rsp)
leaq 0xaf1be(%rip), %rsi     # 0xdd11e
movq %rbx, %rdi
callq 0x21ac0
testq %rax, %rax
je 0x2e11f
movq %rax, %r14
leaq 0x168(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x219c0
movq %r14, %rdi
callq 0x21030
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x219c0
leaq 0x1(%r12), %rdi
callq 0x21040
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x21e50
cmpq %r12, %rax
jne 0x2e137
movb $0x0, (%r15,%r12)
leaq 0x158(%rsp), %r12
movq 0x8(%r12), %r13
movq %r15, %rdi
callq 0x21380
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x21ec0
movq %r15, %rdi
callq 0x21c30
movq %r14, %rdi
callq 0x218b0
leaq 0x1d0(%rsp), %rdi
xorl %esi, %esi
callq 0x94466
leaq 0x430(%rsp), %rdi
callq 0x8b6c8
leaq 0x430(%rsp), %rdi
leaq 0x158(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
xorl %ecx, %ecx
callq 0x8b85a
testb %al, %al
je 0x2e14f
leaq 0xaf105(%rip), %rsi     # 0xdd166
leaq 0x3650(%rsp), %rdi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x21430
leaq 0xbb98d(%rip), %rdx     # 0xe9a07
leaq 0x8(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x4, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e167
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x550(%rsp), %r15
movq -0x10(%r15), %r14
leaq 0x3650(%rsp), %rdi
movl $0x3ff, %edx            # imm = 0x3FF
movq %r14, %rsi
callq 0x21430
cmpq %r15, %r14
je 0x2e0e4
movq 0x550(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x218e0
movl $0x636e7573, %eax       # imm = 0x636E7573
xorl 0x3650(%rsp), %eax
movzbl 0x3654(%rsp), %ecx
xorl $0x67, %ecx
orl %eax, %ecx
je 0x2e167
xorl %ebp, %ebp
leaq 0xaf070(%rip), %rdi     # 0xdd178
leaq 0x3650(%rsp), %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x8b53a
jmp 0x301ff
xorl %ebp, %ebp
leaq 0xaeff9(%rip), %rdi     # 0xdd121
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8b53a
jmp 0x3028d
xorl %ebp, %ebp
leaq 0xaefff(%rip), %rdi     # 0xdd13f
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8b53a
jmp 0x30268
xorl %ebp, %ebp
leaq 0xaeffa(%rip), %rdi     # 0xdd152
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8b53a
jmp 0x301ff
leaq 0xae036(%rip), %rsi     # 0xdc1a4
leaq 0x3250(%rsp), %rdi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x21430
leaq 0xaff44(%rip), %rdx     # 0xde0cb
leaq 0x8(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x4, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e1ed
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x550(%rsp), %r14
movq -0x10(%r14), %rbx
leaq 0x3250(%rsp), %rdi
movl $0x3ff, %edx            # imm = 0x3FF
movq %rbx, %rsi
callq 0x21430
cmpq %r14, %rbx
je 0x2e1ed
movq 0x550(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x218e0
leaq 0x258(%rsp), %rdi
movsd 0xade1b(%rip), %xmm1    # 0xdc018
xorpd %xmm0, %xmm0
xorps %xmm2, %xmm2
callq 0x76d52
leaq 0xb4833(%rip), %rdx     # 0xe2a43
leaq 0x30(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e2ca
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x93324
cmpl $0x3, %eax
jb 0x2e2ca
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x34c81
testl %eax, %eax
je 0x2e26b
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x258(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x34c81
testl %eax, %eax
je 0x2e294
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x260(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x34c81
testl %eax, %eax
je 0x2e2bd
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x268(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x77074
leaq 0x240(%rsp), %rdi
movsd 0xadd3e(%rip), %xmm2    # 0xdc018
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movsd %xmm2, 0x28(%rsp)
callq 0x76d52
leaq 0xaeeae(%rip), %rdx     # 0xdd1a2
leaq 0x30(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e3ae
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x93324
cmpl $0x3, %eax
jb 0x2e3ae
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x34c81
testl %eax, %eax
je 0x2e34f
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x240(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x34c81
testl %eax, %eax
je 0x2e378
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x248(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x34c81
testl %eax, %eax
je 0x2e3a1
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x250(%rsp)
leaq 0x240(%rsp), %rdi
callq 0x77074
leaq 0xaedf3(%rip), %rdx     # 0xdd1a8
leaq 0x8(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e3dd
movq 0x8(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x28(%rsp)
leaq 0x3250(%rsp), %rsi
movq 0xa8(%rsp), %rdi
callq 0x3d0ca
leaq 0x10cd4f(%rip), %rax    # 0x13b148
addq $0x10, %rax
leaq 0x1548(%rsp), %rbx
movq %rax, 0x190(%rsp)
movq %rax, -0x8(%rbx)
leaq 0x119268(%rip), %rax    # 0x147680
leaq 0x8(%rax), %rsi
movq %rbx, %rdi
movq %rsi, 0x188(%rsp)
callq 0x72bb6
movl $0x88, %esi
leaq 0x1540(%rsp), %rdi
addq %rsi, %rdi
addq 0x110b95(%rip), %rsi    # 0x13efd8
callq 0x72bb6
leaq 0x119231(%rip), %rax    # 0x147680
movq 0x108(%rax), %rax
movq %rax, 0x1648(%rsp)
movq %rbx, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x73e9e
leaq 0x1540(%rsp), %rsi
andb $-0x3, 0x108(%rsi)
movq 0xa8(%rsp), %rdi
callq 0x3d06c
leaq 0xaed27(%rip), %rdx     # 0xdd1b6
leaq 0x1c8(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x301d9
movq 0x20(%rsp), %rax
leaq 0x58(%rax), %rcx
movq %rcx, 0x60(%rsp)
addq $0x28, %rax
movq %rax, 0x178(%rsp)
movl $0x88, %eax
leaq 0x1191a9(%rip), %rcx    # 0x147680
addq %rax, %rcx
movq %rcx, 0x180(%rsp)
movl $0x0, 0x4c(%rsp)
movq 0x1c8(%rsp), %rbx
movq %rbx, %rdi
callq 0x93324
movl 0x4c(%rsp), %edx
cmpl %eax, %edx
jae 0x301dd
leaq 0x1c0(%rsp), %rdi
movq %rbx, %rsi
callq 0x34c81
testl %eax, %eax
je 0x301e4
movq 0x1c0(%rsp), %rbx
movq %rbx, %rdi
callq 0x94a3e
cmpl $0x7, %eax
jne 0x301d0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xaf609(%rip), %rdx     # 0xddb4f
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e625
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x1660(%rsp), %rax
movq %rax, 0x1650(%rsp)
leaq 0x1650(%rsp), %rdi
leaq 0xb58f1(%rip), %rsi     # 0xe3e77
leaq 0xb58eb(%rip), %rdx     # 0xe3e78
callq 0x395ec
movq 0x548(%rsp), %rdx
cmpq 0x1658(%rsp), %rdx
jne 0x2e5c6
testq %rdx, %rdx
je 0x2e5ca
movq 0x1650(%rsp), %rsi
movq 0x540(%rsp), %rdi
callq 0x21910
testl %eax, %eax
sete %bpl
jmp 0x2e5cd
xorl %ebp, %ebp
jmp 0x2e5cd
movb $0x1, %bpl
movq 0x1650(%rsp), %rdi
leaq 0x1660(%rsp), %rax
cmpq %rax, %rdi
je 0x2e5f2
movq 0x1660(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x2e617
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
movl $0x4, %eax
testb %bpl, %bpl
jne 0x301cc
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xafa97(%rip), %rdx     # 0xde0cb
xorl %ecx, %ecx
callq 0x34bd0
movl 0x4c(%rsp), %ebp
testl %eax, %eax
je 0x2e687
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
movq 0x540(%rsp), %r14
movq %r14, %rdi
callq 0x21ef0
movl %eax, %ebp
leaq 0x550(%rsp), %rax
cmpq %rax, %r14
je 0x2e687
movq 0x550(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x218e0
leaq 0x3a50(%rsp), %rdi
leaq 0xaeb27(%rip), %rsi     # 0xdd1bd
movl %ebp, %edx
xorl %eax, %eax
callq 0x21140
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
movq %r14, %rdi
leaq 0x3a50(%rsp), %rsi
callq 0x3d0ca
movq 0xa8(%rsp), %rdi
movq %r14, %rsi
callq 0x3ce8e
movq %r14, 0x68(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xaead6(%rip), %rdx     # 0xdd1c6
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x301c8
movq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x93324
testl %eax, %eax
je 0x301af
movq %rbx, %rdi
callq 0x93324
movl %eax, %edi
shlq $0x3, %rdi
callq 0x21040
movq %rax, 0x38(%rsp)
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x93324
movl %eax, %eax
cmpq %rax, %r14
jae 0x2e756
movq 0x38(%rsp), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
jmp 0x2e735
movq $0x0, 0x50(%rsp)
movq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x93324
movl %eax, %eax
movq 0x50(%rsp), %rdx
cmpq %rax, %rdx
jae 0x30045
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x34c81
testl %eax, %eax
je 0x3003b
movq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x94a3e
cmpl $0x7, %eax
jne 0x3003b
movl $0x400, %edx            # imm = 0x400
leaq 0x2a50(%rsp), %rdi
xorl %esi, %esi
callq 0x21490
movl $0x400, %edx            # imm = 0x400
leaq 0x2e50(%rsp), %rdi
xorl %esi, %esi
callq 0x21490
movl $0x400, %edx            # imm = 0x400
leaq 0x2650(%rsp), %rdi
xorl %esi, %esi
callq 0x21490
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xaf35a(%rip), %rdx     # 0xddb4f
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e8d4
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x1660(%rsp), %rax
movq %rax, 0x1650(%rsp)
leaq 0x1650(%rsp), %rdi
leaq 0xb5642(%rip), %rsi     # 0xe3e77
leaq 0xb563c(%rip), %rdx     # 0xe3e78
callq 0x395ec
movq 0x548(%rsp), %rdx
cmpq 0x1658(%rsp), %rdx
jne 0x2e875
testq %rdx, %rdx
je 0x2e879
movq 0x1650(%rsp), %rsi
movq 0x540(%rsp), %rdi
callq 0x21910
testl %eax, %eax
sete %bpl
jmp 0x2e87c
xorl %ebp, %ebp
jmp 0x2e87c
movb $0x1, %bpl
movq 0x1650(%rsp), %rdi
leaq 0x1660(%rsp), %rax
cmpq %rax, %rdi
je 0x2e8a1
movq 0x1660(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x2e8c6
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
movl $0xa, %eax
testb %bpl, %bpl
jne 0x30032
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xaf7e8(%rip), %rdx     # 0xde0cb
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e93d
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
movq 0x540(%rsp), %r14
movl $0x3ff, %edx            # imm = 0x3FF
leaq 0x2a50(%rsp), %rdi
movq %r14, %rsi
callq 0x21430
leaq 0x550(%rsp), %rax
cmpq %rax, %r14
je 0x2e93d
movq 0x550(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x218e0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xba345(%rip), %rdx     # 0xe8c91
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2e9a6
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
movq 0x540(%rsp), %r14
movl $0x3ff, %edx            # imm = 0x3FF
leaq 0x2650(%rsp), %rdi
movq %r14, %rsi
callq 0x21430
leaq 0x550(%rsp), %rax
cmpq %rax, %r14
je 0x2e9a6
movq 0x550(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x218e0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xae817(%rip), %rdx     # 0xdd1cc
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2ea0f
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
movq 0x540(%rsp), %r14
movl $0x3ff, %edx            # imm = 0x3FF
leaq 0x2e50(%rsp), %rdi
movq %r14, %rsi
callq 0x21430
leaq 0x550(%rsp), %rax
cmpq %rax, %r14
je 0x2ea0f
movq 0x550(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x218e0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xae7b6(%rip), %rdx     # 0xdd1d4
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2eaa3
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x1660(%rsp), %rax
movq %rax, 0x1650(%rsp)
leaq 0x1650(%rsp), %rdi
leaq 0xbcffc(%rip), %rsi     # 0xeba56
leaq 0xbcff6(%rip), %rdx     # 0xeba57
callq 0x395ec
movq 0x548(%rsp), %rdx
movb $0x1, %al
movl %eax, 0x28(%rsp)
cmpq 0x1658(%rsp), %rdx
jne 0x2eab3
testq %rdx, %rdx
je 0x2eaab
movq 0x1650(%rsp), %rsi
movq 0x540(%rsp), %rdi
callq 0x21910
testl %eax, %eax
setne %al
movl %eax, 0x28(%rsp)
jmp 0x2eab3
movb $0x1, %al
movl %eax, 0x28(%rsp)
jmp 0x2eafd
movl $0x0, 0x28(%rsp)
movq 0x1650(%rsp), %rdi
leaq 0x1660(%rsp), %rax
cmpq %rax, %rdi
je 0x2ead8
movq 0x1660(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x2eafd
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xae6d4(%rip), %rdx     # 0xdd1e0
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2eb8b
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x1660(%rsp), %rax
movq %rax, 0x1650(%rsp)
leaq 0x1650(%rsp), %rdi
leaq 0xbcf0e(%rip), %rsi     # 0xeba56
leaq 0xbcf08(%rip), %rdx     # 0xeba57
callq 0x395ec
movq 0x548(%rsp), %rdx
movb $0x1, %r13b
cmpq 0x1658(%rsp), %rdx
jne 0x2eb93
testq %rdx, %rdx
je 0x2eb90
movq 0x1650(%rsp), %rsi
movq 0x540(%rsp), %rdi
callq 0x21910
testl %eax, %eax
setne %r13b
jmp 0x2eb93
movb $0x1, %r13b
jmp 0x2ebdd
xorl %r13d, %r13d
movq 0x1650(%rsp), %rdi
leaq 0x1660(%rsp), %rax
cmpq %rax, %rdi
je 0x2ebb8
movq 0x1660(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x2ebdd
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x58(%rsp), %rbx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xae5f9(%rip), %rdx     # 0xdd1ea
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2ec76
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x1660(%rsp), %rax
movq %rax, 0x1650(%rsp)
leaq 0x1650(%rsp), %rdi
leaq 0xbce29(%rip), %rsi     # 0xeba56
leaq 0xbce23(%rip), %rdx     # 0xeba57
callq 0x395ec
movq 0x548(%rsp), %rdx
movb $0x1, %al
movl %eax, 0x40(%rsp)
cmpq 0x1658(%rsp), %rdx
jne 0x2ec86
testq %rdx, %rdx
je 0x2ec7e
movq 0x1650(%rsp), %rsi
movq 0x540(%rsp), %rdi
callq 0x21910
testl %eax, %eax
setne %al
movl %eax, 0x40(%rsp)
jmp 0x2ec86
movb $0x1, %al
movl %eax, 0x40(%rsp)
jmp 0x2ecd0
movl $0x0, 0x40(%rsp)
movq 0x1650(%rsp), %rdi
leaq 0x1660(%rsp), %rax
cmpq %rax, %rdi
je 0x2ecab
movq 0x1660(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x2ecd0
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xae515(%rip), %rdx     # 0xdd1f4
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2ed61
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x1660(%rsp), %rax
movq %rax, 0x1650(%rsp)
leaq 0x1650(%rsp), %rdi
leaq 0xbcd3b(%rip), %rsi     # 0xeba56
leaq 0xbcd35(%rip), %rdx     # 0xeba57
callq 0x395ec
movq 0x548(%rsp), %rdx
xorl %r15d, %r15d
cmpq 0x1658(%rsp), %rdx
jne 0x2ed6c
testq %rdx, %rdx
je 0x2ed66
movq 0x1650(%rsp), %rsi
movq 0x540(%rsp), %rdi
callq 0x21910
xorl %r15d, %r15d
testl %eax, %eax
sete %r15b
jmp 0x2ed6c
xorl %r15d, %r15d
jmp 0x2edb6
movl $0x1, %r15d
movq 0x1650(%rsp), %rdi
leaq 0x1660(%rsp), %rax
cmpq %rax, %rdi
je 0x2ed91
movq 0x1660(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x2edb6
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
leaq 0xae43a(%rip), %rdx     # 0xdd1ff
xorl %ecx, %ecx
callq 0x34bd0
leaq 0xae4c2(%rip), %r12     # 0xdd295
testl %eax, %eax
je 0x2eeb0
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
leaq 0x1660(%rsp), %rax
movq %rax, 0x1650(%rsp)
leaq 0x1650(%rsp), %rdi
leaq 0xbcc4a(%rip), %rsi     # 0xeba56
leaq 0xbcc44(%rip), %rdx     # 0xeba57
callq 0x395ec
movq 0x548(%rsp), %rdx
leaq 0xae46e(%rip), %r12     # 0xdd295
cmpq 0x1658(%rsp), %rdx
jne 0x2ee66
leaq 0xae447(%rip), %r12     # 0xdd27f
testq %rdx, %rdx
je 0x2ee66
movq 0x1650(%rsp), %rsi
movq 0x540(%rsp), %rdi
callq 0x21910
testl %eax, %eax
leaq 0xae43a(%rip), %r12     # 0xdd295
leaq 0xae41d(%rip), %rax     # 0xdd27f
cmoveq %rax, %r12
movq 0x1650(%rsp), %rdi
leaq 0x1660(%rsp), %rax
cmpq %rax, %rdi
je 0x2ee8b
movq 0x1660(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x2eeb0
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
movq 0x190(%rsp), %rax
movq %rax, 0x320(%rsp)
leaq 0x328(%rsp), %rdi
movq 0x188(%rsp), %rsi
callq 0x72bb6
leaq 0x3a8(%rsp), %rdi
movq 0x180(%rsp), %rsi
callq 0x72bb6
leaq 0x11878f(%rip), %rax    # 0x147680
movq 0x108(%rax), %rax
movq %rax, 0x428(%rsp)
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
leaq 0xadf7f(%rip), %rdx     # 0xdce8e
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2efa9
movq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x93324
cmpl $0x10, %eax
jb 0x2efa9
leaq 0x540(%rsp), %rdi
leaq 0xafce6(%rip), %rsi     # 0xdec28
callq 0x72bb6
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x93324
cmpl %eax, %ebp
jae 0x2ef91
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x34c81
testl %eax, %eax
je 0x2ef8d
movq 0x10(%rsp), %rdi
callq 0x9558e
movl %ebp, %eax
andl $0x3, %eax
shll $0x5, %eax
addq %rsp, %rax
addq $0x540, %rax            # imm = 0x540
movl %ebp, %ecx
shrl $0x2, %ecx
movsd %xmm0, (%rax,%rcx,8)
incl %ebp
jmp 0x2ef49
leaq 0x320(%rsp), %rdi
leaq 0x540(%rsp), %rsi
movl %r15d, %edx
callq 0x70ece
movl 0x2650(%rsp), %eax
movl $0x756f7247, %ecx       # imm = 0x756F7247
xorl %ecx, %eax
movl 0x2653(%rsp), %ecx
movl $0x646e75, %edx         # imm = 0x646E75
xorl %edx, %ecx
orl %eax, %ecx
je 0x2f746
movl 0x2650(%rsp), %eax
movl $0x6d6f6f52, %ecx       # imm = 0x6D6F6F52
xorl %ecx, %eax
movzbl 0x2654(%rsp), %ecx
orl %eax, %ecx
je 0x2f8c2
movl 0x2650(%rsp), %eax
movl $0x656a624f, %ecx       # imm = 0x656A624F
xorl %ecx, %eax
movl 0x2653(%rsp), %ecx
movl $0x746365, %edx         # imm = 0x746365
xorl %edx, %ecx
orl %eax, %ecx
je 0x2fd17
movl $0x0, 0x1c(%rsp)
cmpl $0x786f42, 0x2650(%rsp) # imm = 0x786F42
jne 0x30021
movapd 0xaeb30(%rip), %xmm0    # 0xddb60
movapd %xmm0, 0x100(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x110(%rsp)
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
leaq 0xae262(%rip), %rdx     # 0xdd2bc
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2f0f6
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x93324
cmpl $0x3, %eax
jb 0x2f0f6
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x34c81
testl %eax, %eax
je 0x2f0a4
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x100(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x34c81
testl %eax, %eax
je 0x2f0cd
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x108(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x34c81
testl %eax, %eax
je 0x2f0f6
movq 0x10(%rsp), %rdi
callq 0x9558e
movsd %xmm0, 0x110(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x886bc
movq 0x58(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
leaq 0xad12e(%rip), %rdx     # 0xdc245
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2f152
movq 0xb0(%rsp), %r8
movq 0x20(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xd0(%rsp), %rcx
movq %rcx, %rdx
callq 0x34ceb
testl %eax, %eax
je 0x3000c
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
leaq 0x1650(%rsp), %rbx
movq %rbx, %rdi
leaq 0xae149(%rip), %rsi     # 0xdd2c7
leaq 0x2a50(%rsp), %rdx
xorl %eax, %eax
callq 0x21140
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3d0ca
movq %r14, %rdi
leaq 0x320(%rsp), %rsi
callq 0x3d06c
movq %r14, 0xe0(%rsp)
leaq 0xae9c9(%rip), %rax     # 0xddb80
movq %rax, 0xe8(%rsp)
xorl %ecx, %ecx
xorl %eax, %eax
movq %rcx, 0x198(%rsp)
testq %rcx, %rcx
sete %al
leaq 0xad378(%rip), %rcx     # 0xdc550
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0xf8(%rsp)
leaq 0x11864b(%rip), %rdx    # 0x147838
leaq 0x30(%rdx), %rcx
movq %rcx, 0xf0(%rsp)
movl $0x2, %eax
movq %rdx, %rsi
xorl %r15d, %r15d
leaq 0x1(%r15), %rdi
movq %rax, 0x1b0(%rsp)
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
movq %rdx, %rbx
shlq $0x2, %rbx
andq $-0x8, %rbx
leaq (%rbx,%rbx,2), %rax
leaq 0x110(%rsp), %rcx
subq %rax, %rcx
cmpq $0x2, %r15
movl $0x0, %r14d
movq %rdi, 0x1a0(%rsp)
cmovneq %rdi, %r14
movsd 0x100(%rsp,%r14,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd (%rcx,%r15,8), %xmm1
movsd 0x100(%rsp,%r15,8), %xmm0
mulsd 0xf8(%rsp), %xmm0
movsd %xmm1, 0x40(%rsp)
mulsd 0xacd9c(%rip), %xmm1    # 0xdc020
movsd %xmm1, 0x1b8(%rsp)
leaq 0x88(%rsp), %rdi
movq %rsi, 0x1a8(%rsp)
callq 0x77722
movsd 0xf8(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm0
leaq (%r14,%r14,2), %rsi
shlq $0x3, %rsi
addq 0x10fce0(%rip), %rsi    # 0x13efa0
leaq 0x2a0(%rsp), %rdi
callq 0x77722
leaq (%rbx,%rbx,8), %rax
movq 0xf0(%rsp), %rsi
subq %rax, %rsi
leaq 0x288(%rsp), %rdi
movsd 0x1b8(%rsp), %xmm0
callq 0x77722
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorps %xmm2, %xmm2
leaq 0x270(%rsp), %rdi
callq 0x762ba
leaq 0x228(%rsp), %rdi
leaq 0x270(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x76605
leaq 0x2d0(%rsp), %rdi
leaq 0x228(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
callq 0x76ce1
leaq 0x308(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
leaq 0x288(%rsp), %rdx
callq 0x76ce1
leaq 0x210(%rsp), %rdi
leaq 0x270(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x76605
leaq 0x228(%rsp), %rdi
leaq 0x210(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
callq 0x76605
leaq 0x2d0(%rsp), %rdi
leaq 0x228(%rsp), %rsi
leaq 0x288(%rsp), %rdx
callq 0x76ce1
leaq 0x1f8(%rsp), %rdi
leaq 0x270(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x76605
leaq 0x210(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
callq 0x76605
leaq 0x228(%rsp), %rdi
leaq 0x210(%rsp), %rsi
leaq 0x288(%rsp), %rdx
callq 0x76605
leaq 0x2b8(%rsp), %rdi
leaq 0x270(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x76605
leaq 0x1f8(%rsp), %rdi
leaq 0x2b8(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
callq 0x76ce1
leaq 0x210(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
leaq 0x288(%rsp), %rdx
callq 0x76605
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
leaq 0x1f8(%rsp), %rdi
callq 0x82a96
xorpd %xmm1, %xmm1
leaq 0x2b8(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
callq 0x82a96
leaq 0x2f8(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0x82a96
xorpd %xmm0, %xmm0
leaq 0x2e8(%rsp), %rdi
movsd 0x40(%rsp), %xmm1
callq 0x82a96
leaq 0x78(%rsp), %rdi
callq 0x886bc
movl $0x68, %edi
callq 0x218c0
movq %rax, %r13
movq %rax, %rdi
leaq 0x308(%rsp), %rsi
leaq 0x1f8(%rsp), %rdx
callq 0x6a414
movl 0x84(%rsp), %edx
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x88752
movl $0x68, %edi
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
leaq 0x2d0(%rsp), %rsi
leaq 0x2b8(%rsp), %rdx
callq 0x6a414
movl 0x84(%rsp), %edx
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x88752
movl $0x68, %edi
callq 0x218c0
movq %rax, %rbp
movq %rax, %rdi
leaq 0x228(%rsp), %rsi
leaq 0x2f8(%rsp), %rdx
callq 0x6a414
movl 0x84(%rsp), %edx
leaq 0x78(%rsp), %rdi
movq %rbp, %rsi
callq 0x88752
movl $0x68, %edi
callq 0x218c0
movq %rax, %rbx
movq %rax, %rdi
leaq 0x210(%rsp), %rsi
leaq 0x2e8(%rsp), %rdx
callq 0x6a414
movl 0x84(%rsp), %edx
leaq 0x78(%rsp), %rdi
movq %rbx, %rsi
callq 0x88752
leaq 0xc0(%rsp), %rdi
callq 0x886bc
movl $0x88, %edi
callq 0x218c0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x6a800
movl 0xcc(%rsp), %edx
leaq 0xc0(%rsp), %rdi
movq %r12, %rsi
callq 0x88752
movl $0x88, %edi
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x6a800
movl 0xcc(%rsp), %edx
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x88752
movl $0x70, %edi
callq 0x218c0
movq %rax, %rbx
movq %rax, %rdi
leaq 0x78(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x68918
movq 0xe8(%rsp), %rax
movslq (%rax,%r15,4), %rax
leaq 0x115b54(%rip), %r12    # 0x1451b0
cmpl %eax, 0xdc(%rsp)
jle 0x2f671
movq 0xd0(%rsp), %rcx
movq (%rcx,%rax,8), %r12
movl $0x60, %edi
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x3d9c4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3dc6c
movq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0x3ceca
leaq 0xc0(%rsp), %rdi
callq 0x88726
leaq 0x78(%rsp), %rdi
callq 0x88726
movq 0x1a8(%rsp), %rsi
addq $0x18, %rsi
addq $0x18, 0xf0(%rsp)
movq 0x1b0(%rsp), %rax
incq %rax
movq 0x1a0(%rsp), %rcx
movq %rcx, %r15
cmpq $0x3, %rcx
jne 0x2f204
movq 0x198(%rsp), %rcx
leaq 0x1(%rcx), %rax
addq $0xc, 0xe8(%rsp)
testq %rcx, %rcx
movq %rax, %rcx
je 0x2f1c1
movq 0x68(%rsp), %rdi
movq 0xe0(%rsp), %rbx
movq %rbx, %rsi
callq 0x3ce8e
movq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rbx, (%rax,%rcx,8)
leaq 0xd0(%rsp), %rdi
callq 0x88726
jmp 0x30021
movl $0x0, 0x1c(%rsp)
leaq 0x540(%rsp), %rbx
movq %rbx, %rdi
leaq 0xadaac(%rip), %rsi     # 0xdd20c
leaq 0xad9b1(%rip), %rdx     # 0xdd118
leaq 0x3250(%rsp), %rcx
leaq 0x2e50(%rsp), %r8
xorl %eax, %eax
callq 0x21140
testb %r13b, %r13b
je 0x30021
movq %rbx, %rdi
callq 0x8a868
testl %eax, %eax
je 0x30021
movl $0x160, %edi            # imm = 0x160
callq 0x218c0
movq %rax, %rbx
movq %rax, %rdi
callq 0x282a0
movq (%rbx), %rsi
movq %rbx, %rdi
leaq 0x540(%rsp), %rdx
callq 0x30f33
testl %eax, %eax
je 0x30019
leaq 0x1650(%rsp), %r14
movq %r14, %rdi
leaq 0xada46(%rip), %rsi     # 0xdd21f
leaq 0x2a50(%rsp), %rdx
xorl %eax, %eax
callq 0x21140
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28ac4
movq (%rbx), %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq 0x148(%rbx), %rdi
testq %rdi, %rdi
je 0x2f814
callq 0x21ae0
leaq 0x540(%rsp), %rdi
callq 0x8b397
movq %rax, 0x148(%rbx)
movq 0x20(%rsp), %rax
movl 0x64(%rax), %edx
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x88752
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
movl $0x30, %edi
callq 0x218c0
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq 0x178(%rsp), %rdx
callq 0x3e210
movq %r14, %rdi
movq %r15, %rsi
callq 0x3cee6
movq %r14, %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq %r14, %rdi
leaq 0x320(%rsp), %rsi
callq 0x3d06c
movq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3ce8e
movq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %r14, (%rax,%rcx,8)
jmp 0x30021
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %rbx
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
leaq 0x1650(%rsp), %r14
movq %r14, %rdi
leaq 0xad940(%rip), %rsi     # 0xdd22e
leaq 0x2a50(%rsp), %rdx
xorl %eax, %eax
callq 0x21140
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3d0ca
movq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0x3ce8e
movq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rbx, (%rax,%rcx,8)
leaq 0x88(%rsp), %rdi
callq 0x886bc
leaq 0x540(%rsp), %rdi
leaq 0xad8cd(%rip), %rsi     # 0xdd20c
leaq 0xad7d2(%rip), %rdx     # 0xdd118
leaq 0x3250(%rsp), %rcx
leaq 0x2e50(%rsp), %r8
xorl %eax, %eax
callq 0x21140
testb %r13b, %r13b
je 0x2fa81
leaq 0x540(%rsp), %rdi
callq 0x8a868
testl %eax, %eax
je 0x2fa81
movl $0x160, %edi            # imm = 0x160
callq 0x218c0
movq %rax, %r15
movq %rax, %rdi
callq 0x282a0
movq (%r15), %rsi
movq %r15, %rdi
leaq 0x540(%rsp), %rdx
callq 0x30f33
testl %eax, %eax
je 0x2fedd
leaq 0x1650(%rsp), %r14
movq %r14, %rdi
leaq 0xad879(%rip), %rsi     # 0xdd236
leaq 0x2a50(%rsp), %rdx
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %r14, %rsi
callq 0x28ac4
movq (%r15), %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq 0x148(%r15), %rdi
testq %rdi, %rdi
je 0x2f9f8
callq 0x21ae0
leaq 0x540(%rsp), %rdi
callq 0x8b397
movq %rax, 0x148(%r15)
movq 0x20(%rsp), %rax
movl 0x64(%rax), %edx
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x88752
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
movl $0x30, %edi
callq 0x218c0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
leaq 0x88(%rsp), %rdx
callq 0x3e210
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cee6
movq %r14, %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3ce8e
leaq 0x540(%rsp), %rdi
leaq 0xad7af(%rip), %rsi     # 0xdd23f
leaq 0xad681(%rip), %rdx     # 0xdd118
leaq 0x3250(%rsp), %rcx
leaq 0x2e50(%rsp), %r8
xorl %eax, %eax
callq 0x21140
cmpb $0x0, 0x28(%rsp)
je 0x2fbd4
leaq 0x540(%rsp), %rdi
callq 0x8a868
testl %eax, %eax
je 0x2fbd4
movl $0x160, %edi            # imm = 0x160
callq 0x218c0
movq %rax, %r15
movq %rax, %rdi
callq 0x282a0
movq (%r15), %rsi
movq %r15, %rdi
leaq 0x540(%rsp), %rdx
callq 0x30f33
testl %eax, %eax
je 0x2fedd
leaq 0x1650(%rsp), %r14
movq %r14, %rdi
leaq 0xad742(%rip), %rsi     # 0xdd252
leaq 0x2a50(%rsp), %rdx
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %r14, %rsi
callq 0x28ac4
movq (%r15), %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq 0x148(%r15), %rdi
testq %rdi, %rdi
je 0x2fb4b
callq 0x21ae0
leaq 0x540(%rsp), %rdi
callq 0x8b397
movq %rax, 0x148(%r15)
movq 0x20(%rsp), %rax
movl 0x64(%rax), %edx
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x88752
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
movl $0x30, %edi
callq 0x218c0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
leaq 0x88(%rsp), %rdx
callq 0x3e210
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cee6
movq %r14, %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3ce8e
leaq 0x540(%rsp), %rdi
leaq 0xad67a(%rip), %rsi     # 0xdd25d
leaq 0xad52e(%rip), %rdx     # 0xdd118
leaq 0x3250(%rsp), %rcx
leaq 0x2e50(%rsp), %r8
xorl %eax, %eax
callq 0x21140
cmpb $0x0, 0x40(%rsp)
je 0x2fec3
leaq 0x540(%rsp), %rdi
callq 0x8a868
testl %eax, %eax
je 0x2fec3
movl $0x160, %edi            # imm = 0x160
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
callq 0x282a0
movq (%r14), %rsi
movq %r14, %rdi
leaq 0x540(%rsp), %rdx
callq 0x30f33
testl %eax, %eax
je 0x2fedd
leaq 0x1650(%rsp), %r15
movq %r15, %rdi
leaq 0xad60d(%rip), %rsi     # 0xdd270
leaq 0x2a50(%rsp), %rdx
xorl %eax, %eax
callq 0x21140
movq %r14, %rdi
movq %r15, %rsi
callq 0x28ac4
movq (%r14), %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq %r14, %rdi
leaq 0x540(%rsp), %rsi
callq 0x37326
movq 0x20(%rsp), %rax
movl 0x64(%rax), %edx
movq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x88752
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %r15
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
movl $0x30, %edi
callq 0x218c0
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
leaq 0x88(%rsp), %rdx
callq 0x3e210
movq %r15, %rdi
movq %r12, %rsi
callq 0x3cee6
movq %r15, %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3ce8e
jmp 0x2fec3
leaq 0x540(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
leaq 0xad3ec(%rip), %rdx     # 0xdd118
leaq 0x2e50(%rsp), %rcx
movq %rcx, %r8
xorl %eax, %eax
callq 0x21140
leaq 0x148(%rsp), %rax
movq %rax, 0x138(%rsp)
movq %rbx, %rdi
callq 0x21380
leaq (%rsp,%rax), %rdx
addq $0x540, %rdx            # imm = 0x540
leaq 0x138(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x395ec
movq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x3adf4
movq %rax, %r14
movq 0x70(%rsp), %r15
addq $0x8, %r15
cmpq %r15, %rax
je 0x2fd98
movq 0x40(%r14), %rbx
jmp 0x2fd9a
xorl %ebx, %ebx
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x2fdbf
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x218e0
cmpq %r15, %r14
je 0x2feea
leaq 0x88(%rsp), %rdi
callq 0x886bc
movq 0x58(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
leaq 0xac45c(%rip), %rdx     # 0xdc245
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x2fe25
leaq 0x28(%rbx), %rdx
movq 0xb0(%rsp), %r8
movq 0x20(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x88(%rsp), %rcx
callq 0x34ceb
testl %eax, %eax
je 0x2fedd
movl $0x1b0, %edi            # imm = 0x1B0
callq 0x218c0
movq %rax, %r14
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x3bab8
leaq 0x1650(%rsp), %rdi
leaq 0xad464(%rip), %rsi     # 0xdd2b2
leaq 0x2a50(%rsp), %rdx
xorl %eax, %eax
callq 0x21140
movl $0x30, %edi
callq 0x218c0
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
leaq 0x88(%rsp), %rdx
callq 0x3e210
movq %r14, %rdi
movq %r15, %rsi
callq 0x3cee6
movq %r14, %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq %r14, %rdi
leaq 0x320(%rsp), %rsi
callq 0x3d06c
movq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3ce8e
movq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %r14, (%rax,%rcx,8)
leaq 0x88(%rsp), %rdi
callq 0x88726
movl $0x0, 0x1c(%rsp)
jmp 0x30021
leaq 0x88(%rsp), %rdi
jmp 0x30014
movl $0x160, %edi            # imm = 0x160
callq 0x218c0
movq %rax, %rbx
movq %rax, %rdi
callq 0x282a0
movq (%rbx), %rsi
movq %rbx, %rdi
leaq 0x540(%rsp), %rdx
callq 0x30f33
testl %eax, %eax
je 0x30019
leaq 0x1650(%rsp), %rdi
leaq 0xad380(%rip), %rsi     # 0xdd2a9
leaq 0x2e50(%rsp), %r14
movq %r14, %rdx
xorl %eax, %eax
callq 0x21140
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28ac4
movq (%rbx), %rdi
leaq 0x1650(%rsp), %rsi
callq 0x3d0ca
movq 0x148(%rbx), %rdi
testq %rdi, %rdi
je 0x2ff67
callq 0x21ae0
leaq 0x540(%rsp), %rdi
callq 0x8b397
movq %rax, 0x148(%rbx)
movq 0x20(%rsp), %rax
movl 0x64(%rax), %edx
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x88752
leaq 0x128(%rsp), %rax
movq %rax, 0x118(%rsp)
leaq 0x540(%rsp), %r14
movq %r14, %rdi
callq 0x21380
leaq (%rsp,%rax), %rdx
addq $0x540, %rdx            # imm = 0x540
leaq 0x118(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x395ec
movq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x3b02a
movq %rbx, (%rax)
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x2fdc8
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x218e0
jmp 0x2fdc8
leaq 0xd0(%rsp), %rdi
callq 0x88726
movl $0x1, 0x1c(%rsp)
leaq 0x320(%rsp), %rdi
callq 0x70878
movl 0x1c(%rsp), %eax
cmpl $0xa, %eax
je 0x3003b
testl %eax, %eax
jne 0x3004a
incq 0x50(%rsp)
jmp 0x2e75f
movl $0x8, %eax
cmpl $0x8, %eax
jne 0x301c2
movq 0xb8(%rsp), %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x93324
movl %eax, %eax
cmpq %rax, %r15
jae 0x301b6
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x34c81
testl %eax, %eax
je 0x30100
movq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x94a3e
cmpl $0x7, %eax
jne 0x30100
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
leaq 0xb8beb(%rip), %rdx     # 0xe8c91
xorl %ecx, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x30100
movq 0x8(%rsp), %rsi
leaq 0x540(%rsp), %rdi
callq 0x8d848
movq 0x540(%rsp), %r12
movq %r12, %rdi
leaq 0xad154(%rip), %rsi     # 0xdd229
callq 0x21d10
movl %eax, %ebp
leaq 0x550(%rsp), %rax
cmpq %rax, %r12
je 0x300fc
movq 0x550(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x218e0
testl %ebp, %ebp
je 0x30108
incq %r15
jmp 0x3005e
movq 0x38(%rsp), %rax
movq (%rax,%r15,8), %r12
testq %r12, %r12
je 0x30100
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
leaq 0xad1a9(%rip), %rdx     # 0xdd2ce
movl $0x6, %ecx
callq 0x34bd0
testl %eax, %eax
je 0x30100
xorl %ebp, %ebp
movq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x93324
cmpl %eax, %ebp
jae 0x30100
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x34c81
movq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x95964
testb %al, %al
je 0x301ab
movq %r13, %rdi
callq 0x92a16
movl %eax, %r13d
testl %eax, %eax
js 0x301ab
movq %rbx, %rdi
callq 0x93324
cmpl %eax, %r13d
jae 0x301ab
movl %r13d, %eax
movq 0x38(%rsp), %rcx
movq (%rcx,%rax,8), %r13
testq %r13, %r13
je 0x301ab
movq 0x68(%rsp), %rdi
movq %r13, %rsi
callq 0x3bf3a
movq %r12, %rdi
movq %r13, %rsi
callq 0x3ce8e
incl %ebp
jmp 0x3013a
movl $0x4, %ecx
jmp 0x301ca
movq 0x38(%rsp), %rdi
callq 0x21c30
xorl %eax, %eax
movl %eax, %ecx
testl %eax, %eax
jne 0x301ca
xorl %ecx, %ecx
movl %ecx, %eax
testb $0xb, %al
jne 0x301e9
incl 0x4c(%rsp)
jmp 0x2e4ea
xorl %ebp, %ebp
jmp 0x301f2
movl $0x2, %eax
jmp 0x301e9
movl $0x1, %eax
xorl %ebp, %ebp
cmpl $0x2, %eax
sete %bpl
leaq 0x1540(%rsp), %rdi
callq 0x70878
leaq 0x528(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30220
movq 0x528(%rsp), %rsi
incq %rsi
callq 0x218e0
leaq 0x4e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30241
movq 0x4e0(%rsp), %rsi
incq %rsi
callq 0x218e0
leaq 0x480(%rsp), %rdi
callq 0x39072
leaq 0x430(%rsp), %rdi
callq 0x39210
leaq 0x1d0(%rsp), %rdi
callq 0x949a8
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x3028d
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x218e0
leaq 0x70(%rsp), %rdi
callq 0x373d6
leaq 0xa0(%rsp), %rdi
callq 0x373f8
movl %ebp, %eax
addq $0x3e58, %rsp           # imm = 0x3E58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3056a
movq %rax, %r15
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x30620
movq 0x128(%rsp), %rsi
jmp 0x303b6
jmp 0x302f6
movq %rax, %rbx
movl $0x1b0, %esi            # imm = 0x1B0
jmp 0x3035a
jmp 0x302f6
jmp 0x3035f
movq %rax, %rbx
movl $0x30, %esi
movq %r12, %rdi
jmp 0x3036a
jmp 0x3035f
jmp 0x30379
movq %rax, %rbx
movl $0x160, %esi            # imm = 0x160
jmp 0x30367
jmp 0x30323
movq %rax, %r15
movl $0x1b0, %esi            # imm = 0x1B0
movq %r14, %rdi
jmp 0x30402
movq %rax, %rbx
movl $0x160, %esi            # imm = 0x160
jmp 0x3035a
movl $0x30, %esi
movq %r15, %rdi
movq %rax, %r15
jmp 0x30402
movq %rax, %r15
movl $0x1b0, %esi            # imm = 0x1B0
movq %r14, %rdi
callq 0x218e0
jmp 0x30613
movq %rax, %rbx
movl $0x30, %esi
movq %r15, %rdi
jmp 0x3036a
movq %rax, %rbx
movl $0x1b0, %esi            # imm = 0x1B0
movq %r14, %rdi
callq 0x218e0
jmp 0x3048f
jmp 0x304ee
movq %rax, %r15
movl $0x160, %esi            # imm = 0x160
jmp 0x303ff
jmp 0x3056a
jmp 0x30562
jmp 0x3056a
movq %rax, %r15
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x30620
movq 0x148(%rsp), %rsi
incq %rsi
jmp 0x30402
jmp 0x3056a
jmp 0x30562
jmp 0x304ee
jmp 0x304ee
jmp 0x304ee
jmp 0x3048c
jmp 0x3056a
jmp 0x30610
jmp 0x3048c
jmp 0x3048c
jmp 0x3048c
jmp 0x3056a
movq %rax, %r15
movl $0x1b0, %esi            # imm = 0x1B0
movq %rbx, %rdi
callq 0x218e0
jmp 0x30620
jmp 0x3056a
jmp 0x3048c
jmp 0x304ee
jmp 0x30562
jmp 0x3048c
jmp 0x3048c
jmp 0x30562
movq %rax, %r15
leaq 0x1540(%rsp), %rdi
callq 0x70f00
jmp 0x3063a
jmp 0x3048c
jmp 0x30562
jmp 0x304ee
jmp 0x30610
jmp 0x3056a
jmp 0x304f6
jmp 0x30562
jmp 0x3056a
movq %rax, %r15
movl $0x1b0, %esi            # imm = 0x1B0
movq %r14, %rdi
jmp 0x3051d
jmp 0x30562
jmp 0x30562
jmp 0x3056a
movq %rax, %r15
jmp 0x30647
jmp 0x3052b
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x88726
movq %rbx, %r15
jmp 0x30620
jmp 0x304f6
jmp 0x304f6
jmp 0x304f6
jmp 0x30562
jmp 0x30562
jmp 0x30562
jmp 0x30562
jmp 0x30562
jmp 0x3056a
jmp 0x304f6
jmp 0x304f6
jmp 0x30562
jmp 0x30562
jmp 0x30562
movq %rax, %r15
jmp 0x30679
jmp 0x3056a
jmp 0x304ee
jmp 0x304ee
jmp 0x30562
movq %rax, %r15
jmp 0x3063a
movq %rax, %r15
movq 0x540(%rsp), %rdi
leaq 0x550(%rsp), %rax
cmpq %rax, %rdi
je 0x3062d
movq 0x550(%rsp), %rsi
incq %rsi
callq 0x218e0
jmp 0x3062d
jmp 0x30562
jmp 0x3052b
movq %rax, %r15
jmp 0x30654
jmp 0x30562
jmp 0x30562
jmp 0x3056a
movq %rax, %r15
jmp 0x30683
jmp 0x30562
movq %rax, %r15
leaq 0x320(%rsp), %rdi
callq 0x70f00
jmp 0x3062d
jmp 0x30562
jmp 0x30562
jmp 0x30562
jmp 0x30562
jmp 0x30562
movq %rax, %r15
jmp 0x3062d
movq %rax, %r15
jmp 0x30620
jmp 0x305ef
movq %rax, %r15
movl $0x68, %esi
movq %r14, %rdi
jmp 0x305bf
movq %rax, %r15
movl $0x88, %esi
jmp 0x305a2
jmp 0x305f4
movq %rax, %r15
movl $0x68, %esi
movq %rbx, %rdi
jmp 0x305bf
movq %rax, %r15
movl $0x60, %esi
movq %r14, %rdi
jmp 0x305de
movq %rax, %r15
movl $0x68, %esi
movq %rbp, %rdi
jmp 0x305bf
movq %rax, %r15
movl $0x68, %esi
movq %r13, %rdi
callq 0x218e0
jmp 0x30604
movq %rax, %r15
movl $0x70, %esi
movq %rbx, %rdi
jmp 0x305de
movq %rax, %r15
movl $0x88, %esi
movq %r12, %rdi
callq 0x218e0
jmp 0x305f7
jmp 0x305ef
jmp 0x305f4
jmp 0x305ef
jmp 0x305ef
jmp 0x305f4
movq %rax, %r15
jmp 0x30604
movq %rax, %r15
leaq 0xc0(%rsp), %rdi
callq 0x88726
leaq 0x78(%rsp), %rdi
callq 0x88726
jmp 0x30613
movq %rax, %r15
leaq 0xd0(%rsp), %rdi
callq 0x88726
leaq 0x320(%rsp), %rdi
callq 0x70878
leaq 0x1540(%rsp), %rdi
callq 0x70878
leaq 0x430(%rsp), %rdi
callq 0x37384
leaq 0x1d0(%rsp), %rdi
callq 0x949a8
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x30679
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x218e0
leaq 0x70(%rsp), %rdi
callq 0x373d6
leaq 0xa0(%rsp), %rdi
callq 0x373f8
movq %r15, %rdi
callq 0x220d0