// File: /workspace/github_c_makefile_star2_O1/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
cmpq $0x4, %r15
je 0x4b58
cmpl $0x3, %r15d
je 0x4b45
cmpl $0x2, %r15d
jne 0x4b89
movq 0xe4ae(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x9802(%rip), %rdx      # 0xe32e
movl $0x5, %esi
xorl %eax, %eax
callq 0x3cd8
movq %r14, %rdi
movl $0x4, %esi
jmp 0x4c67
movq 0xe484(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x97dc(%rip), %rdx      # 0xe332
jmp 0x4b70
cmpl $0x2, 0x1c(%r14)
movq 0xe46c(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
jne 0x4bbc
leaq 0x97c6(%rip), %rdx      # 0xe336
movl $0x3, %esi
xorl %eax, %eax
callq 0x3cd8
movq %r14, %rdi
movl $0x2, %esi
jmp 0x4c67
leal -0x5(%r15), %ecx
cmpl $0x8, %ecx
ja 0x4bdc
movq 0xe437(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x979b(%rip), %rdx      # 0xe33e
movl $0xd, %esi
xorl %eax, %eax
callq 0x3cd8
movq %r14, %rdi
movl $0xc, %esi
jmp 0x4c67
leaq 0x9777(%rip), %rdx      # 0xe33a
movl $0x9, %esi
xorl %eax, %eax
callq 0x3cd8
movq %r14, %rdi
movl $0x8, %esi
jmp 0x4c67
testb %al, %al
js 0x4c42
testb %r12b, %r12b
je 0x513d
cmpq $0x0, (%rbx)
jne 0x4c08
cmpq $0x0, 0x10(%rbx)
jne 0x4c08
cmpq $0x0, 0x20(%rbx)
jne 0x4c08
cmpq $0x0, 0x30(%rbx)
je 0x513d
movq 0xe3c1(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x9729(%rip), %rdx      # 0xe342
movl $0x7, %esi
xorl %eax, %eax
callq 0x3cd8
movq %r14, %rdi
movl $0x6, %esi
callq 0x5191
leaq 0x970d(%rip), %rdi      # 0xe346
xorl %eax, %eax
callq 0x2150
jmp 0x4c6c
movq 0xe387(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
leaq 0x96ef(%rip), %rdx      # 0xe342
movl $0x7, %esi
xorl %eax, %eax
callq 0x3cd8
movq %r14, %rdi
movl $0x6, %esi
callq 0x5191
leal -0x5(%r15), %eax
cmpl $0x8, %eax
ja 0x4c9e
leaq 0x9abe(%rip), %rdi      # 0xe73a
xorl %eax, %eax
callq 0x2150
leaq 0x95d2(%rip), %rax      # 0xe25c
movslq -0x14(%rax,%r15,4), %rdi
addq %rax, %rdi
xorl %eax, %eax
callq 0x2150
movb $0x1, %r13b
jmp 0x4ca1
xorl %r13d, %r13d
testb $0x10, 0x18(%r14)
je 0x4ce0
leaq 0x979b(%rip), %rax      # 0xe44a
leaq 0x9a84(%rip), %rdi      # 0xe73a
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x9719(%rip), %rdi      # 0xe3f2
xorl %eax, %eax
callq 0x2150
testb $0x20, 0x18(%r14)
je 0x4d1f
leaq 0x975c(%rip), %rax      # 0xe44a
leaq 0x9a45(%rip), %rdi      # 0xe73a
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x96e0(%rip), %rdi      # 0xe3f8
xorl %eax, %eax
callq 0x2150
movq 0x20(%r14), %rax
cmpl $0x2, 0x8(%rax)
je 0x4d90
movl 0x18(%r14), %eax
movl %eax, %ecx
shrl $0x6, %ecx
shrl $0x7, %eax
xorl %ecx, %eax
testb $0x1, %al
je 0x4d90
cmpb $0x0, 0x49(%rbx)
jne 0x4d90
leaq 0x9702(%rip), %rax      # 0xe44a
leaq 0x99eb(%rip), %rdi      # 0xe73a
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 0x9699(%rip), %rax      # 0xe410
leaq 0x9a24(%rip), %rsi      # 0xe7a2
cmoveq %rax, %rsi
leaq 0x967b(%rip), %rdi      # 0xe404
xorl %eax, %eax
callq 0x2150
testb $0x2, 0x19(%r14)
je 0x4dcf
leaq 0x96ac(%rip), %rax      # 0xe44a
leaq 0x9995(%rip), %rdi      # 0xe73a
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x964e(%rip), %rdi      # 0xe416
xorl %eax, %eax
callq 0x2150
testb $0x4, 0x19(%r14)
je 0x4e0e
leaq 0x966d(%rip), %rax      # 0xe44a
leaq 0x9956(%rip), %rdi      # 0xe73a
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x961e(%rip), %rdi      # 0xe425
xorl %eax, %eax
callq 0x2150
movq 0x20(%r14), %rax
cmpl $0x0, 0x8(%rax)
je 0x4e1d
movq %rax, %rbp
jmp 0x4e26
movq 0x48(%rax), %rbp
testq %rbp, %rbp
je 0x4e18
cmpl $0x3, 0x8(%rbp)
jne 0x4e86
leal -0x2(%r15), %eax
cmpl $0x6, %eax
ja 0x4f0f
leaq 0x9400(%rip), %rcx      # 0xe240
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x95fa(%rip), %rax      # 0xe44a
leaq 0x98e3(%rip), %rdi      # 0xe73a
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 0x95b3(%rip), %rdx      # 0xe434
jmp 0x50d1
leal -0x9(%r15), %eax
cmpl $0x1, %eax
ja 0x50d6
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %r14
xorl %edi, %edi
callq 0x8924
movq %rax, %r15
xorl %edi, %edi
movq %r14, %rsi
callq 0x8960
movq %rax, %r14
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rbx
movq %r15, %rdi
callq 0x8924
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8960
movq %rax, %rbx
leaq 0x9570(%rip), %rax      # 0xe44a
leaq 0x9859(%rip), %rdi      # 0xe73a
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x9532(%rip), %rdx      # 0xe436
movq %r15, %rdi
movq %rbx, %rsi
jmp 0x50d1
testb %r12b, %r12b
je 0x50d6
cmpq $0x0, (%rbx)
je 0x4f5b
leaq 0x9525(%rip), %rax      # 0xe44a
leaq 0x980e(%rip), %rdi      # 0xe73a
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 0x94de(%rip), %rdx      # 0xe434
callq 0x51f8
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r15
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %r12
callq 0x8924
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x8960
testq %r14, %r14
je 0x4fc2
movq %rax, %r15
leaq 0x94bd(%rip), %rax      # 0xe44a
leaq 0x97a6(%rip), %rdi      # 0xe73a
testb %r13b, %r13b
cmovneq %rax, %rdi
movzbl %r13b, %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
xorl %eax, %eax
callq 0x2150
leaq 0x947f(%rip), %rdx      # 0xe436
movq %r14, %rdi
movq %r15, %rsi
callq 0x51f8
cmpq $0x0, 0x30(%rbx)
je 0x5005
leaq 0x947a(%rip), %rax      # 0xe44a
leaq 0x9763(%rip), %rdi      # 0xe73a
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 0x9461(%rip), %rdi      # 0xe45f
xorl %eax, %eax
callq 0x2150
cmpq $0x0, 0x40(%rbx)
je 0x50d6
leaq 0x9433(%rip), %rax      # 0xe44a
leaq 0x971c(%rip), %rdi      # 0xe73a
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 0x9759(%rip), %rax      # 0xe7a2
leaq 0x940d(%rip), %rdx      # 0xe45d
cmoveq %rax, %rdx
leaq 0x9410(%rip), %rdi      # 0xe46b
xorl %eax, %eax
callq 0x2150
jmp 0x50d6
leaq 0x93df(%rip), %rax      # 0xe44a
leaq 0x96c8(%rip), %rdi      # 0xe73a
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 0x50ca
leaq 0x93ab(%rip), %rax      # 0xe44a
leaq 0x9694(%rip), %rdi      # 0xe73a
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 0x9365(%rip), %rdx      # 0xe436
callq 0x51f8
testb %r13b, %r13b
je 0x50e5
movl $0x29, %edi
callq 0x2050
cmpl $0x2, 0x8(%rbp)
jne 0x5125
movq 0xdede(%rip), %rbx      # 0x12fd0
movq (%rbx), %rdi
leaq 0x933c(%rip), %rdx      # 0xe438
movl $0xa, %esi
xorl %eax, %eax
callq 0x3cd8
movq (%rbx), %rdi
movl 0x20(%rbp), %ecx
movq 0x18(%rbp), %r8
leaq 0x9196(%rip), %rdx      # 0xe2af
movl $0xc, %esi
xorl %eax, %eax
callq 0x3cd8
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
movq 0xde8c(%rip), %rax      # 0x12fd0
movq (%rax), %rdi
testl %r15d, %r15d
je 0x5185
leaq 0x91f7(%rip), %rdx      # 0xe34a
movl $0xb, %esi
xorl %eax, %eax
callq 0x3cd8
movq %r14, %rdi
movl $0xa, %esi
callq 0x5191
testb %r12b, %r12b
je 0x4c6c
cmpq $0x0, 0x40(%rbx)
jne 0x4c32
jmp 0x4c6c
leaq 0x91c2(%rip), %rdx      # 0xe34e
jmp 0x4bc3