// File: /workspace/github_c_makefile_star2_O0/AlxHnr[P]nano-backup/src/restore.c
// Function: handleFiletypeChanges
static void handleFiletypeChanges(PathNode *node, const PathState *state,
                                  const struct stat stats)
{
  if(state->type == PST_regular_file)
  {
    if(S_ISLNK(stats.st_mode))
    {
      backupHintSet(node->hint, BH_symlink_to_regular);
    }
    else if(S_ISDIR(stats.st_mode))
    {
      backupHintSet(node->hint, BH_directory_to_regular);
    }
    else if(!S_ISREG(stats.st_mode))
    {
      backupHintSet(node->hint, BH_other_to_regular);
    }
  }
  else if(state->type == PST_symlink)
  {
    if(S_ISREG(stats.st_mode))
    {
      backupHintSet(node->hint, BH_regular_to_symlink);
    }
    else if(S_ISDIR(stats.st_mode))
    {
      backupHintSet(node->hint, BH_directory_to_symlink);
    }
    else if(!S_ISLNK(stats.st_mode))
    {
      backupHintSet(node->hint, BH_other_to_symlink);
    }
  }
  else if(state->type == PST_directory)
  {
    if(S_ISREG(stats.st_mode))
    {
      backupHintSet(node->hint, BH_regular_to_directory);
    }
    else if(S_ISLNK(stats.st_mode))
    {
      backupHintSet(node->hint, BH_symlink_to_directory);
    }
    else if(!S_ISDIR(stats.st_mode))
    {
      backupHintSet(node->hint, BH_other_to_directory);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xb51c
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0xb4bd
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0x7, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb517
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xb4e9
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0x9, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb515
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0xb513
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0xb, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb515
jmp 0xb517
jmp 0xb64d
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xb5b4
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0xb555
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0x5, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb5af
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0xb581
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0xa, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb5ad
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0xa000, %eax           # imm = 0xA000
je 0xb5ab
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0xc, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb5ad
jmp 0xb5af
jmp 0xb64b
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0xb649
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0xb5ed
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0x6, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb647
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0xb619
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0x8, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb645
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
je 0xb643
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
orl $0xd, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0xb645
jmp 0xb647
jmp 0xb649
jmp 0xb64b
jmp 0xb64d
popq %rbp
retq
nop