LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/oreparaz[P]dudect/examples/donna/curve25519-donna.c
// Function: freduce_coefficients
static void freduce_coefficients(limb *output) {
  unsigned i;

  output[10] = 0;

  for (i = 0; i < 10; i += 2) {
    limb over = div_by_2_26(output[i]);
    /* The entry condition (that |output[i]| < 280*2^54) means that over is, at
     * most, 280*2^28 in the first iteration of this loop. This is added to the
     * next limb and we can approximate the resulting bound of that limb by
     * 281*2^54. */
    output[i] -= over << 26;
    output[i+1] += over;

    /* For the first iteration, |output[i+1]| < 281*2^54, thus |over| <
     * 281*2^29. When this is added to the next limb, the resulting bound can
     * be approximated as 281*2^54.
     *
     * For subsequent iterations of the loop, 281*2^54 remains a conservative
     * bound and no overflow occurs. */
    over = div_by_2_25(output[i+1]);
    output[i+1] -= over << 25;
    output[i+2] += over;
  }
  /* Now |output[10]| < 281*2^29 and all other coefficients are reduced. */
  output[0] += output[10] << 4;
  output[0] += output[10] << 1;
  output[0] += output[10];

  output[10] = 0;

  /* Now output[1..9] are reduced, and |output[0]| < 2^26 + 19*281*2^29
   * So |over| will be no more than 2^16. */
  {
    limb over = div_by_2_26(output[0]);
    output[0] -= over << 26;
    output[1] += over;
  }

  /* Now output[0,2..9] are reduced, and |output[1]| < 2^25 + 2^16 < 2^26. The
   * bound on |output[1]| is sufficient to meet our needs. */
}

// Assembly:
movq $0x0, 0x50(%rdi)
movq (%rdi), %rcx
movq $-0x2, %rax
movq %rcx, %rdx
shrq $0x20, %rdx
sarl $0x1f, %edx
shrl $0x6, %edx
addq %rcx, %rdx
movq %rdx, %rsi
sarq $0x1a, %rsi
andq $-0x4000000, %rdx       # imm = 0xFC000000
subq %rdx, %rcx
movq %rcx, 0x10(%rdi,%rax,8)
addq 0x18(%rdi,%rax,8), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
sarl $0x1f, %edx
shrl $0x7, %edx
addq %rsi, %rdx
movq %rdx, %rcx
sarq $0x19, %rcx
andq $-0x2000000, %rdx       # imm = 0xFE000000
subq %rdx, %rsi
movq %rsi, 0x18(%rdi,%rax,8)
addq 0x20(%rdi,%rax,8), %rcx
movq %rcx, 0x20(%rdi,%rax,8)
addq $0x2, %rax
cmpq $0x8, %rax
jb 0x305f
movq 0x50(%rdi), %rax
leaq (%rax,%rax,8), %rcx
addq (%rdi), %rax
leaq (%rax,%rcx,2), %rax
movq $0x0, 0x50(%rdi)
movq %rax, %rcx
sarq $0x3f, %rcx
shrl $0x6, %ecx
addq %rax, %rcx
movq %rcx, %rdx
sarq $0x1a, %rdx
andq $-0x4000000, %rcx       # imm = 0xFC000000
subq %rcx, %rax
movq %rax, (%rdi)
addq %rdx, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/silverneko[P]miku/./src/utils.h
// Function: int cast::to<int>() const
T to() const
      {
         T res;
         istringstream in(val);
         in >> res;
         return res;
      }

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdi, %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x34b0
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x31b0
movl 0xc(%rsp), %ebx
movq 0x946b(%rip), %rsi      # 0xcfb0
leaq 0x10(%rsp), %rdi
callq 0x33a0
leaq 0x88(%rsp), %rdi
callq 0x3100
movl %ebx, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
movq %rax, %rbx
movq 0x943f(%rip), %rsi      # 0xcfb0
leaq 0x10(%rsp), %rdi
callq 0x33a0
leaq 0x88(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34e0
// File: /workspace/github_c_makefile_star2_O3/silverneko[P]miku/./src/sandbox.cpp
// Function: sandboxInit(int)
int sandboxInit(int boxid)
{
   ostringstream sout;
   sout << "isolate --box-id=" << boxid;
   sout << " --cg";
   sout << " --init 2>/dev/null >/dev/null";
   cerr << "[debug] box-" << boxid << " inited" << endl;
   system(sout.str().c_str());
   return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %edi, %ebx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x3350
leaq 0x4d9a(%rip), %rsi      # 0x9280
movl $0x11, %edx
movq %r14, %rdi
callq 0x32f0
leaq 0x20(%rsp), %rdi
movl %ebx, %esi
callq 0x34d0
leaq 0x4d8c(%rip), %rsi      # 0x9292
leaq 0x20(%rsp), %rdi
movl $0x5, %edx
callq 0x32f0
leaq 0x4e3d(%rip), %rsi      # 0x9359
leaq 0x20(%rsp), %rdi
movl $0x1e, %edx
callq 0x32f0
movq 0x8ab6(%rip), %rdi      # 0xcfe8
leaq 0x4dff(%rip), %rsi      # 0x9338
movl $0xc, %edx
callq 0x32f0
movq 0x8a9e(%rip), %rdi      # 0xcfe8
movl %ebx, %esi
callq 0x34d0
movq %rax, %rbx
leaq 0x4e1d(%rip), %rsi      # 0x9378
movl $0x7, %edx
movq %rax, %rdi
callq 0x32f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x3430
movq (%rsp), %rdi
callq 0x3240
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45c0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x89f1(%rip), %rsi      # 0xcfb8
leaq 0x20(%rsp), %rdi
callq 0x3170
leaq 0x90(%rsp), %rdi
callq 0x3100
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4610
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x4610
jmp 0x460d
movq %rax, %rbx
movq 0x89a1(%rip), %rsi      # 0xcfb8
leaq 0x20(%rsp), %rdi
callq 0x3170
leaq 0x90(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34e0
// File: /workspace/github_c_makefile_star2_O3/silverneko[P]miku/./src/sandbox.cpp
// Function: sandboxDele(int)
int sandboxDele(int boxid)
{
   ostringstream sout;
   sout << "isolate --box-id=" << boxid;
   sout << " --cg";
   sout << " --cleanup 2>/dev/null >/dev/null";
   cerr << "[debug] box-" << boxid << " cleaned" << endl;
   system(sout.str().c_str());
   return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %edi, %ebx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x3350
leaq 0x4c2a(%rip), %rsi      # 0x9280
movl $0x11, %edx
movq %r14, %rdi
callq 0x32f0
leaq 0x20(%rsp), %rdi
movl %ebx, %esi
callq 0x34d0
leaq 0x4c1c(%rip), %rsi      # 0x9292
leaq 0x20(%rsp), %rdi
movl $0x5, %edx
callq 0x32f0
leaq 0x4cf4(%rip), %rsi      # 0x9380
leaq 0x20(%rsp), %rdi
movl $0x21, %edx
callq 0x32f0
movq 0x8946(%rip), %rdi      # 0xcfe8
leaq 0x4c8f(%rip), %rsi      # 0x9338
movl $0xc, %edx
callq 0x32f0
movq 0x892e(%rip), %rdi      # 0xcfe8
movl %ebx, %esi
callq 0x34d0
movq %rax, %rbx
leaq 0x4cd7(%rip), %rsi      # 0x93a2
movl $0x8, %edx
movq %rax, %rdi
callq 0x32f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x3430
movq (%rsp), %rdi
callq 0x3240
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4730
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x8881(%rip), %rsi      # 0xcfb8
leaq 0x20(%rsp), %rdi
callq 0x3170
leaq 0x90(%rsp), %rdi
callq 0x3100
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4780
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x4780
jmp 0x477d
movq %rax, %rbx
movq 0x8831(%rip), %rsi      # 0xcfb8
leaq 0x20(%rsp), %rdi
callq 0x3170
leaq 0x90(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34e0
nop
// File: /workspace/github_c_makefile_star2_O3/silverneko[P]miku/./src/server_io.cpp
// Function: respondValidating(int)
int respondValidating(int submission_id)
{
   ostringstream sout;
   sout << "respond_validating.py " << submission_id;
   system(sout.str().c_str());
   return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %edi, %ebx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x3350
leaq 0x1e22(%rip), %rsi      # 0x96b6
movl $0x16, %edx
movq %r14, %rdi
callq 0x32f0
leaq 0x20(%rsp), %rdi
movl %ebx, %esi
callq 0x34d0
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x3430
movq (%rsp), %rdi
callq 0x3240
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x78de
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x56d3(%rip), %rsi      # 0xcfb8
leaq 0x20(%rsp), %rdi
callq 0x3170
leaq 0x90(%rsp), %rdi
callq 0x3100
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x792e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x792e
jmp 0x792b
movq %rax, %rbx
movq 0x5683(%rip), %rsi      # 0xcfb8
leaq 0x20(%rsp), %rdi
callq 0x3170
leaq 0x90(%rsp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x34e0
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Main.cpp
// Function: ShowHelp()
static void ShowHelp()
{
  printf("\nTundra Build Processor 2.0\n");
  printf("Copyright (C) 2010-2023 Andreas Fredriksson\n\n");

#ifdef HAVE_GIT_INFO
  printf("Git branch: %s\n", g_GitBranch);
  printf("Git commit: %s\n\n", g_GitVersion);
#endif

  printf("This program comes with ABSOLUTELY NO WARRANTY.\n");

  printf("Usage: tundra2 [options...] [targets...]\n\n");
  printf("Options:\n");

  size_t max_opt_len = 0;
  for (size_t i = 0; i < ARRAY_SIZE(g_OptionTemplates); ++i)
  {
    size_t opt_len = strlen(g_OptionTemplates[i].m_LongName) + 12;
    if (opt_len > max_opt_len)
      max_opt_len = opt_len;
  }

  for (size_t i = 0; i < ARRAY_SIZE(g_OptionTemplates); ++i)
  {
    const OptionTemplate* t = g_OptionTemplates + i;

    if (!t->m_Help)
      continue;

    char long_text[256];
    if (t->m_Type == OptionType::kInt)
      snprintf(long_text, sizeof long_text, "%s=<integer>", t->m_LongName);
    else if (t->m_Type == OptionType::kString)
      snprintf(long_text, sizeof long_text, "%s=<string>", t->m_LongName);
    else
      snprintf(long_text, sizeof long_text, "%s          ", t->m_LongName);

    printf("  -%c, --%-*s %s\n", t->m_ShortName, (int) max_opt_len, long_text, t->m_Help);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x11707(%rip), %rdi     # 0x1585a
callq 0x3540
leaq 0x11717(%rip), %rdi     # 0x15876
callq 0x3540
leaq 0x11652(%rip), %rdi     # 0x157bd
leaq 0x10ec7(%rip), %rsi     # 0x15039
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3060
leaq 0x1164b(%rip), %rdi     # 0x157cd
leaq 0x10e87(%rip), %rsi     # 0x15010
xorl %eax, %eax
callq 0x3060
leaq 0x1170c(%rip), %rdi     # 0x158a3
callq 0x3540
leaq 0x11730(%rip), %rdi     # 0x158d3
callq 0x3540
leaq 0x1174e(%rip), %rdi     # 0x158fd
callq 0x3540
movl $0x8, %r14d
leaq 0x188cf(%rip), %r13     # 0x1ca90
movq %rbx, %r15
movq (%r14,%r13), %rdi
callq 0x3150
movq %rax, %rbx
addq $0xc, %rbx
cmpq %r15, %rbx
cmovbeq %r15, %rbx
addq $0x28, %r14
cmpq $0x328, %r14            # imm = 0x328
jne 0x41c1
movl $0x20, %ebp
movq %rsp, %r14
leaq 0x1160d(%rip), %r15     # 0x15804
movq (%rbp,%r13), %r12
testq %r12, %r12
je 0x4253
movl -0x10(%rbp,%r13), %eax
leaq 0x115de(%rip), %rdx     # 0x157eb
cmpl $0x2, %eax
je 0x4219
leaq 0x115de(%rip), %rdx     # 0x157f7
movq -0x18(%rbp,%r13), %rcx
cmpl $0x1, %eax
leaq 0x115b6(%rip), %rax     # 0x157de
cmoveq %rax, %rdx
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
xorl %eax, %eax
callq 0x3560
movsbl -0x20(%rbp,%r13), %esi
movq %r15, %rdi
movl %ebx, %edx
movq %r14, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x3060
addq $0x28, %rbp
cmpq $0x340, %rbp            # imm = 0x340
jne 0x41f7
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Main.cpp
// Function: AssignOptionValue(char*, OptionTemplate const*, char const*, bool)
static int AssignOptionValue(char* option_base, const OptionTemplate* templ, const char* value, bool is_short)
{
  char* dest = option_base + templ->m_Offset;

  switch (templ->m_Type)
  {
    case OptionType::kBool:
      *(bool*)dest = true;
      return 1;

    case OptionType::kInt:
      if (value)
      {
        *(int*)dest = atoi(value);
        return is_short ? 2 : 1;
      }
      else
      {
        if (is_short)
          fprintf(stderr, "option requires an argument: %c\n", templ->m_ShortName);
        else
          fprintf(stderr, "option requires an argument: --%s\n", templ->m_LongName);
        return 0;
      }
      break;

    case OptionType::kString:
      if (value)
      {
        *(const char**)dest = value;
        return is_short ? 2 : 1;
      }
      else
      {
        if (is_short)
          fprintf(stderr, "option requires an argument: %c\n", templ->m_ShortName);
        else
          fprintf(stderr, "option requires an argument: --%s\n", templ->m_LongName);
        return 0;
      }
      break;

    default:
      return 0;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %ebx
movq %rdi, %r14
movq 0x18(%rsi), %r15
movl 0x10(%rsi), %eax
cmpl $0x2, %eax
je 0x42b2
cmpl $0x1, %eax
je 0x429f
xorl %ebx, %ebx
testl %eax, %eax
jne 0x42c0
movb $0x1, (%r14,%r15)
movl $0x1, %ebx
jmp 0x42c0
testq %rdx, %rdx
je 0x42c8
movq %rdx, %rdi
callq 0x3550
movl %eax, (%r14,%r15)
jmp 0x42bb
testq %rdx, %rdx
je 0x42c8
movq %rdx, (%r14,%r15)
movzbl %bl, %ebx
incl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x18d09(%rip), %rax     # 0x1cfd8
movq (%rax), %rdi
testb %bl, %bl
je 0x42eb
movsbl (%rsi), %edx
leaq 0x11499(%rip), %rsi     # 0x15779
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3480
jmp 0x42c0
movq 0x8(%rsi), %rdx
leaq 0x114a4(%rip), %rsi     # 0x1579a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3480
jmp 0x42c0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/BuildQueue.cpp
// Function: t2::BuildQueueBuildNodeRange(t2::BuildQueue*, int, int, int)
BuildResult::Enum BuildQueueBuildNodeRange(BuildQueue* queue, int start_index, int count, int pass_index)
  {
    // Make sure none of the build threads see in-progress state due to a spurious wakeup.
    MutexLock(&queue->m_Lock);

    CHECK(start_index + count <= queue->m_Config.m_MaxNodes);

    queue->m_CurrentPassIndex = pass_index;

    // Initialize build queue with index range to build
    int32_t   *build_queue = queue->m_Queue;
    NodeState *node_states = queue->m_Config.m_NodeState;

    for (int i = 0; i < count; ++i)
    {
      NodeState* state = node_states + start_index + i;

      NodeStateFlagQueued(state);

      // Verify node hasn't been touched already
      CHECK(state->m_Progress == BuildProgress::kInitial);

      build_queue[i] = start_index + i;
    }

    queue->m_PendingNodeCount = count;
    queue->m_FailedNodeCount  = 0;
    queue->m_QueueWriteIndex  = count;
    queue->m_QueueReadIndex   = 0;

    MutexUnlock(&queue->m_Lock);

    CondBroadcast(&queue->m_WorkAvailable);

    // This thread is thread 0.
    BuildLoop(&queue->m_ThreadState[0]);

    if (SignalGetReason())
      return BuildResult::kInterrupted;
    else if (queue->m_FailedNodeCount)
      return BuildResult::kBuildError;
    else
      return BuildResult::kOk;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x34b0
testl %eax, %eax
jne 0x47e3
movl %r15d, 0xf0(%rbx)
testl %ebp, %ebp
jle 0x477f
movq 0x58(%rbx), %rax
movslq %r14d, %rdx
movl %edx, %ecx
shlq $0x6, %rdx
addq 0x90(%rbx), %rdx
movl %ebp, %esi
xorl %edi, %edi
orb $0x1, (%rdx)
leal (%rcx,%rdi), %r8d
movl %r8d, (%rax,%rdi,4)
incq %rdi
addq $0x40, %rdx
cmpq %rdi, %rsi
jne 0x4768
movl %ebp, 0xe8(%rbx)
xorl %eax, %eax
movl %eax, 0xec(%rbx)
movl %ebp, 0x68(%rbx)
movl %eax, 0x64(%rbx)
movq %rbx, %rdi
callq 0x3250
testl %eax, %eax
jne 0x47ec
leaq 0x28(%rbx), %rdi
callq 0x3110
testl %eax, %eax
jne 0x47f5
movq 0x100(%rbx), %rdi
callq 0x4803
callq 0x113a8
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jne 0x47d8
xorl %eax, %eax
cmpl $0x0, 0xec(%rbx)
setne %al
addl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11272(%rip), %rdi     # 0x15a5c
jmp 0x47fc
leaq 0x11285(%rip), %rdi     # 0x15a78
jmp 0x47fc
leaq 0x1129a(%rip), %rdi     # 0x15a96
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/BuildQueue.cpp
// Function: t2::WakeWaiters(t2::BuildQueue*, int)
static void WakeWaiters(BuildQueue* queue, int count)
  {
    if (count > 1)
      CondBroadcast(&queue->m_WorkAvailable);
    else
      CondSignal(&queue->m_WorkAvailable);
  }

// Assembly:
pushq %rax
addq $0x28, %rdi
cmpl $0x2, %esi
jl 0x58aa
callq 0x3110
testl %eax, %eax
je 0x58b3
leaq 0x101ee(%rip), %rdi     # 0x15a96
jmp 0x58bc
callq 0x3040
testl %eax, %eax
jne 0x58b5
popq %rax
retq
leaq 0x10285(%rip), %rdi     # 0x15b41
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/BuildQueue.cpp
// Function: t2::MakeDirectoriesRecursive(t2::StatCache*, t2::PathBuffer const&)
static bool MakeDirectoriesRecursive(StatCache* stat_cache, const PathBuffer& dir)
  {
    PathBuffer parent_dir = dir;
    PathStripLast(&parent_dir);

    // Can't go any higher.
    if (dir == parent_dir)
      return true;

    if (!MakeDirectoriesRecursive(stat_cache, parent_dir))
      return false;

    char path[kMaxPathLength];
    PathFormat(path, &dir);

    FileInfo info = StatCacheStat(stat_cache, path);

    if (info.Exists())
    {
      // Just asssume this is a directory. We could check it - but there's currently no way via _stat64() calls
      // on Windows to check if a file is a symbolic link (to a directory).
      return true;
    }
    else
    {
      Log(kSpam, "create dir \"%s\"", path);
      bool success = MakeDirectory(path);
      StatCacheMarkDirty(stat_cache, path, Djb2HashPath(path));
      return success;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x24(%rsp), %r15
movl $0x28c, %edx            # imm = 0x28C
movq %r15, %rdi
callq 0x3290
movq %r15, %rdi
callq 0xed49
movzwl 0x6(%r14), %r13d
cmpw 0x6(%r15), %r13w
jne 0x5967
movb $0x1, %bpl
testq %r13, %r13
je 0x59f2
leaq 0xa(%r14), %r12
leaq 0x2e(%rsp), %rsi
leal (,%r13,2), %edx
movq %r12, %rdi
callq 0x3360
testl %eax, %eax
jne 0x5967
movl $0x8a, %eax
leaq (%r14,%rax), %rdi
addq %rax, %r15
cmpl $0x1, %r13d
jne 0x5942
movzwl (%r12), %eax
jmp 0x5954
leal -0x1(%r13), %eax
movzwl (%r12,%rax,2), %eax
addl $-0x2, %r13d
subw (%r12,%r13,2), %ax
movzwl %ax, %edx
movq %r15, %rsi
callq 0x3360
testl %eax, %eax
je 0x59f2
leaq 0x24(%rsp), %rsi
movq %rbx, %rdi
callq 0x58c3
testb %al, %al
je 0x59f0
leaq 0x2b0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xee8e
movq %r15, %rdi
callq 0x5c7c
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq 0x116f1
movb $0x1, %bpl
testb $0x1, (%r14)
jne 0x59f2
leaq 0x103b5(%rip), %rsi     # 0x15d6d
leaq 0x2b0(%rsp), %r14
movl $0x10, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5d74
movq %r14, %rdi
callq 0x5fb6
movl %eax, %ebp
movq %r14, %rdi
callq 0x5c7c
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x1167b
jmp 0x59f2
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Stats.hpp
// Function: t2::TimingScope::~TimingScope()
~TimingScope()
  {
    uint64_t micros = TimerGet() - m_StartTime;
    if (uint32_t *ptr = m_CountPtr)
      AtomicIncrement(ptr);
    AtomicAdd(m_TimePtr, micros);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x5f2a
movq (%rbx), %rdx
movq 0x10(%rbx), %rcx
testq %rdx, %rdx
je 0x5a48
lock
incl (%rdx)
subq %rcx, %rax
movq 0x8(%rbx), %rcx
lock
addq %rax, (%rcx)
popq %rbx
retq
movq %rax, %rdi
callq 0x5a24
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Common.cpp
// Function: t2::CroakErrno(char const*, ...)
void NORETURN CroakErrno(const char* fmt, ...)
{
  va_list args;
  va_start(args, fmt);
  vfprintf(stderr, fmt, args);
  va_end(args);
  fprintf(stderr, "\n");
  fprintf(stderr, "errno: %d (%s)\n", errno, strerror(errno));
#if defined(TUNDRA_WIN32)
  DWORD gle = GetLastError();

  char* message = nullptr;
  size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
                                 NULL, gle, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (char*)&message, 0, NULL);
    
  fprintf(stderr, "Win32 GLE: %u (%s)\n", gle, message);
#endif
  if (DebuggerAttached())
    abort();
  else
    exit(1);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x5b69
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x17448(%rip), %rbx     # 0x1cfd8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x3450
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x3410
movq (%rbx), %rbx
callq 0x3050
movl (%rax), %ebp
movl %ebp, %edi
callq 0x30f0
leaq 0x10228(%rip), %rsi     # 0x15de8
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3480
movl $0x1, %edi
callq 0x33f0
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Common.cpp
// Function: t2::Djb2Hash(char const*)
uint32_t Djb2Hash(const char *str_)
{
  const uint8_t *str = (const uint8_t *) str_;
  uint32_t hash      = 5381;
  int c;

  while (0 != (c = *str++))
  {
    hash = (hash * 33) + c;
  }

  return hash ? hash : 1;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x5ca3
incq %rdi
movl $0x1505, %edx           # imm = 0x1505
movl %edx, %eax
movzbl %cl, %ecx
shll $0x5, %eax
addl %edx, %eax
addl %ecx, %eax
movb (%rdi), %cl
incq %rdi
movl %eax, %edx
testb %cl, %cl
jne 0x5c8c
jmp 0x5ca8
movl $0x1505, %eax           # imm = 0x1505
cmpl $0x1, %eax
adcl $0x0, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Common.cpp
// Function: t2::Djb2Hash64(char const*)
uint64_t Djb2Hash64(const char *str_)
{
  const uint8_t *str = (const uint8_t *) str_;
  uint64_t hash      = 5381;
  int c;

  while (0 != (c = *str++))
  {
    hash = (hash * 33) + c;
  }

  return hash ? hash : 1;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x5cd8
incq %rdi
movl $0x1505, %eax           # imm = 0x1505
movq %rax, %rdx
shlq $0x5, %rdx
addq %rax, %rdx
movzbl %cl, %eax
addq %rdx, %rax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x5cbd
jmp 0x5cdd
movl $0x1505, %eax           # imm = 0x1505
cmpq $0x1, %rax
adcq $0x0, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Common.cpp
// Function: t2::Djb2HashNoCase(char const*)
uint32_t Djb2HashNoCase(const char *str_)
{
  const uint8_t *str = (const uint8_t *) str_;
  uint32_t hash = 5381;
  int c;

  while (0 != (c = *str++))
  {
    hash = (hash * 33) + FoldCase(c);
  }

  return hash ? hash : 1;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x5d17
incq %rdi
movl $0x1505, %eax           # imm = 0x1505
movzbl %cl, %ecx
movl %eax, %edx
shll $0x5, %edx
addl %eax, %edx
leal -0x41(%rcx), %esi
leal 0x20(%rcx), %eax
cmpl $0x1a, %esi
cmovael %ecx, %eax
addl %edx, %eax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x5cf4
jmp 0x5d1c
movl $0x1505, %eax           # imm = 0x1505
cmpl $0x1, %eax
adcl $0x0, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Common.cpp
// Function: t2::Djb2HashNoCase64(char const*)
uint64_t Djb2HashNoCase64(const char *str_)
{
  const uint8_t *str = (const uint8_t *) str_;
  uint64_t hash = 5381;
  int c;

  while (0 != (c = *str++))
  {
    hash = (hash * 33) + FoldCase(c);
  }

  return hash ? hash : 1;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x5d58
incq %rdi
movl $0x1505, %eax           # imm = 0x1505
movzbl %cl, %ecx
movq %rax, %rdx
shlq $0x5, %rdx
addq %rax, %rdx
leal -0x41(%rcx), %esi
leal 0x20(%rcx), %eax
cmpl $0x1a, %esi
cmovael %ecx, %eax
addq %rdx, %rax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x5d31
jmp 0x5d5d
movl $0x1505, %eax           # imm = 0x1505
cmpq $0x1, %rax
adcq $0x0, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Common.cpp
// Function: t2::Log(t2::LogLevel, char const*, ...)
void Log(LogLevel level, const char* fmt, ...)
{
  if (s_LogFlags & level)
  {
    const char* prefix = "?";

    switch (level)
    {
      case kError   : prefix = "E"; break;
      case kWarning : prefix = "W"; break;
      case kInfo    : prefix = "I"; break;
      case kDebug   : prefix = "D"; break;
      case kSpam    : prefix = "S"; break;
      default       : break;
    }
    fprintf(stderr, "[%s] ", prefix);

    va_list args;
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);

    fprintf(stderr, "\n");
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
testb %al, %al
je 0x5db9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testl %edi, 0x175bd(%rip)     # 0x1d390
jne 0x5de0
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
leaq 0x1000e(%rip), %rdx     # 0x15df8
leal -0x1(%rdi), %eax
cmpl $0x7, %eax
ja 0x5e0b
leaq 0xff9f(%rip), %rcx      # 0x15d98
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10228(%rip), %rdx     # 0x16031
jmp 0x5e32
cmpl $0x10, %edi
jne 0x5e32
leaq 0x101fb(%rip), %rdx     # 0x16012
jmp 0x5e32
leaq 0x10e97(%rip), %rdx     # 0x16cb7
jmp 0x5e32
leaq 0xffd3(%rip), %rdx      # 0x15dfc
jmp 0x5e32
leaq 0xffc8(%rip), %rdx      # 0x15dfa
movq 0x1719f(%rip), %r14     # 0x1cfd8
movq (%r14), %rdi
leaq 0xffbb(%rip), %rsi      # 0x15dfe
xorl %eax, %eax
callq 0x3480
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x3450
movq (%r14), %rsi
movl $0xa, %edi
callq 0x3410
jmp 0x5dd5
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::WriteCommonStringPtr(t2::BinarySegment*, t2::BinarySegment*, char const*, t2::HashTable<t2::CommonStringRecord, 0u>*, t2::MemAllocLinear*)
void WriteCommonStringPtr(BinarySegment* segment, BinarySegment* str_seg, const char* ptr, HashTable<CommonStringRecord, 0>* table, MemAllocLinear* scratch)
{
  uint32_t hash = Djb2Hash(ptr);
  CommonStringRecord* r;
  if (nullptr == (r = HashTableLookup(table, hash, ptr)))
  {
    CommonStringRecord r;
    r.m_Pointer = BinarySegmentPosition(str_seg);
    HashTableInsert(table, hash, ptr, r);
    BinarySegmentWriteStringData(str_seg, ptr);
    BinarySegmentWritePointer(segment, r.m_Pointer);
  }
  else
  {
    BinarySegmentWritePointer(segment, r->m_Pointer);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x5c7c
movl %eax, %ebp
movq %r12, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x890c
cmpl $-0x1, %eax
je 0x60b4
movq 0x28(%r12), %rcx
testq %rcx, %rcx
je 0x60b4
cltq
shlq $0x4, %rax
movl (%rcx,%rax), %esi
movq 0x8(%rcx,%rax), %rdx
movq %rbx, %rdi
jmp 0x6108
movq %r15, %rdi
callq 0x134b5
movl %eax, %r13d
movq %rbx, (%rsp)
movq %rdx, %rbx
movq %r12, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x8982
movq 0x28(%r12), %rcx
cltq
shlq $0x4, %rax
movl %r13d, (%rcx,%rax)
movq %rbx, 0x8(%rcx,%rax)
movq %r14, %rdi
callq 0x3150
leaq 0x1(%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1343d
movq (%rsp), %rdi
movl %r13d, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13469
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::FindStringValue(t2::JsonValue const*, char const*, char const*)
static const char* FindStringValue(const JsonValue* obj, const char* key, const char* default_value = nullptr)
{
  if (JsonValue::kObject != obj->m_Type)
    return default_value;

  const JsonValue *node = obj->Find(key);

  if (!node)
    return default_value;

  if (JsonValue::kString != node->m_Type)
    return default_value;

  return static_cast<const JsonStringValue*>(node)->m_String;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
cmpl $0x2, (%rdi)
jne 0x6402
movq %rdi, %r14
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0x6402
movq %rsi, %r15
movq 0x10(%r14), %rbp
xorl %r13d, %r13d
movq (%rbp,%r13,8), %rdi
movq %r15, %rsi
callq 0x3470
testl %eax, %eax
je 0x63ec
incq %r13
cmpq %r13, %r12
jne 0x63d1
jmp 0x6402
movq 0x18(%r14), %rax
movq (%rax,%r13,8), %rax
testq %rax, %rax
je 0x6402
cmpl $0x4, (%rax)
jne 0x6402
movq 0x8(%rax), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::FindArrayValue(t2::JsonObjectValue const*, char const*)
static const JsonArrayValue* FindArrayValue(const JsonObjectValue* obj, const char* key)
{
  if (obj == nullptr)
    return nullptr;

  const JsonValue *node = obj->Find(key);

  if (!node)
    return nullptr;
  if (JsonValue::kArray != node->m_Type)
    return nullptr;
  return static_cast<const JsonArrayValue*>(node);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6477
movq %rdi, %r14
xorl %ebx, %ebx
cmpl $0x2, (%rdi)
cmovneq %rbx, %r14
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x6479
movq %rsi, %r15
movq 0x10(%r14), %r13
xorl %ebx, %ebx
xorl %ebp, %ebp
movq (%r13,%rbp,8), %rdi
movq %r15, %rsi
callq 0x3470
testl %eax, %eax
je 0x645f
incq %rbp
cmpq %rbp, %r12
jne 0x6444
jmp 0x6479
movq 0x18(%r14), %rax
movq (%rax,%rbp,8), %rax
testq %rax, %rax
je 0x6477
xorl %ebx, %ebx
cmpl $0x3, (%rax)
cmoveq %rax, %rbx
jmp 0x6479
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::GenerateIdeIntegrationFiles(char const*, int, char const**)
bool GenerateIdeIntegrationFiles(const char* build_file, int argc, const char** argv)
{
  MemAllocHeap heap;
  HeapInit(&heap);

  Buffer<char> args;
  BufferInit(&args);
  CreateCommandLine(&heap, &args, argc, argv);

  // Run DAG generator.
  bool result = RunExternalTool("generate-ide-files %s %s", build_file, args.m_Storage);

  BufferDestroy(&args, &heap);
  t2::HeapDestroy(&heap);

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xf(%rsp), %r15
movq %r15, %rdi
callq 0xe880
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x69bc
movq (%r12), %rdx
leaq 0xf642(%rip), %rdi      # 0x15fb5
movq %r14, %rsi
xorl %eax, %eax
callq 0x6729
movl %eax, %ebx
movq (%r12), %rsi
testq %rsi, %rsi
je 0x69a3
leaq 0xf(%rsp), %rdi
callq 0xe88a
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0xf(%rsp), %rdi
callq 0xe881
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::CreateCommandLine(t2::MemAllocHeap*, t2::Buffer<char>*, int, char const**)
static void CreateCommandLine(MemAllocHeap* heap, Buffer<char>* args, int argc, const char** argv)
{
  for (int i = 0; i < argc; ++i)
  {
    if (i > 0)
      BufferAppendOne(args, heap, ' ');

    const size_t arglen = strlen(argv[i]);
    const bool has_spaces = nullptr != strchr(argv[i], ' ');

    if (has_spaces)
      BufferAppendOne(args, heap, '"');

    BufferAppend(args, heap, argv[i], arglen);

    if (has_spaces)
      BufferAppendOne(args, heap, '"');
  }

  BufferAppendOne(args, heap, '\0');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
jle 0x6a8c
movq %rcx, %r15
movl %edx, %eax
movq %rax, (%rsp)
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x69f8
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x88ab
movb $0x20, (%rax)
movq (%r15,%rbp,8), %r13
movq %r13, %rdi
callq 0x3150
movq %rax, %r12
movq %r13, %rdi
movl $0x20, %esi
callq 0x3130
testq %rax, %rax
je 0x6a63
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x88ab
movb $0x22, %cl
movb %cl, (%rax)
movq (%r15,%rbp,8), %r13
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x88ab
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x3290
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x88ab
movb $0x22, %cl
movb %cl, (%rax)
jmp 0x6a7f
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x88ab
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x3290
incq %rbp
cmpq %rbp, (%rsp)
jne 0x69e0
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x88ab
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::GenerateTemplateFiles(int, char const**)
bool GenerateTemplateFiles(int argc, const char** argv)
{
  MemAllocHeap heap;
  HeapInit(&heap);

  Buffer<char> args;
  BufferInit(&args);
  CreateCommandLine(&heap, &args, argc, argv);

  // Run DAG generator.
  bool result = RunExternalTool("create-template-file %s", args.m_Storage);

  BufferDestroy(&args, &heap);
  t2::HeapDestroy(&heap);

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xf(%rsp), %r14
movq %r14, %rdi
callq 0xe880
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x69bc
movq (%r15), %rsi
leaq 0xf4d6(%rip), %rdi      # 0x15fce
xorl %eax, %eax
callq 0x6729
movl %eax, %ebx
movq (%r15), %rsi
testq %rsi, %rsi
je 0x6b24
leaq 0xf(%rsp), %rdi
callq 0xe88a
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0xf(%rsp), %rdi
callq 0xe881
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::WriteStringPtr(t2::BinarySegment*, t2::BinarySegment*, char const*)
static void WriteStringPtr(BinarySegment* seg, BinarySegment *str_seg, const char* text)
{
  if (text)
  {
    BinarySegmentWritePointer(seg, BinarySegmentPosition(str_seg));
    BinarySegmentWriteStringData(str_seg, text);
  }
  else
  {
    BinarySegmentWriteNullPointer(seg);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r15
testq %rdx, %rdx
je 0x834f
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x134b5
movq %r15, %rdi
movl %eax, %esi
callq 0x13469
movq %rbx, %rdi
callq 0x3150
leaq 0x1(%rax), %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x1343d
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
movl $0x4, %edx
movq %r15, %rdi
callq 0x1343d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::FindObjectValue(t2::JsonObjectValue const*, char const*)
static const JsonObjectValue* FindObjectValue(const JsonObjectValue* obj, const char* key)
{
  const JsonValue *node = obj->Find(key);
  if (!node)
    return nullptr;
  if (JsonValue::kObject != node->m_Type)
    return nullptr;
  return static_cast<const JsonObjectValue*>(node);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
cmpl $0x2, (%rdi)
cmovneq %rbx, %r14
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x83cd
movq %rsi, %r15
movq 0x10(%r14), %r13
xorl %ebx, %ebx
xorl %ebp, %ebp
movq (%r13,%rbp,8), %rdi
movq %r15, %rsi
callq 0x3470
testl %eax, %eax
je 0x83b7
incq %rbp
cmpq %rbp, %r12
jne 0x839c
jmp 0x83cd
movq 0x18(%r14), %rax
movq (%rax,%rbp,8), %rax
xorl %ebx, %ebx
testq %rax, %rax
je 0x83cd
cmpl $0x2, (%rax)
cmoveq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::WriteStrHashArray(t2::BinarySegment*, t2::BinarySegment*, t2::BinarySegment*, t2::JsonArrayValue const*)
static bool WriteStrHashArray(
    BinarySegment* main_seg,
    BinarySegment* aux_seg,
    BinarySegment* str_seg,
    const JsonArrayValue* strings)
{
  BinarySegmentWriteInt32(main_seg, (int) strings->m_Count);
  BinarySegmentWritePointer(main_seg, BinarySegmentPosition(aux_seg));
  for (size_t i = 0, count = strings->m_Count; i < count; ++i)
  {
    const char* str = strings->m_Values[i]->GetString();
    if (!str)
      return false;
    WriteStringPtr(aux_seg, str_seg, str);
  }
  BinarySegmentWritePointer(main_seg, BinarySegmentPosition(aux_seg));
  for (size_t i = 0, count = strings->m_Count; i < count; ++i)
  {
    const char* str = strings->m_Values[i]->GetString();
    uint32_t hash = Djb2Hash(str);
    BinarySegmentWriteUint32(aux_seg, hash);
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl 0x8(%rcx), %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
callq 0x1343d
movq %r14, %rdi
callq 0x134b5
movq %r15, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x848e
movq 0x10(%rbx), %rax
movq (%rax), %rax
xorl %r13d, %r13d
cmpl $0x4, (%rax)
cmovneq %r13, %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x84e7
movq 0x8(%rsp), %rax
leaq -0x1(%rax), %rbp
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
callq 0x8306
cmpq %r13, %rbp
je 0x848e
movq 0x10(%rbx), %rax
movq 0x8(%rax,%r13,8), %rax
cmpl $0x4, (%rax)
je 0x8477
xorl %eax, %eax
movq 0x8(%rax), %rdx
incq %r13
testq %rdx, %rdx
jne 0x8457
cmpq 0x8(%rsp), %r13
setae %r13b
jmp 0x84e7
movq %r14, %rdi
callq 0x134b5
movq %r15, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%rbx), %r12
movb $0x1, %r13b
testq %r12, %r12
je 0x84e7
xorl %ebp, %ebp
leaq 0x4(%rsp), %r15
movq 0x10(%rbx), %rax
movq (%rax,%rbp,8), %rax
cmpl $0x4, (%rax)
je 0x84c2
xorl %eax, %eax
movq 0x8(%rax), %rdi
callq 0x5c7c
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1343d
incq %rbp
cmpq %rbp, %r12
jne 0x84b3
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::FindIntValue(t2::JsonObjectValue const*, char const*, long)
static int64_t FindIntValue(const JsonObjectValue* obj, const char* key, int64_t def_value)
{
  const JsonValue *node = obj->Find(key);
  if (!node)
    return def_value;
  if (JsonValue::kNumber != node->m_Type)
    return def_value;
  return (int64_t) static_cast<const JsonNumberValue*>(node)->m_Number;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
xorl %r15d, %r15d
cmpl $0x2, (%rdi)
cmoveq %rdi, %r15
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x8557
movq %rsi, %r14
movq 0x10(%r15), %rbp
xorl %r13d, %r13d
movq (%rbp,%r13,8), %rdi
movq %r14, %rsi
callq 0x3470
testl %eax, %eax
je 0x853f
incq %r13
cmpq %r13, %r12
jne 0x8524
jmp 0x8557
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rax
testq %rax, %rax
je 0x8557
cmpl $0x5, (%rax)
jne 0x8557
cvttsd2si 0x8(%rax), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::WriteNodeArray(t2::BinarySegment*, t2::BinarySegment*, t2::JsonArrayValue const*, int const*)
static bool WriteNodeArray(BinarySegment* top_seg, BinarySegment* data_seg, const JsonArrayValue* ints, const int32_t remap_table[])
{
  BinarySegmentWriteInt32(top_seg, (int) ints->m_Count);
  BinarySegmentWritePointer(top_seg, BinarySegmentPosition(data_seg));

  for (size_t i = 0, count = ints->m_Count; i < count; ++i)
  {
    if (const JsonNumberValue* num = ints->m_Values[i]->AsNumber())
    {
      int index = remap_table[(int) num->m_Number];
      BinarySegmentWriteInt32(data_seg, index);
    }
    else
      return false;
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0x8(%rdx), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
callq 0x1343d
movq %r15, %rdi
callq 0x134b5
movq %r12, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%r14), %r13
testq %r13, %r13
je 0x8601
movq 0x10(%r14), %rax
movq (%rax), %rax
cmpl $0x5, (%rax)
jne 0x8605
movl $0x1, %ecx
movq %rsp, %r12
cvttsd2si 0x8(%rax), %eax
movq %rcx, %rbp
cltq
movl (%rbx,%rax,4), %eax
movl %eax, (%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1343d
cmpq %rbp, %r13
je 0x85f9
movq 0x10(%r14), %rax
movq (%rax,%rbp,8), %rax
leaq 0x1(%rbp), %rcx
cmpl $0x5, (%rax)
je 0x85c3
cmpq %r13, %rbp
setae %al
jmp 0x8607
movb $0x1, %al
jmp 0x8607
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::GetBoolean(t2::JsonObjectValue const*, char const*)
static bool GetBoolean(const JsonObjectValue* obj, const char* name)
{
  if (const JsonValue* val = obj->Find(name))
  {
    if (const JsonBooleanValue* b = val->AsBoolean())
    {
      return b->m_Boolean;
    }
  }

  return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
cmpl $0x2, (%rdi)
cmovneq %rax, %rbx
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x8672
movq %rsi, %r14
movq 0x10(%rbx), %r13
xorl %r12d, %r12d
movq (%r13,%r12,8), %rdi
movq %r14, %rsi
callq 0x3470
testl %eax, %eax
je 0x8659
incq %r12
cmpq %r12, %r15
jne 0x863e
jmp 0x8670
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
testq %rax, %rax
je 0x8670
cmpl $0x1, (%rax)
jne 0x8670
movb 0x4(%rax), %al
jmp 0x8672
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::WriteFileArray(t2::BinarySegment*, t2::BinarySegment*, t2::BinarySegment*, t2::JsonArrayValue const*)
static bool WriteFileArray(
    BinarySegment* seg,
    BinarySegment* ptr_seg,
    BinarySegment* str_seg,
    const JsonArrayValue* files)
{
  if (!files || 0 == files->m_Count)
  {
    BinarySegmentWriteInt32(seg, 0);
    BinarySegmentWriteNullPointer(seg);
    return true;
  }

  BinarySegmentWriteInt32(seg, (int) files->m_Count);
  BinarySegmentWritePointer(seg, BinarySegmentPosition(ptr_seg));

  for (size_t i = 0, count = files->m_Count; i < count; ++i)
  {
    const JsonStringValue *path = files->m_Values[i]->AsString();
    if (!path)
      return false;

    PathBuffer pathbuf;
    PathInit(&pathbuf, path->m_String);

    char cleaned_path[kMaxPathLength];
    PathFormat(cleaned_path, &pathbuf);

    WriteStringPtr(ptr_seg, str_seg, cleaned_path);
    BinarySegmentWriteUint32(ptr_seg, Djb2HashPath(cleaned_path));
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
movq %rdx, 0x8(%rsp)
movq %rdi, %r12
testq %rcx, %rcx
je 0x8752
movq %rcx, %rbx
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0x8752
movq %rsi, %r15
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r12, %rdi
callq 0x1343d
movq %r15, %rdi
callq 0x134b5
movq %r12, %rdi
movl %eax, %esi
callq 0x13469
movq 0x8(%rbx), %rbp
testq %rbp, %rbp
je 0x877f
xorl %r14d, %r14d
leaq 0x14(%rsp), %r12
leaq 0x2a0(%rsp), %r13
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rax
cmpl $0x4, (%rax)
jne 0x877f
movq 0x8(%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0xeb0c
movq %r13, %rdi
movq %r12, %rsi
callq 0xee8e
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x8306
movq %r13, %rdi
callq 0x5c7c
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x1343d
incq %r14
cmpq %r14, %rbp
jne 0x86f4
jmp 0x877f
xorl %ebp, %ebp
leaq 0x14(%rsp), %rbx
movl %ebp, (%rbx)
movl $0x4, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1343d
movl %ebp, (%rbx)
leaq 0x14(%rsp), %rsi
movl $0x4, %edx
movq %r12, %rdi
callq 0x1343d
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DagGenerator.cpp
// Function: t2::GetNodeFlag(t2::JsonObjectValue const*, char const*, unsigned int)
static uint32_t GetNodeFlag(const JsonObjectValue* node, const char* name, uint32_t value)
{
  uint32_t result = 0;

  if (const JsonValue* val = node->Find(name))
  {
    if (const JsonBooleanValue* flag = val->AsBoolean())
    {
      if (flag->m_Boolean)
        result = value;
    }
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %eax, %eax
cmpl $0x2, (%rdi)
cmovneq %rax, %r14
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x87f7
movl %edx, %ebx
movq %rsi, %r15
movq 0x10(%r14), %rbp
xorl %r13d, %r13d
movq (%rbp,%r13,8), %rdi
movq %r15, %rsi
callq 0x3470
testl %eax, %eax
je 0x87da
incq %r13
cmpq %r13, %r12
jne 0x87bd
xorl %eax, %eax
jmp 0x87f7
movq 0x18(%r14), %rax
movq (%rax,%r13,8), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x87f7
cmpl $0x1, (%rcx)
jne 0x87f7
xorl %eax, %eax
cmpb $0x0, 0x4(%rcx)
cmovnel %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/Buffer.hpp
// Function: int* t2::BufferAlloc<int>(t2::Buffer<int>*, t2::MemAllocHeap*, unsigned long)
T* BufferAlloc(Buffer<T>* buffer, MemAllocHeap* heap, size_t count)
  {
    T            *storage  = buffer->m_Storage;
    const size_t  old_size = buffer->m_Size;
    const size_t  capacity = buffer->m_Capacity;

    if (old_size + count > capacity)
    {
      size_t new_capacity = capacity ? capacity *2 : 8;

      if (new_capacity < old_size + count)
        new_capacity = old_size + count;

      storage           = (T*) HeapReallocate(heap, storage, sizeof(T) *new_capacity);
      buffer->m_Storage  = storage;
      buffer->m_Capacity = new_capacity;
    }

    buffer->m_Size = old_size + count;
    return storage + old_size;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %rcx
addq %r15, %rbx
cmpq %rcx, %rbx
jbe 0x8897
leaq (%rcx,%rcx), %rdx
testq %rcx, %rcx
movl $0x8, %r12d
cmovneq %rdx, %r12
cmpq %rbx, %r12
cmovbeq %rbx, %r12
leaq (,%r12,4), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0xe892
movq %rax, (%r14)
movq %r12, 0x10(%r14)
movq %rbx, 0x8(%r14)
leaq (%rax,%r15,4), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq