// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/core/basename.c
// Function: gt_basename_unit_test
int gt_basename_unit_test(GtError *err)
{
  char *bn;
  int had_err = 0;
  gt_error_check(err);

  /* /usr/lib */
  bn = gt_basename(GT_PATH_SEPARATOR_STR"usr"GT_PATH_SEPARATOR_STR"lib");
  gt_ensure(!strcmp(bn, "lib"));
  gt_free(bn);

  if (!had_err) {
    /* /usr/ */
    bn = gt_basename(GT_PATH_SEPARATOR_STR"usr"GT_PATH_SEPARATOR_STR);
    gt_ensure(!strcmp(bn, "usr"));
    gt_free(bn);
  }

  if (!had_err) {
    bn = gt_basename("usr");
    gt_ensure(!strcmp(bn, "usr"));
    gt_free(bn);
  }

  if (!had_err) {
    bn = gt_basename(GT_PATH_SEPARATOR_STR);
    gt_ensure(!strcmp(bn, GT_PATH_SEPARATOR_STR));
    gt_free(bn);
  }

  if (!had_err) {
    bn = gt_basename(GT_PATH_SEPARATOR_STR GT_PATH_SEPARATOR_STR
                     GT_PATH_SEPARATOR_STR);
    gt_ensure(!strcmp(bn, GT_PATH_SEPARATOR_STR));
    gt_free(bn);
  }

  if (!had_err) {
#ifndef _WIN32
    bn = gt_basename("//usr//lib//");
#else
    bn = gt_basename("\\\\usr\\\\lib\\\\");
#endif
    gt_ensure(!strcmp(bn, "lib"));
    gt_free(bn);
  }

  if (!had_err) {
    bn = gt_basename(NULL);
    gt_ensure(!strcmp(bn, "."));
    gt_free(bn);
  }

  if (!had_err) {
    bn = gt_basename("");
    gt_ensure(!strcmp(bn, "."));
    gt_free(bn);
  }

  if (!had_err) {
    bn = gt_basename(".");
    gt_ensure(!strcmp(bn, "."));
    gt_free(bn);
  }

  if (!had_err) {
    bn = gt_basename("..");
    gt_ensure(!strcmp(bn, ".."));
    gt_free(bn);
  }

  return had_err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x7027c
movq %rbx, %rdi
callq 0x3566a
testb %al, %al
jne 0x7071d
leaq 0x7f58b(%rip), %rdi     # 0xef80e
callq 0x701b4
movq %rax, %r14
leaq 0x7f581(%rip), %rsi     # 0xef813
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x702dd
leaq 0x72ed4(%rip), %rsi     # 0xe3179
leaq 0x7f56b(%rip), %rdx     # 0xef817
leaq 0x7f545(%rip), %rcx     # 0xef7f8
leaq 0x7f52a(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x43, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x44, %edx
jmp 0x70688
leaq 0x7f500(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x44, %edx
callq 0x362a0
leaq 0x7f532(%rip), %rdi     # 0xef82a
callq 0x701b4
movq %rax, %r14
leaq 0x7f529(%rip), %rsi     # 0xef830
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x70352
leaq 0x72e5f(%rip), %rsi     # 0xe3179
leaq 0x7f513(%rip), %rdx     # 0xef834
leaq 0x7f4d0(%rip), %rcx     # 0xef7f8
leaq 0x7f4b5(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x49, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x4a, %edx
jmp 0x70688
leaq 0x7f48b(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x4a, %edx
callq 0x362a0
leaq 0x7f4c3(%rip), %r15     # 0xef830
movq %r15, %rdi
callq 0x701b4
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xb890
testl %eax, %eax
je 0x703c6
leaq 0x72deb(%rip), %rsi     # 0xe3179
leaq 0x7f49f(%rip), %rdx     # 0xef834
leaq 0x7f45c(%rip), %rcx     # 0xef7f8
leaq 0x7f441(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x4f, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x50, %edx
jmp 0x70688
leaq 0x7f417(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x50, %edx
callq 0x362a0
leaq 0x7f48b(%rip), %r15     # 0xef86c
movq %r15, %rdi
callq 0x701b4
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xb890
testl %eax, %eax
je 0x7043a
leaq 0x72d77(%rip), %rsi     # 0xe3179
leaq 0x7f43e(%rip), %rdx     # 0xef847
leaq 0x7f3e8(%rip), %rcx     # 0xef7f8
leaq 0x7f3cd(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x55, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x56, %edx
jmp 0x70688
leaq 0x7f3a3(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x56, %edx
callq 0x362a0
leaq 0x7f415(%rip), %rdi     # 0xef86a
callq 0x701b4
movq %rax, %r14
leaq 0x7f408(%rip), %rsi     # 0xef86c
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x704af
leaq 0x72d02(%rip), %rsi     # 0xe3179
leaq 0x7f3c9(%rip), %rdx     # 0xef847
leaq 0x7f373(%rip), %rcx     # 0xef7f8
leaq 0x7f358(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x5c, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x5d, %edx
jmp 0x70688
leaq 0x7f32e(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x5d, %edx
callq 0x362a0
leaq 0x7f3a4(%rip), %rdi     # 0xef86e
callq 0x701b4
movq %rax, %r14
leaq 0x7f33a(%rip), %rsi     # 0xef813
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x70524
leaq 0x72c8d(%rip), %rsi     # 0xe3179
leaq 0x7f324(%rip), %rdx     # 0xef817
leaq 0x7f2fe(%rip), %rcx     # 0xef7f8
leaq 0x7f2e3(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x66, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x67, %edx
jmp 0x70688
leaq 0x7f2b9(%rip), %r15     # 0xef7e4
movq %r14, %rdi
movq %r15, %rsi
movl $0x67, %edx
callq 0x362a0
movl $0x2, %edi
movq %r15, %rsi
movl $0x23, %edx
callq 0x35ee2
movq %rax, %r14
movw $0x2e, (%rax)
leaq 0x79f02(%rip), %rsi     # 0xea45e
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x705a7
leaq 0x72c0a(%rip), %rsi     # 0xe3179
leaq 0x7f305(%rip), %rdx     # 0xef87b
leaq 0x7f27b(%rip), %rcx     # 0xef7f8
leaq 0x7f260(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x6c, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x6d, %edx
jmp 0x70688
leaq 0x7f236(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x6d, %edx
callq 0x362a0
leaq 0x7e5bd(%rip), %rdi     # 0xeeb7f
callq 0x701b4
movq %rax, %r14
leaq 0x79e8d(%rip), %rsi     # 0xea45e
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x70619
leaq 0x72b95(%rip), %rsi     # 0xe3179
leaq 0x7f290(%rip), %rdx     # 0xef87b
leaq 0x7f206(%rip), %rcx     # 0xef7f8
leaq 0x7f1eb(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x72, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x73, %edx
jmp 0x70688
leaq 0x7f1c4(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x73, %edx
callq 0x362a0
leaq 0x79e2a(%rip), %r15     # 0xea45e
movq %r15, %rdi
callq 0x701b4
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xb890
testl %eax, %eax
je 0x7069a
leaq 0x72b24(%rip), %rsi     # 0xe3179
leaq 0x7f21f(%rip), %rdx     # 0xef87b
leaq 0x7f195(%rip), %rcx     # 0xef7f8
leaq 0x7f17a(%rip), %r15     # 0xef7e4
movq %rbx, %rdi
movq %r15, %r8
movl $0x78, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
movl $0x79, %edx
callq 0x362a0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7f143(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x79, %edx
callq 0x362a0
leaq 0x7e214(%rip), %r15     # 0xee8c9
movq %r15, %rdi
callq 0x701b4
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xb890
testl %eax, %eax
je 0x70702
leaq 0x72aa3(%rip), %rsi     # 0xe3179
leaq 0x7f1af(%rip), %rdx     # 0xef88c
leaq 0x7f114(%rip), %rcx     # 0xef7f8
leaq 0x7f0f9(%rip), %r8      # 0xef7e4
movq %rbx, %rdi
movl $0x7e, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x70704
xorl %ebx, %ebx
leaq 0x7f0d9(%rip), %rsi     # 0xef7e4
movq %r14, %rdi
movl $0x7f, %edx
callq 0x362a0
jmp 0x70692
callq 0x19651
nop