// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movl 0x18(%rdi), %eax
movl %eax, %r15d
andl $0x1ff, %r15d           # imm = 0x1FF
cmpl $0x4, %r15d
je 0x4a8f
cmpl $0x3, %r15d
je 0x4a7c
cmpl $0x2, %r15d
jne 0x4ac7
movq 0xe57a(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x98ce(%rip), %rdx      # 0xe32e
xorl %r13d, %r13d
movl $0x5, %esi
xorl %eax, %eax
callq 0x3bbc
movq %r14, %rdi
movl $0x4, %esi
jmp 0x4bd9
movq 0xe54d(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x98a5(%rip), %rdx      # 0xe332
jmp 0x4aab
cmpl $0x2, 0x1c(%r14)
movq 0xe535(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
jne 0x4b25
leaq 0x988b(%rip), %rdx      # 0xe336
xorl %r13d, %r13d
movl $0x3, %esi
xorl %eax, %eax
callq 0x3bbc
movq %r14, %rdi
movl $0x2, %esi
jmp 0x4bd9
leal -0x5(%r15), %r13d
cmpl $0x9, %r13d
jae 0x4b48
movq 0xe4f8(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x985c(%rip), %rdx      # 0xe33e
movl $0xd, %esi
xorl %eax, %eax
callq 0x3bbc
movq %r14, %rdi
movl $0xc, %esi
callq 0x5145
leaq 0x9c35(%rip), %rdi      # 0xe737
xorl %eax, %eax
callq 0x2150
leaq 0x9730(%rip), %rax      # 0xe240
movslq (%rax,%r13,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x9832(%rip), %rdi      # 0xe352
jmp 0x5122
leaq 0x980e(%rip), %rdx      # 0xe33a
xorl %r13d, %r13d
movl $0x9, %esi
xorl %eax, %eax
callq 0x3bbc
movq %r14, %rdi
movl $0x8, %esi
jmp 0x4bd9
testb %al, %al
js 0x4bb1
testb %r12b, %r12b
je 0x5087
cmpq $0x0, (%rbx)
jne 0x4b74
cmpq $0x0, 0x10(%rbx)
jne 0x4b74
cmpq $0x0, 0x20(%rbx)
jne 0x4b74
cmpq $0x0, 0x30(%rbx)
je 0x5087
movq 0xe455(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x97bd(%rip), %rdx      # 0xe342
xorl %r13d, %r13d
movl $0x7, %esi
xorl %eax, %eax
callq 0x3bbc
movq %r14, %rdi
movl $0x6, %esi
callq 0x5145
leaq 0x979e(%rip), %rdi      # 0xe346
xorl %eax, %eax
callq 0x2150
jmp 0x4bde
movq 0xe418(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x9780(%rip), %rdx      # 0xe342
xorl %r13d, %r13d
movl $0x7, %esi
xorl %eax, %eax
callq 0x3bbc
movq %r14, %rdi
movl $0x6, %esi
callq 0x5145
movl 0x18(%r14), %eax
testb $0x10, %al
je 0x4c22
leaq 0x985d(%rip), %rax      # 0xe44a
leaq 0x9b43(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x97db(%rip), %rdi      # 0xe3f2
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
testb $0x20, %al
je 0x4c62
leaq 0x981d(%rip), %rax      # 0xe44a
leaq 0x9b03(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x97a1(%rip), %rdi      # 0xe3f8
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
movq 0x20(%r14), %rcx
cmpl $0x2, 0x8(%rcx)
je 0x4cd6
movl %eax, %ecx
shrl $0x6, %ecx
movl %eax, %edx
shrl $0x7, %edx
xorl %ecx, %edx
testb $0x1, %dl
je 0x4cd6
cmpb $0x0, 0x49(%rbx)
jne 0x4cd6
leaq 0x97c0(%rip), %rax      # 0xe44a
leaq 0x9aa6(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
testb $0x40, 0x18(%r14)
leaq 0x9757(%rip), %rax      # 0xe410
leaq 0x9adf(%rip), %rsi      # 0xe79f
cmoveq %rax, %rsi
leaq 0x9739(%rip), %rdi      # 0xe404
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
btl $0x9, %eax
jae 0x4d18
leaq 0x9767(%rip), %rax      # 0xe44a
leaq 0x9a4d(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x9709(%rip), %rdi      # 0xe416
xorl %eax, %eax
callq 0x2150
movl 0x18(%r14), %eax
btl $0xa, %eax
jae 0x4d56
leaq 0x9725(%rip), %rax      # 0xe44a
leaq 0x9a0b(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x96d6(%rip), %rdi      # 0xe425
xorl %eax, %eax
callq 0x2150
movq 0x20(%r14), %rax
cmpl $0x0, 0x8(%rax)
je 0x4d65
movq %rax, %rbp
jmp 0x4d6e
movq 0x48(%rax), %rbp
testq %rbp, %rbp
je 0x4d60
cmpl $0x3, 0x8(%rbp)
jne 0x4dcf
addl $-0x2, %r15d
cmpl $0x6, %r15d
ja 0x4e59
leaq 0x94db(%rip), %rax      # 0xe264
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x96b1(%rip), %rax      # 0xe44a
leaq 0x9997(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x966a(%rip), %rdx      # 0xe434
jmp 0x501b
addl $-0x9, %r15d
cmpl $0x1, %r15d
ja 0x5020
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %r14
xorl %edi, %edi
callq 0x8778
movq %rax, %r15
xorl %edi, %edi
movq %r14, %rsi
callq 0x87b4
movq %rax, %r14
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rbx
movq %r15, %rdi
callq 0x8778
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x87b4
movq %rax, %rbx
leaq 0x9626(%rip), %rax      # 0xe44a
leaq 0x990c(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x95e8(%rip), %rdx      # 0xe436
movq %r15, %rdi
movq %rbx, %rsi
jmp 0x501b
testb %r12b, %r12b
je 0x5020
cmpq $0x0, (%rbx)
je 0x4ea5
leaq 0x95db(%rip), %rax      # 0xe44a
leaq 0x98c1(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x9594(%rip), %rdx      # 0xe434
callq 0x51ac
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %r12
callq 0x8778
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x87b4
testq %r14, %r14
je 0x4f0c
movq %rax, %r15
leaq 0x9573(%rip), %rax      # 0xe44a
leaq 0x9859(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x9535(%rip), %rdx      # 0xe436
movq %r14, %rdi
movq %r15, %rsi
callq 0x51ac
cmpq $0x0, 0x30(%rbx)
je 0x4f4f
leaq 0x9530(%rip), %rax      # 0xe44a
leaq 0x9816(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
movq 0x30(%rbx), %rsi
leaq 0x9517(%rip), %rdi      # 0xe45f
xorl %eax, %eax
callq 0x2150
cmpq $0x0, 0x40(%rbx)
je 0x5020
leaq 0x94e9(%rip), %rax      # 0xe44a
leaq 0x97cf(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
movq 0x40(%rbx), %rsi
cmpq $0x1, %rsi
leaq 0x980c(%rip), %rax      # 0xe79f
leaq 0x94c3(%rip), %rdx      # 0xe45d
cmoveq %rax, %rdx
leaq 0x94c6(%rip), %rdi      # 0xe46b
xorl %eax, %eax
callq 0x2150
jmp 0x5020
leaq 0x9495(%rip), %rax      # 0xe44a
leaq 0x977b(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
jmp 0x5014
leaq 0x9461(%rip), %rax      # 0xe44a
leaq 0x9747(%rip), %rdi      # 0xe737
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rsi
leaq 0x941b(%rip), %rdx      # 0xe436
callq 0x51ac
testb %r13b, %r13b
je 0x502f
movl $0x29, %edi
callq 0x2050
cmpl $0x2, 0x8(%rbp)
jne 0x506f
movq 0xdf94(%rip), %rbx      # 0x12fd0
movq (%rbx), %rdi
leaq 0x93f2(%rip), %rdx      # 0xe438
movl $0xa, %esi
xorl %eax, %eax
callq 0x3bbc
movq (%rbx), %rdi
movl 0x20(%rbp), %ecx
movq 0x18(%rbp), %r8
leaq 0x924c(%rip), %rdx      # 0xe2af
movl $0xc, %esi
xorl %eax, %eax
callq 0x3bbc
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
movq 0xdf42(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
testl %r15d, %r15d
je 0x5131
leaq 0x92a9(%rip), %rdx      # 0xe34a
xorl %r13d, %r13d
movl $0xb, %esi
xorl %eax, %eax
callq 0x3bbc
movq %r14, %rdi
movl $0xa, %esi
callq 0x5145
testb %r12b, %r12b
je 0x4bde
cmpq $0x0, 0x40(%rbx)
je 0x513d
leaq 0x9272(%rip), %rdi      # 0xe346
xorl %r13d, %r13d
jmp 0x4ba8
leaq 0x92b6(%rip), %rdi      # 0xe399
jmp 0x5122
leaq 0x9288(%rip), %rdi      # 0xe374
jmp 0x5122
leaq 0x928f(%rip), %rdi      # 0xe384
jmp 0x5122
leaq 0x92d0(%rip), %rdi      # 0xe3ce
jmp 0x5122
leaq 0x925b(%rip), %rdi      # 0xe362
jmp 0x5122
leaq 0x929b(%rip), %rdi      # 0xe3ab
jmp 0x5122
leaq 0x92a7(%rip), %rdi      # 0xe3c0
jmp 0x5122
leaq 0x92bd(%rip), %rdi      # 0xe3df
xorl %eax, %eax
callq 0x2150
movb $0x1, %r13b
jmp 0x4bde
leaq 0x9216(%rip), %rdx      # 0xe34e
jmp 0x4b2c
xorl %r13d, %r13d
jmp 0x4bde