// File: /workspace/github_c_makefile_star2_O2/AlxHnr[P]nano-backup/src/informations.c
// Function: printNode
static void printNode(const PathNode *node, const ChangeSummary *summary,
                      const bool summarize_subnode_changes)
{
  const BackupHint hint = backupHintNoPol(node->hint);

  if(hint == BH_added)
  {
    colorPrintf(stdout, TC_green_bold, "++ ");
    printNodePath(node, TC_green);
  }
  else if(hint == BH_removed)
  {
    colorPrintf(stdout, TC_red_bold, "-- ");
    printNodePath(node, TC_red);
  }
  else if(hint == BH_not_part_of_repository)
  {
    if(node->policy == BPOL_mirror)
    {
      colorPrintf(stdout, TC_red_bold, "xx ");
      printNodePath(node, TC_red);
    }
    else
    {
      colorPrintf(stdout, TC_blue_bold, "?? ");
      printNodePath(node, TC_blue);
    }
  }
  else if(hint >= BH_regular_to_symlink && hint <= BH_other_to_directory)
  {
    colorPrintf(stdout, TC_cyan_bold, "<> ");
    printNodePath(node, TC_cyan);
  }
  else if(hint & BH_content_changed)
  {
    colorPrintf(stdout, TC_yellow_bold, "!! ");
    printNodePath(node, TC_yellow);
  }
  else if(summarize_subnode_changes && containsContentChanges(summary))
  {
    colorPrintf(stdout, TC_yellow_bold, "!! ");
    printNodePath(node, TC_yellow);
    printf("...");
  }
  else if(hint != BH_none)
  {
    colorPrintf(stdout, TC_magenta_bold, "@@ ");
    printNodePath(node, TC_magenta);

    if(summarize_subnode_changes && summary->changed_attributes > 0)
    {
      printf("...");
    }
  }
  else
  {
    colorPrintf(stdout, TC_blue_bold, ":: ");
    printNodePath(node, TC_blue);
  }

  bool has_printed_details = false;

  if(hint >= BH_regular_to_symlink && hint <= BH_other_to_directory)
  {
    printPrefix(&has_printed_details);

    switch(hint)
    {
      case BH_regular_to_symlink: printf("File -> Symlink"); break;
      case BH_regular_to_directory: printf("File -> Directory"); break;
      case BH_symlink_to_regular: printf("Symlink -> File"); break;
      case BH_symlink_to_directory: printf("Symlink -> Directory"); break;
      case BH_directory_to_regular: printf("Directory -> File"); break;
      case BH_directory_to_symlink: printf("Directory -> Symlink"); break;
      case BH_other_to_regular: printf("Other -> File"); break;
      case BH_other_to_symlink: printf("Other -> Symlink"); break;
      case BH_other_to_directory: printf("Other -> Directory"); break;
      default: /* ignore */ break;
    }
  }

  if(node->hint & BH_owner_changed)
  {
    printPrefix(&has_printed_details);
    printf("owner");
  }
  if(node->hint & BH_permissions_changed)
  {
    printPrefix(&has_printed_details);
    printf("permissions");
  }

  if(node->history->state.type != PST_symlink &&
     !(node->hint & BH_timestamp_changed) !=
       !(node->hint & BH_content_changed) &&
     !summary->affects_parent_timestamp)
  {
    printPrefix(&has_printed_details);
    printf("%stimestamp",
           (node->hint & BH_timestamp_changed) ? "" : "same ");
  }

  if(node->hint & BH_policy_changed)
  {
    printPrefix(&has_printed_details);
    printf("policy changed");
  }
  if(node->hint & BH_loses_history)
  {
    printPrefix(&has_printed_details);
    printf("looses history");
  }

  const PathState *existing_state = getExistingState(node);
  if(existing_state->type == PST_directory)
  {
    if(hint == BH_added || hint == BH_regular_to_directory ||
       hint == BH_symlink_to_directory)
    {
      printPrefix(&has_printed_details);
      printChangeDetail(summary->new_items, "+");
    }
    else if(hint == BH_removed)
    {
      printPrefix(&has_printed_details);
      printChangeDetail(summary->removed_items, "-");
    }
    else if(hint == BH_not_part_of_repository)
    {
      printPrefix(&has_printed_details);
      printChangeDetail(summary->lost_items, "-");
    }
    else if(summarize_subnode_changes)
    {
      printSummarizedDetail(summary, &has_printed_details);
    }
  }
  else if(hint == BH_directory_to_regular ||
          hint == BH_directory_to_symlink)
  {
    ChangeDetail lost_files = {
      .affected_items_count = 0,
      .affected_items_total_size = 0,
    };
    changeDetailAdd(&lost_files,
                    summary->removed_items.affected_items_count,
                    summary->removed_items.affected_items_total_size);
    changeDetailAdd(&lost_files, summary->lost_items.affected_items_count,
                    summary->lost_items.affected_items_total_size);
    printPrefix(&has_printed_details);
    printChangeDetail(lost_files, "-");
  }

  if(has_printed_details)
  {
    printf(")");
  }

  if(existing_state->type == PST_symlink)
  {
    colorPrintf(stdout, TC_magenta, " -> ");
    colorPrintf(stdout, TC_cyan, "" PRI_STR "",
                STR_FMT(existing_state->metadata.symlink_target));
  }

  printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x18(%rdi), %eax
movl %eax, %r12d
andl $0x1ff, %r12d           # imm = 0x1FF
pushq $0x8
popq %r13
pushq $0x2
popq %r15
cmpl $0x4, %r12d
je 0x47c2
cmpl $0x3, %r12d
je 0x47af
cmpl $0x2, %r12d
jne 0x47e6
movq 0xf83e(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
leaq 0x9b92(%rip), %rdx      # 0xe32e
pushq $0x5
popq %rsi
xorl %eax, %eax
callq 0x3830
pushq $0x4
popq %r15
jmp 0x4858
movq 0xf81a(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
leaq 0x9b72(%rip), %rdx      # 0xe332
jmp 0x47da
cmpl $0x2, 0x1c(%r14)
movq 0xf802(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
jne 0x4844
leaq 0x9b5c(%rip), %rdx      # 0xe336
pushq $0x3
popq %rsi
xorl %eax, %eax
callq 0x3830
jmp 0x4858
leal -0x5(%r12), %r15d
cmpl $0x9, %r15d
jae 0x49ea
movq 0xf7d4(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
leaq 0x9b38(%rip), %rdx      # 0xe33e
pushq $0xd
popq %rsi
xorl %eax, %eax
callq 0x3830
pushq $0xc
popq %rsi
movq %r14, %rdi
callq 0x4c6e
leaq 0xf(%rsp), %rdi
movb $0x0, (%rdi)
callq 0x4cd5
leaq 0x9a11(%rip), %rax      # 0xe240
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x9b13(%rip), %rdi      # 0xe352
jmp 0x4c62
leaq 0x9aef(%rip), %rdx      # 0xe33a
pushq $0x9
popq %rsi
xorl %eax, %eax
callq 0x3830
movl %r13d, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x4c6e
movb $0x0, 0xf(%rsp)
movl 0x18(%r14), %eax
testb $0x10, %al
je 0x488c
leaq 0xf(%rsp), %rdi
callq 0x4cd5
leaq 0x9b71(%rip), %rdi      # 0xe3f2
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
testb $0x20, %al
je 0x48ac
leaq 0xf(%rsp), %rdi
callq 0x4cd5
leaq 0x9b57(%rip), %rdi      # 0xe3f8
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
movq 0x20(%r14), %rcx
cmpl $0x2, 0x8(%rcx)
je 0x4900
movl %eax, %ecx
shrl $0x6, %ecx
movl %eax, %edx
shrl $0x7, %edx
xorl %ecx, %edx
testb $0x1, %dl
je 0x4900
cmpb $0x0, 0x49(%rbx)
jne 0x4900
leaq 0xf(%rsp), %rdi
callq 0x4cd5
testb $0x40, 0x18(%r14)
leaq 0x9b2d(%rip), %rax      # 0xe410
leaq 0x9eb5(%rip), %rsi      # 0xe79f
cmoveq %rax, %rsi
leaq 0x9b0f(%rip), %rdi      # 0xe404
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
btl $0x9, %eax
jae 0x4922
leaq 0xf(%rsp), %rdi
callq 0x4cd5
leaq 0x9aff(%rip), %rdi      # 0xe416
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
btl $0xa, %eax
jae 0x4940
leaq 0xf(%rsp), %rdi
callq 0x4cd5
leaq 0x9aec(%rip), %rdi      # 0xe425
xorl %eax, %eax
callq 0x2150
movq 0x20(%r14), %rax
cmpl $0x0, 0x8(%rax)
je 0x494f
movq %rax, %r15
jmp 0x4958
movq 0x48(%rax), %r15
testq %r15, %r15
je 0x494a
cmpl $0x3, 0x8(%r15)
jne 0x499a
addl $-0x2, %r12d
cmpl $0x6, %r12d
ja 0x4a36
leaq 0x98f0(%rip), %rax      # 0xe264
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x9a9f(%rip), %rdx      # 0xe434
jmp 0x4b30
addl $-0x9, %r12d
cmpl $0x1, %r12d
ja 0x4b35
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x4d67
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x4d67
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq (%r14), %rdi
movq 0x8(%r14), %rsi
jmp 0x4b29
testb %al, %al
js 0x4b98
testb %bpl, %bpl
je 0x4bbe
movq %rbx, %rdi
callq 0x457d
testb %al, %al
je 0x4bbe
movq 0xf5be(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
leaq 0x9926(%rip), %rdx      # 0xe342
pushq $0x7
popq %rsi
xorl %eax, %eax
callq 0x3830
pushq $0x6
popq %rsi
movq %r14, %rdi
callq 0x4c6e
jmp 0x4bfd
testb %bpl, %bpl
je 0x4b35
cmpq $0x0, (%rbx)
je 0x4a62
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x99d7(%rip), %rdx      # 0xe434
callq 0x4cff
movups 0x10(%rbx), %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x4d67
movq (%r14), %r14
testq %r14, %r14
je 0x4aa5
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq 0x18(%rsp), %rsi
leaq 0x9999(%rip), %rdx      # 0xe436
movq %r14, %rdi
callq 0x4cff
cmpq $0x0, 0x30(%rbx)
je 0x4ac8
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq 0x30(%rbx), %rsi
leaq 0x999e(%rip), %rdi      # 0xe45f
xorl %eax, %eax
callq 0x2150
cmpq $0x0, 0x40(%rbx)
je 0x4b35
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq 0x40(%rbx), %rsi
cmpq $0x1, %rsi
leaq 0x9cb7(%rip), %rax      # 0xe79f
leaq 0x996e(%rip), %rdx      # 0xe45d
cmoveq %rax, %rdx
leaq 0x9971(%rip), %rdi      # 0xe46b
xorl %eax, %eax
callq 0x2150
jmp 0x4b35
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
jmp 0x4b29
leaq 0xf(%rsp), %rdi
callq 0x4cd5
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rsi
leaq 0x9906(%rip), %rdx      # 0xe436
callq 0x4cff
cmpb $0x1, 0xf(%rsp)
jne 0x4b44
pushq $0x29
popq %rdi
callq 0x2050
cmpl $0x2, 0x8(%r15)
jne 0x4b82
movq 0xf47e(%rip), %rbx      # 0x13fd0
movq (%rbx), %rdi
leaq 0x98dc(%rip), %rdx      # 0xe438
pushq $0xa
popq %rsi
xorl %eax, %eax
callq 0x3830
movq (%rbx), %rdi
movl 0x20(%r15), %ecx
movq 0x18(%r15), %r8
leaq 0x9737(%rip), %rdx      # 0xe2af
pushq $0xc
popq %rsi
xorl %eax, %eax
callq 0x3830
pushq $0xa
popq %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
movq 0xf431(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
leaq 0x9799(%rip), %rdx      # 0xe342
pushq $0x7
popq %rsi
xorl %eax, %eax
callq 0x3830
pushq $0x6
popq %rsi
movq %r14, %rdi
jmp 0x485e
movq 0xf40b(%rip), %rax      # 0x13fd0
movq (%rax), %rdi
testl %r12d, %r12d
je 0x4c10
leaq 0x9776(%rip), %rdx      # 0xe34a
pushq $0xb
popq %rsi
xorl %eax, %eax
callq 0x3830
pushq $0xa
popq %rsi
movq %r14, %rdi
callq 0x4c6e
testb %bpl, %bpl
je 0x4863
cmpq $0x0, 0x40(%rbx)
je 0x4863
leaq 0x9742(%rip), %rdi      # 0xe346
xorl %eax, %eax
callq 0x2150
jmp 0x4863
leaq 0x9737(%rip), %rdx      # 0xe34e
jmp 0x484b
leaq 0x9776(%rip), %rdi      # 0xe399
jmp 0x4c62
leaq 0x9748(%rip), %rdi      # 0xe374
jmp 0x4c62
leaq 0x974f(%rip), %rdi      # 0xe384
jmp 0x4c62
leaq 0x9790(%rip), %rdi      # 0xe3ce
jmp 0x4c62
leaq 0x971b(%rip), %rdi      # 0xe362
jmp 0x4c62
leaq 0x975b(%rip), %rdi      # 0xe3ab
jmp 0x4c62
leaq 0x9767(%rip), %rdi      # 0xe3c0
jmp 0x4c62
leaq 0x977d(%rip), %rdi      # 0xe3df
xorl %eax, %eax
callq 0x2150
jmp 0x4868