// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::WriteNodes(t2::JsonArrayValue const*, t2::BinarySegment*, t2::BinarySegment*, t2::BinarySegment*, t2::BinarySegment*, t2::BinaryLocator*, t2::MemAllocHeap*, t2::HashTable<t2::CommonStringRecord, 0u>*, t2::MemAllocLinear*, t2::TempNodeGuid const*, int const*)
static bool WriteNodes(
    const JsonArrayValue* nodes,
    BinarySegment* main_seg,
    BinarySegment* node_data_seg,
    BinarySegment* array2_seg,
    BinarySegment* str_seg,
    BinaryLocator scanner_ptrs[],
    MemAllocHeap* heap,
    HashTable<CommonStringRecord, kFlagCaseSensitive>* shared_strings,
    MemAllocLinear* scratch,
    const TempNodeGuid* order,
    const int32_t* remap_table)
{
  BinarySegmentWritePointer(main_seg, BinarySegmentPosition(node_data_seg));  // m_NodeData

  MemAllocLinearScope scratch_scope(scratch);

  size_t node_count = nodes->m_Count;

  struct BacklinkRec
  {
    Buffer<int32_t> m_Links;
  };

  BacklinkRec* links = HeapAllocateArrayZeroed<BacklinkRec>(heap, node_count);

  for (size_t i = 0; i < node_count; ++i)
  {
    const JsonObjectValue* node = nodes->m_Values[i]->AsObject();
    if (!node)
      return false;

    const JsonArrayValue *deps          = FindArrayValue(node, "Deps");

    if (EmptyArray(deps))
      continue;

    for (size_t di = 0, count = deps->m_Count; di < count; ++di)
    {
      if (const JsonNumberValue* dep_index_n = deps->m_Values[di]->AsNumber())
      {
        int32_t dep_index = (int) dep_index_n->m_Number;
        if (dep_index < 0 || dep_index >= (int) node_count)
          return false;

        BufferAppendOne(&links[dep_index].m_Links, heap, int32_t(i));
      }
      else
      {
        return false;
      }
    }
  }

  for (size_t ni = 0; ni < node_count; ++ni)
  {
    const int32_t i = order[ni].m_Node;
    const JsonObjectValue* node = nodes->m_Values[i]->AsObject();

    const char           *action        = FindStringValue(node, "Action");
    const char           *annotation    = FindStringValue(node, "Annotation");
    const char           *preaction     = FindStringValue(node, "PreAction");
    const int             pass_index    = (int) FindIntValue(node, "PassIndex", 0);
    const JsonArrayValue *deps          = FindArrayValue(node, "Deps");
    const JsonArrayValue *inputs        = FindArrayValue(node, "Inputs");
    const JsonArrayValue *outputs       = FindArrayValue(node, "Outputs");
    const JsonArrayValue *aux_outputs   = FindArrayValue(node, "AuxOutputs");
    const JsonArrayValue *env_vars      = FindArrayValue(node, "Env");
    const int             scanner_index = (int) FindIntValue(node, "ScannerIndex", -1);

    WriteStringPtr(node_data_seg, str_seg, action);
    WriteStringPtr(node_data_seg, str_seg, preaction);
    WriteCommonStringPtr(node_data_seg, str_seg, annotation, shared_strings, scratch);
    BinarySegmentWriteInt32(node_data_seg, pass_index);

    if (deps)
    {
      BinarySegmentAlign(array2_seg, 4);
      BinarySegmentWriteInt32(node_data_seg, (int) deps->m_Count);
      BinarySegmentWritePointer(node_data_seg, BinarySegmentPosition(array2_seg));
      for (size_t i = 0, count = deps->m_Count; i < count; ++i)
      {
        if (const JsonNumberValue* dep_index = deps->m_Values[i]->AsNumber())
        {
          int index = (int) dep_index->m_Number;
          int remapped_index = remap_table[index];
          BinarySegmentWriteInt32(array2_seg, remapped_index);
        }
        else
        {
          return false;
        }
      }
    }
    else
    {
      BinarySegmentWriteInt32(node_data_seg, 0);
      BinarySegmentWriteNullPointer(node_data_seg);
    }

    const Buffer<int32_t>& backlinks = links[i].m_Links;
    if (backlinks.m_Size > 0)
    {
      BinarySegmentWriteInt32(node_data_seg, (int) backlinks.m_Size);
      BinarySegmentWritePointer(node_data_seg, BinarySegmentPosition(array2_seg));
      for (int32_t index : backlinks)
      {
        BinarySegmentWriteInt32(array2_seg, remap_table[index]);
      }
    }
    else
    {
      BinarySegmentWriteInt32(node_data_seg, 0);
      BinarySegmentWriteNullPointer(node_data_seg);
    }

    WriteFileArray(node_data_seg, array2_seg, str_seg, inputs);
    WriteFileArray(node_data_seg, array2_seg, str_seg, outputs);
    WriteFileArray(node_data_seg, array2_seg, str_seg, aux_outputs);

    // Environment variables
    if (env_vars && env_vars->m_Count > 0)
    {
      BinarySegmentAlign(array2_seg, 4);
      BinarySegmentWriteInt32(node_data_seg, (int) env_vars->m_Count);
      BinarySegmentWritePointer(node_data_seg, BinarySegmentPosition(array2_seg));
      for (size_t i = 0, count = env_vars->m_Count; i < count; ++i)
      {
        const char* key = FindStringValue(env_vars->m_Values[i], "Key");
        const char* value = FindStringValue(env_vars->m_Values[i], "Value");

        if (!key || !value)
          return false;

        WriteCommonStringPtr(array2_seg, str_seg, key, shared_strings, scratch);
        WriteCommonStringPtr(array2_seg, str_seg, value, shared_strings, scratch);
      }
    }
    else
    {
      BinarySegmentWriteInt32(node_data_seg, 0);
      BinarySegmentWriteNullPointer(node_data_seg);
    }

    if (-1 != scanner_index)
    {
      BinarySegmentWritePointer(node_data_seg, scanner_ptrs[scanner_index]);
    }
    else
    {
      BinarySegmentWriteNullPointer(node_data_seg);
    }

    uint32_t flags = 0;

    flags |= GetNodeFlag(node, "OverwriteOutputs", NodeData::kFlagOverwriteOutputs);
    flags |= GetNodeFlag(node, "PreciousOutputs",  NodeData::kFlagPreciousOutputs);
    flags |= GetNodeFlag(node, "Expensive",        NodeData::kFlagExpensive);

    BinarySegmentWriteUint32(node_data_seg, flags);
  }

  for (size_t i = 0; i < node_count; ++i)
  {
    BufferDestroy(&links[i].m_Links, heap);
  }

  HeapFree(heap, links);

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20e20
movq -0x1f0(%rbp), %rdi
movl %eax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movl -0x48(%rbp), %esi
movq -0x40(%rbp), %rdx
callq 0x20db0
movq 0x20(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x6e40
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq 0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0xb500
movq %rax, -0x1e8(%rbp)
jmp 0xa5b4
movq -0x1e8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0xa764
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xb850
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0xa628
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0xb000
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6f50
jmp 0xb017
movq -0x88(%rbp), %rdi
leaq 0x19f07(%rip), %rsi     # 0x2453d
callq 0x84e0
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0xa0a0
testb $0x1, %al
jne 0xa654
jmp 0xa659
jmp 0xa753
movq $0x0, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
jae 0xa751
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xa0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xbb60
movq %rax, -0x1f8(%rbp)
jmp 0xa6ae
movq -0x1f8(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0xa725
movq -0xb0(%rbp), %rax
cvttsd2si 0x8(%rax), %eax
movl %eax, -0xb4(%rbp)
cmpl $0x0, -0xb4(%rbp)
jl 0xa6ef
movl -0xb4(%rbp), %eax
movq -0x60(%rbp), %rcx
cmpl %ecx, %eax
jl 0xa702
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0xb000
movq -0x68(%rbp), %rax
movslq -0xb4(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq 0x10(%rbp), %rsi
movl -0x80(%rbp), %edx
callq 0xbd40
jmp 0xa723
jmp 0xa738
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0xb000
jmp 0xa73a
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0xa676
jmp 0xa753
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0xa5c7
movq $0x0, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0xaf97
movq 0x28(%rbp), %rax
movq -0xc0(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
movl 0x10(%rax,%rcx,4), %eax
movl %eax, -0xc4(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xb850
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19d7f(%rip), %rsi     # 0x24545
xorl %eax, %eax
movl %eax, %edx
callq 0x8460
movq %rax, -0x200(%rbp)
jmp 0xa7d8
movq -0x200(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x196d9(%rip), %rsi     # 0x23ecd
xorl %eax, %eax
movl %eax, %edx
callq 0x8460
movq %rax, -0x208(%rbp)
jmp 0xa806
movq -0x208(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19d20(%rip), %rsi     # 0x24542
xorl %eax, %eax
movl %eax, %edx
callq 0x8460
movq %rax, -0x210(%rbp)
jmp 0xa834
movq -0x210(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19cfc(%rip), %rsi     # 0x2454c
xorl %eax, %eax
movl %eax, %edx
callq 0xb250
movq %rax, -0x218(%rbp)
jmp 0xa862
movq -0x218(%rbp), %rax
movl %eax, -0xec(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19cc0(%rip), %rsi     # 0x2453d
callq 0x84e0
movq %rax, -0xf8(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x1962f(%rip), %rsi     # 0x23ec6
callq 0x84e0
movq %rax, -0x100(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19eb1(%rip), %rsi     # 0x24762
callq 0x84e0
movq %rax, -0x108(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19c8b(%rip), %rsi     # 0x24556
callq 0x84e0
movq %rax, -0x110(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19c7c(%rip), %rsi     # 0x24561
callq 0x84e0
movq %rax, -0x118(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19c66(%rip), %rsi     # 0x24565
movq $-0x1, %rdx
callq 0xb250
movq %rax, -0x220(%rbp)
jmp 0xa914
movq -0x220(%rbp), %rax
movl %eax, -0x11c(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0xb020
jmp 0xa937
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0xb020
jmp 0xa94d
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0xe0(%rbp), %rdx
movq 0x18(%rbp), %rcx
movq 0x20(%rbp), %r8
callq 0x7f90
jmp 0xa96b
movq -0x20(%rbp), %rdi
movl -0xec(%rbp), %esi
callq 0xbb00
jmp 0xa97c
cmpq $0x0, -0xf8(%rbp)
je 0xaadb
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x20cc0
jmp 0xa99a
movq -0x20(%rbp), %rdi
movq -0xf8(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xbb00
jmp 0xa9af
movq -0x20(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20e20
movq %rdx, -0x230(%rbp)
movl %eax, -0x224(%rbp)
jmp 0xa9d2
movq -0x238(%rbp), %rdi
movq -0x230(%rbp), %rax
movl -0x224(%rbp), %ecx
movl %ecx, -0x130(%rbp)
movq %rax, -0x128(%rbp)
movl -0x130(%rbp), %esi
movq -0x128(%rbp), %rdx
callq 0x20db0
jmp 0xaa07
movq $0x0, -0x138(%rbp)
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x138(%rbp), %rax
cmpq -0x140(%rbp), %rax
jae 0xaad9
movq -0xf8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x138(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xbb60
movq %rax, -0x240(%rbp)
jmp 0xaa5c
movq -0x240(%rbp), %rax
movq %rax, -0x148(%rbp)
cmpq $0x0, -0x148(%rbp)
je 0xaaad
movq -0x148(%rbp), %rax
cvttsd2si 0x8(%rax), %eax
movl %eax, -0x14c(%rbp)
movq 0x30(%rbp), %rax
movslq -0x14c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x150(%rbp)
movq -0x28(%rbp), %rdi
movl -0x150(%rbp), %esi
callq 0xbb00
jmp 0xaaab
jmp 0xaac0
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0xb000
jmp 0xaac2
movq -0x138(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x138(%rbp)
jmp 0xaa24
jmp 0xaaf5
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xbb00
jmp 0xaae8
movq -0x20(%rbp), %rdi
callq 0xbba0
jmp 0xaaf3
jmp 0xaaf5
movq -0x68(%rbp), %rax
movslq -0xc4(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0xac31
movq -0x20(%rbp), %rdi
movq -0x158(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xbb00
jmp 0xab35
movq -0x20(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20e20
movq %rdx, -0x250(%rbp)
movl %eax, -0x244(%rbp)
jmp 0xab58
movq -0x258(%rbp), %rdi
movq -0x250(%rbp), %rax
movl -0x244(%rbp), %ecx
movl %ecx, -0x168(%rbp)
movq %rax, -0x160(%rbp)
movl -0x168(%rbp), %esi
movq -0x160(%rbp), %rdx
callq 0x20db0
jmp 0xab8d
movq -0x158(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rdi
callq 0xbd80
movq %rax, -0x260(%rbp)
jmp 0xabb0
movq -0x260(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x170(%rbp), %rdi
callq 0xbda0
movq %rax, -0x268(%rbp)
jmp 0xabd3
movq -0x268(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x178(%rbp), %rax
cmpq -0x180(%rbp), %rax
je 0xac2f
movq -0x178(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x184(%rbp)
movq -0x28(%rbp), %rdi
movq 0x30(%rbp), %rax
movslq -0x184(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0xbb00
jmp 0xac19
jmp 0xac1b
movq -0x178(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x178(%rbp)
jmp 0xabe1
jmp 0xac4b
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xbb00
jmp 0xac3e
movq -0x20(%rbp), %rdi
callq 0xbba0
jmp 0xac49
jmp 0xac4b
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x100(%rbp), %rcx
callq 0xb540
jmp 0xac65
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x108(%rbp), %rcx
callq 0xb540
jmp 0xac7f
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x110(%rbp), %rcx
callq 0xb540
jmp 0xac99
cmpq $0x0, -0x118(%rbp)
je 0xae5f
movq -0x118(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0xae5f
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x20cc0
jmp 0xacc9
movq -0x20(%rbp), %rdi
movq -0x118(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xbb00
jmp 0xacde
movq -0x20(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20e20
movq %rdx, -0x278(%rbp)
movl %eax, -0x26c(%rbp)
jmp 0xad01
movq -0x280(%rbp), %rdi
movq -0x278(%rbp), %rax
movl -0x26c(%rbp), %ecx
movl %ecx, -0x198(%rbp)
movq %rax, -0x190(%rbp)
movl -0x198(%rbp), %esi
movq -0x190(%rbp), %rdx
callq 0x20db0
jmp 0xad36
movq $0x0, -0x1a0(%rbp)
movq -0x118(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a0(%rbp), %rax
cmpq -0x1a8(%rbp), %rax
jae 0xae5d
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x1a0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x197ee(%rip), %rsi     # 0x24572
xorl %eax, %eax
movl %eax, %edx
callq 0x8460
movq %rax, -0x288(%rbp)
jmp 0xad96
movq -0x288(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x118(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x1a0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x197b5(%rip), %rsi     # 0x24576
xorl %eax, %eax
movl %eax, %edx
callq 0x8460
movq %rax, -0x290(%rbp)
jmp 0xadd3
movq -0x290(%rbp), %rax
movq %rax, -0x1b8(%rbp)
cmpq $0x0, -0x1b0(%rbp)
je 0xadf5
cmpq $0x0, -0x1b8(%rbp)
jne 0xae08
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0xb000
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x1b0(%rbp), %rdx
movq 0x18(%rbp), %rcx
movq 0x20(%rbp), %r8
callq 0x7f90
jmp 0xae26
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x1b8(%rbp), %rdx
movq 0x18(%rbp), %rcx
movq 0x20(%rbp), %r8
callq 0x7f90
jmp 0xae44
jmp 0xae46
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
jmp 0xad53
jmp 0xae79
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xbb00
jmp 0xae6c
movq -0x20(%rbp), %rdi
callq 0xbba0
jmp 0xae77
jmp 0xae79
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x11c(%rbp), %eax
je 0xaeba
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movslq -0x11c(%rbp), %rcx
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movaps %xmm0, -0x1d0(%rbp)
movl -0x1d0(%rbp), %esi
movq -0x1c8(%rbp), %rdx
callq 0x20db0
jmp 0xaeb8
jmp 0xaec7
movq -0x20(%rbp), %rdi
callq 0xbba0
jmp 0xaec5
jmp 0xaec7
movl $0x0, -0x1d4(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x1969d(%rip), %rsi     # 0x2457c
movl $0x1, %edx
callq 0xb6a0
movl %eax, -0x294(%rbp)
jmp 0xaef1
movl -0x294(%rbp), %ecx
movl -0x1d4(%rbp), %eax
orl %ecx, %eax
movl %eax, -0x1d4(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x1967a(%rip), %rsi     # 0x2458d
movl $0x2, %edx
callq 0xb6a0
movl %eax, -0x298(%rbp)
jmp 0xaf25
movl -0x298(%rbp), %ecx
movl -0x1d4(%rbp), %eax
orl %ecx, %eax
movl %eax, -0x1d4(%rbp)
movq -0xd0(%rbp), %rdi
leaq 0x19656(%rip), %rsi     # 0x2459d
movl $0x4, %edx
callq 0xb6a0
movl %eax, -0x29c(%rbp)
jmp 0xaf59
movl -0x29c(%rbp), %ecx
movl -0x1d4(%rbp), %eax
orl %ecx, %eax
movl %eax, -0x1d4(%rbp)
movq -0x20(%rbp), %rdi
movl -0x1d4(%rbp), %esi
callq 0xbaa0
jmp 0xaf7e
jmp 0xaf80
movq -0xc0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc0(%rbp)
jmp 0xa76f
movq $0x0, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0xafe3
movq -0x68(%rbp), %rax
movq -0x1e0(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq 0x10(%rbp), %rsi
callq 0xbdc0
jmp 0xafcd
jmp 0xafcf
movq -0x1e0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1e0(%rbp)
jmp 0xafa2
movq 0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x18960
jmp 0xaff2
movb $0x1, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6f50
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x35c0