LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Driver.cpp
// Function: t2::DriverInit(t2::Driver*, t2::DriverOptions const*)
bool DriverInit(Driver* self, const DriverOptions* options)
{
  HeapInit(&self->m_Heap);
  LinearAllocInit(&self->m_Allocator, &self->m_Heap, MB(64), "Driver Linear Allocator");

  LinearAllocSetOwner(&self->m_Allocator, ThreadCurrent());

  MmapFileInit(&self->m_DagFile);
  MmapFileInit(&self->m_StateFile);
  MmapFileInit(&self->m_ScanFile);

  self->m_DagData = nullptr;
  self->m_StateData = nullptr;
  self->m_ScanData = nullptr;

  BufferInit(&self->m_NodeRemap);
  BufferInit(&self->m_Nodes);

  self->m_Options = *options;

  // This linear allocator is only accessed when the state cache is locked.
  LinearAllocInit(&self->m_ScanCacheAllocator, &self->m_Heap, MB(64), "scan cache");
  ScanCacheInit(&self->m_ScanCache, &self->m_Heap, &self->m_ScanCacheAllocator);

  // This linear allocator is only accessed when the state cache is locked.
  LinearAllocInit(&self->m_StatCacheAllocator, &self->m_Heap, MB(64), "stat cache");
  StatCacheInit(&self->m_StatCache, &self->m_StatCacheAllocator, &self->m_Heap);

  memset(&self->m_PassNodeCount, 0, sizeof self->m_PassNodeCount);

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0xef60
leaq 0x8(%rbx), %r15
leaq 0xbfff(%rip), %rcx      # 0x16642
movl $0x4000000, %edx        # imm = 0x4000000
movq %r15, %rdi
movq %rbx, %rsi
callq 0xefb4
callq 0x126dc
movq %r15, %rdi
movq %rax, %rsi
callq 0xf02b
leaq 0x40(%rbx), %rdi
callq 0xf074
leaq 0x60(%rbx), %rdi
callq 0xf074
leaq 0x80(%rbx), %rdi
callq 0xf074
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movq $0x0, 0xb0(%rbx)
movups %xmm0, 0xe8(%rbx)
movups %xmm0, 0xf8(%rbx)
movups %xmm0, 0x108(%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm0, 0xb8(%rbx)
movups %xmm1, 0xc8(%rbx)
movups %xmm2, 0xd8(%rbx)
leaq 0x118(%rbx), %r14
leaq 0xbf7e(%rip), %rcx      # 0x1665a
movl $0x4000000, %edx        # imm = 0x4000000
movq %r14, %rdi
movq %rbx, %rsi
callq 0xefb4
leaq 0x150(%rbx), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xfcec
leaq 0x1b8(%rbx), %r14
leaq 0xbf59(%rip), %rcx      # 0x16665
movl $0x4000000, %edx        # imm = 0x4000000
movq %r14, %rdi
movq %rbx, %rsi
callq 0xefb4
leaq 0x1f0(%rbx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11cdc
addq $0x340, %rbx            # imm = 0x340
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31b0
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Driver.cpp
// Function: t2::DriverDestroy(t2::Driver*)
void DriverDestroy(Driver* self)
{
  DigestCacheDestroy(&self->m_DigestCache);

  StatCacheDestroy(&self->m_StatCache);

  ScanCacheDestroy(&self->m_ScanCache);

  BufferDestroy(&self->m_Nodes, &self->m_Heap);
  BufferDestroy(&self->m_NodeRemap, &self->m_Heap);

  MmapFileDestroy(&self->m_ScanFile);
  MmapFileDestroy(&self->m_StateFile);
  MmapFileDestroy(&self->m_DagFile);

  LinearAllocDestroy(&self->m_ScanCacheAllocator);
  LinearAllocDestroy(&self->m_StatCacheAllocator);
  LinearAllocDestroy(&self->m_Allocator);
  HeapDestroy(&self->m_Heap);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x268, %rdi            # imm = 0x268
callq 0x12dbf
leaq 0x1f0(%rbx), %rdi
callq 0x11d1a
leaq 0x150(%rbx), %rdi
callq 0xfd27
movq 0x100(%rbx), %rsi
testq %rsi, %rsi
je 0xa7a1
leaq 0x100(%rbx), %r14
movq %rbx, %rdi
callq 0xef6a
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0xe8(%rbx), %rsi
testq %rsi, %rsi
je 0xa7cb
leaq 0xe8(%rbx), %r14
movq %rbx, %rdi
callq 0xef6a
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x80(%rbx), %rdi
callq 0xf07f
leaq 0x60(%rbx), %rdi
callq 0xf07f
leaq 0x40(%rbx), %rdi
callq 0xf07f
leaq 0x118(%rbx), %rdi
callq 0xf012
leaq 0x1b8(%rbx), %rdi
callq 0xf012
leaq 0x8(%rbx), %rdi
callq 0xf012
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xef61
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Driver.cpp
// Function: t2::DriverSaveScanCache(t2::Driver*)
bool DriverSaveScanCache(Driver* self)
{
  ScanCache* scan_cache = &self->m_ScanCache;

  if (!ScanCacheDirty(scan_cache))
    return true;

  // This will be invalidated.
  self->m_ScanData = nullptr;

  bool success = ScanCacheSave(scan_cache, self->m_DagData->m_ScanCacheFileNameTmp, &self->m_Heap);

  // Unmap the file so we can overwrite it (on Windows.)
  MmapFileDestroy(&self->m_ScanFile);

  if (success)
  {
    success = RenameFile(self->m_DagData->m_ScanCacheFileNameTmp, self->m_DagData->m_ScanCacheFileName);
  }
  else
  {
    remove(self->m_DagData->m_ScanCacheFileNameTmp);
  }

  return success;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x150(%rdi), %r14
movq %r14, %rdi
callq 0x10245
movb $0x1, %bpl
testb %al, %al
je 0xab68
movq $0x0, 0xb0(%rbx)
movq 0xa0(%rbx), %rax
movslq 0x78(%rax), %rcx
testq %rcx, %rcx
leaq 0x78(%rcx,%rax), %rsi
cmoveq %rcx, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1028d
movl %eax, %ebp
leaq 0x80(%rbx), %rdi
callq 0xf07f
movq 0xa0(%rbx), %rax
movslq 0x78(%rax), %rcx
testq %rcx, %rcx
leaq 0x78(%rcx,%rax), %rdi
cmoveq %rcx, %rdi
testb %bpl, %bpl
je 0xab63
movslq 0x74(%rax), %rcx
testq %rcx, %rcx
leaq 0x74(%rcx,%rax), %rsi
cmoveq %rcx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x61d0
callq 0x3600
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Driver.cpp
// Function: t2::DriverCleanOutputs(t2::Driver*)
void DriverCleanOutputs(Driver* self)
{
  ProfilerScope prof_scope("Tundra Clean", 0);
  int count = 0;
  for (NodeState& state : self->m_Nodes)
  {
    for (const FrozenFileAndHash& fh : state.m_MmapData->m_OutputFiles)
    {
      if (0 == RemoveFileOrDir(fh.m_Filename))
        ++count;
    }
  }
  Log(kInfo, "Removed %d output files\n", count);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x4(%rsp)
leaq 0x11e48(%rip), %rax     # 0x1d680
cmpb $0x1, (%rax)
jne 0xb84b
leaq 0xaf01(%rip), %rdi      # 0x16745
xorl %esi, %esi
callq 0xfb72
movq 0x108(%rbx), %r14
testq %r14, %r14
je 0xb8bc
movq 0x100(%rbx), %r15
shlq $0x6, %r14
addq %r15, %r14
xorl %ebx, %ebx
movq 0x8(%r15), %rax
movslq 0x2c(%rax), %rcx
testq %rcx, %rcx
leaq 0x2c(%rcx,%rax), %r12
cmoveq %rcx, %r12
movslq 0x28(%rax), %r13
testq %r13, %r13
je 0xb8b1
shlq $0x3, %r13
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
movslq (%r12,%rbp), %rax
addq %rax, %rdi
testq %rax, %rax
cmoveq %rax, %rdi
callq 0x61c3
xorb $0x1, %al
movzbl %al, %eax
addl %eax, %ebx
addq $0x8, %rbp
cmpq %rbp, %r13
jne 0xb88a
addq $0x40, %r15
cmpq %r14, %r15
jne 0xb867
jmp 0xb8be
xorl %ebx, %ebx
leaq 0xae8d(%rip), %rsi      # 0x16752
movl $0x4, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x5ef0
leaq 0x4(%rsp), %rdi
callq 0x5b82
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb8ee
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x5b82
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Driver.cpp
// Function: bool t2::LoadFrozenData<t2::DagData>(char const*, t2::MemoryMappedFile*, t2::DagData const**)
static bool LoadFrozenData(const char* fn, MemoryMappedFile* result, const FrozenType** ptr)
{
  MemoryMappedFile mapping;

  MmapFileInit(&mapping);

  MmapFileMap(&mapping, fn);

  if (MmapFileValid(&mapping))
  {
    char *mmap_buffer = static_cast<char*>(mapping.m_Address);
    const FrozenType* data = reinterpret_cast<const FrozenType*>(mmap_buffer);

    Log(kDebug, "%s: successfully mapped at %p (%d bytes)", fn, data, (int) mapping.m_Size);

    // Check size
    if (mapping.m_Size < sizeof(FrozenType))
    {
      Log(kWarning, "%s: Bad mmap size %d - need at least %d bytes",
          fn, (int) mapping.m_Size, (int) sizeof(FrozenType));
      goto error;
    }

    // Check magic number
    if (data->m_MagicNumber != FrozenType::MagicNumber)
    {
      Log(kDebug, "%s: Bad magic number %08x - current is %08x",
          fn, data->m_MagicNumber, FrozenType::MagicNumber);
      goto error;
    }

    // Move ownership of memory mapping to member variable.
    *result = mapping;

    *ptr = data;

    return true;
  }

  Log(kDebug, "%s: mmap failed", fn);

error:
  MmapFileDestroy(&mapping);
  return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xf074
movq %r12, %rdi
movq %rbx, %rsi
callq 0xf11b
movq (%r12), %r12
testq %r12, %r12
je 0xb97b
movl 0x10(%rsp), %r8d
leaq 0xae93(%rip), %rsi      # 0x167d7
movl $0x8, %edi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x5ef0
movq 0x10(%rsp), %rcx
cmpq $0x83, %rcx
ja 0xb993
leaq 0xae95(%rip), %rsi      # 0x16800
movl $0x2, %edi
movq %rbx, %rdx
movl $0x84, %r8d
jmp 0xb9ce
leaq 0xaed8(%rip), %rsi      # 0x1685a
movl $0x8, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5ef0
jmp 0xb9d5
movl (%r12), %ecx
cmpl $0x6d992313, %ecx       # imm = 0x6D992313
jne 0xb9b9
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq %r12, (%r14)
movb $0x1, %al
jmp 0xb9e1
leaq 0xae6e(%rip), %rsi      # 0x1682e
movl $0x8, %edi
movq %rbx, %rdx
movl $0x6d992313, %r8d       # imm = 0x6D992313
xorl %eax, %eax
callq 0x5ef0
leaq 0x8(%rsp), %rdi
callq 0xf07f
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Driver.cpp
// Function: t2::FindReachable(unsigned int*, t2::DagData const*, int)
static void FindReachable(uint32_t* node_bits, const DagData* dag, int index)
{
  int word_index = index / 32;
  int bit_index = index & 31;
  if (node_bits[word_index] & (1 << bit_index))
    return;

  node_bits[word_index] |= (1 << bit_index);

  const NodeData* node = dag->m_NodeData + index;

  for (int dep : node->m_Dependencies)
  {
    FindReachable(node_bits, dag, dep);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ecx
movq %rsi, %rbx
leal 0x1f(%rcx), %eax
testl %edx, %edx
cmovnsl %edx, %eax
sarl $0x5, %eax
cltq
movl (%rdi,%rax,4), %edx
movl $0x1, %esi
shll %cl, %esi
btl %ecx, %edx
jb 0xbf5a
movq %rdi, %r14
orl %esi, %edx
movl %edx, (%rdi,%rax,4)
movslq 0xc(%rbx), %rax
testq %rax, %rax
leaq 0xc(%rax,%rbx), %rdx
cmoveq %rax, %rdx
movslq %ecx, %rax
leaq (%rax,%rax,8), %rax
leaq (%rdx,%rax,8), %rcx
movslq 0x14(%rdx,%rax,8), %rsi
testq %rsi, %rsi
leaq 0x14(%rsi,%rcx), %r15
cmoveq %rsi, %r15
movslq 0x10(%rdx,%rax,8), %r12
testq %r12, %r12
je 0xbf5a
shlq $0x2, %r12
xorl %r13d, %r13d
movl (%r15,%r13), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbed3
addq $0x4, %r13
cmpq %r13, %r12
jne 0xbf42
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/SortedArrayUtil.hpp
// Function: t2::HashDigest const* t2::BinarySearch<t2::HashDigest>(t2::HashDigest const*, int, t2::HashDigest const&)
const T* BinarySearch(const T* table, int count, const T& key)
{
  if (count > 0)
  {
    const T* end = table + count;
    const T* iter = std::lower_bound(table, end, key);
    if (iter != end && *iter == key)
    {
      return iter;
    }
  }
  return nullptr;
}

// Assembly:
testl %esi, %esi
jle 0xd7a1
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
shlq $0x4, %r14
addq %rdi, %r14
movq %r14, %rsi
callq 0xdd26
cmpq %r14, %rax
je 0xd797
movq (%rax), %rcx
cmpq (%rbx), %rcx
jne 0xd797
movq 0x8(%rbx), %rcx
cmpq %rcx, 0x8(%rax)
je 0xd799
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/HashTable.hpp
// Function: void t2::HashTableGrow<0u>(t2::HashSet<0u>*)
void HashTableGrow(HashSet<kFlags>* self)
  {
    MemAllocHeap*  heap      = self->m_Heap;

    const uint32_t old_size  = self->m_TableSize;
    // start at 1<<7 (128), increase by 4x each time
    const uint32_t new_shift = std::max(self->m_TableSizeShift + 2, 7u);
    const uint32_t new_size  = 1 << new_shift;

    uint32_t* old_hashes = self->m_Hashes;
    const char** old_strings = self->m_Strings;

    uint32_t* new_hashes = HeapAllocateArrayZeroed<uint32_t>(heap, new_size);
    const char** new_strings = HeapAllocateArrayZeroed<const char*>(heap, new_size);

    const uint32_t new_mask = new_size - 1;

    for (uint32_t i = 0; i < old_size; ++i)
    {
      if (uint32_t h = old_hashes[i])
      {
        uint32_t index = h & new_mask;

        while (new_hashes[index] != 0)
        {
          index = (index + 1) & new_mask;
        }

        new_hashes[index] = h;
        new_strings[index] = old_strings[i];
      }
    }

    HeapFree(heap, old_strings);
    HeapFree(heap, old_hashes);

    // Commit
    self->m_Hashes         = new_hashes;
    self->m_Strings        = new_strings;
    self->m_TableSize      = new_size;
    self->m_TableSizeShift = new_shift;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movq %rdi, 0x18(%rsp)
movl 0x10(%rbx), %ebp
movl 0x14(%rbx), %eax
addl $0x2, %eax
cmpl $0x8, %eax
movl $0x7, %ecx
cmovael %eax, %ecx
movl $0x1, %r14d
movl %ecx, 0x14(%rsp)
shll %cl, %r14d
movq (%rbx), %r15
movq 0x8(%rbx), %r12
leaq (,%r14,4), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rsi
shlq $0x4, %rsi
callq 0xef62
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq 0x8(%rsp), %rdx
callq 0x31b0
leaq (,%r14,8), %rax
movq %rax, 0x20(%rsp)
movq %r14, 0x8(%rsp)
shlq $0x6, %r14
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0xef62
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq 0x20(%rsp), %rdx
callq 0x31b0
testq %rbp, %rbp
je 0xdc7a
movq 0x8(%rsp), %rax
decl %eax
xorl %ecx, %ecx
movl (%r15,%rcx,4), %edx
testl %edx, %edx
je 0xdc72
movl %edx, %edi
movl %edi, %esi
andl %eax, %esi
movl %esi, %edi
incl %edi
cmpl $0x0, (%r13,%rsi,4)
jne 0xdc55
movl %edx, (%r13,%rsi,4)
movq (%r12,%rcx,8), %rdx
movq %rdx, (%r14,%rsi,8)
incq %rcx
cmpq %rbp, %rcx
jne 0xdc4b
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xef6a
movq %rbp, %rdi
movq %r15, %rsi
callq 0xef6a
movq %r13, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x8(%rsp), %rax
movl %eax, 0x10(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0x14(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/FileInfo.cpp
// Function: t2::ShouldFilter(char const*, unsigned long)
bool ShouldFilter(const char* name, size_t len)
{
  // Filter out some common noise entries that only serve to cause DAG regeneration.

  if (1 == len && name[0] == '.')
    return true;

  if (2 == len && name[0] == '.' && name[1] == '.')
    return true;

  // Vim .foo.swp files
  if (len >= 4 && name[0] == '.' && 0 == memcmp(name + len - 4, ".swp", 4))
    return true;

  // Weed out '.tundra2.*' files too, as the .json file gets removed in between
  // regenerating, messing up glob signatures.
  static const char t2_prefix[] = ".tundra2.";
  if (len >= (sizeof t2_prefix) - 1 && 0 == memcmp(name, t2_prefix, (sizeof t2_prefix) - 1))
    return true;

  // Emacs foo~ files
  if (len > 1 && name[len-1] == '~')
    return true;

  return false;
}

// Assembly:
cmpq $0x2, %rsi
je 0xde68
cmpq $0x1, %rsi
jne 0xde75
movb $0x1, %al
cmpb $0x2e, (%rdi)
je 0xdebb
cmpq $0x2, %rsi
jne 0xde75
cmpb $0x2e, (%rdi)
jne 0xde75
movb $0x1, %al
cmpb $0x2e, 0x1(%rdi)
je 0xdebb
cmpq $0x4, %rsi
jb 0xde8a
cmpb $0x2e, (%rdi)
jne 0xde8a
cmpl $0x7077732e, -0x4(%rdi,%rsi) # imm = 0x7077732E
je 0xdebc
cmpq $0x9, %rsi
jb 0xdeaa
movabsq $0x326172646e75742e, %rax # imm = 0x326172646E75742E
xorq (%rdi), %rax
movzbl 0x8(%rdi), %ecx
xorq $0x2e, %rcx
orq %rax, %rcx
je 0xdebc
cmpq $0x2, %rsi
jb 0xdeb9
movb $0x1, %al
cmpb $0x7e, -0x1(%rdi,%rsi)
je 0xdebb
xorl %eax, %eax
retq
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Hash.cpp
// Function: t2::HashUpdate(t2::HashState*, void const*, unsigned long)
void HashUpdate(HashState* self, const void *data_in, size_t size)
{
  const uint8_t*       data   = static_cast<const uint8_t*>(data_in);
  size_t               remain = size;
  uint8_t*             buffer = self->m_Buffer;
  HashStateImpl*       state  = &self->m_StateImpl;
  size_t               used   = self->m_BufUsed;

  while (remain > 0)
  {
    if (used != 0 || remain < sizeof self->m_Buffer)
    {
      const size_t buf_space = (sizeof self->m_Buffer) - used;
      const size_t copy_size = remain < buf_space ? remain : buf_space;
      memcpy(buffer + used, data, copy_size);

      used   += copy_size;
      data   += copy_size;
      remain -= copy_size;

      if (used == sizeof self->m_Buffer)
      {
        HashBlock(buffer, state, self->m_DebugFile);
        used = 0;
      }
    }
    else
    {
      HashBlock(data, state, self->m_DebugFile);
      data   += sizeof self->m_Buffer;
      remain -= sizeof self->m_Buffer;
    }
  }
  
  self->m_BufUsed  = used;
  self->m_MsgSize += size * 8;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x48(%rdi), %rbx
testq %rdx, %rdx
movq %rdx, (%rsp)
je 0xe101
movq %rsi, %r15
leaq 0x50(%r14), %r12
movq %rdx, %rbp
testq %rbx, %rbx
sete %al
cmpq $0x40, %rbp
setae %cl
testb %cl, %al
jne 0xe0e0
movl $0x40, %r13d
subq %rbx, %r13
cmpq %r13, %rbp
cmovbq %rbp, %r13
leaq (%r12,%rbx), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x3290
addq %r13, %rbx
addq %r13, %r15
subq %r13, %rbp
cmpq $0x40, %rbx
jne 0xe0fc
movq 0x90(%r14), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1391c
jmp 0xe0fa
movq 0x90(%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1391c
addq $0x40, %r15
addq $-0x40, %rbp
xorl %ebx, %ebx
testq %rbp, %rbp
jne 0xe08d
movq %rbx, 0x48(%r14)
movq (%rsp), %rax
shlq $0x3, %rax
addq %rax, 0x40(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Hash.cpp
// Function: t2::HashSingleString(t2::HashDigest*, char const*)
void HashSingleString(HashDigest* digest_out, const char* string)
{
  HashState h;
  HashInit(&h);
  HashUpdate(&h, string, strlen(string));
  HashFinalize(&h, digest_out);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq $0x0, 0x90(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r15)
movq %r15, %rdi
callq 0x13a88
movq %rbx, %rdi
callq 0x3150
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xe068
movq %r15, %rdi
movq %r14, %rsi
callq 0xe195
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Hash.cpp
// Function: t2::HashFinalize(t2::HashState*, t2::HashDigest*)
void HashFinalize(HashState* self, HashDigest* digest)
{
  uint8_t one_bit = 0x80;
  uint8_t count_data[8];

  // Generate size data in bit endian format
  for (int i = 0; i < 8; ++i)
  {
    count_data[i] = (uint8_t) (self->m_MsgSize >> (56 - i * 8));
  }

  // Set trailing one-bit
  HashUpdate(self, &one_bit, 1);

  // Emit null padding to to make room for 64 bits of size info in the last block 
  static const uint8_t zeroes[128] = { 0 };

  int diff = int(self->m_BufUsed) - (sizeof(self->m_Buffer) - 8);

  if (diff < 0)
    HashUpdate(self, zeroes, -diff);
  else
    HashUpdate(self, zeroes, sizeof(self->m_Buffer) - diff);

  CHECK(self->m_BufUsed == sizeof(self->m_Buffer) - 8);

  // Write size in bits as last 64-bits
  HashUpdate(self, count_data, 8);

  // Make sure we actually finalized our last block
  CHECK(0 == self->m_BufUsed);

  HashFinalizeImpl(&self->m_StateImpl, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb $-0x80, 0xf(%rsp)
movq 0x40(%rdi), %rax
movl $0x38, %ecx
leaq 0x10(%rsp), %rdx
movq %rax, %rsi
shrq %cl, %rsi
movb %sil, (%rdx)
addq $-0x8, %rcx
incq %rdx
cmpq $-0x8, %rcx
jne 0xe1b5
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0xe068
movl 0x48(%r14), %eax
movl $0x38, %edx
subl %eax, %edx
addl $-0x38, %eax
movl $0x40, %ecx
subq %rax, %rcx
testl %eax, %eax
cmovnsq %rcx, %rdx
leaq 0x88d0(%rip), %rsi      # 0x16ad0
movq %r14, %rdi
callq 0xe068
leaq 0x10(%rsp), %rsi
movl $0x8, %edx
movq %r14, %rdi
callq 0xe068
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13ac0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Hash.cpp
// Function: t2::HashAddStringFoldCase(t2::HashState*, char const*)
void HashAddStringFoldCase(HashState* self, const char* path)
{
  while (true)
  {
    char c = *path++;
    if (c == 0)
      return;
    c = FoldCase(c);
    HashUpdate(self, &c, 1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb (%rsi), %al
movb %al, 0xf(%rsp)
testb %al, %al
je 0xe284
movq %rsi, %rbx
movq %rdi, %r14
incq %rbx
leaq 0xf(%rsp), %r15
movsbl %al, %eax
leal -0x41(%rax), %ecx
leal 0x20(%rax), %edx
cmpl $0x1a, %ecx
movzbl %al, %eax
movzbl %dl, %ecx
cmovael %eax, %ecx
movb %cl, 0xf(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0xe068
movb (%rbx), %al
movb %al, 0xf(%rsp)
incq %rbx
testb %al, %al
jne 0xe24e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Hash.cpp
// Function: t2::DigestToString(char (&) [33], t2::HashDigest const&)
void
DigestToString(char (&buffer)[kDigestStringSize], const HashDigest& digest)
{
  static const char hex[] = "0123456789abcdef";

#if ENABLED(USE_FAST_HASH)
  int i = 0;
  for (int k = 0; k < 2; ++k)
  {
    uint64_t w = digest.m_Words64[k];
    for (int b = 0; b < 8; ++b)
    {
      uint8_t byte = w >> 56;
      buffer[i++] = hex[byte>>4];
      buffer[i++] = hex[byte & 0xf];
      w <<= 8;
    }
  }
#else
  for (size_t i = 0; i < sizeof(digest.m_Data); ++i)
  {
    uint8_t byte = digest.m_Data[i];
    buffer[2 * i + 0] = hex[byte>>4];
    buffer[2 * i + 1] = hex[byte & 0xf];
  }
#endif

  buffer[kDigestStringSize - 1] = '\0';
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x1(%rdi), %rax
xorl %ecx, %ecx
leaq 0x8870(%rip), %rdx      # 0x16b50
xorl %r8d, %r8d
movq (%rsi,%rcx,8), %r9
movslq %r8d, %r8
leaq (%rax,%r8), %r11
xorl %r10d, %r10d
movq %r9, %rbx
shrq $0x38, %rbx
movq %r9, %r14
shrq $0x3c, %r14
movb (%r14,%rdx), %bpl
movb %bpl, -0x1(%r11,%r10)
andl $0xf, %ebx
movb (%rbx,%rdx), %bl
movb %bl, (%r11,%r10)
shlq $0x8, %r9
addq $0x2, %r10
cmpl $0x10, %r10d
jne 0xe2f1
leaq 0x1(%rcx), %r9
addq %r10, %r8
testq %rcx, %rcx
movq %r9, %rcx
je 0xe2e3
movb $0x0, 0x20(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/JsonParse.cpp
// Function: t2::JsonParse(char*, t2::MemAllocLinear*, t2::MemAllocLinear*, char (&) [1024])
const JsonValue* JsonParse(
    char *buffer,
    MemAllocLinear* allocator,
    MemAllocLinear* scratch,
    char (&error_message)[1024])
{
  TimingScope timing_scope(nullptr, &g_Stats.m_JsonParseTimeCycles);

  // Setup statics. Harmless to do multiple times.
  s_TrueValue.m_Type = JsonValue::kBoolean;
  s_TrueValue.m_Boolean = true;
  s_FalseValue.m_Type = JsonValue::kBoolean;
  s_FalseValue.m_Boolean = false;

  JsonState json_state;
  JsonStateInit(&json_state, allocator, scratch, buffer);

  const JsonValue* root = JsonParseValue(&json_state);

  if (root && !JsonLexerExpect(&json_state.m_Lexer, kJsonLexEof))
  {
    root = JsonError(&json_state, "data after document");
  }

  if (root)
  {
    error_message[0] = '\0';
  }
  else
  {
    strncpy(error_message, json_state.m_ErrorMessage, sizeof error_message);
    error_message[sizeof(error_message)-1] = '\0';
  }
  
  return root;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x848, %rsp            # imm = 0x848
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq $0x0, (%rsp)
movl $0x98, %eax
addq 0xec5a(%rip), %rax      # 0x1cfc0
movq %rax, 0x8(%rsp)
callq 0x60a6
movq %rax, 0x10(%rsp)
movl $0x1, %eax
movl %eax, 0xf2f0(%rip)      # 0x1d670
movb $0x1, 0xf2ed(%rip)      # 0x1d674
movl %eax, 0xf2eb(%rip)      # 0x1d678
xorl %ecx, %ecx
movb %cl, 0xf2e7(%rip)       # 0x1d67c
leaq 0x18(%rsp), %rdi
movq %r12, (%rdi)
movl %eax, 0x8(%rdi)
movl $0xc, 0x10(%rdi)
movb %cl, 0x20(%rdi)
movb %cl, 0x420(%rdi)
movq %r15, 0x820(%rdi)
movq %r14, 0x828(%rdi)
callq 0xe46a
movq %rax, %r14
leaq 0x438(%rsp), %r15
testq %rax, %rax
je 0xe3e8
movl 0x28(%rsp), %eax
cmpl $0xc, %eax
jne 0xe3ed
leaq 0x18(%rsp), %rdi
callq 0xea77
jmp 0xe3f5
xorl %r14d, %r14d
jmp 0xe41e
movl $0xc, 0x28(%rsp)
cmpl $0xa, %eax
je 0xe41e
movl 0x20(%rsp), %ecx
leaq 0x8964(%rip), %rdx      # 0x16d69
leaq 0x8808(%rip), %r8       # 0x16c14
xorl %r14d, %r14d
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
xorl %eax, %eax
callq 0x3560
testq %r14, %r14
jne 0xe43a
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31a0
addq $0x3ff, %rbx            # imm = 0x3FF
movb $0x0, (%rbx)
movq %rsp, %rdi
callq 0x5bac
movq %r14, %rax
addq $0x848, %rsp            # imm = 0x848
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5bac
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/MemAllocHeap.cpp
// Function: t2::HeapReallocate(t2::MemAllocHeap*, void*, unsigned long)
void* HeapReallocate(MemAllocHeap *heap, void *ptr, size_t size)
{
  void* new_ptr = realloc(ptr, size);

  if (!new_ptr && size > 0)
  {
    Croak("out of memory reallocating %d bytes at %p", (int) size, ptr);
  }

  return new_ptr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x35b0
testq %rax, %rax
setne %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
je 0xef9f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7dcf(%rip), %rdi      # 0x16d75
movl %r14d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5bdd
nop
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/MemAllocLinear.cpp
// Function: t2::LinearAllocInit(t2::MemAllocLinear*, t2::MemAllocHeap*, unsigned long, char const*)
void LinearAllocInit(MemAllocLinear* self, MemAllocHeap* heap, size_t max_size, const char* debug_name)
{
  size_t alloc_size = max_size + MemAllocLinear::kMaxAlignment - 1;
  self->m_BasePointer = static_cast<char*>(HeapAllocate(heap, alloc_size));
  self->m_Pointer     = nullptr;
  self->m_Size        = max_size;
  self->m_Offset      = 0;
  self->m_BackingHeap = heap;
  self->m_DebugName   = debug_name;

  uintptr_t aligned_base = uintptr_t(self->m_BasePointer + MemAllocLinear::kMaxAlignment - 1) & ~(MemAllocLinear::kMaxAlignment - 1);
  uintptr_t delta        = aligned_base - uintptr_t(self->m_BasePointer);

  self->m_Pointer = self->m_BasePointer + delta;
  self->m_Size   -= (delta);

  self->m_OwnerThread = 0;

#if ENABLED(USE_VALGRIND)
  VALGRIND_MAKE_MEM_NOACCESS(self->m_BasePointer, alloc_size);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x3f(%rdx), %rsi
movq %r15, %rdi
callq 0xef62
movq %rax, (%r12)
xorl %ecx, %ecx
movq %rcx, 0x18(%r12)
movq %r15, 0x20(%r12)
movq %rbx, 0x28(%r12)
leaq 0x3f(%rax), %rdx
andq $-0x40, %rdx
movq %rdx, 0x8(%r12)
subq %rdx, %rax
addq %r14, %rax
movq %rax, 0x10(%r12)
movq %rcx, 0x30(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/MemoryMappedFile.cpp
// Function: t2::MmapFileUnmap(t2::MemoryMappedFile*)
void MmapFileUnmap(MemoryMappedFile* self)
{
  if (self->m_Address)
  {
    TimingScope timing_scope(&g_Stats.m_MunmapCalls, &g_Stats.m_MunmapTimeCycles);

    if (0 != munmap(self->m_Address, self->m_Size))
      Croak("munmap(%p, %d) failed: %d", self->m_Address, (int) self->m_Size, errno);

    close((int) self->m_SysData[0]);
  }

  Clear(self);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0xf0d6
leaq 0xe505(%rip), %rax      # 0x1d5a0
leaq 0x40(%rax), %rcx
movq %rcx, (%rsp)
addq $0x48, %rax
movq %rax, 0x8(%rsp)
callq 0x60a6
movq %rax, 0x10(%rsp)
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x31d0
testl %eax, %eax
jne 0xf0e8
movl 0x10(%rbx), %edi
callq 0x3660
movq %rsp, %rdi
callq 0x5bac
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq (%rbx), %r14
movl 0x8(%rbx), %ebx
callq 0x3050
movl (%rax), %ecx
leaq 0x7cc9(%rip), %rdi      # 0x16dc5
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x5bdd
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5bac
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/MemoryMappedFile.cpp
// Function: t2::MmapFileMap(t2::MemoryMappedFile*, char const*)
void MmapFileMap(MemoryMappedFile* self, const char *fn)
{
  TimingScope timing_scope(&g_Stats.m_MmapCalls, &g_Stats.m_MmapTimeCycles);

  MmapFileUnmap(self);

  int fd = open(fn, O_RDONLY);

  if (-1 == fd)
    goto error;

  struct stat stbuf;
  if (0 != fstat(fd, &stbuf))
    goto error;

  self->m_Address    = mmap(NULL, stbuf.st_size, PROT_READ, MAP_FILE|MAP_PRIVATE, fd, 0);
  self->m_Size       = stbuf.st_size;
  self->m_SysData[0] = fd;

  if (self->m_Address)
    return;

error:
  if (-1 != fd)
    close(fd);

  Clear(self);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xe46d(%rip), %rax      # 0x1d5a0
leaq 0x30(%rax), %rcx
movq %rcx, 0x8(%rsp)
addq $0x38, %rax
movq %rax, 0x10(%rsp)
callq 0x60a6
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0xf084
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3240
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xf181
leaq 0x20(%rsp), %rsi
movl %ebp, %edi
callq 0x35d0
testl %eax, %eax
je 0xf1a1
movl %ebp, %edi
callq 0x3660
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5bac
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x50(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
movl $0x1, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x35f0
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
movslq %ebp, %rcx
movq %rcx, 0x10(%rbx)
testq %rax, %rax
jne 0xf18b
jmp 0xf17a
jmp 0xf1d7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5bac
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/PathUtil.cpp
// Function: t2::PathStripLast(t2::PathBuffer*)
bool PathStripLast(PathBuffer* buffer)
{
  uint16_t min_seg_count = (buffer->m_Flags & PathBuffer::kFlagWindowsDevicePath) ? 1 : 0;
  uint16_t seg_count = buffer->m_SegCount;
  if (seg_count > min_seg_count)
  {
    buffer->m_SegCount = seg_count - 1;
    return true;
  }
  else
    return false;
}

// Assembly:
movzwl 0x4(%rdi), %eax
shrl %eax
andl $0x1, %eax
movzwl 0x6(%rdi), %ecx
cmpw %ax, %cx
jbe 0xf445
leal -0x1(%rcx), %edx
movw %dx, 0x6(%rdi)
cmpw %ax, %cx
seta %al
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/PathUtil.cpp
// Function: t2::PathConcat(t2::PathBuffer*, t2::PathBuffer const*)
void PathConcat(PathBuffer* buffer, const PathBuffer* other)
{
  if (PathIsAbsolute(other))
  {
    *buffer = *other;
  }
  else
  {
    PathConcatImpl(buffer, other);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testb $0x1, 0x4(%rsi)
jne 0xf4e6
movzwl 0x6(%r14), %r15d
movl 0x4(%r14), %eax
movzwl 0x8(%rbx), %ecx
testl %ecx, %ecx
je 0xf4ca
movl %eax, %edx
shrl %edx
andl $0x1, %edx
cmpl %edx, %r15d
jle 0xf4b3
decl %r15d
jmp 0xf4c6
testl %r15d, %r15d
movl $0x1, %r15d
jne 0xf4c6
incw 0x8(%r14)
xorl %r15d, %r15d
decl %ecx
jne 0xf4a9
testb $0x1, %al
je 0xf4d5
movw $0x0, 0x8(%r14)
testl %r15d, %r15d
jle 0xf500
leal -0x1(%r15), %eax
movzwl 0xa(%r14,%rax,2), %ebp
jmp 0xf502
movl $0x28c, %edx            # imm = 0x28C
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3290
xorl %ebp, %ebp
movzwl 0x6(%rbx), %eax
testq %rax, %rax
je 0xf514
decl %eax
movzwl 0xa(%rbx,%rax,2), %edx
jmp 0xf516
xorl %edx, %edx
movl %ebp, %edi
movl $0x8a, %esi
addq %r14, %rdi
addq %rsi, %rdi
addq %rbx, %rsi
callq 0x3290
movzwl 0x6(%rbx), %eax
testq %rax, %rax
je 0xf555
movslq %r15d, %rcx
leaq (%r14,%rcx,2), %rcx
addq $0xa, %rcx
xorl %edx, %edx
movzwl 0xa(%rbx,%rdx,2), %esi
addw %bp, %si
movw %si, (%rcx,%rdx,2)
incq %rdx
cmpq %rdx, %rax
jne 0xf541
addw 0x6(%rbx), %r15w
movw %r15w, 0x6(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/PathUtil.cpp
// Function: t2::PathFormatPartial(char (&) [512], t2::PathBuffer const*, int, int)
void PathFormatPartial(char (&output)[kMaxPathLength], const PathBuffer* buffer, int start_seg, int end_seg)
{
  char *cursor = &output[0];
  char pathsep = PathType::kWindows == buffer->m_Type ? '\\' : '/';

  if (start_seg == 0 &&
      PathBuffer::kFlagAbsolute ==
      (buffer->m_Flags & (PathBuffer::kFlagAbsolute|PathBuffer::kFlagWindowsDevicePath)))
  {
    *cursor++ = pathsep;
  }

  // Emit all leading ".." tokens we've got left
  for (int i = 0, count = buffer->m_LeadingDotDots; i < count; ++i)
  {
    *cursor++ = '.';
    *cursor++ = '.';
    *cursor++ = pathsep;
  }

  // Emit all remaining tokens.
  uint16_t off = 0;

  for (int i = 0; i < start_seg; ++i)
  {
    off += buffer->SegLength(i);
  }

  for (int i = start_seg; i <= end_seg; ++i)
  {
    uint16_t len = buffer->SegLength(i);

    if ((cursor - &output[0]) + len + 1 >= kMaxPathLength)
      Croak("Path too long");

    if (i > start_seg)
      *cursor++ = pathsep;

    memcpy(cursor, buffer->m_Data + off, len);
    cursor += len;
    off += len;
  }
  *cursor = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, (%rsp)
movq %rsi, %r15
cmpl $0x1, (%rsi)
movl $0x5c, %eax
movl $0x2f, %r8d
cmovel %eax, %r8d
movq %rdi, %r13
testl %edx, %edx
jne 0xf5bc
movzwl 0x4(%r15), %eax
andl $0x3, %eax
movq %rdi, %r13
cmpw $0x1, %ax
jne 0xf5bc
leaq 0x1(%rdi), %r13
movb %r8b, (%rdi)
movzwl 0x8(%r15), %eax
testl %eax, %eax
je 0xf5d8
movw $0x2e2e, (%r13)         # imm = 0x2E2E
movb %r8b, 0x2(%r13)
addq $0x3, %r13
decl %eax
jne 0xf5c5
testl %edx, %edx
jle 0xf60a
movl %edx, %eax
xorl %ecx, %ecx
xorl %esi, %esi
testq %rcx, %rcx
je 0xf5f5
movzwl 0xa(%r15,%rcx,2), %r12d
subw 0x8(%r15,%rcx,2), %r12w
jmp 0xf5fa
movzwl 0xa(%r15), %r12d
addl %esi, %r12d
incq %rcx
movl %r12d, %esi
cmpq %rcx, %rax
jne 0xf5e2
jmp 0xf60d
xorl %r12d, %r12d
cmpl (%rsp), %edx
jg 0xf69c
movl %r8d, 0x4(%rsp)
leaq 0x8a(%r15), %rax
movq %rax, 0x8(%rsp)
leal -0x1(%rdx), %eax
movq %rdx, 0x10(%rsp)
movq %rdi, %r14
leal 0x1(%rax), %ebx
testl %ebx, %ebx
jle 0xf64b
movl %ebx, %ecx
movzwl 0xa(%r15,%rcx,2), %ecx
movl %eax, %eax
subw 0xa(%r15,%rax,2), %cx
jmp 0xf650
movzwl 0xa(%r15), %ecx
movq %r13, %rax
subq %rdi, %rax
movzwl %cx, %ebp
addq %rbp, %rax
cmpq $0x1ff, %rax            # imm = 0x1FF
jge 0xf6b0
cmpl %edx, %ebx
jle 0xf673
movl 0x4(%rsp), %eax
movb %al, (%r13)
incq %r13
movzwl %r12w, %esi
addq 0x8(%rsp), %rsi
movq %r13, %rdi
movq %rbp, %rdx
callq 0x3290
addq %rbp, %r13
addl %ebp, %r12d
movl %ebx, %eax
cmpl %ebx, (%rsp)
movq 0x10(%rsp), %rdx
movq %r14, %rdi
jne 0xf632
movb $0x0, (%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7748(%rip), %rdi      # 0x16dff
xorl %eax, %eax
callq 0x5bdd
nop
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Profiler.cpp
// Function: t2::ProfilerInit(char const*, int)
void ProfilerInit(const char* fileName, int threadCount)
  {
    CHECK(!g_ProfilerEnabled);
    CHECK(threadCount > 0);

    g_ProfilerEnabled = true;

    s_ProfilerState.m_ThreadCount = threadCount;

    HeapInit(&s_ProfilerState.m_Heap);

    size_t fileNameLen = strlen(fileName);
    s_ProfilerState.m_FileName = (char*)HeapAllocate(&s_ProfilerState.m_Heap, fileNameLen + 1);
    memcpy(s_ProfilerState.m_FileName, fileName, fileNameLen + 1);

    s_ProfilerState.m_Threads = HeapAllocateArray<ProfilerThread>(&s_ProfilerState.m_Heap, s_ProfilerState.m_ThreadCount);
    for (int i = 0; i < s_ProfilerState.m_ThreadCount; ++i)
    {
      ProfilerThread& thread = s_ProfilerState.m_Threads[i];
      thread.m_Events = HeapAllocateArray<ProfilerEvent>(&s_ProfilerState.m_Heap, kProfilerThreadMaxEvents);
      thread.m_EventCount = 0;
      LinearAllocInit(&thread.m_ScratchStrings, &s_ProfilerState.m_Heap, kProfilerThreadStringsSize, "profilerStrings");
      thread.m_IsBegin = false;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, 0xdfab(%rip)      # 0x1d680
movl %esi, 0xdfc5(%rip)      # 0x1d6a0
leaq 0xdfa6(%rip), %r14      # 0x1d688
movq %r14, %rdi
callq 0xef60
movq %rbx, %rdi
callq 0x3150
leaq 0x1(%rax), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xef62
movq %rax, 0xdf88(%rip)      # 0x1d690
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3290
movslq 0xdf83(%rip), %rax      # 0x1d6a0
shlq $0x3, %rax
leaq (%rax,%rax,8), %rsi
movq %r14, %rdi
callq 0xef62
movq %rax, 0xdf64(%rip)      # 0x1d698
cmpl $0x0, 0xdf65(%rip)      # 0x1d6a0
jle 0xf7a3
xorl %r12d, %r12d
leaq 0xdf41(%rip), %rbx      # 0x1d688
leaq 0x76fa(%rip), %r14      # 0x16e48
xorl %r13d, %r13d
movq 0xdf40(%rip), %rbp      # 0x1d698
leaq (%r12,%rbp), %r15
movl $0x100000, %esi         # imm = 0x100000
movq %rbx, %rdi
callq 0xef62
movq %rax, 0x38(%rbp,%r12)
movl $0x0, 0x40(%rbp,%r12)
movl $0x400000, %edx         # imm = 0x400000
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0xefb4
movb $0x0, 0x44(%rbp,%r12)
incq %r13
movslq 0xdf06(%rip), %rax      # 0x1d6a0
addq $0x48, %r12
cmpq %rax, %r13
jl 0xf751
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Profiler.cpp
// Function: t2::EscapeString(char const*, char*, int)
static void EscapeString(const char* src, char* dst, int dstSpace)
  {
    while (*src && dstSpace > 2) // some input chars might expand into 2 in the output
    {
      char c = *src;
      switch (c)
      {
      case '"':
      case '\\':
      case '\b':
      case '\f':
      case '\n':
      case '\r':
      case '\t':
        *dst++ = '\\'; *dst++ = c; dstSpace -= 2;
        break;
      default:
        if (c >= 32 && c < 126)
        {
          *dst++ = c; dstSpace -= 1;
        }
      }
      ++src;
    }
    *dst = 0;
  }

// Assembly:
movb (%rdi), %dl
testb %dl, %dl
je 0xf9fe
incq %rdi
movl $0x400, %eax            # imm = 0x400
movabsq $0x400003700, %rcx      # imm = 0x400003700
movzbl %dl, %r8d
cmpb $0x22, %r8b
ja 0xf9dd
btq %r8, %rcx
jae 0xf9dd
leaq 0x1(%rsi), %r9
movb $0x5c, (%rsi)
movl $0xfffffffe, %r8d       # imm = 0xFFFFFFFE
movl $0x2, %r10d
addq %r10, %rsi
movb %dl, (%r9)
addl %r8d, %eax
movb (%rdi), %dl
testb %dl, %dl
je 0xf9fe
incq %rdi
cmpl $0x2, %eax
jg 0xf9a1
jmp 0xf9fe
cmpl $0x5c, %r8d
je 0xf9b1
leal -0x20(%rdx), %r8d
cmpb $0x5d, %r8b
ja 0xf9cd
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x1, %r10d
movq %rsi, %r9
jmp 0xf9c4
movb $0x0, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Profiler.cpp
// Function: t2::ProfilerDestroy()
void ProfilerDestroy()
  {
    if (!g_ProfilerEnabled)
      return;

    for (int i = 0; i < s_ProfilerState.m_ThreadCount; ++i)
    {
      ProfilerThread& thread = s_ProfilerState.m_Threads[i];
      if (thread.m_IsBegin)
        ProfilerEndImpl(i);
    }

    ProfilerWriteOutput();

    for (int i = 0; i < s_ProfilerState.m_ThreadCount; ++i)
    {
      ProfilerThread& thread = s_ProfilerState.m_Threads[i];
      Log(kSpam, "profiler: thread %i had %d events, %.1f KB strings", i, thread.m_EventCount, double(thread.m_ScratchStrings.m_Offset)/1024.0);
      HeapFree(&s_ProfilerState.m_Heap, thread.m_Events);
      LinearAllocDestroy(&thread.m_ScratchStrings);
    }
    HeapFree(&s_ProfilerState.m_Heap, s_ProfilerState.m_Threads);
    HeapFree(&s_ProfilerState.m_Heap, s_ProfilerState.m_FileName);
    HeapDestroy(&s_ProfilerState.m_Heap);
  }

// Assembly:
cmpb $0x1, 0xdc77(%rip)      # 0x1d680
jne 0xfb2a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0xdc7f(%rip)      # 0x1d6a0
jle 0xfa53
movl $0x44, %r14d
xorl %ebx, %ebx
movq 0xdc66(%rip), %rax      # 0x1d698
cmpb $0x1, (%rax,%r14)
jne 0xfa40
movl %ebx, %edi
callq 0xfb2b
incq %rbx
movslq 0xdc56(%rip), %rax      # 0x1d6a0
addq $0x48, %r14
cmpq %rax, %rbx
jl 0xfa2b
callq 0xf7b2
cmpl $0x0, 0xdc41(%rip)      # 0x1d6a0
jle 0xfaef
xorl %r13d, %r13d
leaq 0xdc19(%rip), %rbx      # 0x1d688
leaq 0x757c(%rip), %r14      # 0x16ff2
xorl %r15d, %r15d
movq 0xdc18(%rip), %rbp      # 0x1d698
movq %rbp, %r12
addq %r13, %r12
movl 0x40(%rbp,%r13), %ecx
movsd 0x18(%rbp,%r13), %xmm1
unpcklps 0x6337(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x633f(%rip), %xmm1     # 0x15de0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x738b(%rip), %xmm0     # 0x16e40
movl $0x10, %edi
movq %r14, %rsi
movl %r15d, %edx
movb $0x1, %al
callq 0x5ef0
movq 0x38(%rbp,%r13), %rsi
movq %rbx, %rdi
callq 0xef6a
movq %r12, %rdi
callq 0xf012
incq %r15
movslq 0xdbba(%rip), %rax      # 0x1d6a0
addq $0x48, %r13
cmpq %rax, %r15
jl 0xfa79
movq 0xdba2(%rip), %rsi      # 0x1d698
leaq 0xdb8b(%rip), %rbx      # 0x1d688
movq %rbx, %rdi
callq 0xef6a
movq 0xdb84(%rip), %rsi      # 0x1d690
movq %rbx, %rdi
callq 0xef6a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xef61
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Profiler.cpp
// Function: t2::ProfilerEndImpl(int)
void ProfilerEndImpl(int threadIndex)
  {
    CHECK(g_ProfilerEnabled);
    CHECK(threadIndex >= 0 && threadIndex < s_ProfilerState.m_ThreadCount);
    ProfilerThread& thread = s_ProfilerState.m_Threads[threadIndex];
    CHECK(thread.m_IsBegin);
    CHECK(thread.m_EventCount > 0);
    thread.m_IsBegin = false;
    if (thread.m_EventCount > kProfilerThreadMaxEvents)
      return;
    ProfilerEvent& evt = thread.m_Events[thread.m_EventCount-1];
    evt.m_Duration = TimerGet() - evt.m_Time;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0xdb62(%rip), %rax      # 0x1d698
movslq %edi, %rcx
leaq (%rcx,%rcx,8), %rcx
movb $0x0, 0x44(%rax,%rcx,8)
movl 0x40(%rax,%rcx,8), %ebx
cmpq $0x8000, %rbx           # imm = 0x8000
ja 0xfb6a
leaq (%rax,%rcx,8), %rax
movq 0x38(%rax), %r14
shlq $0x5, %rbx
callq 0x60a6
subq -0x20(%r14,%rbx), %rax
movq %rax, -0x18(%r14,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Profiler.cpp
// Function: t2::ProfilerBeginImpl(char const*, int)
void ProfilerBeginImpl(const char* name, int threadIndex)
  {
    CHECK(g_ProfilerEnabled);
    CHECK(threadIndex >= 0 && threadIndex < s_ProfilerState.m_ThreadCount);
    ProfilerThread& thread = s_ProfilerState.m_Threads[threadIndex];
    CHECK(!thread.m_IsBegin);
    thread.m_IsBegin = true;
    if (thread.m_EventCount >= kProfilerThreadMaxEvents)
    {
      Log(kWarning, "profiler: max events (%d) reached on thread %i, '%s' and later won't be recorded", (int)kProfilerThreadMaxEvents, threadIndex, name);
      return;
    }
    ProfilerEvent& evt = thread.m_Events[thread.m_EventCount++];
    evt.m_Time = TimerGet();

    // split input name by first space
    const char* nextWord = strchr(name, ' ');
    if (nextWord == nullptr)
    {
      evt.m_Name = StrDup(&thread.m_ScratchStrings, name);
      evt.m_Info = "";
    }
    else
    {
      evt.m_Name = StrDupN(&thread.m_ScratchStrings, name, nextWord - name);
      evt.m_Info = StrDup(&thread.m_ScratchStrings, nextWord + 1);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xdb11(%rip), %rax      # 0x1d698
movslq %esi, %rdx
leaq (%rdx,%rdx,8), %rdx
movb $0x1, 0x44(%rax,%rdx,8)
movl 0x40(%rax,%rdx,8), %r15d
cmpq $0x8000, %r15           # imm = 0x8000
jb 0xfbcc
movl %esi, %ecx
leaq 0x747b(%rip), %rsi      # 0x17025
movl $0x2, %edi
movl $0x8000, %edx           # imm = 0x8000
movq %rbx, %r8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5ef0
leaq (%rax,%rdx,8), %r14
movq 0x38(%r14), %r12
leal 0x1(%r15), %eax
movl %eax, 0x40(%r14)
shlq $0x5, %r15
leaq (%r12,%r15), %rbp
callq 0x60a6
movq %rax, (%r12,%r15)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x3130
testq %rax, %rax
je 0xfc73
movq %rax, %r15
movq %rax, %r12
subq %rbx, %r12
leaq 0x1(%r12), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0xf030
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x3290
xorl %eax, %eax
movb %al, (%r13,%r12)
xorl %r12d, %r12d
movq %r13, 0x10(%rbp)
incq %r15
movq %r15, %rdi
callq 0x3150
movq %rax, %rbx
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0xf030
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3290
movb %r12b, (%r14,%rbx)
movq %r14, 0x18(%rbp)
jmp 0xfcb4
movq %rbx, %rdi
callq 0x3150
movq %rax, %r15
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0xf030
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3290
movb $0x0, (%r14,%r15)
movq %r14, 0x10(%rbp)
leaq 0x66f6(%rip), %rax      # 0x163a6
movq %rax, 0x18(%rbp)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/ScanCache.cpp
// Function: t2::ScanCacheInit(t2::ScanCache*, t2::MemAllocHeap*, t2::MemAllocLinear*)
void ScanCacheInit(ScanCache* self, MemAllocHeap* heap, MemAllocLinear* allocator)
{
  self->m_FrozenData       = nullptr;
  self->m_Heap             = heap;
  self->m_Allocator        = allocator;
  self->m_RecordCount      = 0;
  self->m_TableSize        = 0;
  self->m_Table            = nullptr;
  self->m_FrozenAccess     = nullptr;

  ReadWriteLockInit(&self->m_Lock);
}

// Assembly:
pushq %rax
xorl %ecx, %ecx
movq %rcx, (%rdi)
movq %rsi, 0x40(%rdi)
movq %rdx, 0x48(%rdi)
leaq 0x8(%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movq %rcx, 0x60(%rdi)
movq %rax, %rdi
xorl %esi, %esi
callq 0x3260
testl %eax, %eax
jne 0xfd19
popq %rax
retq
leaq 0x73a0(%rip), %rdi      # 0x170c0
xorl %eax, %eax
callq 0x5c85
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/ScanCache.cpp
// Function: t2::ScanCacheSetCache(t2::ScanCache*, t2::ScanData const*)
void ScanCacheSetCache(ScanCache* self, const ScanData* frozen_data)
{
  self->m_FrozenData = frozen_data;

  if (frozen_data)
  {
    self->m_FrozenAccess = HeapAllocateArrayZeroed<uint8_t>(self->m_Heap, frozen_data->m_EntryCount);

    Log(kDebug, "Scan cache initialized from frozen data - %u entries", frozen_data->m_EntryCount);

#if ENABLED(CHECKED_BUILD)
    // Paranoia - make sure the cache is sorted.
    for (int i = 1, count = frozen_data->m_EntryCount; i < count; ++i)
    {
      if (frozen_data->m_Keys[i] < frozen_data->m_Keys[i - 1])
        Croak("Header scanning cache is not sorted");
    }
#endif
  }
}

// Assembly:
movq %rsi, (%rdi)
testq %rsi, %rsi
je 0xfdc0
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x40(%rdi), %rdi
movslq 0x4(%rsi), %r15
movq %r15, %rsi
callq 0xef62
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x31b0
movq %r12, 0x60(%r14)
movl 0x4(%rbx), %edx
leaq 0x72cd(%rip), %rsi      # 0x17076
movl $0x8, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5ef0
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/ScanCache.cpp
// Function: t2::ScanCacheDirty(t2::ScanCache*)
bool ScanCacheDirty(ScanCache* self)
{
  bool result;

  ReadWriteLockRead(&self->m_Lock);

  result = self->m_RecordCount > 0;

  ReadWriteUnlockRead(&self->m_Lock);

  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x32f0
testl %eax, %eax
jne 0x10276
movl 0x50(%r14), %ebp
movq %rbx, %rdi
callq 0x3430
testl %eax, %eax
jne 0x1027f
testl %ebp, %ebp
setne %al
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x6e80(%rip), %rdi      # 0x170fd
jmp 0x10286
leaq 0x6e96(%rip), %rdi      # 0x1711c
xorl %eax, %eax
callq 0x5c85