LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/HashTable.hpp
// Function: int t2::HashTableBaseLookup<0u>(t2::HashTableBase<0u>*, unsigned int, char const*)
int HashTableBaseLookup(HashTableBase<kFlags>* self, uint32_t hash, const char* string)
  {
    uint32_t size = self->m_TableSize;

    if (0 == size)
    {
      return -1;
    }

    int (*compare_fn)(const char* l, const char* r);

    if (kFlags & kFlagCaseInsensitive)
    {
      compare_fn = FastCompareNoCase;
    }
    else
    {
      compare_fn = strcmp;
    }

    const uint32_t* hashes = self->m_Hashes;
    const char* const* strings = self->m_Strings;

    uint32_t index = hash & (size - 1);

    for (;;)
    {
      uint32_t candidate_hash = hashes[index];

      if (!candidate_hash)
        return -1;

      if (hash == candidate_hash)
      {
        const char* candidate_string = strings[index];
        if (candidate_string == string || compare_fn(candidate_string, string) == 0)
        {
          return index;
        }
      }

      index = (index + 1) & (size - 1);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x10(%rdi), %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %r15d, %r15d
je 0x8973
movl %esi, %ebp
movq (%rdi), %r12
decl %r15d
movl %r15d, %r13d
andl %esi, %r13d
movl (%r12,%r13,4), %ecx
testl %ecx, %ecx
je 0x8973
movq %rdx, %r14
movq 0x8(%rdi), %rbx
cmpl %ebp, %ecx
jne 0x895b
movq (%rbx,%r13,8), %rdi
cmpq %r14, %rdi
je 0x8970
movq %r14, %rsi
callq 0x3470
testl %eax, %eax
je 0x8970
incl %r13d
andl %r15d, %r13d
movl (%r12,%r13,4), %ecx
testl %ecx, %ecx
jne 0x8942
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x8973
movl %r13d, %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/HashTable.hpp
// Function: int t2::HashTableBaseInsert<t2::HashTable<t2::CommonStringRecord, 0u>>(t2::HashTable<t2::CommonStringRecord, 0u>*, unsigned int, char const*)
int HashTableBaseInsert(TableType* self, uint32_t hash, const char* string)
  {
    uint32_t record_count = self->m_RecordCount;
    uint32_t table_size = self->m_TableSize;
    uint64_t load = 0x100 * uint64_t(record_count + 1) >> uint64_t(self->m_TableSizeShift);

    if (load > 0x050)
    {
      HashTableGrow(self);
      table_size = self->m_TableSize;
    }

    uint32_t index = hash & (table_size - 1);

    uint32_t* hashes = self->m_Hashes;

    while (hashes[index] != 0)
    {
      index = (index + 1) & (table_size - 1);
    }

    hashes[index] = hash;
    self->m_Strings[index] = string;
    self->m_RecordCount = record_count + 1;

    return index;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl 0x18(%rdi), %r15d
incl %r15d
movq %r15, %rax
shlq $0x8, %rax
movb 0x14(%rdi), %cl
shrq %cl, %rax
cmpq $0x51, %rax
jb 0x89b3
movq %r14, %rdi
callq 0x89e6
movl 0x10(%r14), %edx
decl %edx
movl %edx, %eax
andl %ebp, %eax
movq (%r14), %rcx
cmpl $0x0, (%rcx,%rax,4)
je 0x89cc
incl %eax
andl %edx, %eax
jmp 0x89c0
movl %ebp, (%rcx,%rax,4)
movq 0x8(%r14), %rcx
movq %rbx, (%rcx,%rax,8)
movl %r15d, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe880
leaq 0x8(%rbx), %r15
leaq 0xc3a0(%rip), %rcx      # 0x16632
movl $0x4000000, %edx        # imm = 0x4000000
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe8d4
callq 0x11fa0
movq %r15, %rdi
movq %rax, %rsi
callq 0xe94b
leaq 0x40(%rbx), %rdi
callq 0xe994
leaq 0x60(%rbx), %rdi
callq 0xe994
leaq 0x80(%rbx), %rdi
callq 0xe994
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 0xc31f(%rip), %rcx      # 0x1664a
movl $0x4000000, %edx        # imm = 0x4000000
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe8d4
leaq 0x150(%rbx), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xf61c
leaq 0x1b8(%rbx), %r14
leaq 0xc2fa(%rip), %rcx      # 0x16655
movl $0x4000000, %edx        # imm = 0x4000000
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe8d4
leaq 0x1f0(%rbx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11610
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_O3/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 0x126b2
leaq 0x1f0(%rbx), %rdi
callq 0x1164e
leaq 0x150(%rbx), %rdi
callq 0xf657
movq 0x100(%rbx), %rsi
testq %rsi, %rsi
je 0xa3f0
leaq 0x100(%rbx), %r14
movq %rbx, %rdi
callq 0xe88a
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0xe8(%rbx), %rsi
testq %rsi, %rsi
je 0xa41a
leaq 0xe8(%rbx), %r14
movq %rbx, %rdi
callq 0xe88a
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x80(%rbx), %rdi
callq 0xe99f
leaq 0x60(%rbx), %rdi
callq 0xe99f
leaq 0x40(%rbx), %rdi
callq 0xe99f
leaq 0x118(%rbx), %rdi
callq 0xe932
leaq 0x1b8(%rbx), %rdi
callq 0xe932
leaq 0x8(%rbx), %rdi
callq 0xe932
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe881
// File: /workspace/github_c_makefile_star2_O3/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 0xfb60
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
je 0xa7c7
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 0xfba8
movl %eax, %ebp
leaq 0x80(%rbx), %rdi
callq 0xe99f
movq 0xa0(%rbx), %rax
movslq 0x78(%rax), %rcx
testq %rcx, %rcx
leaq 0x78(%rcx,%rax), %rdi
cmoveq %rcx, %rdi
testb %bpl, %bpl
je 0xa7c0
movslq 0x74(%rax), %rcx
testq %rcx, %rcx
leaq 0x74(%rcx,%rax), %rsi
cmoveq %rcx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x6054
callq 0x3600
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x121de(%rip), %rax     # 0x1d680
cmpb $0x1, (%rax)
jne 0xb4b5
leaq 0xb287(%rip), %rdi      # 0x16735
xorl %esi, %esi
callq 0xf4a3
movq 0x108(%rbx), %r14
testq %r14, %r14
je 0xb526
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 0xb51b
shlq $0x3, %r13
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
movslq (%r12,%rbp), %rax
addq %rax, %rdi
testq %rax, %rax
cmoveq %rax, %rdi
callq 0x6047
xorb $0x1, %al
movzbl %al, %eax
addl %eax, %ebx
addq $0x8, %rbp
cmpq %rbp, %r13
jne 0xb4f4
addq $0x40, %r15
cmpq %r14, %r15
jne 0xb4d1
jmp 0xb528
xorl %ebx, %ebx
leaq 0xb213(%rip), %rsi      # 0x16742
movl $0x4, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x5d74
leaq 0x4(%rsp), %rdi
callq 0x5a06
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb558
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x5a06
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O3/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 0xe994
movq %r12, %rdi
movq %rbx, %rsi
callq 0xea3b
movq (%r12), %r12
testq %r12, %r12
je 0xb5e5
movl 0x10(%rsp), %r8d
leaq 0xb219(%rip), %rsi      # 0x167c7
movl $0x8, %edi
movq %rbx, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x5d74
movq 0x10(%rsp), %rcx
cmpq $0x83, %rcx
ja 0xb5fd
leaq 0xb21b(%rip), %rsi      # 0x167f0
movl $0x2, %edi
movq %rbx, %rdx
movl $0x84, %r8d
jmp 0xb638
leaq 0xb25e(%rip), %rsi      # 0x1684a
movl $0x8, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5d74
jmp 0xb63f
movl (%r12), %ecx
cmpl $0x6d992313, %ecx       # imm = 0x6D992313
jne 0xb623
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq %r12, (%r14)
movb $0x1, %al
jmp 0xb64b
leaq 0xb1f4(%rip), %rsi      # 0x1681e
movl $0x8, %edi
movq %rbx, %rdx
movl $0x6d992313, %r8d       # imm = 0x6D992313
xorl %eax, %eax
callq 0x5d74
leaq 0x8(%rsp), %rdi
callq 0xe99f
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xd2df
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
shlq $0x4, %r14
addq %rdi, %r14
movq %r14, %rsi
callq 0xd7f8
cmpq %r14, %rax
je 0xd2d5
movq (%rax), %rcx
cmpq (%rbx), %rcx
jne 0xd2d5
movq 0x8(%rbx), %rcx
cmpq %rcx, 0x8(%rax)
je 0xd2d7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe882
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 0xe882
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq 0x20(%rsp), %rdx
callq 0x31b0
testq %rbp, %rbp
je 0xd74c
movq 0x8(%rsp), %rax
decl %eax
xorl %ecx, %ecx
movl (%r15,%rcx,4), %edx
testl %edx, %edx
je 0xd744
movl %edx, %edi
movl %edi, %esi
andl %eax, %esi
movl %esi, %edi
incl %edi
cmpl $0x0, (%r13,%rsi,4)
jne 0xd727
movl %edx, (%r13,%rsi,4)
movq (%r12,%rcx,8), %rdx
movq %rdx, (%r14,%rsi,8)
incq %rcx
cmpq %rbp, %rcx
jne 0xd71d
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0xe88a
movq %rbp, %rdi
movq %r15, %rsi
callq 0xe88a
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_O3/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 0xd932
cmpq $0x1, %rsi
jne 0xd941
movb $0x1, %al
cmpb $0x2e, (%rdi)
jne 0xd988
retq
cmpb $0x2e, (%rdi)
jne 0xd97f
movb $0x1, %al
cmpb $0x2e, 0x1(%rdi)
je 0xd931
jmp 0xd97f
cmpq $0x4, %rsi
jb 0xd979
cmpb $0x2e, (%rdi)
jne 0xd956
cmpl $0x7077732e, -0x4(%rdi,%rsi) # imm = 0x7077732E
je 0xd976
cmpq $0x9, %rsi
jb 0xd97f
movabsq $0x326172646e75742e, %rax # imm = 0x326172646E75742E
xorq (%rdi), %rax
movzbl 0x8(%rdi), %ecx
xorq $0x2e, %rcx
orq %rax, %rcx
jne 0xd97f
movb $0x1, %al
retq
cmpq $0x2, %rsi
jb 0xd988
movb $0x1, %al
cmpb $0x7e, -0x1(%rdi,%rsi)
je 0xd931
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xdbcd
movq %rsi, %r15
leaq 0x50(%r14), %r12
movq %rdx, %rbp
testq %rbx, %rbx
sete %al
cmpq $0x40, %rbp
setae %cl
testb %cl, %al
jne 0xdbac
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 0xdbc8
movq 0x90(%r14), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x131b0
jmp 0xdbc6
movq 0x90(%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x131b0
addq $0x40, %r15
addq $-0x40, %rbp
xorl %ebx, %ebx
testq %rbp, %rbp
jne 0xdb59
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_O3/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 0x1331e
movq %rbx, %rdi
callq 0x3150
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xdb34
movq %r15, %rdi
movq %r14, %rsi
callq 0xdc61
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7(%rsp), %rsi
movb $-0x80, (%rsi)
movq 0x40(%rdi), %xmm1
pshufd $0x44, %xmm1, %xmm0     # xmm0 = xmm1[0,1,0,1]
movdqa %xmm1, %xmm2
movdqa %xmm1, %xmm3
movdqa %xmm1, %xmm4
psrlq $0x8, %xmm4
punpcklqdq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0]
psrlq $0x38, %xmm1
movdqa %xmm0, %xmm5
psrlq $0x30, %xmm5
movsd %xmm1, %xmm5            # xmm5 = xmm1[0],xmm5[1]
psrlq $0x28, %xmm2
movdqa %xmm0, %xmm1
psrlq $0x20, %xmm1
movsd %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1]
psrlq $0x18, %xmm3
psrlq $0x10, %xmm0
movsd %xmm3, %xmm0            # xmm0 = xmm3[0],xmm0[1]
movdqa 0x8def(%rip), %xmm2     # 0x16ac0
pand %xmm2, %xmm4
andpd %xmm2, %xmm0
packuswb %xmm4, %xmm0
andpd %xmm2, %xmm1
andpd %xmm2, %xmm5
packuswb %xmm1, %xmm5
packuswb %xmm0, %xmm5
packuswb %xmm5, %xmm5
leaq 0x8(%rsp), %r15
movq %xmm5, (%r15)
movl $0x1, %edx
callq 0xdb34
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 0x8da8(%rip), %rsi      # 0x16ad0
movq %r14, %rdi
callq 0xdb34
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0xdb34
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1335d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movb (%rsi), %al
testb %al, %al
je 0xddb1
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
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 0xdb34
movb (%rbx), %al
movb %al, 0xf(%rsp)
incq %rbx
testb %al, %al
jne 0xdd72
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movb $0x1, %cl
xorl %r9d, %r9d
leaq 0x8d49(%rip), %rdx      # 0x16b50
xorl %r8d, %r8d
movq (%rsi,%r9,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 0xde18
addq %r10, %r8
movl $0x1, %r9d
testb $0x1, %cl
movl $0x0, %ecx
jne 0xde0a
movb $0x0, 0x20(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xf12e(%rip), %rax      # 0x1cfc0
movq %rax, 0x8(%rsp)
callq 0x5f2a
movq %rax, 0x10(%rsp)
movl $0x1, %eax
movl %eax, 0xf7c4(%rip)      # 0x1d670
movb $0x1, 0xf7c1(%rip)      # 0x1d674
movl %eax, 0xf7bf(%rip)      # 0x1d678
xorl %ecx, %ecx
movb %cl, 0xf7bb(%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 0xdf8c
movq %rax, %r15
leaq 0x438(%rsp), %r14
testq %rax, %rax
je 0xdf42
movl 0x28(%rsp), %eax
cmpl $0xc, %eax
jne 0xdf14
leaq 0x18(%rsp), %rdi
callq 0xe465
jmp 0xdf1c
movl $0xc, 0x28(%rsp)
cmpl $0xa, %eax
je 0xdf5c
movl 0x20(%rsp), %ecx
leaq 0x8e3d(%rip), %rdx      # 0x16d69
leaq 0x8ce1(%rip), %r8       # 0x16c14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
xorl %eax, %eax
callq 0x3560
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31a0
addq $0x3ff, %rbx            # imm = 0x3FF
xorl %r15d, %r15d
movb $0x0, (%rbx)
movq %rsp, %rdi
callq 0x5a30
movq %r15, %rax
addq $0x848, %rsp            # imm = 0x848
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5a30
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O3/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 0xe8bf
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x84af(%rip), %rdi      # 0x16d75
movl %r14d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5a61
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xe9f6
leaq 0xebe5(%rip), %rax      # 0x1d5a0
leaq 0x40(%rax), %rcx
movq %rcx, (%rsp)
addq $0x48, %rax
movq %rax, 0x8(%rsp)
callq 0x5f2a
movq %rax, 0x10(%rsp)
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x31d0
testl %eax, %eax
jne 0xea08
movl 0x10(%rbx), %edi
callq 0x3660
movq %rsp, %rdi
callq 0x5a30
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 0x83a9(%rip), %rdi      # 0x16dc5
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x5a61
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5a30
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O3/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 0xeb4d(%rip), %rax      # 0x1d5a0
leaq 0x30(%rax), %rcx
movq %rcx, 0x8(%rsp)
addq $0x38, %rax
movq %rax, 0x10(%rsp)
callq 0x5f2a
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0xe9a4
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3240
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xeaa1
leaq 0x20(%rsp), %rsi
movl %ebp, %edi
callq 0x35d0
testl %eax, %eax
je 0xeac1
movl %ebp, %edi
callq 0x3660
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x8(%rsp), %rdi
callq 0x5a30
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 0xeaab
jmp 0xea9a
jmp 0xeaf7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a30
movq %rbx, %rdi
callq 0x35e0
// File: /workspace/github_c_makefile_star2_O3/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 0xed62
leal -0x1(%rcx), %edx
movw %dx, 0x6(%rdi)
cmpw %ax, %cx
seta %al
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %rbx
testb $0x1, 0x4(%rsi)
jne 0xee00
movzwl 0x6(%rbx), %r15d
movl 0x4(%rbx), %eax
movzwl 0x8(%r14), %ecx
testl %ecx, %ecx
je 0xede6
movl %eax, %edx
shrl %edx
andl $0x1, %edx
cmpl %edx, %r15d
jle 0xedd0
decl %r15d
jmp 0xede2
testl %r15d, %r15d
movl $0x1, %r15d
jne 0xede2
incw 0x8(%rbx)
xorl %r15d, %r15d
decl %ecx
jne 0xedc6
testb $0x1, %al
je 0xedf0
movw $0x0, 0x8(%rbx)
testl %r15d, %r15d
jle 0xee1a
leal -0x1(%r15), %eax
movzwl 0xa(%rbx,%rax,2), %ebp
jmp 0xee1c
movl $0x28c, %edx            # imm = 0x28C
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3290
xorl %ebp, %ebp
movzwl 0x6(%r14), %eax
testq %rax, %rax
je 0xee30
decl %eax
movzwl 0xa(%r14,%rax,2), %edx
jmp 0xee32
xorl %edx, %edx
movl %ebp, %edi
movl $0x8a, %esi
addq %rbx, %rdi
addq %rsi, %rdi
addq %r14, %rsi
callq 0x3290
movzwl 0x6(%r14), %eax
testq %rax, %rax
je 0xee7a
movslq %r15d, %rcx
leaq (%rbx,%rcx,2), %rcx
addq $0xa, %rcx
xorl %edx, %edx
movzwl 0xa(%r14,%rdx,2), %esi
addw %bp, %si
movw %si, (%rcx,%rdx,2)
incq %rdx
cmpq %rdx, %rax
jne 0xee5e
movzwl 0x6(%r14), %eax
jmp 0xee7c
xorl %eax, %eax
addl %r15d, %eax
movw %ax, 0x6(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xeee0
movzwl 0x4(%r15), %eax
andl $0x3, %eax
movq %rdi, %r13
cmpw $0x1, %ax
jne 0xeee0
leaq 0x1(%rdi), %r13
movb %r8b, (%rdi)
movzwl 0x8(%r15), %eax
testl %eax, %eax
je 0xeefc
movw $0x2e2e, (%r13)         # imm = 0x2E2E
movb %r8b, 0x2(%r13)
addq $0x3, %r13
decl %eax
jne 0xeee9
testl %edx, %edx
jle 0xef2e
movl %edx, %eax
xorl %ecx, %ecx
xorl %esi, %esi
testq %rcx, %rcx
je 0xef19
movzwl 0xa(%r15,%rcx,2), %r12d
subw 0x8(%r15,%rcx,2), %r12w
jmp 0xef1e
movzwl 0xa(%r15), %r12d
addl %esi, %r12d
incq %rcx
movl %r12d, %esi
cmpq %rcx, %rax
jne 0xef06
jmp 0xef31
xorl %r12d, %r12d
cmpl (%rsp), %edx
jg 0xefc0
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 0xef6f
movl %ebx, %ecx
movzwl 0xa(%r15,%rcx,2), %ecx
movl %eax, %eax
subw 0xa(%r15,%rax,2), %cx
jmp 0xef74
movzwl 0xa(%r15), %ecx
movq %r13, %rax
subq %rdi, %rax
movzwl %cx, %ebp
addq %rbp, %rax
cmpq $0x1ff, %rax            # imm = 0x1FF
jge 0xefd4
cmpl %edx, %ebx
jle 0xef97
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 0xef56
movb $0x0, (%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7e24(%rip), %rdi      # 0x16dff
xorl %eax, %eax
callq 0x5a61
nop
// File: /workspace/github_c_makefile_star2_O3/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, 0xe687(%rip)      # 0x1d680
movl %esi, 0xe6a1(%rip)      # 0x1d6a0
leaq 0xe682(%rip), %r14      # 0x1d688
movq %r14, %rdi
callq 0xe880
movq %rbx, %rdi
callq 0x3150
leaq 0x1(%rax), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xe882
movq %rax, 0xe664(%rip)      # 0x1d690
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3290
movslq 0xe65f(%rip), %rax      # 0x1d6a0
shlq $0x3, %rax
leaq (%rax,%rax,8), %rsi
movq %r14, %rdi
callq 0xe882
movq %rax, 0xe640(%rip)      # 0x1d698
cmpl $0x0, 0xe641(%rip)      # 0x1d6a0
jle 0xf0c7
xorl %r12d, %r12d
leaq 0xe61d(%rip), %rbx      # 0x1d688
leaq 0x7dd6(%rip), %r14      # 0x16e48
xorl %r13d, %r13d
movq 0xe61c(%rip), %rbp      # 0x1d698
leaq (%r12,%rbp), %r15
movl $0x100000, %esi         # imm = 0x100000
movq %rbx, %rdi
callq 0xe882
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 0xe8d4
movb $0x0, 0x44(%rbp,%r12)
incq %r13
movslq 0xe5e2(%rip), %rax      # 0x1d6a0
addq $0x48, %r12
cmpq %rax, %r13
jl 0xf075
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/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 0xf325
incq %rdi
movl $0x400, %eax            # imm = 0x400
movabsq $0x400003700, %rcx      # imm = 0x400003700
movzbl %dl, %r8d
cmpb $0x22, %r8b
ja 0xf304
btq %r8, %rcx
jae 0xf304
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 0xf325
incq %rdi
cmpl $0x2, %eax
jg 0xf2c8
jmp 0xf325
cmpl $0x5c, %r8d
je 0xf2d8
leal -0x20(%rdx), %r8d
cmpb $0x5d, %r8b
ja 0xf2f4
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x1, %r10d
movq %rsi, %r9
jmp 0xf2eb
movb $0x0, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0xe350(%rip)      # 0x1d680
jne 0xf45b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0xe359(%rip), %eax      # 0x1d6a0
testl %eax, %eax
jle 0xf384
movl $0x44, %r14d
movq 0xe340(%rip), %rcx      # 0x1d698
xorl %ebx, %ebx
cmpb $0x1, (%rcx,%r14)
jne 0xf375
movl %ebx, %edi
callq 0xf45c
movq 0xe329(%rip), %rcx      # 0x1d698
movl 0xe32b(%rip), %eax      # 0x1d6a0
incq %rbx
movslq %eax, %rdx
addq $0x48, %r14
cmpq %rdx, %rbx
jl 0xf35a
callq 0xf0d6
cmpl $0x0, 0xe310(%rip)      # 0x1d6a0
jle 0xf420
xorl %r13d, %r13d
leaq 0xe2e8(%rip), %rbx      # 0x1d688
leaq 0x7c4b(%rip), %r14      # 0x16ff2
xorl %r15d, %r15d
movq 0xe2e7(%rip), %rbp      # 0x1d698
movq %rbp, %r12
addq %r13, %r12
movl 0x40(%rbp,%r13), %ecx
movsd 0x18(%rbp,%r13), %xmm1
unpcklps 0x69f6(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x69fe(%rip), %xmm1     # 0x15dd0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x7a5a(%rip), %xmm0     # 0x16e40
movl $0x10, %edi
movq %r14, %rsi
movl %r15d, %edx
movb $0x1, %al
callq 0x5d74
movq 0x38(%rbp,%r13), %rsi
movq %rbx, %rdi
callq 0xe88a
movq %r12, %rdi
callq 0xe932
incq %r15
movslq 0xe289(%rip), %rax      # 0x1d6a0
addq $0x48, %r13
cmpq %rax, %r15
jl 0xf3aa
movq 0xe271(%rip), %rsi      # 0x1d698
leaq 0xe25a(%rip), %rbx      # 0x1d688
movq %rbx, %rdi
callq 0xe88a
movq 0xe253(%rip), %rsi      # 0x1d690
movq %rbx, %rdi
callq 0xe88a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe881
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe231(%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 0xf49b
leaq (%rax,%rcx,8), %rax
movq 0x38(%rax), %r14
shlq $0x5, %rbx
callq 0x5f2a
subq -0x20(%r14,%rbx), %rax
movq %rax, -0x18(%r14,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe1e0(%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 0xf4fd
movl %esi, %ecx
leaq 0x7b4a(%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 0x5d74
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 0x5f2a
movq %rax, (%r12,%r15)
movq %rbx, %rdi
movl $0x20, %esi
callq 0x3130
testq %rax, %rax
je 0xf5a4
movq %rax, %r15
movq %rax, %r12
subq %rbx, %r12
leaq 0x1(%r12), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0xe950
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 0xe950
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3290
movb %r12b, (%r14,%rbx)
movq %r14, 0x18(%rbp)
jmp 0xf5e5
movq %rbx, %rdi
callq 0x3150
movq %rax, %r15
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0xe950
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3290
movb $0x0, (%r14,%r15)
movq %r14, 0x10(%rbp)
leaq 0x6db5(%rip), %rax      # 0x16396
movq %rax, 0x18(%rbp)
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/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 0xf649
popq %rax
retq
leaq 0x7a70(%rip), %rdi      # 0x170c0
xorl %eax, %eax
callq 0x5b09