LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0xf6f0
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 0xe882
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x31b0
movq %r12, 0x60(%r14)
movl 0x4(%rbx), %edx
leaq 0x799d(%rip), %rsi      # 0x17076
movl $0x8, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5d74
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xfb91
movl 0x50(%r14), %ebp
movq %rbx, %rdi
callq 0x3430
testl %eax, %eax
jne 0xfb9a
testl %ebp, %ebp
setne %al
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7565(%rip), %rdi      # 0x170fd
jmp 0xfba1
leaq 0x757b(%rip), %rdi      # 0x1711c
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/ScanCache.cpp
// Function: t2::WriteUniqueStringPointer(t2::HashTable<t2::BinaryLocator, 0u>*, t2::BinarySegment*, t2::BinarySegment*, unsigned int, char const*)
static void WriteUniqueStringPointer(HashTable<BinaryLocator, kFlagPathStrings>* atoms, BinarySegment* out_segment, BinarySegment* string_segment, uint32_t hash, const char* filename)
{
  if (const BinaryLocator* l = HashTableLookup(atoms, hash, filename))
  {
    BinarySegmentWritePointer(out_segment, *l);
    return;
  }

  BinaryLocator pos = BinarySegmentPosition(string_segment);
  HashTableInsert(atoms, hash, filename, pos);

  BinarySegmentWritePointer(out_segment, pos);
  BinarySegmentWriteStringData(string_segment, filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl %ecx, %esi
movq %r8, %rdx
callq 0x890c
cmpl $-0x1, %eax
je 0x10465
movq 0x28(%r12), %rcx
testq %rcx, %rcx
je 0x10465
cltq
shlq $0x4, %rax
movl (%rcx,%rax), %esi
movq 0x8(%rcx,%rax), %rdx
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13469
movq %r14, %rdi
callq 0x134b5
movl %eax, %r13d
movq %r14, (%rsp)
movq %r15, %r14
movq %rdx, %r15
movq %r12, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x109b1
movq 0x28(%r12), %rcx
cltq
shlq $0x4, %rax
movl %r13d, (%rcx,%rax)
movq %r15, 0x8(%rcx,%rax)
movq %r14, %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x13469
movq %rbx, %rdi
callq 0x3150
leaq 0x1(%rax), %rdx
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1343d
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/SignalHandler.cpp
// Function: t2::SignalSet(char const*)
void SignalSet(const char* reason)
{
  MutexLock(&s_SignalMutex);

  s_SignalInfo.m_Signalled = true;
  s_SignalInfo.m_Reason    = reason;

  if (ConditionVariable* cvar = s_SignalCond)
    CondBroadcast(cvar);

  MutexUnlock(&s_SignalMutex);

#if defined(TUNDRA_WIN32)
  // Also signal this event - build threads waiting on external programs are stuck in WaitForMultipleObjects()
  // and can't wait for a condition variable at the same time.
  SetEvent(s_SignalHandle);
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xc2b1(%rip), %rdi      # 0x1d6a8
callq 0x34b0
testl %eax, %eax
jne 0x1142e
movq %rbx, 0xc2c9(%rip)      # 0x1d6d0
movq 0xc2ca(%rip), %rdi      # 0x1d6d8
testq %rdi, %rdi
je 0x1141c
callq 0x3110
testl %eax, %eax
jne 0x11440
leaq 0xc285(%rip), %rdi      # 0x1d6a8
callq 0x3250
testl %eax, %eax
jne 0x11437
popq %rbx
retq
leaq 0x4627(%rip), %rdi      # 0x15a5c
jmp 0x11447
leaq 0x463a(%rip), %rdi      # 0x15a78
jmp 0x11447
leaq 0x464f(%rip), %rdi      # 0x15a96
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/SignalHandler.cpp
// Function: t2::SignalHandlerInit()
void SignalHandlerInit()
{
  MutexInit(&s_SignalMutex);

#if defined(TUNDRA_UNIX)
	{
		pthread_t sigthread;
		if (0 != pthread_create(&sigthread, NULL, PosixSignalHandlerThread, NULL))
			CroakErrno("couldn't start signal handler thread");
		pthread_detach(sigthread);
	}
#elif defined(TUNDRA_WIN32)
  s_SignalHandle = CreateEvent(NULL, TRUE, FALSE, NULL);
  SetConsoleCtrlHandler(WindowsSignalHandlerFunc, TRUE);
#else
#error Meh
#endif
}

// Assembly:
pushq %rax
leaq 0xc252(%rip), %rdi      # 0x1d6a8
xorl %esi, %esi
callq 0x34d0
testl %eax, %eax
jne 0x11483
leaq 0x32(%rip), %rdx        # 0x1149a
movq %rsp, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x3610
testl %eax, %eax
jne 0x1148c
movq (%rsp), %rdi
callq 0x3230
popq %rax
retq
leaq 0x4586(%rip), %rdi      # 0x15a10
jmp 0x11493
leaq 0x5cc4(%rip), %rdi      # 0x17157
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/SignalHandler.cpp
// Function: t2::PosixSignalHandlerThread(void*)
static void* PosixSignalHandlerThread(void *arg)
{
  (void)arg; // unused

  int sig, rc;
  sigset_t sigs;
  sigemptyset(&sigs);
  sigaddset(&sigs, SIGINT);
  sigaddset(&sigs, SIGTERM);
  sigaddset(&sigs, SIGQUIT);
  if (0 == (rc = sigwait(&sigs, &sig)))
  {
    const char *reason = "unknown";
    switch (sig)
    {
      case SIGINT:  reason = "SIGINT";  break;
      case SIGTERM: reason = "SIGTERM"; break;
      case SIGQUIT: reason = "SIGQUIT"; break;
    }
    SignalSet(reason);
  }
  else
    CroakErrno("sigwait() failed");

  return nullptr;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x3420
movq %rbx, %rdi
movl $0x2, %esi
callq 0x3530
movq %rbx, %rdi
movl $0xf, %esi
callq 0x3530
movq %rbx, %rdi
movl $0x3, %esi
callq 0x3530
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x30e0
testl %eax, %eax
jne 0x1152c
movl 0xc(%rsp), %eax
cmpl $0xf, %eax
je 0x1150c
cmpl $0x3, %eax
je 0x11503
cmpl $0x2, %eax
jne 0x11515
leaq 0x5c9a(%rip), %rdi      # 0x1719b
jmp 0x1151c
leaq 0x5ca0(%rip), %rdi      # 0x171aa
jmp 0x1151c
leaq 0x5c8f(%rip), %rdi      # 0x171a2
jmp 0x1151c
leaq 0x5c77(%rip), %rdi      # 0x17193
callq 0x113ec
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
leaq 0x5c7f(%rip), %rdi      # 0x171b2
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/SignalHandler.cpp
// Function: t2::SignalBlockThread(bool)
void SignalBlockThread(bool block)
{
	sigset_t sigs;
	sigemptyset(&sigs);
	sigaddset(&sigs, SIGINT);
	sigaddset(&sigs, SIGTERM);
	sigaddset(&sigs, SIGQUIT);
	if  (0 != pthread_sigmask(block ? SIG_BLOCK : SIG_UNBLOCK, &sigs, 0))
		CroakErrno("pthread_sigmask failed");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movl %edi, %ebx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3420
movq %r14, %rdi
movl $0x2, %esi
callq 0x3530
movq %r14, %rdi
movl $0xf, %esi
callq 0x3530
movq %r14, %rdi
movl $0x3, %esi
callq 0x3530
xorb $0x1, %bl
movzbl %bl, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x30b0
testl %eax, %eax
jne 0x11600
addq $0x88, %rsp
popq %rbx
popq %r14
retq
leaq 0x5b75(%rip), %rdi      # 0x1717c
xorl %eax, %eax
callq 0x5b09
nop
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/StatCache.cpp
// Function: t2::StatCacheInit(t2::StatCache*, t2::MemAllocLinear*, t2::MemAllocHeap*)
void StatCacheInit(StatCache* self, MemAllocLinear* allocator, MemAllocHeap* heap)
{
  self->m_Allocator      = allocator;
  self->m_Heap           = heap;
  HashTableInit(&self->m_Files, heap);
  ReadWriteLockInit(&self->m_HashLock);
}

// Assembly:
pushq %rax
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x54(%rdi)
movq %rdx, 0x68(%rdi)
movq $0x0, 0x70(%rdi)
addq $0x10, %rdi
xorl %esi, %esi
callq 0x3260
testl %eax, %eax
jne 0x11640
popq %rax
retq
leaq 0x5a79(%rip), %rdi      # 0x170c0
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/StatCache.cpp
// Function: t2::StatCacheMarkDirty(t2::StatCache*, char const*, unsigned int)
void StatCacheMarkDirty(StatCache* self, const char* path, uint32_t hash)
{
  ReadWriteLockWrite(&self->m_HashLock);

  if (FileInfo* fi = HashTableLookup(&self->m_Files, hash, path))
  {
    fi->m_Flags = FileInfo::kFlagDirty;
  }

  ReadWriteUnlockWrite(&self->m_HashLock);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
movq %rbx, %rdi
callq 0x34f0
testl %eax, %eax
jne 0x116da
leaq 0x48(%r14), %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x890c
cmpl $-0x1, %eax
je 0x116c3
movq 0x70(%r14), %rcx
testq %rcx, %rcx
je 0x116c3
cltq
leaq (%rax,%rax,2), %rax
movl $0x40000000, (%rcx,%rax,8) # imm = 0x40000000
movq %rbx, %rdi
callq 0x3430
testl %eax, %eax
jne 0x116e3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5a1c(%rip), %rdi      # 0x170fd
jmp 0x116ea
leaq 0x5a32(%rip), %rdi      # 0x1711c
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/StatCache.cpp
// Function: t2::StatCacheStat(t2::StatCache*, char const*, unsigned int)
FileInfo StatCacheStat(StatCache* self, const char* path, uint32_t hash)
{
  ReadWriteLockRead(&self->m_HashLock);

  const FileInfo* fi = HashTableLookup(&self->m_Files, hash, path);

  if (fi != nullptr && 0 == (fi->m_Flags & FileInfo::kFlagDirty))
  {
    FileInfo result = *fi;
    ReadWriteUnlockRead(&self->m_HashLock);
    return result;
  }

  ReadWriteUnlockRead(&self->m_HashLock);

  AtomicIncrement(&g_Stats.m_StatCacheMisses);
  FileInfo file_info = GetFileInfo(path);

  // There's a natural race condition here. Some other thread might come in,
  // stat the file and insert it before us. We just let that happen. The DAG
  // guarantees that we won't be writing to files that are being stat'd here,
  // so the result of these races is benign.
  StatCacheInsert(self, hash, path, file_info);
  return file_info;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsi), %r14
movq %r14, %rdi
callq 0x32f0
testl %eax, %eax
jne 0x1181a
leaq 0x48(%r15), %r13
movq %r13, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x890c
cmpl $-0x1, %eax
je 0x11760
movq 0x70(%r15), %rcx
testq %rcx, %rcx
je 0x11760
cltq
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
testb $0x40, 0x3(%rax)
jne 0x11760
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movups (%rax), %xmm0
movups %xmm0, (%rbx)
jmp 0x117fc
movq %r14, %rdi
callq 0x3430
testl %eax, %eax
jne 0x11823
movq %r13, 0x10(%rsp)
movl %ebp, 0xc(%rsp)
leaq 0xbe20(%rip), %rax      # 0x1d5a0
lock
incl 0x74(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd860
movq %r14, %rdi
callq 0x34f0
testl %eax, %eax
jne 0x1181a
movq (%r15), %rbp
movq %r12, %rdi
callq 0x3150
movq %rax, %r13
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %rbp, %rdi
callq 0xe950
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3290
movb $0x0, (%rbp,%r13)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movq %rbp, %rdx
callq 0x1186f
movq 0x70(%r15), %rcx
cltq
leaq (%rax,%rax,2), %rax
movups (%rbx), %xmm0
movups %xmm0, (%rcx,%rax,8)
movq 0x10(%rbx), %rdx
movq %rdx, 0x10(%rcx,%rax,8)
movq %r14, %rdi
callq 0x3430
testl %eax, %eax
jne 0x11823
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58dc(%rip), %rdi      # 0x170fd
jmp 0x1182a
leaq 0x58f2(%rip), %rdi      # 0x1711c
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/ExecUnix.cpp
// Function: t2::SetFdNonBlocking(int)
static void SetFdNonBlocking(int fd)
{
	int flags;

	flags = fcntl(fd, F_GETFL);
	flags |= O_NONBLOCK;
	if (-1 == fcntl(fd, F_SETFL, flags))
		CroakErrno("couldn't unblock fd %d", fd);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x3, %esi
xorl %eax, %eax
callq 0x31e0
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x31e0
cmpl $-0x1, %eax
je 0x124ab
popq %rbx
retq
leaq 0x4e1d(%rip), %rdi      # 0x172cf
movl %ebx, %esi
xorl %eax, %eax
callq 0x5b09
nop
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DigestCache.cpp
// Function: t2::DigestCacheInit(t2::DigestCache*, unsigned long)
void DigestCacheInit(DigestCache* self, size_t heap_size)
{
  ReadWriteLockInit(&self->m_Lock);

  self->m_State = nullptr;

  HeapInit(&self->m_Heap);
  LinearAllocInit(&self->m_Allocator, &self->m_Heap, heap_size / 2, "digest allocator");
  MmapFileInit(&self->m_StateFile);
  HashTableInit(&self->m_Table, &self->m_Heap);

  self->m_AccessTime = time(nullptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
callq 0x3260
testl %eax, %eax
jne 0x12546
xorl %r12d, %r12d
movq %r12, 0x38(%rbx)
leaq 0x40(%rbx), %r15
movq %r15, %rdi
callq 0xe880
leaq 0x48(%rbx), %rdi
shrq %r14
leaq 0x4df0(%rip), %rcx      # 0x172e6
movq %r15, %rsi
movq %r14, %rdx
callq 0xe8d4
leaq 0x80(%rbx), %rdi
callq 0xe994
xorps %xmm0, %xmm0
movups %xmm0, 0xac(%rbx)
movups %xmm0, 0xa0(%rbx)
movq %r15, 0xc0(%rbx)
movq %r12, 0xc8(%rbx)
xorl %edi, %edi
callq 0x3300
movq %rax, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4b73(%rip), %rdi      # 0x170c0
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DigestCache.cpp
// Function: t2::DigestCacheOpen(t2::DigestCache*, char const*)
void DigestCacheOpen(DigestCache* self, const char* filename)
{
  MmapFileMap(&self->m_StateFile, filename);
  if (MmapFileValid(&self->m_StateFile))
  {
    const DigestCacheState* state = (const DigestCacheState*) self->m_StateFile.m_Address;
    if (DigestCacheState::MagicNumber == state->m_MagicNumber)
    {
      const uint64_t time_now = time(nullptr);

      // Throw out records that haven't been accessed in a week.
      const uint64_t cutoff_time = time_now - 7 * 24 * 60 * 60;

      self->m_State = state;

      //HashTablePrepareBulkInsert(&self->m_Table, state->m_Records.GetCount());

      for (const FrozenDigestRecord& record : state->m_Records)
      {
        if (record.m_AccessTime < cutoff_time)
          continue;

        DigestCacheRecord r;
        r.m_ContentDigest = record.m_ContentDigest;
        r.m_Timestamp     = record.m_Timestamp;
        r.m_AccessTime    = record.m_AccessTime;
        HashTableInsert(&self->m_Table, record.m_FilenameHash, record.m_Filename.Get(), r);
      }
      Log(kDebug, "digest cache initialized -- %d entries", state->m_Records.GetCount());
    }
    else
    {
      MmapFileUnmap(&self->m_StateFile);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x80(%rdi), %r14
movq %r14, %rdi
callq 0xea3b
movq 0x80(%rbx), %r12
testq %r12, %r12
je 0x1268d
cmpl $0x6a683db8, (%r12)     # imm = 0x6A683DB8
jne 0x1269c
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x3300
movq %rax, %r14
movq %r12, 0x38(%rbx)
movslq 0x8(%r12), %rax
testq %rax, %rax
leaq 0x8(%rax,%r12), %r13
cmoveq %rax, %r13
movslq 0x4(%r12), %rax
testq %rax, %rax
je 0x12669
movq %r12, (%rsp)
addq $-0x93a80, %r14         # imm = 0xFFF6C580
movq %rbx, 0x18(%rsp)
leaq 0xa0(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x24(%r13), %rcx
movq %rcx, 0x8(%rsp)
shlq $0x4, %rax
leaq (%rax,%rax,2), %r12
xorl %r15d, %r15d
movq 0x8(%r13,%r15), %rbp
cmpq %r14, %rbp
jb 0x12658
movups 0x14(%r13,%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
movq (%r13,%r15), %rbx
movl 0x10(%r13,%r15), %esi
movslq 0x24(%r13,%r15), %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%r15), %rdx
addq %rax, %rdx
testq %rax, %rax
cmoveq %rax, %rdx
movq 0x10(%rsp), %rdi
callq 0x12b91
movq 0x18(%rsp), %rcx
movq 0xc8(%rcx), %rcx
cltq
shlq $0x5, %rax
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rcx,%rax)
movq %rbx, 0x10(%rcx,%rax)
movq %rbp, 0x18(%rcx,%rax)
addq $0x30, %r15
cmpq %r15, %r12
jne 0x125f2
movq (%rsp), %rax
movl 0x4(%rax), %r15d
leaq 0x4c87(%rip), %rsi      # 0x172f7
movl $0x8, %edi
movl %r15d, %edx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5d74
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe9a4
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DigestCache.cpp
// Function: t2::DigestCacheDestroy(t2::DigestCache*)
void DigestCacheDestroy(DigestCache* self)
{
  HashTableDestroy(&self->m_Table);
  MmapFileDestroy(&self->m_StateFile);
  LinearAllocDestroy(&self->m_Allocator);
  HeapDestroy(&self->m_Heap);
  ReadWriteLockDestroy(&self->m_Lock);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0xa0, %rdi
callq 0x12b53
leaq 0x80(%rbx), %rdi
callq 0xe99f
leaq 0x48(%rbx), %rdi
callq 0xe932
leaq 0x40(%rbx), %rdi
callq 0xe881
movq %rbx, %rdi
callq 0x35c0
testl %eax, %eax
jne 0x126ee
popq %rbx
retq
leaq 0x49e8(%rip), %rdi      # 0x170dd
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DigestCache.cpp
// Function: t2::DigestCacheGet(t2::DigestCache*, char const*, unsigned int, unsigned long, t2::HashDigest*)
bool DigestCacheGet(DigestCache* self, const char* filename, uint32_t hash, uint64_t timestamp, HashDigest* digest_out)
{
  bool result = false;

  ReadWriteLockRead(&self->m_Lock);

  if (DigestCacheRecord* r = (DigestCacheRecord*) HashTableLookup(&self->m_Table, hash, filename))
  {
    if (r->m_Timestamp == timestamp)
    {
      // Technically violates r/w lock - doesn't matter
      r->m_AccessTime = self->m_AccessTime;
      *digest_out     = r->m_ContentDigest;
      result          = true;
    }
  }

  ReadWriteUnlockRead(&self->m_Lock);

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
callq 0x32f0
testl %eax, %eax
jne 0x12a15
leaq 0xa0(%rbx), %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x890c
cmpl $-0x1, %eax
je 0x129fc
movq 0xc8(%rbx), %rcx
testq %rcx, %rcx
je 0x129fc
cltq
shlq $0x5, %rax
addq %rax, %rcx
cmpq %r15, 0x10(%rcx)
jne 0x129fc
movq 0xd0(%rbx), %rax
movq %rax, 0x18(%rcx)
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movb $0x1, %bpl
jmp 0x129fe
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x3430
testl %eax, %eax
jne 0x12a1e
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46e1(%rip), %rdi      # 0x170fd
jmp 0x12a25
leaq 0x46f7(%rip), %rdi      # 0x1711c
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/DigestCache.cpp
// Function: t2::DigestCacheSet(t2::DigestCache*, char const*, unsigned int, unsigned long, t2::HashDigest const&)
void DigestCacheSet(DigestCache* self, const char* filename, uint32_t hash, uint64_t timestamp, const HashDigest& digest)
{
  ReadWriteLockWrite(&self->m_Lock);

  DigestCacheRecord* r;

  if (nullptr != (r = (DigestCacheRecord*) HashTableLookup(&self->m_Table, hash, filename)))
  {
    r->m_Timestamp     = timestamp;
    r->m_ContentDigest = digest;
    r->m_AccessTime    = self->m_AccessTime;
  }
  else
  {
    DigestCacheRecord r;
    r.m_ContentDigest = digest;
    r.m_Timestamp     = timestamp;
    r.m_AccessTime    = self->m_AccessTime;
    HashTableInsert(&self->m_Table, hash, StrDup(&self->m_Allocator, filename), r);
  }

  ReadWriteUnlockWrite(&self->m_Lock);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x34f0
testl %eax, %eax
jne 0x12b3c
leaq 0xa0(%rbx), %r12
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x890c
cmpl $-0x1, %eax
je 0x12a9a
movq 0xc8(%rbx), %rcx
testq %rcx, %rcx
je 0x12a9a
cltq
shlq $0x5, %rax
movq %r14, 0x10(%rcx,%rax)
movups (%r13), %xmm0
movups %xmm0, (%rcx,%rax)
movq 0xd0(%rbx), %rdx
jmp 0x12b1c
movups (%r13), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0xd0(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x48(%rbx), %r13
movq %r15, %rdi
callq 0x3150
movq %r14, (%rsp)
movq %rax, %r14
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %r13, %rdi
callq 0xe950
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3290
movb $0x0, (%r13,%r14)
movq %r12, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x12b91
movq 0xc8(%rbx), %rcx
cltq
shlq $0x5, %rax
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rcx,%rax)
movq (%rsp), %rdx
movq %rdx, 0x10(%rcx,%rax)
movq 0x8(%rsp), %rdx
movq %rdx, 0x18(%rcx,%rax)
movq %rbx, %rdi
callq 0x3430
testl %eax, %eax
jne 0x12b45
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x45ba(%rip), %rdi      # 0x170fd
jmp 0x12b4c
leaq 0x45d0(%rip), %rdi      # 0x1711c
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/FileSign.cpp
// Function: t2::CalculateGlobSignatureFor(char const*, t2::MemAllocHeap*, t2::MemAllocLinear*)::IterContext::Callback(void*, t2::FileInfo const&, char const*)
static void Callback(void* user_data, const FileInfo& info, const char* path)
      {
        IterContext* self = (IterContext*) user_data;
        char* data = StrDup(self->m_Allocator, path);
        Buffer<const char*>* target = info.IsDirectory() ? &self->m_Dirs : &self->m_Files;
        BufferAppendOne(target, self->m_Heap, data);
      }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %r12
movq %rdx, %rdi
callq 0x3150
movq %rax, %r13
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %r12, %rdi
callq 0xe950
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3290
movb $0x0, (%r12,%r13)
leaq 0x10(%rbx), %rax
testb $0x8, (%r15)
leaq 0x28(%rbx), %rdi
cmovneq %rax, %rdi
movq 0x8(%rbx), %rsi
movl $0x1, %edx
callq 0x11ec7
movq %r12, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/HashFast.cpp
// Function: t2::HashInitImpl(t2::HashStateImpl*)
void HashInitImpl(HashStateImpl* self)
{
  uint32_t seeds[4] = { 0x89caf13a, 0x179fa534, 0x5199afcc, 0xef901315 };

  for (int i = 0; i < 4; ++i)
  {
    uint32_t seed = seeds[i];
    self->m_V[i][0] = seed + kPrime32_1 + kPrime32_2;
    self->m_V[i][1] = seed + kPrime32_2;
    self->m_V[i][2] = seed;
    self->m_V[i][3] = seed - kPrime32_1;
  }
}

// Assembly:
xorl %eax, %eax
leaq 0x4049(%rip), %rcx      # 0x17370
movq 0x4021(%rip), %xmm0     # 0x17350
movl (%rax,%rcx), %edx
movd %edx, %xmm1
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
paddd %xmm0, %xmm1
movq %xmm1, (%rdi,%rax,4)
movl %edx, 0x8(%rdi,%rax,4)
addl $0x61c8864f, %edx       # imm = 0x61C8864F
movl %edx, 0xc(%rdi,%rax,4)
addq $0x4, %rax
cmpq $0x10, %rax
jne 0x1332f
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/HashFast.cpp
// Function: t2::HashFinalizeImpl(t2::HashStateImpl*, t2::HashDigest*)
void HashFinalizeImpl(HashStateImpl* state, HashDigest* digest)
{
  for (int v = 0; v < 4; ++v)
  {
    uint32_t v0 = state->m_V[v][0];
    uint32_t v1 = state->m_V[v][1];
    uint32_t v2 = state->m_V[v][2];
    uint32_t v3 = state->m_V[v][3];

    uint32_t h32 = RotateLeft(v0, 1) + RotateLeft(v1, 7) + RotateLeft(v2, 12) + RotateLeft(v3, 18);

    h32 ^= h32 >> 15;
    h32 *= kPrime32_2;
    h32 ^= h32 >> 13;
    h32 *= kPrime32_3;
    h32 ^= h32 >> 16;

    digest->m_Words32[v] = h32;
  }
}

// Assembly:
xorl %eax, %eax
movdqa 0x3ff9(%rip), %xmm0     # 0x17360
pshufd $0xf5, %xmm0, %xmm1     # xmm1 = xmm0[1,1,3,3]
movdqa (%rdi,%rax,4), %xmm2
pshufd $0xf5, %xmm2, %xmm3     # xmm3 = xmm2[1,1,3,3]
pmuludq %xmm0, %xmm2
pshufd $0xed, %xmm2, %xmm4     # xmm4 = xmm2[1,3,2,3]
pmuludq %xmm1, %xmm3
pshufd $0xed, %xmm3, %xmm5     # xmm5 = xmm3[1,3,2,3]
punpckldq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
pshufd $0xe8, %xmm2, %xmm2     # xmm2 = xmm2[0,2,2,3]
pshufd $0xe8, %xmm3, %xmm3     # xmm3 = xmm3[0,2,2,3]
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
por %xmm4, %xmm2
pshufd $0xee, %xmm2, %xmm3     # xmm3 = xmm2[2,3,2,3]
paddd %xmm2, %xmm3
pshufd $0x55, %xmm3, %xmm2     # xmm2 = xmm3[1,1,1,1]
paddd %xmm3, %xmm2
movd %xmm2, %ecx
movl %ecx, %edx
shrl $0xf, %edx
xorl %ecx, %edx
imull $0x85ebca77, %edx, %ecx # imm = 0x85EBCA77
movl %ecx, %edx
shrl $0xd, %edx
xorl %ecx, %edx
imull $0xc2b2ae3d, %edx, %ecx # imm = 0xC2B2AE3D
movl %ecx, %edx
shrl $0x10, %edx
xorl %ecx, %edx
movl %edx, (%rsi,%rax)
addq $0x4, %rax
cmpq $0x10, %rax
jne 0x1336c
retq
nop
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/BinaryWriter.cpp
// Function: t2::BinarySegmentAlign(t2::BinarySegment*, unsigned long)
void BinarySegmentAlign(BinarySegment* self, size_t alignment)
{
  size_t offset  = self->m_Bytes.m_Size;
  size_t aligned = (offset + alignment - 1) & ~(alignment - 1);
  size_t delta   = aligned - offset;

  while (delta--)
  {
    BufferAppendOne(&self->m_Bytes, self->m_Heap, 0xfe);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x20(%rdi), %r15
leaq (%rsi,%r15), %rax
decq %rax
negq %rsi
andq %rax, %rsi
cmpq %r15, %rsi
je 0x13427
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
subq %rsi, %r15
movq 0x10(%rbx), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x13765
movb $-0x2, (%rax)
incq %r15
jne 0x1340e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/BinaryWriter.cpp
// Function: t2::BinarySegmentWritePointer(t2::BinarySegment*, t2::BinaryLocator)
void BinarySegmentWritePointer(BinarySegment* seg, BinaryLocator locator)
{
  BinaryFixup* fixup = BufferAlloc(&seg->m_Fixups, seg->m_Heap, 1);
  fixup->m_PointerOffset = seg->m_Bytes.m_Size;
  fixup->m_Target        = locator;

  // Write dummy value to be fixed up later
  BinarySegmentWriteUint32(seg, 0x7eeeeeee);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
addq $0x30, %rdi
movq 0x10(%r14), %rsi
movl $0x1, %edx
callq 0x137c6
movq 0x20(%r14), %rcx
movq %rcx, (%rax)
movl %ebp, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x10(%r14), %rsi
addq $0x18, %r14
movl $0x4, %edx
movq %r14, %rdi
callq 0x13765
movl $0x7eeeeeee, (%rax)     # imm = 0x7EEEEEEE
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/BinaryWriter.cpp
// Function: t2::BinaryWriterDestroy(t2::BinaryWriter*)
void BinaryWriterDestroy(BinaryWriter* self)
{
  for (BinarySegment* seg : self->m_Segments)
  {
    BinarySegmentDestroy(seg);
    HeapFree(self->m_Heap, seg);
  }

  BufferDestroy(&self->m_Segments, self->m_Heap);
  self->m_Heap = nullptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r13
testq %r13, %r13
je 0x13565
movq %r15, (%rsp)
shlq $0x3, %r13
xorl %ebp, %ebp
movq (%r14,%rbp), %r15
movq 0x30(%r15), %rsi
testq %rsi, %rsi
je 0x13523
leaq 0x30(%r15), %r12
movq 0x10(%r15), %rdi
callq 0xe88a
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x1354a
leaq 0x18(%r15), %r12
movq 0x10(%r15), %rdi
callq 0xe88a
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movq (%rbx), %rdi
movq %r15, %rsi
callq 0xe88a
addq $0x8, %rbp
cmpq %rbp, %r13
jne 0x134f8
movq (%rsp), %r15
movq (%r15), %r14
testq %r14, %r14
je 0x13584
movq (%rbx), %rdi
movq %r14, %rsi
callq 0xe88a
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movq $0x0, (%rbx)
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/BinaryWriter.cpp
// Function: t2::BinaryWriterFlush(t2::BinaryWriter*, char const*)
bool BinaryWriterFlush(BinaryWriter* self, const char* out_fn)
{
  if (!BinaryWriterFinalize(self))
    return false;

  FILE* f = fopen(out_fn, "wb");
  if (!f)
    return false;
  
  bool success = true;

  const size_t seg_count = self->m_Segments.m_Size;
  BinarySegment** segs = self->m_Segments.m_Storage;

  // Align all segments to 16 bytes
  for (size_t i = 0; success && i < seg_count; ++i)
  {
    success = BinarySegmentWrite(segs[i], f);
  }

  fclose(f);
  return success;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0x1364e
movq 0x8(%rbx), %r12
xorl %r13d, %r13d
movq (%r12,%r13,8), %rdi
movl $0x10, %esi
callq 0x133e9
incq %r13
cmpq %r13, %r15
jne 0x135bd
xorl %eax, %eax
xorl %ecx, %ecx
movq (%r12,%rax,8), %rdx
movq %rcx, 0x8(%rdx)
addq 0x20(%rdx), %rcx
incq %rax
cmpq %rax, %r15
jne 0x135d7
xorl %eax, %eax
movq (%r12,%rax,8), %rcx
movq 0x38(%rcx), %rdi
testq %rdi, %rdi
je 0x13646
movq 0x30(%rcx), %rdx
movq 0x8(%rcx), %rsi
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
xorl %r8d, %r8d
movslq 0x8(%rdx,%r8), %r9
movq (%r12,%r9,8), %r9
movq 0x8(%r9), %r9
movq (%rdx,%r8), %r10
subq %rsi, %r9
subq %r10, %r9
addq 0x10(%rdx,%r8), %r9
movslq %r9d, %r11
cmpq %r9, %r11
jne 0x136c5
movq 0x18(%rcx), %r11
movl %r9d, (%r11,%r10)
addq $0x18, %r8
cmpq %r8, %rdi
jne 0x1360d
incq %rax
cmpq %r15, %rax
jne 0x135ed
leaq 0x3d40(%rip), %rsi      # 0x17395
movq %r14, %rdi
callq 0x33c0
testq %rax, %rax
je 0x136ab
movq %rax, %r14
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x136af
movq 0x8(%rbx), %r12
movl $0x1, %r13d
movq -0x8(%r12,%r13,8), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rax), %rbx
movl $0x1, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x3650
cmpq %rbx, %rax
sete %bl
jne 0x136b1
leaq 0x1(%r13), %rax
cmpq %r15, %r13
movq %rax, %r13
jb 0x13678
jmp 0x136b1
xorl %ebx, %ebx
jmp 0x136b9
movb $0x1, %bl
movq %r14, %rdi
callq 0x3340
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3ccc(%rip), %rdi      # 0x17398
xorl %eax, %eax
callq 0x5a61
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/BinaryWriter.cpp
// Function: t2::BinaryWriterAddSegment(t2::BinaryWriter*)
BinarySegment* BinaryWriterAddSegment(BinaryWriter* self)
{
  BinarySegment* seg = (BinarySegment*) HeapAllocate(self->m_Heap, sizeof(BinarySegment));
  BinarySegmentInit(seg, (int) self->m_Segments.m_Size, self->m_Heap);
  BufferAppendOne(&self->m_Segments, self->m_Heap, seg);
  return seg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movl $0x48, %esi
callq 0xe882
movq %rax, %rbx
leaq 0x8(%r14), %r15
movl 0x10(%r14), %eax
movq (%r14), %r12
movl %eax, (%rbx)
movq $-0x1, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movl $0x20000, %esi          # imm = 0x20000
movq %r12, %rdi
callq 0xe882
movq %rax, 0x18(%rbx)
xorl %r13d, %r13d
movq %r13, 0x20(%rbx)
movq $0x20000, 0x28(%rbx)    # imm = 0x20000
movl $0x18000, %esi          # imm = 0x18000
movq %r12, %rdi
callq 0xe882
movq %rax, 0x30(%rbx)
movq %r13, 0x38(%rbx)
movq $0x1000, 0x40(%rbx)     # imm = 0x1000
movq (%r14), %rsi
movl $0x1, %edx
movq %r15, %rdi
callq 0x13835
movq %rbx, (%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/IncludeScanner.cpp
// Function: t2::ScanIncludesCpp(char*, t2::MemAllocLinear*)
IncludeData*
ScanIncludesCpp(char* buffer, MemAllocLinear* allocator)
{
  IncludeDataList list;

  char *linep = buffer;

  while (linep)
  {
    char *line = linep;
    linep = GetNextLine(linep);

    if (IncludeData* d = ScanCppLine(line, allocator))
    {
      list.Add(d);
    }
  }

  return list.m_Head;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
testq %rdi, %rdi
je 0x13a4b
movq %rdi, %r15
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
movq %rbp, (%rsp)
movq %r15, %rbx
movq %r15, %rdi
movl $0xa, %esi
callq 0x3130
testq %rax, %rax
je 0x138ea
movq %rax, %r15
movb $0x0, (%rax)
incq %r15
jmp 0x138ed
xorl %r15d, %r15d
leaq -0x1(%rbx), %rbp
leaq 0x8(%rbx), %rcx
addq $0xa, %rbx
movq %rcx, %r13
movq %rbx, %r12
movb 0x1(%rbp), %r14b
incq %rbp
movsbl %r14b, %edi
callq 0x3070
leaq 0x1(%r13), %rcx
incq %rbx
testl %eax, %eax
jne 0x138f9
cmpb $0x23, %r14b
jne 0x13953
movl $0x9, %r14d
movsbl -0x7(%r13), %edi
callq 0x3070
incq %r13
incq %r12
testl %eax, %eax
jne 0x13926
leaq -0x8(%r13), %rsi
movl $0x7, %edx
leaq 0x3a69(%rip), %rdi      # 0x173b3
callq 0x3170
testl %eax, %eax
je 0x13965
movq (%rsp), %rbp
testq %r15, %r15
jne 0x138c6
jmp 0x13a54
movsbl -0x1(%r13), %edi
callq 0x3070
testl %eax, %eax
je 0x13953
movsbl (%r13), %edi
callq 0x3070
incq %r13
testl %eax, %eax
jne 0x13973
movl $0x20, %esi
movl $0x8, %edx
movq 0x10(%rsp), %rdi
callq 0xe950
movq %rax, %rbp
movzbl -0x1(%r13), %eax
cmpl $0x3c, %eax
je 0x139b3
cmpl $0x22, %eax
jne 0x13953
movl $0x22, %eax
xorl %edi, %edi
jmp 0x139bb
movl $0x3e, %eax
movb $0x1, %dil
movq $-0x1, %rbx
movq %r13, %rcx
movsbl (%rcx), %esi
incq %rcx
xorl %edx, %edx
testl %esi, %esi
sete %dl
cmpl %esi, %eax
cmovel %r14d, %edx
incq %rbx
testl %edx, %edx
je 0x139c5
cmpl $0x9, %edx
jne 0x13953
movq %rbx, 0x8(%rbp)
leaq 0x1(%rbx), %rsi
movl $0x1, %edx
movl %edi, %r14d
movq 0x10(%rsp), %rdi
callq 0xe950
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3290
movb $0x0, (%r12,%rbx)
movq %r12, (%rbp)
movb %r14b, 0x10(%rbp)
movb $0x1, 0x11(%rbp)
movq $0x0, 0x18(%rbp)
cmpq $0x0, 0x8(%rsp)
je 0x13a41
movq (%rsp), %rax
movq %rbp, 0x18(%rax)
jmp 0x13957
movq %rbp, 0x8(%rsp)
jmp 0x13957
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/TerminalIo.cpp
// Function: t2::TerminalIoInit()
void TerminalIoInit(void)
{
	int i;
	for (i = 0; i < kLineBufCount; ++i)
	{
		s_FreeLinebufs[i] = &s_Linebufs[i];
		s_Linebufs[i].m_Data = &s_BufferData[i][0];
		s_Linebufs[i].m_Data = &s_BufferData[i][0];
	}
	s_FreeLinebufCount = kLineBufCount;
	s_QueuedLinebufCount = 0;


  MutexInit(&s_LineLock);
  CondInit(&s_CanPrint);
}

// Assembly:
pushq %rax
leaq 0xa1b0(%rip), %rax      # 0x1dee0
leaq 0x99a9(%rip), %rcx      # 0x1d6e0
xorl %edx, %edx
leaq 0x9fa0(%rip), %rsi      # 0x1dce0
movq %rcx, (%rdx,%rsi)
movq %rax, 0x10(%rcx)
addq $0x2000, %rax           # imm = 0x2000
addq $0x8, %rdx
addq $0x18, %rcx
cmpq $0x200, %rdx            # imm = 0x200
jne 0x13d40
movl $0x40, 0x8a177(%rip)    # 0x9dee0
movl $0x0, 0x8a171(%rip)     # 0x9dee4
leaq 0x8a16e(%rip), %rdi     # 0x9dee8
xorl %esi, %esi
callq 0x34d0
testl %eax, %eax
jne 0x13d99
leaq 0x8a184(%rip), %rdi     # 0x9df10
xorl %esi, %esi
callq 0x33e0
testl %eax, %eax
jne 0x13da2
popq %rax
retq
leaq 0x1c70(%rip), %rdi      # 0x15a10
jmp 0x13da9
leaq 0x1c83(%rip), %rdi      # 0x15a2c
xorl %eax, %eax
callq 0x5b09
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/TerminalIo.cpp
// Function: t2::TerminalIoJobExit(int)
void TerminalIoJobExit(int job_id)
{
	/* Find any queued buffers for this job and flush them. */
	MutexLock(&s_LineLock);

	TTY_PRINTF(("exit job %d\n", job_id));

	if (job_id != s_PrintingJobIndex) {
		/* Wait until we can grab the TTY */
		while (-1 != s_PrintingJobIndex) {
			CondWait(&s_CanPrint, &s_LineLock);
		}
	}

	s_PrintingJobIndex = job_id;

	FlushOutputQueue(job_id);

	s_PrintingJobIndex = -1;

	MutexUnlock(&s_LineLock);

	CondBroadcast(&s_CanPrint);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x89d8d(%rip), %rdi     # 0x9dee8
callq 0x34b0
testl %eax, %eax
jne 0x141ee
movl 0x920a(%rip), %eax      # 0x1d378
cmpl %ebx, %eax
sete %cl
cmpl $-0x1, %eax
sete %al
orb %cl, %al
jne 0x141a3
leaq 0x89d8c(%rip), %r14     # 0x9df10
leaq 0x89d5d(%rip), %r15     # 0x9dee8
movq %r14, %rdi
movq %r15, %rsi
callq 0x3520
testl %eax, %eax
jne 0x141e0
cmpl $-0x1, 0x91d7(%rip)     # 0x1d378
jne 0x1418b
movl %ebx, 0x91cf(%rip)      # 0x1d378
movl %ebx, %edi
callq 0x14000
movl $0xffffffff, 0x91be(%rip) # imm = 0xFFFFFFFF
leaq 0x89d27(%rip), %rdi     # 0x9dee8
callq 0x3250
testl %eax, %eax
jne 0x141f7
leaq 0x89d3f(%rip), %rdi     # 0x9df10
callq 0x3110
testl %eax, %eax
jne 0x14200
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1b96(%rip), %rdi      # 0x15d7d
xorl %eax, %eax
callq 0x5b09
leaq 0x1867(%rip), %rdi      # 0x15a5c
jmp 0x141e7
leaq 0x187a(%rip), %rdi      # 0x15a78
jmp 0x141e7
leaq 0x188f(%rip), %rdi      # 0x15a96
jmp 0x141e7
// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/src/TerminalIo.cpp
// Function: t2::TerminalIoPrintf(int, int, char const*, ...)
void TerminalIoPrintf(int job_id, int sort_key, const char *format, ...)
{
	char buffer[16384];
	va_list a;
	va_start(a, format);
	vsnprintf(buffer, sizeof(buffer), format, a);
	buffer[sizeof(buffer)-1] = '\0';
	TerminalIoEmit(job_id, 0, sort_key, buffer, (int) strlen(buffer));
	va_end(a);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40d0, %rsp           # imm = 0x40D0
movl %esi, %ebx
movl %edi, %ebp
leaq 0x20(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x14264
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0x40f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r14
movl $0x4000, %esi           # imm = 0x4000
movq %r14, %rdi
callq 0x3200
movb $0x0, 0x3fff(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebp, %edi
xorl %esi, %esi
movl %ebx, %edx
movq %r14, %rcx
movl %eax, %r8d
callq 0x13dea
addq $0x40d0, %rsp           # imm = 0x40D0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ToniWestbrook[P]paladin/main.c
// Function: renderMainUsage
int renderMainUsage() {
	fprintf(stderr, "\n");
	fprintf(stderr, "Program: PALADIN (Protein Alignment and Detection Interface)\n\n");
	fprintf(stderr, "Usage:   paladin <command> [options]\n\n");
	fprintf(stderr, "Command: index         index NT or AA sequences in FASTA format\n");
	fprintf(stderr, "         prepare       download and index protein reference\n");
	fprintf(stderr, "         align         align single end read sequences\n");
	fprintf(stderr, "\n");
	fprintf(stderr, "         shm           manage indices in shared memory\n");
	fprintf(stderr, "         fa2pac        convert FASTA to PAC format\n");
	fprintf(stderr, "         pac2bwt       generate BWT from PAC\n");
	fprintf(stderr, "         bwtupdate     update .bwt to the new format\n");
	fprintf(stderr, "         bwt2sa        generate SA from BWT and Occ\n\n");
	fprintf(stderr, "         version       version and contact information\n");
	fprintf(stderr, "\n");
	fprintf(stderr,
"Note: To use PALADIN, first index the reference using the 'index' or 'prepare' command.\n"
"      Then align your reads using the 'align' command.\n\n");

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x2bf4b(%rip), %r12     # 0x2ffd0
movq (%r12), %rsi
pushq $0xa
popq %rbp
movl %ebp, %edi
callq 0x3410
movq (%r12), %rcx
leaq 0x23b8c(%rip), %rdi     # 0x27c2a
pushq $0x3e
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23bb2(%rip), %rdi     # 0x27c69
pushq $0x26
popq %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23bc3(%rip), %rdi     # 0x27c90
pushq $0x40
popq %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23bee(%rip), %rdi     # 0x27cd1
pushq $0x3c
popq %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23c15(%rip), %rdi     # 0x27d0e
pushq $0x37
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rsi
movl %ebp, %edi
callq 0x3410
movq (%r12), %rcx
leaq 0x23c28(%rip), %rdi     # 0x27d46
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23c4a(%rip), %rdi     # 0x27d7e
pushq $0x33
popq %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23c68(%rip), %rdi     # 0x27db2
pushq $0x2d
popq %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23c80(%rip), %rdi     # 0x27de0
pushq $0x35
popq %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23c9c(%rip), %rdi     # 0x27e16
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rcx
leaq 0x23cbc(%rip), %rdi     # 0x27e4c
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r12), %rsi
movl %ebp, %edi
callq 0x3410
movq (%r12), %rcx
leaq 0x23cd3(%rip), %rdi     # 0x27e84
movl $0x90, %esi
movq %rbx, %rdx
callq 0x3790
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ToniWestbrook[P]paladin/main.c
// Function: renderVersion
int renderVersion() {
	fprintf(stderr, "\n");
	fprintf(stderr, "Program: PALADIN (Protein Alignment and Detection Interface)\n");

	fprintf(stderr, "Version: %s\n", PACKAGE_VERSION);
	fprintf(stderr, "Contact: Toni Westbrook (UNH) <anthony.westbrook@unh.edu>\n");
	fprintf(stderr, "Based on: BWA by Heng Li <lh3@sanger.ac.uk>\n\n");

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2bdfb(%rip), %r14     # 0x2ffd0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x3410
movq (%r14), %rcx
leaq 0x23d2b(%rip), %rdi     # 0x27f15
pushq $0x3d
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x3790
movq (%r14), %rdi
leaq 0x239e7(%rip), %rsi     # 0x27be9
leaq 0x20e42(%rip), %rdx     # 0x2504b
xorl %eax, %eax
callq 0x3500
movq (%r14), %rcx
leaq 0x23d39(%rip), %rdi     # 0x27f53
pushq $0x3a
popq %rsi
movq %rbx, %rdx
callq 0x3790
movq (%r14), %rcx
leaq 0x23d5f(%rip), %rdi     # 0x27f8e
pushq $0x2d
popq %rsi
movq %rbx, %rdx
callq 0x3790
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/ToniWestbrook[P]paladin/is.c
// Function: is_sa
int64_t is_sa(const ubyte_t *T, int64_t *SA, int64_t n)
{
	if ((T == NULL) || (SA == NULL) || (n < 0)) return -1;
	SA[0] = n;
	if (n <= 1) {
		if (n == 1) SA[1] = 0;
		return 0;
	}
	return sais_main(T, SA+1, 0, n, 256, 1);
}

// Assembly:
movq %rdx, %rcx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %dl
orb %al, %dl
testq %rcx, %rcx
sets %al
orb %dl, %al
movq $-0x1, %rax
jne 0x4e33
movq %rcx, (%rsi)
cmpq $0x1, %rcx
ja 0x4e34
jne 0x4e31
movq $0x0, 0x8(%rsi)
xorl %eax, %eax
retq
addq $0x8, %rsi
movl $0x100, %r8d            # imm = 0x100
movl $0x1, %r9d
xorl %edx, %edx
jmp 0x4e48
// File: /workspace/github_c_makefile_star2_O3/ToniWestbrook[P]paladin/is.c
// Function: is_bwt
int64_t is_bwt(ubyte_t *T, int64_t n)
{
	int64_t *SA, i, primary = 0;
	SA = (int64_t *)calloc(n+1, sizeof(int64_t));

	if (is_sa(T, SA, n)) return -1;

	for (i = 0; i <= n; ++i) {
		if (SA[i] == 0) primary = i;
		else SA[i] = T[SA[i] - 1];
	}
	for (i = 0; i < primary; ++i) T[i] = SA[i];
	for (; i < n; ++i) T[i] = SA[i + 1];
	free(SA);
	return primary;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1(%rsi), %r13
leaq 0x1fb75(%rip), %rdx     # 0x25004
leaq 0x1fb73(%rip), %r8      # 0x25009
movl $0x8, %esi
movq %r13, %rdi
movl $0xd4, %ecx
callq 0x2319c
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4dfc
movq $-0x1, %r12
testq %rax, %rax
jne 0x5535
testq %rbx, %rbx
js 0x550e
xorl %ecx, %ecx
xorl %eax, %eax
movq (%r15,%rax,8), %rdx
movq %rax, %r12
testq %rdx, %rdx
je 0x54e7
movzbl -0x1(%r14,%rdx), %edx
movq %rdx, (%r15,%rax,8)
movq %rcx, %r12
incq %rax
movq %r12, %rcx
cmpq %rax, %r13
jne 0x54ce
testq %r12, %r12
jle 0x5511
xorl %eax, %eax
movb (%r15,%rax,8), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq %rax, %r12
jne 0x54f9
movq %r12, %rax
jmp 0x5513
xorl %r12d, %r12d
xorl %eax, %eax
cmpq %rbx, %rax
jge 0x552d
movb 0x8(%r15,%rax,8), %cl
movb %cl, (%r14,%rax)
leaq 0x1(%rax), %rcx
movq %rcx, %rax
cmpq %rcx, %rbx
jne 0x5518
movq %r15, %rdi
callq 0x3390
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ToniWestbrook[P]paladin/bwtindex.c
// Function: writeIndexHeader
void writeIndexHeader(FILE * passFilePtr, IndexHeader passHeader) {
	fprintf(passFilePtr, ">VER=%s:NT=%d:MF=%d:RT=%d\n", PACKAGE_VERSION,
														passHeader.nucleotide,
														passHeader.multiFrame,
														passHeader.referenceType);
}

// Assembly:
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %r8d
movl 0x10(%rsp), %r9d
leaq 0x1f837(%rip), %rsi     # 0x25030
leaq 0x1f84b(%rip), %rdx     # 0x2504b
xorl %eax, %eax
jmp 0x3500
// File: /workspace/github_c_makefile_star2_O3/ToniWestbrook[P]paladin/bwtindex.c
// Function: getIndexHeader
IndexHeader getIndexHeader(char * passFile) {
	FILE * filePtr;
	IndexHeader retHeader;

	// Open file and read header information
	filePtr = fopen(passFile, "r");

    if (filePtr == NULL) {
    	logMessage(__func__, LOG_LEVEL_ERROR, "Failed to open file '%s' : %s\n", passFile, errno ? strerror(errno) : "Out of memory");
    	exit(EXIT_FAILURE);
    }

	if (fscanf(filePtr, ">VER=%d.%d.%d:NT=%d:MF=%d:RT=%d", &(retHeader.version[0]),
														   &(retHeader.version[1]),
														   &(retHeader.version[2]),
														   &(retHeader.nucleotide),
														   &(retHeader.multiFrame),
														   &(retHeader.referenceType)) != 6) {
		logMessage(__func__, LOG_LEVEL_ERROR, "Failed to parse file '%s'\n", passFile);
    	exit(EXIT_FAILURE);
	}
	fclose(filePtr);

	return retHeader;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x21651(%rip), %rsi     # 0x26e6a
movq %rbx, %rdi
callq 0x3380
testq %rax, %rax
je 0x586f
movq %rax, %r15
leaq 0xc(%r14), %rdx
leaq 0x10(%r14), %rcx
leaq 0x14(%r14), %r8
leaq 0x4(%r14), %r10
leaq 0x8(%r14), %r11
leaq 0x1f849(%rip), %rsi     # 0x2508d
movq %rax, %rdi
movq %r14, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x3720
addq $0x10, %rsp
cmpl $0x6, %eax
jne 0x5883
movq %r15, %rdi
callq 0x32f0
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
callq 0x3050
movl (%rax), %edi
testl %edi, %edi
jne 0x58a2
leaq 0x1f7fe(%rip), %r8      # 0x2507f
jmp 0x58aa
leaq 0x1f7c7(%rip), %rdi     # 0x25051
leaq 0x1f81c(%rip), %rdx     # 0x250ad
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xde80
jmp 0x58c7
callq 0x30c0
movq %rax, %r8
leaq 0x1f7a0(%rip), %rdi     # 0x25051
leaq 0x1f7a8(%rip), %rdx     # 0x25060
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xde80
movl $0x1, %edi
callq 0x33c0