// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/metadata.c
// Function: readPathSubnodes
static PathNode *
readPathSubnodes(Allocator *region_wrapper, const FileContent content,
                 size_t *reader_position, StringView metadata_path,
                 PathNode *parent_node, Metadata *metadata)
{
  const size_t node_count =
    readSize(content, reader_position, metadata_path);
  PathNode *node_tree = NULL;

  for(size_t counter = 0; counter < node_count; counter++)
  {
    PathNode *node = allocate(region_wrapper, sizeof *node);

    /* Prepend current node to node tree. */
    node->next = node_tree;
    node_tree = node;

    /* Read the name and append it to the parent nodes path. */
    const size_t name_length =
      readSize(content, reader_position, metadata_path);
    if(name_length == 0)
    {
      die("contains filename with length zero: \"" PRI_STR "\"",
          STR_FMT(metadata_path));
    }

    assertBytesLeft(*reader_position, name_length, content, metadata_path);

    StringView name =
      strUnterminated(&content.content[*reader_position], name_length);
    *reader_position += name_length;

    if(memchr(name.content, '\0', name.length) != NULL)
    {
      die("contains filename with null-bytes: \"" PRI_STR "\"",
          STR_FMT(metadata_path));
    }
    else if(memchr(name.content, '/', name.length) != NULL ||
            strIsDotElement(name))
    {
      die("contains invalid filename \"" PRI_STR "\": \"" PRI_STR "\"",
          STR_FMT(name), STR_FMT(metadata_path));
    }

    StringView parent_path =
      parent_node == NULL ? str("") : parent_node->path;
    strSet(&node->path, strAppendPath(parent_path, name, region_wrapper));

    /* Read other node variables. */
    strTableMap(metadata->path_table, node->path, node);

    node->hint = BH_none;
    node->policy = read8(content, reader_position, metadata_path);
    node->history = readFullPathHistory(
      region_wrapper, content, reader_position, metadata_path, metadata);

    node->subnodes =
      readPathSubnodes(region_wrapper, content, reader_position,
                       metadata_path, node, metadata);
  }

  return node_tree;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x20(%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 0x7000
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x75d8
movq -0x18(%rbp), %rdi
movl $0x38, %esi
callq 0x24c0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq -0x40(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq %rdx, 0x30(%rcx)
movq -0x50(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq -0x20(%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 0x7000
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x730d
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
movl %ecx, %esi
movq (%rax), %rdx
leaq 0x1d244(%rip), %rdi     # 0x2454a
movb $0x0, %al
callq 0x4680
movq -0xa8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rdi
movq -0x58(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
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), %rsi
movq -0x20(%rbp), %rax
addq (%rax), %rsi
movq -0x58(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0xf140
movq -0x58(%rbp), %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
xorl %esi, %esi
callq 0x21e0
cmpq $0x0, %rax
je 0x739e
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rcx
movl %ecx, %esi
movq (%rax), %rdx
leaq 0x1d1de(%rip), %rdi     # 0x24575
movb $0x0, %al
callq 0x4680
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
movl $0x2f, %esi
callq 0x21e0
cmpq $0x0, %rax
jne 0x73de
leaq -0x70(%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 0xf590
testb $0x1, %al
jne 0x73de
jmp 0x7404
movq -0xa8(%rbp), %rax
movq -0x68(%rbp), %rcx
movl %ecx, %esi
movq -0x70(%rbp), %rdx
movq 0x8(%rax), %rcx
movq (%rax), %r8
leaq 0x1d1a2(%rip), %rdi     # 0x2459f
movb $0x0, %al
callq 0x4680
jmp 0x7406
cmpq $0x0, -0x28(%rbp)
jne 0x7422
leaq -0x88(%rbp), %rdi
leaq 0x1d38f(%rip), %rsi     # 0x247aa
callq 0xf100
jmp 0x7440
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x80(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
leaq -0x88(%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 0xf750
movq -0xb0(%rbp), %rdi
leaq -0xa0(%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 0xf240
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x50(%rbp), %rax
movq -0x50(%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 0xf940
movq -0xa8(%rbp), %rax
movq -0x50(%rbp), %rcx
movl $0x0, 0x18(%rcx)
movq -0x20(%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 0x8210
movb %al, %cl
movq -0xa8(%rbp), %rax
movzbl %cl, %edx
movq -0x50(%rbp), %rcx
movl %edx, 0x1c(%rcx)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rsi
movq -0x8(%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 0x70e0
movq %rax, %rdx
movq -0xa8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rdx, 0x20(%rcx)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x30(%rbp), %r9
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %r10
movq %r10, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7210
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x727c
movq -0x40(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)