LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/integrity.c
// Function: checkIntegrity
ListOfBrokenPathNodes *checkIntegrity(
  CR_Region *r, const Metadata *metadata, StringView repo_path,
  IntegrityProgressCallback progress_callback, void *callback_user_data)
{
  IntegrityCheckContext ctx = {
    .r = r,
    .broken_nodes = NULL,
    .repo_path = repo_path,
    .progress_callback = progress_callback,
    .callback_user_data = callback_user_data,
  };

  /* Dry run to populate `ctx->files_to_hash_total_size`. */
  CR_Region *disposable_r = attachDisposableRegion(&ctx);
  checkIntegrityRecursively(&ctx, metadata->paths, addToTotalFileSize);
  CR_RegionRelease(disposable_r);
  disposable_r = attachDisposableRegion(&ctx);

  /* Do a real check. */
  checkIntegrityRecursively(&ctx, metadata->paths, storedFileIsHealthy);
  CR_RegionRelease(disposable_r);

  return ctx.broken_nodes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
leaq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movq (%rax), %rcx
movq %rcx, -0x70(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x6730
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
leaq -0x80(%rbp), %rdi
leaq 0x1af(%rip), %rdx       # 0x6880
callq 0x67b0
movq -0x88(%rbp), %rdi
callq 0x23370
leaq -0x80(%rbp), %rdi
callq 0x6730
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
leaq -0x80(%rbp), %rdi
leaq 0x1bb(%rip), %rdx       # 0x68c0
callq 0x67b0
movq -0x88(%rbp), %rdi
callq 0x23370
movq -0x78(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/integrity.c
// Function: attachDisposableRegion
static CR_Region *attachDisposableRegion(IntegrityCheckContext *ctx)
{
  CR_Region *disposable_r = CR_RegionNew();
  ctx->reusable_buffer_allocator =
    allocatorWrapOneSingleGrowableBuffer(disposable_r);
  ctx->unique_subpath_buffer = CR_RegionAllocGrowable(disposable_r, 1);
  ctx->unique_subpath_cache = strTableNew(disposable_r);
  ctx->unique_subpath_cache_key_allocator =
    allocatorWrapRegion(disposable_r);
  return disposable_r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x22f30
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x25e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x229c0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
callq 0xf830
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rdi
callq 0x25a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/integrity.c
// Function: checkIntegrityRecursively
static void
checkIntegrityRecursively(IntegrityCheckContext *ctx,
                          const PathNode *node_list,
                          CheckFileCallback check_file_callback)
{
  for(const PathNode *node = node_list; node != NULL; node = node->next)
  {
    for(const PathHistory *point = node->history; point != NULL;
        point = point->next)
    {
      if(!historyPointIsHealthy(ctx, point, check_file_callback))
      {
        ListOfBrokenPathNodes *broken_node =
          CR_RegionAlloc(ctx->r, sizeof(*broken_node));
        broken_node->node = node;
        broken_node->next = ctx->broken_nodes;
        ctx->broken_nodes = broken_node;
        break;
      }
    }
    checkIntegrityRecursively(ctx, node->subnodes, check_file_callback);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6873
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x684d
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x6a60
testb $0x1, %al
jne 0x683d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x10, %esi
callq 0x230e0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x684d
jmp 0x683f
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x67e3
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x67b0
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x67cc
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/integrity.c
// Function: storedFileIsHealthy
static bool storedFileIsHealthy(IntegrityCheckContext *ctx,
                                const RegularFileInfo *file_info,
                                StringView unique_subpath)
{
  StringView path_to_stored_file = strAppendPath(
    ctx->repo_path, unique_subpath, ctx->reusable_buffer_allocator);

  if(!sPathExists(path_to_stored_file))
  {
    callProgressCallback(ctx, file_info->size);
    return false;
  }

  const struct stat stats = sLStat(path_to_stored_file);
  if(!S_ISREG(stats.st_mode))
  {
    callProgressCallback(ctx, file_info->size);
    return false;
  }
  if((uint64_t)stats.st_size != file_info->size)
  {
    callProgressCallback(ctx, file_info->size);
    return false;
  }

  uint8_t hash[FILE_HASH_SIZE];
  fileHash(path_to_stored_file, stats, hash, fileHashCallback, ctx);
  return memcmp(file_info->hash, hash, FILE_HASH_SIZE) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
leaq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
movq -0x10(%rbp), %rdx
movq 0x28(%rdx), %rsi
leaq -0x30(%rbp), %rdi
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xf750
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xc4d0
testb $0x1, %al
jne 0x6963
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6c00
movb $0x0, -0x1(%rbp)
jmp 0x6a51
leaq -0xc0(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xc670
movl -0xa8(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0x69b8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6c00
movb $0x0, -0x1(%rbp)
jmp 0x6a51
movq -0x90(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x69e0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6c00
movb $0x0, -0x1(%rbp)
jmp 0x6a51
leaq -0xe0(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rdx
movq %rsp, %rax
movq %rax, %rdi
addq $0x18, %rdi
movl $0x12, %ecx
leaq -0xc0(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq -0xe8(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movups -0x30(%rbp), %xmm0
movups %xmm0, (%rax)
leaq 0x218(%rip), %rsi       # 0x6c40
callq 0x4860
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq -0xe0(%rbp), %rsi
movl $0x14, %edx
callq 0x2200
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/integrity.c
// Function: callProgressCallback
static void callProgressCallback(const IntegrityCheckContext *ctx,
                                 const uint64_t processed_block_size)
{
  if(ctx->progress_callback != NULL)
  {
    ctx->progress_callback(processed_block_size,
                           ctx->files_to_check_total_size,
                           ctx->callback_user_data);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x6c39
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rdx
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: metadataNew
Metadata *metadataNew(CR_Region *r)
{
  Metadata *metadata = CR_RegionAlloc(r, sizeof *metadata);
  metadata->r = r;

  metadata->current_backup.id = 0;
  metadata->current_backup.completion_time = 0;
  metadata->current_backup.ref_count = 0;

  metadata->backup_history_length = 0;
  metadata->backup_history = NULL;

  metadata->config_history = NULL;

  metadata->total_path_count = 0;
  metadata->path_table = strTableNew(metadata->r);
  metadata->paths = NULL;

  return metadata;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x50, %esi
callq 0x230e0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xf830
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: readSize
static size_t readSize(const FileContent content, size_t *reader_position,
                       StringView metadata_path)
{
  const uint64_t size = read64(content, reader_position, metadata_path);

  if(size > SIZE_MAX)
  {
    die("failed to read 64 bit size value from \"" PRI_STR "\"",
        STR_FMT(metadata_path));
  }

  return (size_t)size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7b70
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jbe 0x706c
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movl %ecx, %esi
movq (%rax), %rdx
leaq 0x1d40b(%rip), %rdi     # 0x24470
movb $0x0, %al
callq 0x4680
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: readTime
static time_t readTime(const FileContent content, size_t *reader_position,
                       StringView metadata_path)
{
  CR_StaticAssert(sizeof(time_t) == 4 || sizeof(time_t) == 8);

  const int64_t time =
    (int64_t)read64(content, reader_position, metadata_path);

  if(sizeof(time_t) == 4 && (time < INT32_MIN || time > INT32_MAX))
  {
    die("unable to read 64-bit timestamp from \"" PRI_STR "\"",
        STR_FMT(metadata_path));
  }

  return (time_t)time;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x709e
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7b70
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: readFullPathHistory
static PathHistory *readFullPathHistory(Allocator *region_wrapper,
                                        const FileContent content,
                                        size_t *reader_position,
                                        StringView metadata_path,
                                        Metadata *metadata)
{
  const size_t history_length =
    readSize(content, reader_position, metadata_path);

  if(history_length == 0)
  {
    return NULL;
  }

  PathHistory *first_point = readPathHistory(
    region_wrapper, content, reader_position, metadata_path, metadata);
  PathHistory *current_point = first_point;

  for(size_t counter = 1; counter < history_length; counter++)
  {
    current_point->next = readPathHistory(
      region_wrapper, content, reader_position, metadata_path, metadata);
    current_point = current_point->next;
  }

  return first_point;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7000
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x7146
movq $0x0, -0x8(%rbp)
jmp 0x71fd
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %r9
movq %r9, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7d40
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x1, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x71f5
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %r9
movq %r9, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7d40
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x7190
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: writePathList
static void writePathList(const PathNode *node_list, RepoWriter *writer)
{
  size_t list_length = 0;
  for(const PathNode *node = node_list; node != NULL; node = node->next)
  {
    if(backupHintNoPol(node->hint) != BH_not_part_of_repository)
    {
      list_length = sSizeAdd(list_length, 1);
    }
  }

  write64(list_length, writer);

  for(const PathNode *node = node_list; node != NULL; node = node->next)
  {
    if(backupHintNoPol(node->hint) != BH_not_part_of_repository)
    {
      StringView name = strSplitPath(node->path).tail;
      write64(name.length, writer);
      repoWriterWrite(name.content, name.length, writer);

      write8(node->policy, writer);
      writePathHistoryList(node->history, writer);
      writePathList(node->subnodes, writer);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7a8d
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x1ff, %eax            # imm = 0x1FF
cmpl $0x4, %eax
je 0x7a7d
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xb8f0
movq %rax, -0x18(%rbp)
jmp 0x7a7f
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x7a53
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x77f0
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x7b66
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x1ff, %eax            # imm = 0x1FF
cmpl $0x4, %eax
je 0x7b53
movq -0x28(%rbp), %rax
leaq -0x70(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xf390
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x77f0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xa0d0
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rsi
movzbl %al, %edi
callq 0x8410
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x7830
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x7a30
jmp 0x7b55
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x7aa2
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: read64
static uint64_t read64(const FileContent content, size_t *reader_position,
                       StringView metadata_path)
{
  assertBytesLeft(*reader_position, sizeof(uint64_t), content,
                  metadata_path);

  uint64_t value;
  memcpy(&value, &content.content[*reader_position], sizeof(value));
  *reader_position += sizeof(value);

  return convertEndian64(value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq (%rcx), %rdi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x8, %esi
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7bf0
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x7c70
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: assertBytesLeft
static void assertBytesLeft(const size_t reader_position,
                            const size_t bytes, const FileContent content,
                            StringView metadata_path)
{
  if(sSizeAdd(reader_position, bytes) > content.size)
  {
    die("corrupted metadata: expected %zu byte%s, got %zu: \"" PRI_STR
        "\"",
        bytes, bytes == 1 ? "" : "s", content.size - reader_position,
        STR_FMT(metadata_path));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xb8f0
cmpq -0x8(%rbp), %rax
jbe 0x7c65
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdi
leaq 0x1c7dd(%rip), %rdx     # 0x24413
leaq 0x1cb6d(%rip), %rcx     # 0x247aa
cmpq $0x1, %rdi
cmoveq %rcx, %rdx
movq -0x8(%rbp), %rcx
subq -0x18(%rbp), %rcx
movq 0x8(%rax), %rdi
movl %edi, %r8d
movq (%rax), %r9
leaq 0x1c83f(%rip), %rdi     # 0x2449d
movb $0x0, %al
callq 0x4680
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: convertEndian64
static uint64_t convertEndian64(uint64_t value)
{
  if(endian_test.array[0] == 1)
  {
    return value;
  }
  if(endian_test.array[3] == 1)
  {
    value = ((value << 8) & 0xFF00FF00FF00FF00ULL) |
      ((value >> 8) & 0x00FF00FF00FF00FFULL);
    value = ((value << 16) & 0xFFFF0000FFFF0000ULL) |
      ((value >> 16) & 0x0000FFFF0000FFFFULL);
    return (value << 32) | (value >> 32);
  }
  die("failed to convert value: Unsupported endianness");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movzbl 0x1c945(%rip), %eax     # 0x245c8
cmpl $0x1, %eax
jne 0x7c95
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7d2a
movzbl 0x1c92f(%rip), %eax     # 0x245cb
cmpl $0x1, %eax
jne 0x7d1c
movq -0x10(%rbp), %rax
shlq $0x8, %rax
movabsq $-0xff00ff00ff0100, %rcx # imm = 0xFF00FF00FF00FF00
andq %rcx, %rax
movq -0x10(%rbp), %rcx
shrq $0x8, %rcx
movabsq $0xff00ff00ff00ff, %rdx # imm = 0xFF00FF00FF00FF
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shlq $0x10, %rax
movabsq $-0xffff00010000, %rcx  # imm = 0xFFFF0000FFFF0000
andq %rcx, %rax
movq -0x10(%rbp), %rcx
shrq $0x10, %rcx
movabsq $0xffff0000ffff, %rdx   # imm = 0xFFFF0000FFFF
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
shlq $0x20, %rax
movq -0x10(%rbp), %rcx
shrq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x7d2a
leaq 0x1c7b3(%rip), %rdi     # 0x244d6
movb $0x0, %al
callq 0x4680
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: read8
static uint8_t read8(const FileContent content, size_t *reader_position,
                     StringView metadata_path)
{
  assertBytesLeft(*reader_position, sizeof(uint8_t), content,
                  metadata_path);

  const uint8_t byte = content.content[*reader_position];
  *reader_position += sizeof(byte);

  return byte;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq (%rcx), %rdi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7bf0
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movb -0x19(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: read32
static uint32_t read32(const FileContent content, size_t *reader_position,
                       StringView metadata_path)
{
  assertBytesLeft(*reader_position, sizeof(uint32_t), content,
                  metadata_path);

  uint32_t value;
  memcpy(&value, &content.content[*reader_position], sizeof(value));
  *reader_position += sizeof(value);

  return convertEndian32(value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq (%rcx), %rdi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x4, %esi
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7bf0
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movl -0x1c(%rbp), %edi
callq 0x8390
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: convertEndian32
static uint32_t convertEndian32(uint32_t value)
{
  if(endian_test.array[0] == 1)
  {
    return value;
  }
  if(endian_test.array[3] == 1)
  {
    value = ((value << 8) & 0xFF00FF00) | ((value >> 8) & 0xFF00FF);
    return (value << 16) | (value >> 16);
  }
  die("failed to convert value: Unsupported endianness");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movzbl 0x1c226(%rip), %eax     # 0x245c8
cmpl $0x1, %eax
jne 0x83af
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x83f8
movzbl 0x1c215(%rip), %eax     # 0x245cb
cmpl $0x1, %eax
jne 0x83ea
movl -0x8(%rbp), %eax
shll $0x8, %eax
andl $0xff00ff00, %eax       # imm = 0xFF00FF00
movl -0x8(%rbp), %ecx
shrl $0x8, %ecx
andl $0xff00ff, %ecx         # imm = 0xFF00FF
orl %ecx, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shll $0x10, %eax
movl -0x8(%rbp), %ecx
shrl $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x83f8
leaq 0x1c0e5(%rip), %rdi     # 0x244d6
movb $0x0, %al
callq 0x4680
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: runGC
static void runGC(const Metadata *metadata, StringView repo_path,
                  const bool prepend_newline)
{
  if(prepend_newline)
  {
    printf("\n");
  }

  GCProgressCallback *gc_progress_callback = NULL;
  if(sIsTTY(stdout))
  {
    gc_progress_callback = gcProgressCallback;
    printf("\n");
    printGCProgress(false, 0, 100, 0);
  }

  const GCStatistics gc_stats = collectGarbageProgress(
    metadata, repo_path, gc_progress_callback, &(GCProgressContext){ 0 });
  printGCProgress(true, 0, 100, gc_stats.deleted_items_total_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %sil, %al
leaq 0x10(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0x8d60
leaq 0x1ba50(%rip), %rdi     # 0x247a9
movb $0x0, %al
callq 0x2130
movq $0x0, -0x18(%rbp)
movq 0x20251(%rip), %rax     # 0x28fc0
movq (%rax), %rdi
callq 0xd290
testb $0x1, %al
jne 0x8d7d
jmp 0x8da9
leaq 0x79c(%rip), %rax       # 0x9520
movq %rax, -0x18(%rbp)
leaq 0x1ba1a(%rip), %rdi     # 0x247a9
movb $0x0, %al
callq 0x2130
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
movl $0x64, %edx
movq %rcx, %rsi
callq 0x9580
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
leaq -0x38(%rbp), %rdx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x4a30
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x64, %edx
callq 0x9580
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: metadataLoadFromRepo
static Metadata *metadataLoadFromRepo(CR_Region *r, StringView repo_arg,
                                      const RepoLockHint lock_hint)
{
  StringView repo_path = strStripTrailingSlashes(repo_arg);
  StringView metadata_path =
    strAppendPath(repo_path, str("metadata"), allocatorWrapRegion(r));

  if(!sPathExists(metadata_path))
  {
    die("repository has no metadata: \"" PRI_STR "\"", STR_FMT(repo_arg));
  }

  repoLock(r, repo_path, lock_hint);
  return metadataLoad(r, metadata_path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x28(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xf2e0
leaq -0x58(%rbp), %rdi
leaq 0x1b367(%rip), %rsi     # 0x241be
callq 0xf100
movq -0x8(%rbp), %rdi
callq 0x25a0
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
leaq -0x28(%rbp), %rcx
leaq -0x58(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xf750
leaq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xc4d0
testb $0x1, %al
jne 0x8eed
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rcx
movl %ecx, %esi
movq (%rax), %rdx
leaq 0x1b875(%rip), %rdi     # 0x2475b
movb $0x0, %al
callq 0x4680
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa520
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x6d20
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: restore
static void restore(CR_Region *r, StringView repo_arg, const size_t id,
                    StringView path)
{
  Metadata *metadata = metadataLoadFromRepo(r, repo_arg, RLH_readonly);
  StringView full_path =
    strStripTrailingSlashes(buildFullPath(allocatorWrapRegion(r), path));
  initiateRestore(metadata, id, full_path);

  const ChangeSummary changes = printMetadataChanges(metadata, NULL);
  if(containsChanges(&changes) && printf("\n") == 1)
  {
    ensureUserConsent("restore?", allocatorWrapOneSingleGrowableBuffer(r));
    finishRestore(metadata, id, repo_arg);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
leaq 0x28(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8e10
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x25a0
movq %rax, %rsi
movq -0xa0(%rbp), %rax
leaq -0x48(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9870
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xf2e0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa760
movq -0x18(%rbp), %rsi
leaq -0x98(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x5390
leaq -0x98(%rbp), %rdi
callq 0x5660
testb $0x1, %al
jne 0x922f
jmp 0x9287
leaq 0x1b573(%rip), %rdi     # 0x247a9
movb $0x0, %al
callq 0x2130
cmpl $0x1, %eax
jne 0x9287
movq -0x8(%rbp), %rdi
callq 0x25e0
movq %rax, %rsi
leaq 0x1b5b5(%rip), %rdi     # 0x2480a
callq 0x9330
movq -0xa8(%rbp), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xad70
addq $0xc0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: printStats
static void printStats(const char *summary, const TextColor color,
                       const ChangeDetail stats, bool *printed_stats)
{
  if(*printed_stats)
  {
    printf(", ");
  }
  else
  {
    *printed_stats = true;
  }

  printf("%s: ", summary);
  colorPrintf(stdout, color, "%zu", stats.affected_items_count);
  printf(" (");
  printHumanReadableSize(stats.affected_items_total_size);
  printf(")");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, (%rax)
je 0x92c4
leaq 0x1b145(%rip), %rdi     # 0x24400
movb $0x0, %al
callq 0x2130
jmp 0x92cb
movq -0x28(%rbp), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rsi
leaq 0x1afa8(%rip), %rdi     # 0x2427e
movb $0x0, %al
callq 0x2130
movq 0x1fcdc(%rip), %rax     # 0x28fc0
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rcx
leaq 0x1b148(%rip), %rdx     # 0x2443d
movb $0x0, %al
callq 0x4590
leaq 0x1b43f(%rip), %rdi     # 0x24742
movb $0x0, %al
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x4f70
leaq 0x1b0d2(%rip), %rdi     # 0x243ec
movb $0x0, %al
callq 0x2130
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: ensureUserConsent
static void ensureUserConsent(const char *question,
                              Allocator *reusable_buffer)
{
  while(true)
  {
    printf("%s (y/n) ", question);
    if(!sIsTTY(stdin))
    {
      printf("\n");
    }

    StringView line = str("");
    if(!sReadLine(stdin, reusable_buffer, &line) ||
       strIsEqual(line, str("n")) || strIsEqual(line, str("no")))
    {
      exit(EXIT_FAILURE);
    }
    if(strIsEqual(line, str("y")) || strIsEqual(line, str("yes")))
    {
      break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x1b3a1(%rip), %rdi     # 0x246ef
movb $0x0, %al
callq 0x2130
movq 0x1fc6c(%rip), %rax     # 0x28fc8
movq (%rax), %rdi
callq 0xd290
testb $0x1, %al
jne 0x9376
leaq 0x1b43a(%rip), %rdi     # 0x247a9
movb $0x0, %al
callq 0x2130
leaq -0x28(%rbp), %rdi
leaq 0x1b429(%rip), %rsi     # 0x247aa
callq 0xf100
movq 0x1fc3b(%rip), %rax     # 0x28fc8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0xd090
testb $0x1, %al
jne 0x93a6
jmp 0x9450
leaq -0x40(%rbp), %rdi
leaq 0x1b348(%rip), %rsi     # 0x246f9
callq 0xf100
leaq -0x28(%rbp), %rcx
leaq -0x40(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xf4c0
testb $0x1, %al
jne 0x9450
leaq -0x58(%rbp), %rdi
leaq 0x1b2f6(%rip), %rsi     # 0x246fb
callq 0xf100
leaq -0x28(%rbp), %rcx
leaq -0x58(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xf4c0
testb $0x1, %al
jne 0x9450
jmp 0x945a
movl $0x1, %edi
callq 0x2380
leaq -0x70(%rbp), %rdi
leaq 0x1b6a4(%rip), %rsi     # 0x24b09
callq 0xf100
leaq -0x28(%rbp), %rcx
leaq -0x70(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xf4c0
testb $0x1, %al
jne 0x950a
leaq -0x88(%rbp), %rdi
leaq 0x1b242(%rip), %rsi     # 0x246fe
callq 0xf100
leaq -0x28(%rbp), %rcx
leaq -0x88(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xf4c0
testb $0x1, %al
jne 0x950a
jmp 0x950c
jmp 0x9511
jmp 0x9343
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: gcProgressCallback
static void gcProgressCallback(const uint64_t deleted_items_size,
                               const size_t max_call_limit,
                               void *user_data)
{
  GCProgressContext *ctx = user_data;

  if(shouldUpdateProgressLine(&ctx->last_print_timestamp))
  {
    printGCProgress(false, ctx->items_visited, max_call_limit,
                    deleted_items_size);
  }
  ctx->items_visited++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x95d0
testb $0x1, %al
jne 0x954f
jmp 0x9565
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
xorl %edi, %edi
callq 0x9580
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: shouldUpdateProgressLine
static bool shouldUpdateProgressLine(uint64_t *last_print_timestamp)
{
  const uint64_t now = sTimeMilliseconds();
  if(sUint64GetDifference(*last_print_timestamp, now) > 50)
  {
    *last_print_timestamp = now;
    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
callq 0xd420
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xba30
cmpq $0x32, %rax
jbe 0x960c
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x9610
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: printProgress
static void printProgress(const bool assume_is_finished,
                          const uint64_t processed_amount,
                          const uint64_t total_amount,
                          const uint64_t amount_to_format,
                          const char *info_text,
                          const char *formatted_action_suffix)
{
  startOverprintingPreviousLine();
  printf("%s... ", info_text);

  if(assume_is_finished)
  {
    colorPrintf(stdout, TC_bold, "100.0%%");
    printf(" (");
    printHumanReadableSize(amount_to_format);
    printf(" %s)\n", formatted_action_suffix);
  }
  else if(processed_amount >= total_amount)
  {
    printf("99.9%% (");
    printHumanReadableSize(amount_to_format);
    printf(" %s)\n", formatted_action_suffix);
  }
  else if(processed_amount > 0)
  {
    const size_t permille =
      sUint64Mul(processed_amount, 1000) / total_amount;
    printf("%3zu.%zu%% (", permille / 10, permille % 10);
    printHumanReadableSize(amount_to_format);
    printf(" %s)\n", formatted_action_suffix);
  }
  else
  {
    printf("\n");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
callq 0x9770
movq -0x28(%rbp), %rsi
leaq 0x1b0d3(%rip), %rdi     # 0x24727
movb $0x0, %al
callq 0x2130
testb $0x1, -0x1(%rbp)
je 0x96ac
movq 0x1f958(%rip), %rax     # 0x28fc0
movq (%rax), %rdi
movl $0x1, %esi
leaq 0x1b0b7(%rip), %rdx     # 0x2472e
movb $0x0, %al
callq 0x4590
leaq 0x1b0bd(%rip), %rdi     # 0x24742
movb $0x0, %al
callq 0x2130
movq -0x20(%rbp), %rdi
callq 0x4f70
movq -0x30(%rbp), %rsi
leaq 0x1b096(%rip), %rdi     # 0x24736
movb $0x0, %al
callq 0x2130
jmp 0x975e
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x96e1
leaq 0x1b07f(%rip), %rdi     # 0x2473c
movb $0x0, %al
callq 0x2130
movq -0x20(%rbp), %rdi
callq 0x4f70
movq -0x30(%rbp), %rsi
leaq 0x1b05e(%rip), %rdi     # 0x24736
movb $0x0, %al
callq 0x2130
jmp 0x975c
cmpq $0x0, -0x10(%rbp)
jbe 0x974c
movq -0x10(%rbp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0xb9d0
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
movq -0x38(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
leaq 0x1b01d(%rip), %rdi     # 0x24745
movb $0x0, %al
callq 0x2130
movq -0x20(%rbp), %rdi
callq 0x4f70
movq -0x30(%rbp), %rsi
leaq 0x1aff3(%rip), %rdi     # 0x24736
movb $0x0, %al
callq 0x2130
jmp 0x975a
leaq 0x1b056(%rip), %rdi     # 0x247a9
movb $0x0, %al
callq 0x2130
jmp 0x975c
jmp 0x975e
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: integrityProgressCallback
static void
integrityProgressCallback(const uint64_t processed_block_size,
                          const uint64_t total_bytes_to_process,
                          void *user_data)
{
  IntegrityProgressContext *ctx = user_data;

  ctx->bytes_processed =
    sUint64Add(ctx->bytes_processed, processed_block_size);
  if(sIsTTY(stdout) &&
     shouldUpdateProgressLine(&ctx->last_print_timestamp))
  {
    printIntegrityProgress(false, ctx->bytes_processed,
                           total_bytes_to_process);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xb990
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq 0x1f793(%rip), %rax     # 0x28fc0
movq (%rax), %rdi
callq 0xd290
testb $0x1, %al
jne 0x983b
jmp 0x9860
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x95d0
testb $0x1, %al
jne 0x984e
jmp 0x9860
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rdx
xorl %edi, %edi
callq 0x97a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/nb.c
// Function: buildFullPath
static StringView buildFullPath(Allocator *a, StringView path)
{
  if(path.content[0] == '/')
  {
    return path;
  }

  StringView cwd = sGetCurrentDir(a);
  return strAppendPath(strStripTrailingSlashes(cwd), path, a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rsi, -0x8(%rbp)
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x98ba
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x9935
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xcf20
leaq -0x38(%rbp), %rdi
leaq -0x20(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xf2e0
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rsi
leaq -0x38(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xf750
movq -0x48(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/repository.c
// Function: fillPathBufferWithInfo
static void fillPathBufferWithInfo(StringView repo_path,
                                   const RegularFileInfo *info)
{
  /* The +1 is for the slash after the repo path. */
  size_t required_capacity = getFilePathRequiredCapacity(info) + 1;
  required_capacity = sSizeAdd(required_capacity, repo_path.length);
  path_buffer = CR_EnsureCapacity(path_buffer, required_capacity);

  memcpy(path_buffer, repo_path.content, repo_path.length);
  path_buffer[repo_path.length] = '/';

  char *hash_buffer = &path_buffer[repo_path.length + 1];
  buildFilePath(hash_buffer, info);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9ac0
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x8(%rax), %rsi
callq 0xb8f0
movq %rax, -0x10(%rbp)
movq 0x1f89c(%rip), %rdi     # 0x292a0
movq -0x10(%rbp), %rsi
callq 0x22ab0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x1f885(%rip)     # 0x292a0
movq 0x1f87e(%rip), %rdi     # 0x292a0
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x2250
movq -0x20(%rbp), %rcx
movq 0x1f867(%rip), %rax     # 0x292a0
movq 0x8(%rcx), %rdx
movb $0x2f, (%rax,%rdx)
movq 0x1f858(%rip), %rax     # 0x292a0
movq 0x8(%rcx), %rcx
addq $0x1, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x9b20
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/repository.c
// Function: buildFilePath
static void buildFilePath(char *buffer, const RegularFileInfo *info)
{
  sprintf(buffer, "%02x", info->hash[0]);
  sprintf(&buffer[3], "%02x", info->hash[1]);
  buffer[2] = buffer[1];
  buffer[1] = '/';
  buffer[5] = buffer[4];
  buffer[4] = '/';
  buffer += 2;

  for(size_t index = 2; index < FILE_HASH_SIZE; index++)
  {
    sprintf(&buffer[index * 2], "%02x", info->hash[index]);
  }

  char *suffix_buffer = &buffer[FILE_HASH_SIZE * 2];
  sprintf(suffix_buffer, "x%" PRIx64 "x%x", info->size, info->slot);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl 0x18(%rax), %edx
leaq 0x1ae41(%rip), %rsi     # 0x24984
movb $0x0, %al
callq 0x2370
movq -0x8(%rbp), %rdi
addq $0x3, %rdi
movq -0x10(%rbp), %rax
movzbl 0x19(%rax), %edx
leaq 0x1ae23(%rip), %rsi     # 0x24984
movb $0x0, %al
callq 0x2370
movq -0x8(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movb $0x2f, 0x1(%rax)
movq -0x8(%rbp), %rax
movb 0x4(%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x8(%rbp), %rax
movb $0x2f, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq $0x2, -0x18(%rbp)
cmpq $0x14, -0x18(%rbp)
jae 0x9be6
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
shlq %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl 0x18(%rax,%rcx), %edx
leaq 0x1adb3(%rip), %rsi     # 0x24984
movb $0x0, %al
callq 0x2370
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x9ba8
movq -0x8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movzbl 0x2c(%rax), %ecx
leaq 0x1ad7c(%rip), %rsi     # 0x24989
movb $0x0, %al
callq 0x2370
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/repository.c
// Function: repoReaderOpenFile
RepoReader *repoReaderOpenFile(StringView repo_path,
                               StringView source_file_path,
                               const RegularFileInfo *info)
{
  fillPathBufferWithInfo(repo_path, info);
  FILE *stream = fopen(path_buffer, "rb");
  if(stream == NULL)
  {
    dieErrno("failed to open \"" PRI_STR "\" in \"" PRI_STR "\"",
             STR_FMT(source_file_path), STR_FMT(repo_path));
  }

  RepoReader *reader = sMalloc(sizeof *reader);
  strSet(&reader->repo_path, repo_path);
  strSet(&reader->source_file_path, source_file_path);
  reader->stream = stream;

  return reader;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x99c0
movq 0x1f63b(%rip), %rdi     # 0x292a0
leaq 0x1aba7(%rip), %rsi     # 0x24813
callq 0x2330
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9ca2
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rdx
movl %edx, %esi
movq (%rcx), %rdx
movq 0x8(%rax), %rcx
movq (%rax), %r8
leaq 0x1ab7b(%rip), %rdi     # 0x24816
movb $0x0, %al
callq 0x4760
movl $0x38, %edi
callq 0xba70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xf240
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xf240
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)