// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::CompileDag(t2::JsonObjectValue const*, t2::BinaryWriter*, t2::MemAllocHeap*, t2::MemAllocLinear*)
static bool CompileDag(const JsonObjectValue* root, BinaryWriter* writer, MemAllocHeap* heap, MemAllocLinear* scratch)
{
  printf("compiling mmapable DAG data..\n");

  HashTable<CommonStringRecord, kFlagCaseSensitive> shared_strings;
  HashTableInit(&shared_strings, heap);

  BinarySegment         *main_seg      = BinaryWriterAddSegment(writer);
  BinarySegment         *node_guid_seg = BinaryWriterAddSegment(writer);
  BinarySegment         *node_data_seg = BinaryWriterAddSegment(writer);
  BinarySegment         *aux_seg       = BinaryWriterAddSegment(writer);
  BinarySegment         *aux2_seg      = BinaryWriterAddSegment(writer);
  BinarySegment         *str_seg       = BinaryWriterAddSegment(writer);

  const JsonArrayValue  *nodes         = FindArrayValue(root, "Nodes");
  const JsonArrayValue  *passes        = FindArrayValue(root, "Passes");
  const JsonArrayValue  *scanners      = FindArrayValue(root, "Scanners");

  if (EmptyArray(nodes))
  {
    fprintf(stderr, "invalid Nodes data\n");
    return false;
  }

  if (EmptyArray(passes))
  {
    fprintf(stderr, "invalid Passes data\n");
    return false;
  }

  // Write scanners, store pointers
  BinaryLocator* scanner_ptrs = nullptr;

  if (!EmptyArray(scanners))
  {
    scanner_ptrs = (BinaryLocator*) alloca(sizeof(BinaryLocator) * scanners->m_Count);
    for (size_t i = 0, count = scanners->m_Count; i < count; ++i)
    {
      if (!WriteScanner(&scanner_ptrs[i], aux_seg, aux2_seg, str_seg, scanners->m_Values[i]->AsObject(), &shared_strings, scratch))
      {
        fprintf(stderr, "invalid scanner data\n");
        return false;
      }
    }
  }

  // Write magic number
  BinarySegmentWriteUint32(main_seg, DagData::MagicNumber);

  // Compute node guids and index remapping table.
  int32_t      *remap_table = HeapAllocateArray<int32_t>(heap, nodes->m_Count);
  TempNodeGuid *guid_table  = HeapAllocateArray<TempNodeGuid>(heap, nodes->m_Count);

  if (!ComputeNodeGuids(nodes, remap_table, guid_table))
    return false;

  // m_NodeCount
  size_t node_count = nodes->m_Count;
  BinarySegmentWriteInt32(main_seg, int(node_count));

  // Write node guids
  BinarySegmentWritePointer(main_seg, BinarySegmentPosition(node_guid_seg));  // m_NodeGuids
  for (size_t i = 0; i < node_count; ++i)
  {
    BinarySegmentWrite(node_guid_seg, (char*) &guid_table[i].m_Digest, sizeof guid_table[i].m_Digest);
  }

  // Write nodes.
  if (!WriteNodes(nodes, main_seg, node_data_seg, aux_seg, str_seg, scanner_ptrs, heap, &shared_strings, scratch, guid_table, remap_table))
    return false;

  // Write passes
  BinarySegmentWriteInt32(main_seg, (int) passes->m_Count);
  BinarySegmentWritePointer(main_seg, BinarySegmentPosition(aux_seg));
  for (size_t i = 0, count = passes->m_Count; i < count; ++i)
  {
    const char* pass_name = passes->m_Values[i]->GetString();
    if (!pass_name)
      return false;
    WriteStringPtr(aux_seg, str_seg, pass_name);
  }

  // Write configs
  const JsonObjectValue *setup       = FindObjectValue(root, "Setup");
  const JsonArrayValue  *configs     = FindArrayValue(setup, "Configs");
  const JsonArrayValue  *variants    = FindArrayValue(setup, "Variants");
  const JsonArrayValue  *subvariants = FindArrayValue(setup, "SubVariants");
  const JsonArrayValue  *tuples      = FindArrayValue(setup, "BuildTuples");

  if (nullptr == setup || EmptyArray(configs) || EmptyArray(variants) || EmptyArray(subvariants) || EmptyArray(tuples))
  {
    fprintf(stderr, "invalid Setup data\n");
    return false;
  }

  if (!WriteStrHashArray(main_seg, aux_seg, str_seg, configs))
  {
    fprintf(stderr, "invalid Setup.Configs data\n");
    return false;
  }

  if (!WriteStrHashArray(main_seg, aux_seg, str_seg, variants))
  {
    fprintf(stderr, "invalid Setup.Variants data\n");
    return false;
  }

  if (!WriteStrHashArray(main_seg, aux_seg, str_seg, subvariants))
  {
    fprintf(stderr, "invalid Setup.SubVariants data\n");
    return false;
  }

  BinarySegmentWriteInt32(main_seg, (int) tuples->m_Count);
  BinarySegmentWritePointer(main_seg, BinarySegmentPosition(aux_seg));

  for (size_t i = 0, count = tuples->m_Count; i < count; ++i)
  {
    const JsonObjectValue* obj = tuples->m_Values[i]->AsObject();
    if (!obj)
    {
      fprintf(stderr, "invalid Setup.BuildTuples[%d] data\n", (int) i);
      return false;
    }

    int                    config_index     = (int) FindIntValue(obj, "ConfigIndex", -1);
    int                    variant_index    = (int) FindIntValue(obj, "VariantIndex", -1);
    int                    subvariant_index = (int) FindIntValue(obj, "SubVariantIndex", -1);
    const JsonArrayValue  *default_nodes    = FindArrayValue(obj, "DefaultNodes");
    const JsonArrayValue  *always_nodes     = FindArrayValue(obj, "AlwaysNodes");
    const JsonObjectValue *named_nodes      = FindObjectValue(obj, "NamedNodes");

    if (config_index == -1 || variant_index == -1 || subvariant_index == -1 ||
        !default_nodes || !always_nodes)
    {
      fprintf(stderr, "invalid Setup.BuildTuples[%d] data\n", (int) i);
      return false;
    }

    BinarySegmentWriteInt32(aux_seg, config_index);
    BinarySegmentWriteInt32(aux_seg, variant_index);
    BinarySegmentWriteInt32(aux_seg, subvariant_index);

    if (!WriteNodeArray(aux_seg, aux2_seg, default_nodes, remap_table))
    {
      fprintf(stderr, "bad DefaultNodes data\n");
      return false;
    }

    if (!WriteNodeArray(aux_seg, aux2_seg, always_nodes, remap_table))
    {
      fprintf(stderr, "bad AlwaysNodes data\n");
      return false;
    }

    if (named_nodes)
    {
      size_t ncount = named_nodes->m_Count;
      BinarySegmentWriteInt32(aux_seg, (int) ncount);
      BinarySegmentWritePointer(aux_seg, BinarySegmentPosition(aux2_seg));
      for (size_t i = 0; i < ncount; ++i)
      {
        WriteStringPtr(aux2_seg, str_seg, named_nodes->m_Names[i]);
        const JsonNumberValue* node_index = named_nodes->m_Values[i]->AsNumber();
        if (!node_index)
        {
          fprintf(stderr, "named node index must be number\n");
          return false;
        }
        int remapped_index = remap_table[(int) node_index->m_Number];
        BinarySegmentWriteInt32(aux2_seg, remapped_index);
      }
    }
    else
    {
      BinarySegmentWriteInt32(aux_seg, 0);
      BinarySegmentWriteNullPointer(aux_seg);
    }
  }

  const JsonObjectValue* default_tuple = FindObjectValue(setup, "DefaultBuildTuple");
  if (!default_tuple)
  {
    fprintf(stderr, "missing Setup.DefaultBuildTuple\n");
    return false;
  }

  int def_config_index = (int) FindIntValue(default_tuple, "ConfigIndex", -2);
  int def_variant_index = (int) FindIntValue(default_tuple, "VariantIndex", -2);
  int def_subvariant_index = (int) FindIntValue(default_tuple, "SubVariantIndex", -2);

  if (-2 == def_config_index || -2 == def_variant_index || -2 == def_subvariant_index)
  {
    fprintf(stderr, "bad Setup.DefaultBuildTuple data\n");
    return false;
  }

  BinarySegmentWriteInt32(main_seg, def_config_index);
  BinarySegmentWriteInt32(main_seg, def_variant_index);
  BinarySegmentWriteInt32(main_seg, def_subvariant_index);

  if (const JsonArrayValue* file_sigs = FindArrayValue(root, "FileSignatures"))
  {
    size_t count = file_sigs->m_Count;
    BinarySegmentWriteInt32(main_seg, (int) count);
    BinarySegmentWritePointer(main_seg, BinarySegmentPosition(aux_seg));
    for (size_t i = 0; i < count; ++i)
    {
      if (const JsonObjectValue* sig = file_sigs->m_Values[i]->AsObject())
      {
        const char* path = FindStringValue(sig, "File");

        if (!path)
        {
          fprintf(stderr, "bad FileSignatures data (null path in File node)\n");
          return false;
        }

        int64_t timestamp = GetFileInfo(path).m_Timestamp;
        WriteStringPtr(aux_seg, str_seg, path);
        char padding[4] = { 0, 0, 0, 0 };
        BinarySegmentWrite(aux_seg, padding, 4);
        BinarySegmentWriteUint64(aux_seg, uint64_t(timestamp));
      }
      else
      {
        fprintf(stderr, "bad FileSignatures data (FileSignatures must contain objects)\n");
        return false;
      }
    }
  }
  else
  {
    BinarySegmentWriteInt32(main_seg, 0);
    BinarySegmentWriteNullPointer(main_seg);
  }

  if (const JsonArrayValue* glob_sigs = FindArrayValue(root, "GlobSignatures"))
  {
    size_t count = glob_sigs->m_Count;
    BinarySegmentWriteInt32(main_seg, (int) count);
    BinarySegmentWritePointer(main_seg, BinarySegmentPosition(aux_seg));
    for (size_t i = 0; i < count; ++i)
    {
      if (const JsonObjectValue* sig = glob_sigs->m_Values[i]->AsObject())
      {
        const char* path = FindStringValue(sig, "Path");
        if (!path)
        {
          fprintf(stderr, "bad GlobSignatures data\n");
          return false;
        }

        HashDigest digest = CalculateGlobSignatureFor(path, heap, scratch);

        WriteStringPtr(aux_seg, str_seg, path);
        BinarySegmentWrite(aux_seg, (char*) &digest, sizeof digest);
      }
    }
  }
  else
  {
    BinarySegmentWriteInt32(main_seg, 0);
    BinarySegmentWriteNullPointer(main_seg);
  }

  // Emit hashes of file extensions to sign using SHA-1 content digest instead of the normal timestamp signing.
  if (const JsonArrayValue* sha_exts = FindArrayValue(root, "ContentDigestExtensions"))
  {
    BinarySegmentWriteInt32(main_seg, (int) sha_exts->m_Count);
    BinarySegmentWritePointer(main_seg, BinarySegmentPosition(aux_seg));

    for (size_t i = 0, count = sha_exts->m_Count; i < count; ++i)
    {
      const JsonValue* v = sha_exts->m_Values[i];
      if (const JsonStringValue* sv = v->AsString())
      {
        const char* str = sv->m_String;
        if (str[0] != '.')
        {
          fprintf(stderr, "ContentDigestExtensions: Expected extension to start with dot: %s\b", str);
          return false;
        }

        BinarySegmentWriteUint32(aux_seg, Djb2Hash(str));
      }
      else
        return false;
    }
  }
  else
  {
    BinarySegmentWriteInt32(main_seg, 0);
    BinarySegmentWriteNullPointer(main_seg);
  }

  BinarySegmentWriteInt32(main_seg, (int) FindIntValue(root, "MaxExpensiveCount", -1));

  WriteStringPtr(main_seg, str_seg, FindStringValue(root, "StateFileName", ".tundra2.state"));
  WriteStringPtr(main_seg, str_seg, FindStringValue(root, "StateFileNameTmp", ".tundra2.state.tmp"));

  WriteStringPtr(main_seg, str_seg, FindStringValue(root, "ScanCacheFileName", ".tundra2.scancache"));
  WriteStringPtr(main_seg, str_seg, FindStringValue(root, "ScanCacheFileNameTmp", ".tundra2.scancache.tmp"));

  WriteStringPtr(main_seg, str_seg, FindStringValue(root, "DigestCacheFileName", ".tundra2.digestcache"));
  WriteStringPtr(main_seg, str_seg, FindStringValue(root, "DigestCacheFileNameTmp", ".tundra2.digestcache.tmp"));

  HashTableDestroy(&shared_strings);

  HeapFree(heap, guid_table);
  HeapFree(heap, remap_table);

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rcx, -0xa8(%rbp)
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xf9fc(%rip), %rdi      # 0x16562
callq 0x3540
xorps %xmm0, %xmm0
movups %xmm0, -0x1c4(%rbp)
movaps %xmm0, -0x1d0(%rbp)
movq %r14, -0x90(%rbp)
movq %r14, -0x1b0(%rbp)
movq $0x0, -0x1a8(%rbp)
movq %rbx, %rdi
callq 0x136d3
movq %rax, -0x58(%rbp)
movq %rbx, %rdi
callq 0x136d3
movq %rax, -0x70(%rbp)
movq %rbx, %rdi
callq 0x136d3
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
callq 0x136d3
movq %rax, -0x40(%rbp)
movq %rbx, %rdi
callq 0x136d3
movq %rax, %r14
movq %rbx, %rdi
callq 0x136d3
movq %rax, %rbx
leaq 0xf5ff(%rip), %rsi      # 0x161e1
movq %r15, %rdi
callq 0x6414
movq %rax, %r12
leaq 0xf4ad(%rip), %rsi      # 0x160a1
movq %r15, %rdi
callq 0x6414
movq %rax, %r13
leaq 0xf4a2(%rip), %rsi      # 0x160a8
movq %r15, -0x98(%rbp)
movq %r15, %rdi
callq 0x6414
testq %r12, %r12
je 0x7e85
cmpq $0x0, 0x8(%r12)
je 0x7e85
testq %r13, %r13
je 0x7e8c
cmpq $0x0, 0x8(%r13)
je 0x7e8c
movq %rax, %rdx
testq %rax, %rax
movq -0x58(%rbp), %rdi
movq %rbx, -0x38(%rbp)
movq %r14, -0x80(%rbp)
je 0x70a8
movq 0x8(%rdx), %rsi
testq %rsi, %rsi
movq -0x40(%rbp), %r15
je 0x70a8
movq %r12, -0xa0(%rbp)
movq %r13, -0xc0(%rbp)
movq %rsi, %rax
shlq $0x4, %rax
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, -0x88(%rbp)
movq %rcx, %rsp
xorl %ecx, %ecx
movq %rdx, -0xb0(%rbp)
movq %rsi, -0x60(%rbp)
movq 0x10(%rdx), %rax
movq %rcx, -0x50(%rbp)
movq (%rax,%rcx,8), %r12
cmpl $0x2, (%r12)
jne 0x7e6d
movq %r12, %rdi
leaq 0xf7da(%rip), %rsi      # 0x16494
xorl %edx, %edx
callq 0x63a8
movq %rax, %rbx
movq %r12, %rdi
leaq 0xf7cb(%rip), %rsi      # 0x16499
callq 0x6414
testq %rbx, %rbx
je 0x7e6d
movq %rax, %r13
testq %rax, %rax
je 0x7e6d
movq -0x50(%rbp), %r14
shlq $0x4, %r14
addq -0x88(%rbp), %r14
movl $0x4, %esi
movq %r15, %rdi
callq 0x133e9
movq %r15, %rdi
callq 0x134b5
movl %eax, (%r14)
movq %rdx, 0x8(%r14)
movq %rbx, %rdi
leaq 0x106b1(%rip), %rsi     # 0x173ce
callq 0x3470
movl %eax, -0x68(%rbp)
testl %eax, %eax
je 0x6d5b
movq %rbx, %rdi
leaq 0xf773(%rip), %rsi      # 0x164a6
callq 0x3470
testl %eax, %eax
leaq -0x160(%rbp), %r14
jne 0x7e6d
movl $0x1, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
jmp 0x6d74
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
leaq -0x160(%rbp), %r14
movq %r14, %rsi
callq 0x1343d
movl 0x8(%r13), %eax
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1343d
movq -0x80(%rbp), %rdi
callq 0x134b5
movq %r15, %rdi
movl %eax, %esi
callq 0x13469
movq %r14, %rdi
callq 0xdc4a
movq %rbx, %rdi
callq 0x3150
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xdb34
movq 0x8(%r13), %r14
testq %r14, %r14
je 0x6e28
xorl %r15d, %r15d
movq 0x10(%r13), %rax
movq (%rax,%r15,8), %rax
cmpl $0x4, (%rax)
je 0x6de2
xorl %eax, %eax
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x7e6d
movq %rbx, %rdi
callq 0x3150
leaq -0x160(%rbp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xdb34
movq -0x80(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rbx, %rdx
leaq -0x1d0(%rbp), %rcx
callq 0x6064
incq %r15
cmpq %r15, %r14
jne 0x6dd3
movl $0x10, %esi
movq -0x40(%rbp), %rdi
callq 0x1342d
movq %rax, -0x78(%rbp)
cmpl $0x0, -0x68(%rbp)
je 0x7065
movq %r12, %rdi
leaq 0xf660(%rip), %rsi      # 0x164ae
callq 0x8616
movzbl %al, %ebx
movq %r12, %rdi
leaq 0xf660(%rip), %rsi      # 0x164c0
callq 0x8616
leal 0x2(%rbx), %r14d
testb %al, %al
cmovel %ebx, %r14d
movq %r12, %rdi
leaq 0xf655(%rip), %rsi      # 0x164ce
callq 0x8616
leal 0x4(%r14), %ecx
testb %al, %al
cmovel %r14d, %ecx
movl %ecx, -0x2c(%rbp)
movl $0x4, %edx
movq -0x40(%rbp), %r14
movq %r14, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1343d
movq %r12, %rdi
leaq 0xf634(%rip), %rsi      # 0x164de
callq 0x6414
movq %rax, %r13
movq %r12, %rdi
leaq 0xf62b(%rip), %rsi      # 0x164e7
callq 0x6414
testq %r13, %r13
je 0x6ecc
movq 0x8(%r13), %rcx
jmp 0x6ece
xorl %ecx, %ecx
testq %rax, %rax
leaq -0x2c(%rbp), %r15
movq %rax, -0x68(%rbp)
je 0x6ee1
movq 0x8(%rax), %rbx
jmp 0x6ee3
xorl %ebx, %ebx
addq %rcx, %rbx
movl %ebx, -0x2c(%rbp)
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1343d
testq %rbx, %rbx
je 0x704e
movl $0x4, %esi
movq -0x80(%rbp), %rbx
movq %rbx, %rdi
callq 0x133e9
movq %rbx, %rdi
callq 0x134b5
movq %r14, %rdi
movl %eax, %esi
callq 0x13469
testq %r13, %r13
je 0x6fb1
movq 0x8(%r13), %rbx
testq %rbx, %rbx
je 0x6fb1
xorl %r14d, %r14d
movq 0x10(%r13), %rax
movq (%rax,%r14,8), %r15
cmpl $0x4, (%r15)
jne 0x7e6d
movq 0x8(%r15), %rdx
movq -0x80(%rbp), %r12
movq %r12, %rdi
movq -0x38(%rbp), %rsi
callq 0x8306
movq 0x8(%r15), %rdi
callq 0x3150
movw %ax, -0x2c(%rbp)
movl $0x2, %edx
movq %r12, %rdi
leaq -0x2c(%rbp), %r15
movq %r15, %rsi
callq 0x1343d
movb $0x1, -0x2c(%rbp)
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1343d
movb $0x0, -0x2c(%rbp)
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1343d
incq %r14
cmpq %r14, %rbx
jne 0x6f3a
movq -0x68(%rbp), %rax
testq %rax, %rax
je 0x7065
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x7065
xorl %r13d, %r13d
movq 0x10(%rax), %rax
movq (%rax,%r13,8), %r14
cmpl $0x4, (%r14)
jne 0x7e6d
movq 0x8(%r14), %rdx
movq -0x80(%rbp), %r15
movq %r15, %rdi
movq -0x38(%rbp), %rsi
callq 0x8306
movq 0x8(%r14), %rdi
callq 0x3150
movw %ax, -0x2c(%rbp)
movl $0x2, %edx
movq %r15, %rdi
leaq -0x2c(%rbp), %r12
movq %r12, %rsi
callq 0x1343d
xorl %r14d, %r14d
movb %r14b, -0x2c(%rbp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1343d
movb %r14b, -0x2c(%rbp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1343d
incq %r13
cmpq %r13, %rbx
movq -0x68(%rbp), %rax
jne 0x6fce
jmp 0x7065
movl $0x0, -0x2c(%rbp)
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1343d
leaq -0x160(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xdc61
movq -0x50(%rbp), %rcx
incq %rcx
movq -0x60(%rbp), %rsi
cmpq %rsi, %rcx
movq -0x40(%rbp), %r15
movq -0xb0(%rbp), %rdx
jne 0x6c99
movq -0x58(%rbp), %rdi
movq -0xc0(%rbp), %r13
movq -0xa0(%rbp), %r12
jmp 0x70b3
movq $0x0, -0x88(%rbp)
leaq -0x160(%rbp), %rsi
movl $0x6d992313, (%rsi)     # imm = 0x6D992313
movl $0x4, %edx
callq 0x1343d
movq 0x8(%r12), %rsi
shlq $0x2, %rsi
movq -0x90(%rbp), %rbx
movq %rbx, %rdi
callq 0xe882
movq %rax, %r14
movq 0x8(%r12), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rsi
movq %rbx, %rdi
callq 0xe882
movq %r12, %rdi
movq %r14, %rsi
movq %rax, -0xb0(%rbp)
movq %rax, %rdx
callq 0x611b
testb %al, %al
je 0x7e91
movq %r14, -0x68(%rbp)
movq 0x8(%r12), %r14
leaq -0x160(%rbp), %rsi
movl %r14d, (%rsi)
movl $0x4, %edx
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x1343d
movq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0x134b5
movq %rbx, %rdi
movl %eax, %esi
callq 0x13469
testq %r14, %r14
je 0x7176
movq -0xb0(%rbp), %rbx
movl $0x10, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1343d
addq $0x14, %rbx
decq %r14
jne 0x715d
movq -0x48(%rbp), %rdi
callq 0x134b5
movq -0x58(%rbp), %rdi
movl %eax, %esi
callq 0x13469
movq -0xa8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq 0x8(%r12), %rbx
movq %rbx, %rax
shlq $0x6, %rax
leaq (%rax,%rax,8), %rsi
movq -0x90(%rbp), %rdi
callq 0xe882
movq -0x40(%rbp), %r15
movq %rax, %rdi
leaq (,%rbx,8), %rax
leaq (%rax,%rax,2), %rdx
movq %rdi, -0x78(%rbp)
xorl %esi, %esi
callq 0x31b0
testq %rbx, %rbx
je 0x7862
movq %r12, -0xa0(%rbp)
movq %r13, -0xc0(%rbp)
xorl %r12d, %r12d
movq %rbx, -0x50(%rbp)
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rdi
cmpl $0x2, (%rdi)
jne 0x7e74
leaq 0xf2e8(%rip), %rsi      # 0x164f8
callq 0x6414
testq %rax, %rax
je 0x727a
movq %rax, %r14
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x727a
xorl %r13d, %r13d
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rax
cmpl $0x5, (%rax)
jne 0x7e74
cvttsd2si 0x8(%rax), %eax
testl %eax, %eax
js 0x7e74
cmpl -0x50(%rbp), %eax
jge 0x7e74
movl %eax, %eax
leaq (%rax,%rax,2), %rax
movq -0x78(%rbp), %rcx
leaq (%rcx,%rax,8), %rdi
movl $0x1, %edx
movq -0x90(%rbp), %rsi
callq 0x8844
movl %r12d, (%rax)
incq %r13
cmpq %r13, %rbx
jne 0x7229
incq %r12
movq -0x50(%rbp), %rbx
cmpq %rbx, %r12
jne 0x71f1
xorl %eax, %eax
movq -0xa0(%rbp), %rdx
movq %rax, -0x168(%rbp)
leaq (%rax,%rax,4), %rax
movq -0xb0(%rbp), %rcx
movslq 0x10(%rcx,%rax,4), %rcx
movq 0x10(%rdx), %rax
movq %rcx, -0x198(%rbp)
movq (%rax,%rcx,8), %r13
cmpl $0x2, (%r13)
movl $0x0, %eax
cmovneq %rax, %r13
movq %r13, %rdi
leaq 0xf22f(%rip), %rsi      # 0x16500
xorl %edx, %edx
callq 0x63a8
movq %rax, -0xb8(%rbp)
movq %r13, %rdi
leaq 0xebbe(%rip), %rsi      # 0x15ea7
xorl %edx, %edx
callq 0x63a8
movq %rax, -0x1a0(%rbp)
movq %r13, %rdi
leaq 0xf1fc(%rip), %rsi      # 0x164fd
xorl %edx, %edx
callq 0x63a8
movq %rax, %rbx
movq %r13, %rdi
leaq 0xf1f2(%rip), %rsi      # 0x16507
xorl %edx, %edx
callq 0x84f9
movq %rax, %r14
movq %r13, %rdi
leaq 0xf1cf(%rip), %rsi      # 0x164f8
callq 0x6414
movq %rax, %r12
movq %r13, %rdi
leaq 0xeb65(%rip), %rsi      # 0x15ea0
callq 0x6414
movq %rax, -0x190(%rbp)
movq %r13, %rdi
leaq 0xf38d(%rip), %rsi      # 0x166de
callq 0x6414
movq %rax, -0x188(%rbp)
movq %r13, %rdi
leaq 0xf1aa(%rip), %rsi      # 0x16511
callq 0x6414
movq %rax, -0x180(%rbp)
movq %r13, %rdi
leaq 0xf19f(%rip), %rsi      # 0x1651c
callq 0x6414
movq %rax, -0x70(%rbp)
movq %r13, -0x170(%rbp)
movq %r13, %rdi
leaq 0xf189(%rip), %rsi      # 0x16520
movq $-0x1, %rdx
callq 0x84f9
movq %rax, -0x178(%rbp)
movq -0x48(%rbp), %r13
movq %r13, %rdi
movq -0x38(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0x8306
movq %r13, %rdi
movq -0x38(%rbp), %rsi
movq %rbx, %rdx
callq 0x8306
movq %r13, %rdi
movq -0x38(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
leaq -0x1d0(%rbp), %rcx
callq 0x6064
movl %r14d, -0x160(%rbp)
movl $0x4, %edx
movq %r13, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
testq %r12, %r12
je 0x74a5
movl $0x4, %esi
movq %r15, %rdi
callq 0x133e9
movq -0x48(%rbp), %rbx
movl 0x8(%r12), %eax
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq %r15, %rdi
callq 0x134b5
movq %rbx, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%r12), %rbx
testq %rbx, %rbx
je 0x74e5
xorl %r14d, %r14d
movq 0x10(%r12), %rax
movq (%rax,%r14,8), %rax
cmpl $0x5, (%rax)
jne 0x7e74
cvttsd2si 0x8(%rax), %eax
cltq
movq -0x68(%rbp), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
incq %r14
cmpq %r14, %rbx
jne 0x7461
jmp 0x74e5
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq -0x198(%rbp), %rax
leaq (%rax,%rax,2), %rbx
movq -0x78(%rbp), %r13
movq 0x8(%r13,%rbx,8), %rax
testq %rax, %rax
je 0x7585
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq -0x48(%rbp), %r14
movq %r14, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq -0x38(%rbp), %r12
movq %r15, %rdi
callq 0x134b5
movq %r14, %rdi
movl %eax, %esi
callq 0x13469
leaq (,%rbx,8), %rax
addq %r13, %rax
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x75c9
movq (%rax), %r14
shlq $0x2, %rbx
xorl %r15d, %r15d
movslq (%r14,%r15), %rax
movq -0x68(%rbp), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq -0x40(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
addq $0x4, %r15
cmpq %r15, %rbx
jne 0x7554
jmp 0x75c9
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq -0x38(%rbp), %r12
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq -0x40(%rbp), %r15
movq %r15, %rsi
movq %r12, %rdx
movq -0x190(%rbp), %rcx
callq 0x867c
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq -0x188(%rbp), %rcx
callq 0x867c
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq -0x180(%rbp), %rcx
callq 0x867c
movq -0x70(%rbp), %rax
testq %rax, %rax
je 0x7715
cmpq $0x0, 0x8(%rax)
je 0x7715
movl $0x4, %esi
movq %r15, %rdi
callq 0x133e9
movq -0x48(%rbp), %rbx
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq %r15, %rdi
callq 0x134b5
movq %rbx, %rdi
movl %eax, %esi
callq 0x13469
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb8(%rbp)
testq %rax, %rax
je 0x7755
xorl %r12d, %r12d
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rbx
movq %rbx, %rdi
leaq 0xee90(%rip), %rsi      # 0x1652d
xorl %edx, %edx
callq 0x63a8
movq %rax, %r14
movq %rbx, %rdi
leaq 0xee80(%rip), %rsi      # 0x16531
xorl %edx, %edx
callq 0x63a8
movq %rax, %rbx
testq %r14, %r14
leaq -0x1d0(%rbp), %rax
je 0x7e74
testq %rbx, %rbx
je 0x7e74
movq %r15, %rdi
movq %r15, %r13
movq -0x38(%rbp), %r15
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %r14
movq %rax, %rcx
callq 0x6064
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x6064
incq %r12
cmpq %r12, -0xb8(%rbp)
movq %r13, %r15
jne 0x7687
jmp 0x7755
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq -0x178(%rbp), %rax
cmpl $-0x1, %eax
jne 0x7785
movl $0x0, -0x160(%rbp)
movl $0x4, %edx
movq -0x48(%rbp), %r12
movq %r12, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
jmp 0x77a6
cltq
shlq $0x4, %rax
movq -0x88(%rbp), %rcx
movl (%rcx,%rax), %esi
movq 0x8(%rcx,%rax), %rdx
movq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x13469
movq -0x170(%rbp), %r13
movq %r13, %rdi
leaq 0xed80(%rip), %rsi      # 0x16537
movl $0x1, %edx
callq 0x8791
movl %eax, %ebx
movq %r13, %rdi
leaq 0xed7b(%rip), %rsi      # 0x16548
movl $0x2, %edx
callq 0x8791
movl %eax, %r14d
orl %ebx, %r14d
movq %r13, %rdi
leaq 0xed71(%rip), %rsi      # 0x16558
movl $0x4, %edx
callq 0x8791
orl %r14d, %eax
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq %r12, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq -0x168(%rbp), %rax
incq %rax
movq -0x50(%rbp), %r14
cmpq %r14, %rax
movq -0xa0(%rbp), %rdx
jne 0x7293
movq -0x78(%rbp), %rbx
movq -0xc0(%rbp), %r13
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x7859
movq -0x90(%rbp), %rdi
callq 0xe88a
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
addq $0x18, %rbx
decq %r14
jne 0x7837
movq -0x90(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0xe88a
movq -0xa8(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl 0x8(%r13), %eax
leaq -0x160(%rbp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x1343d
movq %r15, %rdi
callq 0x134b5
movq %rbx, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%r13), %rbx
testq %rbx, %rbx
je 0x78f6
xorl %r14d, %r14d
movq %r13, %r12
movq 0x10(%r13), %rax
movq (%rax,%r14,8), %rax
xorl %r13d, %r13d
cmpl $0x4, (%rax)
je 0x78d2
xorl %eax, %eax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x7e94
movq %r15, %rdi
movq -0x38(%rbp), %rsi
callq 0x8306
incq %r14
cmpq %r14, %rbx
movq %r12, %r13
jne 0x78bd
leaq 0xe7f3(%rip), %rsi      # 0x160f0
movq -0x98(%rbp), %rdi
callq 0x8371
movq %rax, %rbx
leaq 0xe7e3(%rip), %rsi      # 0x160f6
movq %rax, %rdi
callq 0x6414
movq %rax, %r12
leaq 0xe7dc(%rip), %rsi      # 0x16101
movq %rbx, %rdi
callq 0x6414
movq %rax, %r14
leaq 0xe7c7(%rip), %rsi      # 0x160fe
movq %rbx, %rdi
callq 0x6414
movq %rax, %r13
leaq 0xe7c1(%rip), %rsi      # 0x1610a
movq %rbx, %rdi
callq 0x6414
movq %rax, -0x60(%rbp)
testq %rbx, %rbx
je 0x7ea6
testq %r12, %r12
je 0x7ea6
testq %r14, %r14
je 0x7ea6
cmpq $0x0, 0x8(%r12)
je 0x7ea6
testq %r13, %r13
je 0x7ea6
cmpq $0x0, 0x8(%r14)
je 0x7ea6
cmpq $0x0, -0x60(%rbp)
je 0x7ea6
cmpq $0x0, 0x8(%r13)
je 0x7ea6
movq -0x60(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7ea6
movq %r13, -0x50(%rbp)
movq %rbx, -0x70(%rbp)
movq -0x58(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r15, %rbx
movq -0x38(%rbp), %r15
movq %r15, %rdx
movq %r12, %rcx
callq 0x83df
testb %al, %al
je 0x821e
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x83df
testb %al, %al
je 0x8228
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq -0x50(%rbp), %rcx
callq 0x83df
testb %al, %al
je 0x8232
movq %rbx, %r14
movq -0x60(%rbp), %rbx
movl 0x8(%rbx), %eax
leaq -0x160(%rbp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r13, %rdi
callq 0x1343d
movq %r14, %rdi
callq 0x134b5
movq %r13, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%rbx), %rax
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x7ca1
xorl %edx, %edx
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax,%rdx,8), %r13
cmpl $0x2, (%r13)
jne 0x8250
movq %rdx, -0x88(%rbp)
movq %r13, %rdi
leaq 0xe726(%rip), %rsi      # 0x161a7
movq $-0x1, %rdx
callq 0x84f9
movq %rax, %rbx
movq %r13, %rdi
leaq 0xe71c(%rip), %rsi      # 0x161b6
movq $-0x1, %rdx
callq 0x84f9
movq %rax, %r14
movq %r13, %rdi
leaq 0xe700(%rip), %rsi      # 0x161b3
movq $-0x1, %rdx
callq 0x84f9
movq %rax, %r12
movq %r13, %rdi
leaq 0xe6f7(%rip), %rsi      # 0x161c3
callq 0x6414
movq %rax, -0x50(%rbp)
movq %r13, %rdi
leaq 0xe6f1(%rip), %rsi      # 0x161d0
callq 0x6414
movq %rax, %r15
movq %r13, %rdi
leaq 0xe6eb(%rip), %rsi      # 0x161dc
callq 0x8371
movq %r15, -0x78(%rbp)
testq %r15, %r15
je 0x8266
cmpq $0x0, -0x50(%rbp)
je 0x8266
cmpl $-0x1, %ebx
je 0x8266
cmpl $-0x1, %r14d
je 0x8266
cmpl $-0x1, %r12d
je 0x8266
movq %rax, %r13
movl %ebx, -0x160(%rbp)
movl $0x4, %edx
movq -0x40(%rbp), %r15
movq %r15, %rdi
leaq -0x160(%rbp), %rbx
movq %rbx, %rsi
callq 0x1343d
movl %r14d, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1343d
movl %r12d, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1343d
movq %r15, %rdi
movq -0x80(%rbp), %r12
movq %r12, %rsi
movq -0x50(%rbp), %rdx
movq -0x68(%rbp), %rbx
movq %rbx, %rcx
callq 0x8569
testb %al, %al
je 0x828d
movq %r15, %rdi
movq %r12, %rsi
movq -0x78(%rbp), %rdx
movq %rbx, %rcx
callq 0x8569
testb %al, %al
je 0x8297
testq %r13, %r13
je 0x7c58
movq 0x8(%r13), %rbx
movl %ebx, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
movq %r12, %rdi
callq 0x134b5
movq %r15, %rdi
movl %eax, %esi
callq 0x13469
testq %rbx, %rbx
movq -0x38(%rbp), %r15
je 0x7c8d
xorl %r14d, %r14d
movq 0x10(%r13), %rax
movq (%rax,%r14,8), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x8306
movq 0x18(%r13), %rax
movq (%rax,%r14,8), %rax
cmpl $0x5, (%rax)
jne 0x7ead
cvttsd2si 0x8(%rax), %eax
cltq
movq -0x68(%rbp), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq %r12, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
incq %r14
cmpq %r14, %rbx
jne 0x7c02
jmp 0x7c8d
xorl %ebx, %ebx
movl %ebx, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
leaq -0x160(%rbp), %r14
movq %r14, %rsi
callq 0x1343d
movl %ebx, -0x160(%rbp)
movl $0x4, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1343d
movq -0x88(%rbp), %rdx
incq %rdx
cmpq -0x48(%rbp), %rdx
jne 0x7a59
leaq 0xe58d(%rip), %rsi      # 0x16235
movq -0x70(%rbp), %rdi
callq 0x8371
testq %rax, %rax
je 0x823c
movq %rax, %rbx
leaq 0xe4e3(%rip), %rsi      # 0x161a7
movq %rax, %rdi
movq $-0x2, %rdx
callq 0x84f9
movq %rax, %r15
leaq 0xe4d9(%rip), %rsi      # 0x161b6
movq %rbx, %rdi
movq $-0x2, %rdx
callq 0x84f9
movq %rax, %r14
leaq 0xe4bd(%rip), %rsi      # 0x161b3
movq %rbx, %rdi
movq $-0x2, %rdx
callq 0x84f9
cmpl $-0x2, %r15d
je 0x8246
cmpl $-0x2, %r14d
je 0x8246
movq %rax, %rbx
cmpl $-0x2, %ebx
je 0x8246
leaq -0x160(%rbp), %r12
movl %r15d, (%r12)
movl $0x4, %edx
movq -0x58(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x1343d
movl %r14d, (%r12)
leaq -0x160(%rbp), %r14
movl $0x4, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x1343d
movl %ebx, (%r14)
leaq -0x160(%rbp), %rsi
movl $0x4, %edx
movq %r13, %rdi
callq 0x1343d
leaq 0xe50d(%rip), %rsi      # 0x1628a
movq -0x98(%rbp), %rdi
callq 0x6414
testq %rax, %rax
je 0x7eb4
movq %rax, %r15
movq 0x8(%rax), %r14
leaq -0x160(%rbp), %rsi
movl %r14d, (%rsi)
movl $0x4, %edx
movq %r13, %rdi
callq 0x1343d
movq -0x40(%rbp), %rdi
callq 0x134b5
movq %r13, %rdi
movl %eax, %esi
callq 0x13469
movq %r14, -0x80(%rbp)
testq %r14, %r14
je 0x7ee8
xorl %r12d, %r12d
movq -0x40(%rbp), %rbx
movq 0x10(%r15), %rax
movq (%rax,%r12,8), %rdi
cmpl $0x2, (%rdi)
jne 0x82a1
leaq 0xe4aa(%rip), %rsi      # 0x16299
xorl %edx, %edx
callq 0x63a8
testq %rax, %rax
je 0x82ab
movq %rax, %r13
leaq -0x160(%rbp), %rdi
movq %rax, %rsi
callq 0xd860
movq -0x150(%rbp), %r14
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x8306
movl $0x0, -0x2c(%rbp)
movl $0x4, %edx
movq %rbx, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1343d
movq %r14, -0x160(%rbp)
movl $0x8, %edx
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
incq %r12
cmpq %r12, -0x80(%rbp)
movq -0x58(%rbp), %r13
jne 0x7dd7
jmp 0x7ee8
callq 0x3680
jmp 0x7e91
movq -0xa8(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x7e91
callq 0x3856
jmp 0x7e91
callq 0x383a
xorl %r13d, %r13d
movl %r13d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3818
jmp 0x7e91
callq 0x374c
jmp 0x7e91
xorl %r14d, %r14d
leaq -0x160(%rbp), %rbx
movl %r14d, (%rbx)
movl $0x4, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1343d
movl %r14d, (%rbx)
leaq -0x160(%rbp), %rsi
movl $0x4, %edx
movq %r13, %rdi
callq 0x1343d
leaq 0xe420(%rip), %rsi      # 0x1630f
movq -0x98(%rbp), %rdi
callq 0x6414
testq %rax, %rax
je 0x7fc0
movq %rax, %rbx
movq %r13, %r14
movq 0x8(%rax), %r13
leaq -0x160(%rbp), %rsi
movl %r13d, (%rsi)
movl $0x4, %edx
movq %r14, %rdi
callq 0x1343d
movq -0x40(%rbp), %rdi
callq 0x134b5
movq %r14, %rdi
movl %eax, %esi
callq 0x13469
testq %r13, %r13
je 0x7ff4
xorl %r14d, %r14d
movq -0x40(%rbp), %r15
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
cmpl $0x2, (%rdi)
jne 0x7fb6
leaq 0xe3c2(%rip), %rsi      # 0x1631e
xorl %edx, %edx
callq 0x63a8
testq %rax, %rax
je 0x82b5
movq %rax, %r12
movq %rax, %rdi
movq -0x90(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0x12f96
movq %rax, -0x160(%rbp)
movq %rdx, -0x158(%rbp)
movq %r15, %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
callq 0x8306
movl $0x10, %edx
movq %r15, %rdi
leaq -0x160(%rbp), %rsi
callq 0x1343d
incq %r14
cmpq %r14, %r13
jne 0x7f48
jmp 0x7ff4
xorl %r14d, %r14d
leaq -0x160(%rbp), %rbx
movl %r14d, (%rbx)
movl $0x4, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1343d
movl %r14d, (%rbx)
leaq -0x160(%rbp), %rsi
movl $0x4, %edx
movq %r13, %rdi
callq 0x1343d
leaq 0xe341(%rip), %rsi      # 0x1633c
movq -0x98(%rbp), %rdi
callq 0x6414
testq %rax, %rax
je 0x80a1
movq %rax, %rbx
movl 0x8(%rax), %eax
leaq -0x160(%rbp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq -0x58(%rbp), %r13
movq %r13, %rdi
callq 0x1343d
movq -0x40(%rbp), %rdi
callq 0x134b5
movq %r13, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x80d9
xorl %r12d, %r12d
leaq -0x160(%rbp), %r14
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rax
cmpl $0x4, (%rax)
jne 0x7e91
movq 0x8(%rax), %rdx
cmpb $0x2e, (%rdx)
jne 0x82bf
movq %rdx, %rdi
callq 0x5c7c
movl %eax, -0x160(%rbp)
movl $0x4, %edx
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x1343d
incq %r12
cmpq %r12, %r15
jne 0x805a
jmp 0x80d9
xorl %r14d, %r14d
leaq -0x160(%rbp), %rbx
movl %r14d, (%rbx)
movl $0x4, %edx
movq -0x58(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1343d
movl %r14d, (%rbx)
leaq -0x160(%rbp), %rsi
movl $0x4, %edx
movq %r13, %rdi
callq 0x1343d
leaq 0xe2b7(%rip), %rsi      # 0x16397
movq -0x98(%rbp), %rbx
movq %rbx, %rdi
movq $-0x1, %rdx
callq 0x84f9
leaq -0x160(%rbp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r13, %rdi
callq 0x1343d
leaq 0xe296(%rip), %rsi      # 0x163a9
leaq 0xe29d(%rip), %rdx      # 0x163b7
movq %rbx, %rdi
callq 0x63a8
movq %r13, %rdi
movq -0x38(%rbp), %r14
movq %r14, %rsi
movq %rax, %rdx
callq 0x8306
leaq 0xe28b(%rip), %rsi      # 0x163c6
leaq 0xe295(%rip), %rdx      # 0x163d7
movq %rbx, %rdi
callq 0x63a8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8306
leaq 0xe28b(%rip), %rsi      # 0x163ea
leaq 0xe296(%rip), %rdx      # 0x163fc
movq %rbx, %rdi
callq 0x63a8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8306
leaq 0xe28c(%rip), %rsi      # 0x1640f
leaq 0xe29a(%rip), %rdx      # 0x16424
movq %rbx, %rdi
callq 0x63a8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8306
leaq 0xe294(%rip), %rsi      # 0x1643b
leaq 0xe2a1(%rip), %rdx      # 0x1644f
movq %rbx, %rdi
callq 0x63a8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8306
leaq 0xe299(%rip), %rsi      # 0x16464
leaq 0xe2a9(%rip), %rdx      # 0x1647b
movq %rbx, %rdi
callq 0x63a8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8306
leaq -0x1d0(%rbp), %rdi
callq 0x8806
movq -0x90(%rbp), %rbx
movq %rbx, %rdi
movq -0xb0(%rbp), %rsi
callq 0xe88a
movq %rbx, %rdi
movq -0x68(%rbp), %rsi
callq 0xe88a
movb $0x1, %r13b
jmp 0x7e94
callq 0x36a2
jmp 0x7e91
callq 0x36c4
jmp 0x7e91
callq 0x36e6
jmp 0x7e91
callq 0x37f6
jmp 0x7e91
callq 0x37d4
jmp 0x7e91
movq 0x14d81(%rip), %rax     # 0x1cfd8
movq (%rax), %rdi
leaq 0xdf22(%rip), %rsi      # 0x16183
xorl %r13d, %r13d
jmp 0x8281
movq 0x14d6b(%rip), %rax     # 0x1cfd8
movq (%rax), %rdi
leaq 0xdf0c(%rip), %rsi      # 0x16183
xorl %r13d, %r13d
movq -0x88(%rbp), %rdx
xorl %eax, %eax
callq 0x3480
jmp 0x7e94
callq 0x3708
jmp 0x7e91
callq 0x372a
jmp 0x7e91
callq 0x376e
jmp 0x7e91
callq 0x3790
jmp 0x7e91
callq 0x37b2
jmp 0x7e91
movq 0x14d12(%rip), %rax     # 0x1cfd8
movq (%rax), %rdi
leaq 0xe084(%rip), %rsi      # 0x16354
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x3480
jmp 0x7e94
jmp 0x82ef
jmp 0x82ef
jmp 0x82ef
jmp 0x82ef
jmp 0x82ef
jmp 0x82ef
jmp 0x82ef
jmp 0x82ef
movq -0xa8(%rbp), %rcx
movq -0x60(%rbp), %rdx
movq %rdx, 0x18(%rcx)
movq %rax, %rdi
callq 0x35e0