LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sFopenWrite
FileStream *sFopenWrite(StringView path)
{
  FileStream *result = newFileStream(path);
  result->handle = fopen(nullTerminate(path), "wb");
  if(result->handle == NULL)
  {
    CR_RegionRelease(result->r);
    dieErrno("failed to open \"" PRI_STR "\" for writing", STR_FMT(path));
  }
  CR_RegionAttach(result->r, closeFileHandle, result);

  return result;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8a86
movq %rax, %rbx
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movaps 0x50(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %edi, %edi
callq 0x99b5
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
leaq 0x5f2c(%rip), %rsi      # 0xeaae
movq %rax, %rdi
callq 0x2370
movq %rax, 0x20(%rbx)
movq (%rbx), %rdi
testq %rax, %rax
je 0x8bae
leaq -0x9f(%rip), %rsi       # 0x8afe
movq %rbx, %rdx
callq 0xde19
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
retq
leaq 0x50(%rsp), %rbx
callq 0xde6a
movl 0x8(%rbx), %esi
movq (%rbx), %rdx
leaq 0x5eec(%rip), %rdi      # 0xeab1
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sFread
void sFread(void *ptr, const size_t size, FileStream *stream)
{
  if(fread(ptr, 1, size, stream->handle) != size)
  {
    if(feof(stream->handle))
    {
      die("reading \"%s\": reached end of file unexpectedly",
          internalFDestroy(stream));
    }
    else
    {
      dieErrno("IO error while reading \"%s\"", internalFDestroy(stream));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq 0x20(%rdx), %rcx
movl $0x1, %esi
movq %r14, %rdx
callq 0x20c0
cmpq %r14, %rax
jne 0x8bf1
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%rbx), %rdi
callq 0x2260
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8c2a
testl %ebp, %ebp
jne 0x8c19
leaq 0x5ef3(%rip), %rdi      # 0xeb02
movq %rax, %rsi
xorl %eax, %eax
callq 0x3e8c
leaq 0x5eb3(%rip), %rdi      # 0xead3
movq %rax, %rsi
xorl %eax, %eax
callq 0x3dc4
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: fDatasync
void fDatasync(StringView path)
{
  const int dir_descriptor = open(nullTerminate(path), O_RDONLY, 0);
  if(dir_descriptor == -1 || fdatasync(dir_descriptor) != 0 ||
     close(dir_descriptor) != 0)
  {
    dieErrno("failed to sync path to device: \"" PRI_STR "\"",
             STR_FMT(path));
  }
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movaps 0x50(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %edi, %edi
callq 0x99b5
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2360
cmpl $-0x1, %eax
je 0x8d70
movl %eax, %ebx
movl %eax, %edi
callq 0x2070
testl %eax, %eax
jne 0x8d70
movl %ebx, %edi
callq 0x21c0
testl %eax, %eax
jne 0x8d70
addq $0x40, %rsp
popq %rbx
retq
leaq 0x50(%rsp), %rax
movl 0x8(%rax), %esi
movq (%rax), %rdx
leaq 0x5db4(%rip), %rdi      # 0xeb36
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sFclose
void sFclose(FileStream *stream)
{
  FILE *handle = stream->handle;
  stream->handle = NULL;
  const char *path = internalFDestroy(stream);

  if(fclose(handle) != 0)
  {
    dieErrno("failed to close \"%s\"", path);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r14
movq $0x0, 0x20(%rdi)
callq 0x8c2a
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
testl %eax, %eax
jne 0x8db5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5da0(%rip), %rdi      # 0xeb5c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: closeDirHandle
void closeDirHandle(void *data)
{
  DirIterator *dir = data;
  if(dir->handle == NULL) return;

  const int old_errno = errno;
  (void)closedir(dir->handle);
  errno = old_errno;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x28(%rdi), %rbx
testq %rbx, %rbx
je 0x8ded
callq 0x2060
movq %rax, %r14
movl (%rax), %ebp
movq %rbx, %rdi
callq 0x21d0
movl %ebp, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sDirOpen
DirIterator *sDirOpen(StringView path)
{
  CR_Region *r = CR_RegionNew();
  DirIterator *dir = CR_RegionAlloc(r, sizeof *dir);

  dir->r = r;
  strSet(&dir->directory_path, strCopy(path, allocatorWrapRegion(r)));
  dir->returned_result_buffer = allocatorWrapOneSingleGrowableBuffer(r);
  dir->handle = opendir(nullTerminate(path));

  if(dir->handle == NULL)
  {
    CR_RegionRelease(r);
    dieErrno("failed to open directory \"" PRI_STR "\"", STR_FMT(path));
  }
  CR_RegionAttach(r, closeDirHandle, dir);

  return dir;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
callq 0xdc7c
movq %rax, %rbx
movl $0x30, %esi
movq %rax, %rdi
callq 0xdd40
movq %rax, %r14
movq %rbx, (%rax)
leaq 0x8(%rax), %r15
movq %rbx, %rdi
callq 0x28cc
movq 0x90(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x80(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0xb003
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
callq 0xaff1
movq %rbx, %rdi
callq 0x28e6
movq %rax, 0x20(%r14)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
movaps 0x80(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %edi, %edi
callq 0x99b5
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %rax, %rdi
callq 0x2110
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0x8ee2
leaq -0xfd(%rip), %rsi       # 0x8dcb
movq %rbx, %rdi
movq %r14, %rdx
callq 0xde19
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x80(%rsp), %r14
movq %rbx, %rdi
callq 0xde6a
movl 0x8(%r14), %esi
movq (%r14), %rdx
leaq 0x5c71(%rip), %rdi      # 0xeb71
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sDirGetNext
StringView sDirGetNext(DirIterator *dir)
{
  struct dirent *dir_entry;
  const int old_errno = errno;
  errno = 0;

  do
  {
    dir_entry = readdir(dir->handle);

    if(dir_entry == NULL && errno != 0)
    {
      dieErrno("failed to read directory \"" PRI_STR "\"",
               STR_FMT(dir->directory_path));
    }
  } while(dir_entry != NULL && dir_entry->d_name[0] == '.' &&
          (dir_entry->d_name[1] == '\0' ||
           (dir_entry->d_name[1] == '.' && dir_entry->d_name[2] == '\0')));

  errno = old_errno;
  if(dir_entry == NULL)
  {
    return str("");
  }

  return strAppendPath(dir->directory_path, str(dir_entry->d_name),
                       dir->returned_result_buffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2060
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
movq 0x28(%r14), %rdi
callq 0x22c0
testq %rax, %rax
jne 0x8f44
cmpl $0x0, (%r15)
jne 0x8fcb
testq %rax, %rax
je 0x8fab
cmpb $0x2e, 0x13(%rax)
jne 0x8f5d
movzbl 0x14(%rax), %ecx
testl %ecx, %ecx
je 0x8f27
cmpl $0x2e, %ecx
jne 0x8f5d
cmpb $0x0, 0x15(%rax)
je 0x8f27
movl %ebp, (%r15)
testq %rax, %rax
je 0x8fae
addq $0x13, %rax
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xaf28
movq 0x20(%r14), %rsi
movq 0x10(%r15), %rax
movq %rax, 0x28(%rsp)
movups (%r15), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x18(%r14), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xb2df
jmp 0x8fbd
movl %ebp, (%r15)
leaq 0x57ed(%rip), %rsi      # 0xe7a2
movq %rbx, %rdi
callq 0xaf28
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x10(%r14), %esi
movq 0x8(%r14), %rdx
leaq 0x5bb7(%rip), %rdi      # 0xeb91
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sDirClose
void sDirClose(DirIterator *dir)
{
  DIR *handle = dir->handle;
  dir->handle = NULL;

  if(closedir(handle) != 0)
  {
    dieErrno("failed to close directory \"" PRI_STR "\"",
             STR_FMT(dir->directory_path));
  }
  CR_RegionRelease(dir->r);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movq $0x0, 0x28(%rbx)
callq 0x21d0
testl %eax, %eax
jne 0x9003
movq (%rbx), %rdi
popq %rbx
jmp 0xde6a
movl 0x10(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x5ba0(%rip), %rdi      # 0xebb1
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sFbytesLeft
bool sFbytesLeft(FileStream *stream)
{
  const int old_errno = errno;
  errno = 0;

  const int character = fgetc(stream->handle);
  if(character == EOF && errno != 0 && errno != EBADF)
  {
    dieErrno("failed to check for remaining bytes in \"%s\"",
             internalFDestroy(stream));
  }
  errno = old_errno;

  if(ungetc(character, stream->handle) != character)
  {
    die("failed to check for remaining bytes in \"%s\"",
        internalFDestroy(stream));
  }

  return character != EOF;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2060
movq %rax, %r14
movl (%rax), %r15d
movl $0x0, (%rax)
movq 0x20(%rbx), %rdi
callq 0x21b0
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x904f
movl (%r14), %eax
testl %eax, %eax
je 0x904f
cmpl $0x9, %eax
jne 0x908b
movl %r15d, (%r14)
movq 0x20(%rbx), %rsi
movl %ebp, %edi
callq 0x22f0
cmpl %ebp, %eax
jne 0x9072
cmpl $-0x1, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x8c2a
leaq 0x5b51(%rip), %rdi      # 0xebd2
movq %rax, %rsi
xorl %eax, %eax
callq 0x3dc4
movq %rbx, %rdi
callq 0x8c2a
leaq 0x5b38(%rip), %rdi      # 0xebd2
movq %rax, %rsi
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sPathExists
bool sPathExists(StringView path)
{
  const int old_errno = errno;
  bool exists = true;
  struct stat stats;
  errno = 0;

  if(lstat(nullTerminate(path), &stats) != 0)
  {
    if(errno != 0 && errno != ENOENT)
    {
      dieErrno("failed to check existence of \"" PRI_STR "\"",
               STR_FMT(path));
    }

    exists = false;
  }

  errno = old_errno;
  return exists;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
callq 0x2060
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
movq 0xe0(%rsp), %rax
leaq 0x20(%rsp), %r14
movq %rax, 0x10(%r14)
movaps 0xd0(%rsp), %xmm0
movaps %xmm0, (%r14)
xorl %edi, %edi
callq 0x99b5
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rsp)
movaps (%r14), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %rax, %rdi
movq %r14, %rsi
callq 0x2210
testl %eax, %eax
je 0x9113
testl $0xfffffffd, (%rbx)     # imm = 0xFFFFFFFD
jne 0x9126
testl %eax, %eax
sete %al
movl %ebp, (%rbx)
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xd0(%rsp), %rax
movl 0x8(%rax), %esi
movq (%rax), %rdx
leaq 0x5ac3(%rip), %rdi      # 0xebfe
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sSymlinkReadTarget
StringView sSymlinkReadTarget(StringView path, Allocator *a)
{
  const struct stat stats = sLStat(path);

  const uint64_t buffer_length = sUint64Add(stats.st_size, 1);
  if(buffer_length > SIZE_MAX)
  {
    die("symlink does not fit in memory: \"" PRI_STR "\"", STR_FMT(path));
  }
  else if(buffer_length > SSIZE_MAX)
  {
    /* In this case the behaviour of readlink() is implementation
       dependent and not portable. */
    die("symlink is too large: \"" PRI_STR "\"", STR_FMT(path));
  }

  char *buffer = allocate(a, buffer_length);

  /* Although st_size bytes are enough to store the symlinks target path,
     the full buffer is used. This allows to detect whether the symlink
     has increased in size while reading. */
  const ssize_t read_bytes =
    readlink(nullTerminate(path), buffer, buffer_length);
  if(read_bytes == -1)
  {
    dieErrno("failed to read symlink: \"" PRI_STR "\"", STR_FMT(path));
  }
  else if(read_bytes != stats.st_size)
  {
    die("symlink changed while reading: \"" PRI_STR "\"", STR_FMT(path));
  }
  buffer[read_bytes] = '\0';

  return str(buffer);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x100(%rsp), %r13
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movaps (%r13), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x91bf
movq 0x30(%r14), %r14
movl $0x1, %esi
movq %r14, %rdi
callq 0x8960
testq %rax, %rax
js 0x9424
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0x284c
movq %rax, %r15
movq 0x10(%r13), %rax
movq %rax, 0x30(%rsp)
movups (%r13), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %edi, %edi
callq 0x99b5
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x20d0
cmpq $-0x1, %rax
je 0x9435
cmpq %r14, %rax
jne 0x944b
movb $0x0, (%r15,%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xaf28
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl 0x8(%r13), %esi
movq (%r13), %rdx
leaq 0x5833(%rip), %rdi      # 0xec66
jmp 0x945a
movl 0x8(%r13), %esi
movq (%r13), %rdx
leaq 0x583f(%rip), %rdi      # 0xec83
xorl %eax, %eax
callq 0x3e8c
movl 0x8(%r13), %esi
movq (%r13), %rdx
leaq 0x4bf1(%rip), %rdi      # 0xe04b
xorl %eax, %eax
callq 0x3dc4
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sUtime
void sUtime(StringView path, const time_t time)
{
  const struct utimbuf time_buffer = {
    .actime = time,
    .modtime = time,
  };

  if(utime(nullTerminate(path), &time_buffer) != 0)
  {
    dieErrno("failed to set timestamp of \"" PRI_STR "\"", STR_FMT(path));
  }
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
leaq 0x40(%rsp), %rbx
movq %rdi, (%rbx)
movq %rdi, 0x8(%rbx)
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movaps 0x60(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %edi, %edi
callq 0x99b5
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2030
testl %eax, %eax
jne 0x96b7
addq $0x50, %rsp
popq %rbx
retq
leaq 0x60(%rsp), %rax
movl 0x8(%rax), %esi
movq (%rax), %rdx
leaq 0x5643(%rip), %rdi      # 0xed0c
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sRemove
void sRemove(StringView path)
{
  const int old_errno = errno;
  if(remove(nullTerminate(path)) != 0)
  {
    dieErrno("failed to remove \"" PRI_STR "\"", STR_FMT(path));
  }
  errno = old_errno;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
callq 0x2060
movq %rax, %rbx
movl (%rax), %ebp
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movaps 0x50(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %edi, %edi
callq 0x99b5
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %rax, %rdi
callq 0x2080
testl %eax, %eax
jne 0x972b
movl %ebp, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
leaq 0x50(%rsp), %rax
movl 0x8(%rax), %esi
movq (%rax), %rdx
leaq 0x55f1(%rip), %rdi      # 0xed2e
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: removeRecursivelyIf
static bool removeRecursivelyIf(StringView path,
                                ShouldRemoveCallback should_remove,
                                void *user_data)
{
  bool current_path_is_needed = false;

  const struct stat stats = sLStat(path);
  if(S_ISDIR(stats.st_mode))
  {
    DirIterator *dir = sDirOpen(path);
    for(StringView subpath = sDirGetNext(dir); !strIsEmpty(subpath);
        strSet(&subpath, sDirGetNext(dir)))
    {
      if(!removeRecursivelyIf(subpath, should_remove, user_data))
      {
        current_path_is_needed = true;
      }
    }
    sDirClose(dir);
  }

  if(!current_path_is_needed && should_remove(path, &stats, user_data))
  {
    sRemove(path);
    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x110(%rsp), %r13
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movaps (%r13), %xmm0
movups %xmm0, (%rsp)
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x91bf
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%r15), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x9889
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
callq 0x8df2
movq %rax, %r15
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x8f07
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
callq 0xb11c
testb %al, %al
je 0x97f9
movq %r15, %rdi
callq 0x8fe1
jmp 0x9889
xorl %ebp, %ebp
leaq 0x30(%rsp), %r12
leaq 0x18(%rsp), %r13
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9754
movzbl %bpl, %ebp
testb %al, %al
movl $0x1, %eax
cmovel %eax, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x8f07
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
callq 0xaff1
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xb11c
testb %al, %al
je 0x9805
movq %r15, %rdi
callq 0x8fe1
testb $0x1, %bpl
leaq 0x110(%rsp), %r13
jne 0x98c4
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq *%rbx
testb %al, %al
je 0x98c4
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
callq 0x96d0
movb $0x1, %al
jmp 0x98c6
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sGetCurrentDir
StringView sGetCurrentDir(Allocator *a)
{
  const int old_errno = errno;
  size_t capacity = 4;
  char *buffer = allocate(getTemporaryBuffer(false), capacity);

  while(true)
  {
    errno = 0;
    if(getcwd(buffer, capacity) != NULL)
    {
      errno = old_errno;
      return strCopy(str(buffer), a);
    }
    if(errno != ERANGE)
    {
      dieErrno("failed to determine current working directory");
    }

    capacity = sSizeMul(capacity, 2);
    buffer = allocate(getTemporaryBuffer(false), capacity);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2060
movq %rax, %r15
movl (%rax), %ebp
xorl %edi, %edi
callq 0x99b5
movl $0x4, %r12d
movl $0x4, %esi
movq %rax, %rdi
callq 0x284c
movq %rax, %r13
movl $0x0, (%r15)
movl $0x4, %esi
movq %rax, %rdi
callq 0x21a0
testq %rax, %rax
jne 0x9966
cmpl $0x22, (%r15)
jne 0x99a7
movl $0x2, %esi
movq %r12, %rdi
callq 0x893c
movq %rax, %r12
xorl %edi, %edi
callq 0x99b5
movq %rax, %rdi
movq %r12, %rsi
callq 0x284c
movq %rax, %r13
movl $0x0, (%r15)
movq %rax, %rdi
movq %r12, %rsi
jmp 0x9922
movl %ebp, (%r15)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0xaf28
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb003
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5398(%rip), %rdi      # 0xed46
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: getTemporaryBuffer
static Allocator *getTemporaryBuffer(const bool secondary)
{
  static Allocator *buffer[2] = { NULL, NULL };
  if(buffer[secondary] == NULL)
  {
    buffer[secondary] =
      allocatorWrapOneSingleGrowableBuffer(CR_GetGlobalRegion());
  }
  return buffer[secondary];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x98ae(%rip), %r14      # 0x13270
cmpq $0x0, (%r14,%rbx,8)
jne 0x99da
callq 0xdab4
movq %rax, %rdi
callq 0x28e6
movq %rax, (%r14,%rbx,8)
movq (%r14,%rbx,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sReadLine
bool sReadLine(FILE *stream, Allocator *a, StringView *result_out)
{
  const int old_errno = errno;

  size_t capacity = 4; /* Small value to test growth. */
  char *buffer = allocate(getTemporaryBuffer(false), capacity);
  size_t length_used = 0;

  while(true)
  {
    errno = 0;
    const int character = fgetc(stream);
    if(character == EOF)
    {
      if(errno != 0) dieErrno("failed to read line");

      if(length_used == 0)
      {
        strSet(result_out, str(""));
        errno = old_errno;
        return false;
      }
    }
    if(character == EOF || character == '\n' || character == '\r' ||
       character == '\0')
    {
      strSet(result_out, strCopy(strUnterminated(buffer, length_used), a));
      errno = old_errno;
      return true;
    }

    buffer[length_used] = (char)character;
    length_used++;

    if(length_used == capacity)
    {
      capacity = sSizeMul(capacity, 2);
      buffer = allocate(getTemporaryBuffer(false), capacity);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, 0x30(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, %r15
callq 0x2060
movq %rax, %r12
movl (%rax), %eax
movl %eax, 0x24(%rsp)
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x99b5
movl $0x4, %ecx
movq %rcx, 0x28(%rsp)
movl $0x4, %esi
movq %rax, %rdi
callq 0x284c
movq %rax, %r13
movl $0x0, (%r12)
movq %r15, %rdi
callq 0x21b0
cmpl $0x9, %eax
jg 0x9a55
cmpl $-0x1, %eax
je 0x9aa0
testl %eax, %eax
je 0x9ac2
jmp 0x9a5f
cmpl $0xa, %eax
je 0x9ac2
cmpl $0xd, %eax
je 0x9ac2
movb %al, (%r13,%rbp)
incq %rbp
movb $0x1, %bl
movq 0x28(%rsp), %rdi
cmpq %rdi, %rbp
jne 0x9b1e
movl $0x2, %esi
callq 0x893c
movq %rax, %r13
xorl %edi, %edi
callq 0x99b5
movq %rax, %rdi
movq %r13, 0x28(%rsp)
movq %r13, %rsi
callq 0x284c
movq %rax, %r13
jmp 0x9b1e
cmpl $0x0, (%r12)
jne 0x9b81
testq %rbp, %rbp
je 0x9b28
leal 0x1(%rax), %ecx
cmpl $0xe, %ecx
ja 0x9a5f
movl $0x4803, %edx           # imm = 0x4803
btl %ecx, %edx
jae 0x9a5f
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0xaf44
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xb003
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x30(%rsp), %rdi
callq 0xaff1
movl 0x24(%rsp), %eax
movl %eax, (%r12)
movb $0x1, %r14b
xorl %ebx, %ebx
testb %bl, %bl
jne 0x9a35
jmp 0x9b68
leaq 0x70(%rsp), %rdi
leaq 0x4c6e(%rip), %rsi      # 0xe7a2
callq 0xaf28
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x70(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x30(%rsp), %rdi
callq 0xaff1
movl 0x24(%rsp), %eax
movl %eax, (%r12)
xorl %ebp, %ebp
xorl %r14d, %r14d
jmp 0x9b1c
andb $0x1, %r14b
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x51ec(%rip), %rdi      # 0xed74
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sIsTTY
bool sIsTTY(FILE *stream)
{
  const int descriptor = fileno(stream);
  if(descriptor == -1)
  {
    dieErrno("failed to get file descriptor from stream");
  }

  const int old_errno = errno;
  const int is_tty = isatty(descriptor);
  errno = old_errno;

  return is_tty == 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
callq 0x22b0
cmpl $-0x1, %eax
je 0x9bbe
movl %eax, %ebx
callq 0x2060
movq %rax, %r14
movl (%rax), %ebp
movl %ebx, %edi
callq 0x20b0
movl %ebp, (%r14)
cmpl $0x1, %eax
sete %al
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x51c3(%rip), %rdi      # 0xed88
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sStringToSize
size_t sStringToSize(StringView string)
{
  const int old_errno = errno;
  errno = 0;

  const char *raw_string = nullTerminate(string);
  char *endptr;
  const long long int value = strtoll(raw_string, &endptr, 10);

  if(endptr == raw_string)
  {
    die("unable to convert to size: \"%s\"", raw_string);
  }
  else if(value < 0)
  {
    die("unable to convert negative value to size: \"%s\"", raw_string);
  }
  else if((value == LLONG_MAX && errno == ERANGE) ||
          (unsigned long long int)value > SIZE_MAX)
  {
    die("value too large to convert to size: \"%s\"", raw_string);
  }

  errno = old_errno;
  return (size_t)value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
callq 0x2060
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
movq 0x70(%rsp), %rax
leaq 0x20(%rsp), %r15
movq %rax, 0x10(%r15)
movaps 0x60(%rsp), %xmm0
movaps %xmm0, (%r15)
xorl %edi, %edi
callq 0x99b5
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rsp)
movaps (%r15), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x2240
cmpq %r14, (%r15)
je 0x9c5b
testq %rax, %rax
js 0x9c64
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
jne 0x9c4e
cmpl $0x22, (%rbx)
je 0x9c6d
movl %ebp, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5150(%rip), %rdi      # 0xedb2
jmp 0x9c74
leaq 0x5167(%rip), %rdi      # 0xedd2
jmp 0x9c74
leaq 0x518d(%rip), %rdi      # 0xee01
movq %r14, %rsi
xorl %eax, %eax
callq 0x3dc4
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sTime
time_t sTime(void)
{
  const time_t current_time = time(NULL);

  if(current_time == (time_t)-1)
  {
    die("failed to determine current time");
  }

  return current_time;
}

// Assembly:
pushq %rax
xorl %edi, %edi
callq 0x22a0
cmpq $-0x1, %rax
je 0x9c8e
popq %rcx
retq
leaq 0x5195(%rip), %rdi      # 0xee2a
xorl %eax, %eax
callq 0x3dc4
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sTimeMilliseconds
uint64_t sTimeMilliseconds(void)
{
  struct timespec timespec;
  if(clock_gettime(CLOCK_REALTIME, &timespec) == -1)
  {
    dieErrno("failed to determine current time");
  }

  return sUint64Add(sUint64Mul(timespec.tv_sec, 1000),
                    timespec.tv_nsec / 1000000);
}

// Assembly:
subq $0x18, %rsp
leaq 0x8(%rsp), %rsi
xorl %edi, %edi
callq 0x20e0
cmpl $-0x1, %eax
je 0x9cea
movq 0x8(%rsp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x8978
movq %rax, %rdi
movabsq $0x431bde82d7b634db, %rax # imm = 0x431BDE82D7B634DB
imulq 0x10(%rsp)
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x12, %rdx
addq %rdx, %rsi
callq 0x8960
addq $0x18, %rsp
retq
leaq 0x5139(%rip), %rdi      # 0xee2a
xorl %eax, %eax
callq 0x3e8c
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sRand
int sRand(void)
{
  static bool already_seeded = false;

  if(!already_seeded)
  {
    srand((sTime() << 9) + getpid());
    already_seeded = true;
  }

  return rand();
}

// Assembly:
cmpb $0x0, 0x9561(%rip)      # 0x13260
jne 0x23f0
pushq %rbx
callq 0x9c7e
movq %rax, %rbx
callq 0x20f0
shll $0x9, %ebx
addl %eax, %ebx
movl %ebx, %edi
callq 0x2220
movb $0x1, 0x953a(%rip)      # 0x13260
popq %rbx
jmp 0x23f0
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sGetFilesContent
FileContent sGetFilesContent(CR_Region *region, StringView path)
{
  const struct stat file_stats = sStat(path);
  if(!S_ISREG(file_stats.st_mode))
  {
    die("\"" PRI_STR "\" is not a regular file", STR_FMT(path));
  }

  /* On 32-bit systems off_t is often larger than size_t. */
  if((uint64_t)file_stats.st_size > SIZE_MAX)
  {
    die("unable to load file into mem due to its size: \"" PRI_STR "\"",
        STR_FMT(path));
  }

  if(file_stats.st_size > 0)
  {
    FileStream *stream = sFopenRead(path);
    char *content = CR_RegionAllocUnaligned(region, file_stats.st_size);
    sFread(content, file_stats.st_size, stream);
    const bool stream_not_at_end = sFbytesLeft(stream);
    sFclose(stream);

    if(stream_not_at_end)
    {
      die("file changed while reading: \"" PRI_STR "\"", STR_FMT(path));
    }

    return (FileContent){ .content = content, .size = file_stats.st_size };
  }

  char *content = CR_RegionAllocUnaligned(region, 1);
  content[0] = '\0';

  return (FileContent){ .content = content, .size = 0 };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %r14
leaq 0xe0(%rsp), %r12
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movaps (%r12), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x9142
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rbx), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x9e0e
movq 0x50(%rsp), %rbx
testq %rbx, %rbx
jle 0x9de3
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
callq 0x89df
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0xdd60
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x8bcc
movq %r15, %rdi
callq 0x9018
movl %eax, %ebp
movq %r15, %rdi
callq 0x8d89
testb %bpl, %bpl
je 0x9df8
movl 0x8(%r12), %esi
movq (%r12), %rdx
leaq 0x5087(%rip), %rdi      # 0xee68
jmp 0x9e1e
movl $0x1, %esi
movq %r14, %rdi
callq 0xdd60
movq %rax, %r14
movb $0x0, (%rax)
xorl %ebx, %ebx
movq %r14, %rax
movq %rbx, %rdx
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%r12), %esi
movq (%r12), %rdx
leaq 0x502d(%rip), %rdi      # 0xee4b
xorl %eax, %eax
callq 0x3dc4
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/safe-wrappers.c
// Function: sRegexCompile
const regex_t *sRegexCompile(CR_Region *r, StringView expression,
                             StringView file_name, const size_t line_nr)
{
  regex_t *regex = CR_RegionAlloc(r, sizeof *regex);
  const int error =
    regcomp(regex, nullTerminate(expression), REG_EXTENDED | REG_NOSUB);

  if(error != 0)
  {
    const size_t error_length = regerror(error, regex, NULL, 0);
    char *error_str = allocate(getTemporaryBuffer(false), error_length);
    regerror(error, regex, error_str, error_length);
    die(PRI_STR ": line %zu: %s: \"" PRI_STR "\"", STR_FMT(file_name),
        line_nr, error_str, STR_FMT(expression));
  }
  CR_RegionAttach(r, releaseRegex, regex);

  return regex;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x40, %esi
callq 0xdd40
movq %rax, %r14
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
movaps 0x70(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %edi, %edi
callq 0x99b5
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0xaf53
movq %r14, %rdi
movq %rax, %rsi
movl $0x9, %edx
callq 0x21e0
testl %eax, %eax
jne 0x9eb7
leaq 0x89(%rip), %rsi        # 0x9f23
movq %r15, %rdi
movq %r14, %rdx
callq 0xde19
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
leaq 0x88(%rsp), %r13
movl %eax, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2290
movq %rax, %r15
xorl %edi, %edi
callq 0x99b5
movq %rax, %rdi
movq %r15, %rsi
callq 0x284c
movq %rax, %r12
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0x2290
movl 0x8(%r13), %esi
movq (%r13), %rdx
leaq 0x70(%rsp), %rax
movl 0x8(%rax), %r9d
movq (%rax), %rax
movq %rax, (%rsp)
leaq 0x4f75(%rip), %rdi      # 0xee8b
movq %rbx, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x3dc4
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search-tree.c
// Function: inheritPolicyToSubnodes
static void inheritPolicyToSubnodes(SearchNode *parent_node)
{
  for(SearchNode *node = parent_node->subnodes; node != NULL;
      node = node->next)
  {
    if(node->policy == BPOL_none || node->policy_inherited)
    {
      node->policy = parent_node->policy;
      node->policy_inherited = true;
      node->policy_line_nr = parent_node->policy_line_nr;
      inheritPolicyToSubnodes(node);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x40(%rdi), %r14
testq %r14, %r14
je 0xa828
movq %rdi, %rbx
cmpl $0x0, 0x2c(%r14)
je 0xa803
cmpb $0x1, 0x30(%r14)
jne 0xa81f
movl 0x2c(%rbx), %eax
movl %eax, 0x2c(%r14)
movb $0x1, 0x30(%r14)
movq 0x38(%rbx), %rax
movq %rax, 0x38(%r14)
movq %r14, %rdi
callq 0xa7e5
movq 0x60(%r14), %r14
testq %r14, %r14
jne 0xa7f5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search-tree.c
// Function: searchTreeLoad
SearchNode *searchTreeLoad(CR_Region *r, StringView path_to_config)
{
  CR_Region *disposable_r = CR_RegionNew();
  const FileContent content =
    sGetFilesContent(disposable_r, path_to_config);
  StringView config = strUnterminated(content.content, content.size);

  SearchNode *root_node = searchTreeParse(r, config);
  CR_RegionRelease(disposable_r);

  return root_node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0xdc7c
movq %rax, %r14
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x9d2c
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xaf44
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x9f84
movq %rax, %rbx
movq %r14, %rdi
callq 0xde6a
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search.c
// Function: searchNew
SearchIterator *searchNew(SearchNode *root_node)
{
  CR_Region *r = CR_RegionNew();

  SearchIterator *iterator = CR_RegionAlloc(r, sizeof *iterator);
  iterator->r = r;

  iterator->current_path_buffer = allocatorWrapOneSingleGrowableBuffer(r);
  strSet(&iterator->current_path,
         strCopy(str("/"), iterator->current_path_buffer));
  iterator->tmp_buffer = allocatorWrapOneSingleGrowableBuffer(r);

  recursionStepRaw(iterator, root_node, root_node->policy);

  /* Prevent found paths from starting with two slashes. */
  iterator->state.path_length = 0;

  /* Store reference to ignore expression list. */
  iterator->ignore_expressions = *root_node->ignore_expressions;

  /* Initialise the state stack. */
  iterator->state_stack.used = 0;
  iterator->state_stack.capacity = 4;

  Allocator *state_array_buffer = allocatorWrapOneSingleGrowableBuffer(r);
  iterator->state_stack.state_array_buffer = state_array_buffer;
  iterator->state_stack.state_array =
    allocate(state_array_buffer,
             sSizeMul(sizeof *iterator->state_stack.state_array,
                      iterator->state_stack.capacity));

  return iterator;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r15
callq 0xdc7c
movq %rax, %r14
movl $0x80, %esi
movq %rax, %rdi
callq 0xdd40
movq %rax, %rbx
movq %r14, (%rax)
movq %r14, %rdi
callq 0x28e6
movq %rax, 0x20(%rbx)
leaq 0x8(%rbx), %r12
leaq 0x3b66(%rip), %rsi      # 0xe448
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0xaf28
movq 0x20(%rbx), %rsi
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
leaq 0x38(%rsp), %r13
movq %r13, %rdi
callq 0xb003
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
callq 0xaff1
movq %r14, %rdi
callq 0x28e6
movq %rax, 0x28(%rbx)
movl 0x2c(%r15), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa9a1
xorl %eax, %eax
movq %rax, 0x40(%rbx)
movq 0x50(%r15), %rcx
movq (%rcx), %rcx
movq %rcx, 0x30(%rbx)
movq %rax, 0x78(%rbx)
movq $0x4, 0x70(%rbx)
movq %r14, %rdi
callq 0x28e6
movq %rax, %r14
movq %rax, 0x68(%rbx)
movq 0x70(%rbx), %rsi
movl $0x28, %edi
callq 0x893c
movq %r14, %rdi
movq %rax, %rsi
callq 0x284c
movq %rax, 0x60(%rbx)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search.c
// Function: recursionStepRaw
static void recursionStepRaw(SearchIterator *iterator, SearchNode *node,
                             const BackupPolicy policy)
{
  /* Store the directories path length before recursing into it. */
  iterator->state.path_length = iterator->current_path.length;

  if(node != NULL && node->policy == BPOL_none &&
     !node->subnodes_contain_regex)
  {
    iterator->state.is_dir_search = false;
    iterator->state.access.current_node = node->subnodes;
  }
  else
  {
    iterator->state.is_dir_search = true;
    iterator->state.access.search.dir = sDirOpen(iterator->current_path);
    iterator->state.access.search.subnodes = node ? node->subnodes : NULL;
    iterator->state.access.search.fallback_policy = policy;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
movq %rcx, 0x40(%rdi)
testq %rsi, %rsi
je 0xa9f2
movq %rsi, %r14
cmpl $0x0, 0x2c(%rsi)
jne 0xa9cf
cmpb $0x0, 0x48(%r14)
je 0xaa21
movb $0x1, 0x38(%rbx)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
callq 0x8df2
movq %rax, 0x48(%rbx)
movq 0x40(%r14), %rax
jmp 0xaa11
movb $0x1, 0x38(%rbx)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
callq 0x8df2
movq %rax, 0x48(%rbx)
xorl %eax, %eax
movq %rax, 0x50(%rbx)
movl %ebp, 0x58(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movb $0x0, 0x38(%rbx)
movq 0x40(%r14), %rax
movq %rax, 0x48(%rbx)
jmp 0xaa18
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search.c
// Function: finishCurrentNode
static SearchResult finishCurrentNode(SearchIterator *iterator)
{
  if(iterator->state.access.current_node == NULL)
  {
    return finishDirectory(iterator);
  }

  SearchNode *node = iterator->state.access.current_node;
  iterator->state.access.current_node = node->next;

  replaceCurrentFilename(iterator, node->name);

  if(sPathExists(iterator->current_path))
  {
    return finishNodeStep(iterator, node, node->policy);
  }

  return finishCurrentNode(iterator);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%r14), %r15
testq %r15, %r15
je 0xaca1
movq 0x60(%r15), %rax
movq %rax, 0x48(%r14)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0xad20
movq 0x18(%r14), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%r14), %xmm0
movups %xmm0, (%rsp)
callq 0x90a4
testb %al, %al
je 0xac48
movl 0x2c(%r15), %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xadcc
jmp 0xacac
movq %rbx, %rdi
movq %r14, %rsi
callq 0xacb9
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search.c
// Function: finishDirectory
static SearchResult finishDirectory(SearchIterator *iterator)
{
  if(iterator->state_stack.used > 0)
  {
    iterator->state_stack.used--;
    iterator->state =
      iterator->state_stack.state_array[iterator->state_stack.used];

    return (SearchResult){ .type = SRT_end_of_directory };
  }

  CR_RegionRelease(iterator->r);

  return (SearchResult){ .type = SRT_end_of_search };
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x78(%rsi), %rax
testq %rax, %rax
je 0xacf8
decq %rax
movq %rax, 0x78(%rsi)
movq 0x60(%rsi), %rcx
leaq (%rax,%rax,4), %rax
movups (%rcx,%rax,8), %xmm0
movups 0x10(%rcx,%rax,8), %xmm1
movups %xmm0, 0x38(%rsi)
movups %xmm1, 0x48(%rsi)
movq 0x20(%rcx,%rax,8), %rax
movq %rax, 0x58(%rsi)
movl $0x10, %ebp
jmp 0xad05
movq (%rsi), %rdi
callq 0xde6a
movl $0x20, %ebp
movl $0xc0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2190
movl %ebp, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search.c
// Function: replaceCurrentFilename
static void replaceCurrentFilename(SearchIterator *iterator,
                                   StringView filename)
{
  StringView path_head =
    strCopy(strUnterminated(iterator->current_path.content,
                            iterator->state.path_length),
            iterator->tmp_buffer);
  strSet(
    &iterator->current_path,
    strAppendPath(path_head, filename, iterator->current_path_buffer));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq 0x8(%rdi), %rsi
movq 0x40(%rdi), %rdx
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0xaf44
movq 0x28(%r14), %rsi
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xb003
movq 0x20(%r14), %rsi
movq 0xb0(%rsp), %rax
movq %rax, 0x28(%rsp)
movaps 0xa0(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0xb2df
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xaff1
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/search.c
// Function: finishNodeStep
static SearchResult finishNodeStep(SearchIterator *iterator,
                                   SearchNode *node,
                                   const BackupPolicy policy)
{
  SearchResult found_file = buildSearchResult(iterator, node, policy);

  if(node != NULL)
  {
    node->search_match |= found_file.type;
  }

  if(found_file.type == SRT_directory)
  {
    recursionStep(iterator, node, policy);
  }

  return found_file;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0xae10
cmpq $0x0, 0x40(%r14)
je 0xae10
movq 0x18(%r15), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x9142
jmp 0xae2c
movq 0x18(%r15), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x91bf
movl $0xf000, %eax           # imm = 0xF000
andl 0x38(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
je 0xae4b
cmpl $0xa000, %eax           # imm = 0xA000
jne 0xae53
movl $0x2, %r12d
jmp 0xae65
movl $0x1, %r12d
jmp 0xae65
xorl %ecx, %ecx
cmpl $0x4000, %eax           # imm = 0x4000
setne %cl
leal 0x4(,%rcx,4), %r12d
movl %r12d, (%rbx)
movups 0x8(%r15), %xmm0
movups %xmm0, 0x8(%rbx)
movq 0x18(%r15), %rax
movq %rax, 0x18(%rbx)
movq %r14, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
leaq 0x30(%rbx), %rdi
leaq 0x20(%rsp), %rsi
movl $0x90, %edx
callq 0x2280
testq %r14, %r14
je 0xae9c
orl %r12d, 0x28(%r14)
cmpl $0x4, %r12d
jne 0xaf13
movq 0x70(%r15), %rdi
cmpq %rdi, 0x78(%r15)
jne 0xaeda
movl $0x2, %esi
callq 0x893c
movq %rax, 0x70(%r15)
movq 0x68(%r15), %r12
movl $0x28, %edi
movq %rax, %rsi
callq 0x893c
movq %r12, %rdi
movq %rax, %rsi
callq 0x284c
movq %rax, 0x60(%r15)
movq 0x60(%r15), %rax
movq 0x78(%r15), %rcx
leaq (%rcx,%rcx,4), %rcx
movq 0x58(%r15), %rdx
movq %rdx, 0x20(%rax,%rcx,8)
movups 0x38(%r15), %xmm0
movups 0x48(%r15), %xmm1
movups %xmm1, 0x10(%rax,%rcx,8)
movups %xmm0, (%rax,%rcx,8)
incq 0x78(%r15)
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0xa9a1
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/str.c
// Function: strCopyRaw
char *strCopyRaw(StringView string, Allocator *a)
{
  char *raw_string = allocate(a, sSizeAdd(string.length, 1));
  memcpy(raw_string, string.content, string.length);
  raw_string[string.length] = '\0';
  return raw_string;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdi
callq 0x8924
movq %rbx, %rdi
movq %rax, %rsi
callq 0x284c
movq %rax, %rbx
movq 0x20(%rsp), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x2280
movb $0x0, (%rbx,%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/str.c
// Function: strCopy
StringView strCopy(StringView string, Allocator *a)
{
  return (StringView){
    .content = strCopyRaw(string, a),
    .length = string.length,
    .is_terminated = true,
  };
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r12
movl $0x1, %esi
movq %r12, %rdi
callq 0x8924
movq %rbx, %rdi
movq %rax, %rsi
callq 0x284c
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2280
movb $0x0, (%rbx,%r12)
movq %rbx, (%r14)
movq %r12, 0x8(%r14)
movb $0x1, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/str.c
// Function: strStripTrailingSlashes
StringView strStripTrailingSlashes(StringView string)
{
  size_t new_length = string.length;
  while(new_length > 0 && string.content[new_length - 1] == '/')
  {
    new_length--;
  }

  return (StringView){
    .content = string.content,
    .length = new_length,
    .is_terminated = new_length == string.length && string.is_terminated,
  };
}

// Assembly:
movq %rdi, %rax
leaq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, %rsi
testq %rdx, %rdx
je 0xb08c
movq (%rcx), %rdi
movq %rdx, %rsi
cmpb $0x2f, -0x1(%rdi,%rsi)
jne 0xb08c
decq %rsi
jne 0xb07e
xorl %esi, %esi
movq (%rcx), %rdi
movq %rdi, (%rax)
movq %rsi, 0x8(%rax)
xorl %edi, %edi
cmpq %rdx, %rsi
jne 0xb0a0
movl 0x10(%rcx), %edi
movb %dil, 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/str.c
// Function: strSplitPath
PathSplit strSplitPath(StringView path)
{
  size_t last_slash = path.length;
  while(last_slash > 0 && path.content[last_slash - 1] != '/')
  {
    last_slash--;
  }

  /* If the last slash is preceded by other slashes, get its position
     instead. */
  while(last_slash > 1 && path.content[last_slash - 2] == '/')
  {
    last_slash--;
  }

  return (PathSplit){
    (StringView){
      .content = path.content,
      .length = last_slash > 0 ? last_slash - 1 : 0,
      .is_terminated = false,
    },
    (StringView){
      .content = &path.content[last_slash],
      .length = path.length - last_slash,
      .is_terminated = path.is_terminated,
    },
  };
}

// Assembly:
movq %rdi, %rax
leaq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, %rsi
testq %rdx, %rdx
je 0xb0cd
movq (%rcx), %rdi
movq %rdx, %rsi
cmpb $0x2f, -0x1(%rdi,%rsi)
je 0xb0cd
decq %rsi
jne 0xb0bf
xorl %esi, %esi
cmpq $0x2, %rsi
jb 0xb0eb
movq (%rcx), %rdi
cmpb $0x2f, -0x2(%rdi,%rsi)
jne 0xb0eb
decq %rsi
cmpq $0x1, %rsi
ja 0xb0d6
movl $0x1, %esi
movq (%rcx), %rdi
movq %rdi, (%rax)
xorl %r8d, %r8d
movq %rsi, %r9
subq $0x1, %r9
cmovaeq %r9, %r8
movq %r8, 0x8(%rax)
movb $0x0, 0x10(%rax)
addq %rsi, %rdi
movq %rdi, 0x18(%rax)
subq %rsi, %rdx
movq %rdx, 0x20(%rax)
movb 0x10(%rcx), %cl
movb %cl, 0x28(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/AlxHnr[P]nano-backup/src/str.c
// Function: strIsWhitespaceOnly
bool strIsWhitespaceOnly(StringView string)
{
  for(size_t index = 0; index < string.length; index++)
  {
    if(string.content[index] != ' ' && string.content[index] != '\t')
    {
      return false;
    }
  }

  return true;
}

// Assembly:
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
sete %al
je 0xb19b
leaq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq %rcx, %rsi
negq %rsi
movl $0x1, %edi
movzbl -0x1(%rdx,%rdi), %r8d
cmpl $0x20, %r8d
je 0xb185
cmpl $0x9, %r8d
jne 0xb19b
cmpq %rcx, %rdi
setae %al
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
cmpq $0x1, %r8
jne 0xb173
andb $0x1, %al
retq