// File: /workspace/github_c_makefile_star2_O3/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 0x708a3
movq %rbx, %rdi
callq 0x34fea
testb %al, %al
jne 0x70ccf
leaq 0x7ef19(%rip), %rdi     # 0xef7c3
callq 0x707d0
movq %rax, %r14
leaq 0x7ef0f(%rip), %rsi     # 0xef7c8
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x70904
leaq 0x7288d(%rip), %rsi     # 0xe3159
leaq 0x7eef9(%rip), %rdx     # 0xef7cc
leaq 0x7eed3(%rip), %rcx     # 0xef7ad
leaq 0x7eeb8(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x43, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x44, %edx
jmp 0x70a53
leaq 0x7ee8e(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x44, %edx
callq 0x35c27
leaq 0x7eec0(%rip), %rdi     # 0xef7df
callq 0x707d0
movq %rax, %r14
leaq 0x7eeb7(%rip), %rsi     # 0xef7e5
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x70979
leaq 0x72818(%rip), %rsi     # 0xe3159
leaq 0x7eea1(%rip), %rdx     # 0xef7e9
leaq 0x7ee5e(%rip), %rcx     # 0xef7ad
leaq 0x7ee43(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x49, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x4a, %edx
jmp 0x70a53
leaq 0x7ee19(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x4a, %edx
callq 0x35c27
leaq 0x7ee51(%rip), %r15     # 0xef7e5
movq %r15, %rdi
callq 0x707d0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xb890
testl %eax, %eax
je 0x709ea
leaq 0x727a4(%rip), %rsi     # 0xe3159
leaq 0x7ee2d(%rip), %rdx     # 0xef7e9
leaq 0x7edea(%rip), %rcx     # 0xef7ad
leaq 0x7edcf(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x4f, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x50, %edx
jmp 0x70a53
leaq 0x7eda8(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x50, %edx
callq 0x35c27
leaq 0x7ee1c(%rip), %rdi     # 0xef821
callq 0x707d0
movq %rax, %r14
cmpb $0x2f, (%rax)
jne 0x70a19
cmpb $0x0, 0x1(%r14)
je 0x70a65
leaq 0x72739(%rip), %rsi     # 0xe3159
leaq 0x7edd5(%rip), %rdx     # 0xef7fc
leaq 0x7ed7f(%rip), %rcx     # 0xef7ad
leaq 0x7ed64(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x55, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x56, %edx
callq 0x35c27
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7ed2d(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x56, %edx
callq 0x35c27
leaq 0x7ed9f(%rip), %rdi     # 0xef81f
callq 0x707d0
movq %rax, %r14
cmpb $0x2f, (%rax)
jne 0x70a94
cmpb $0x0, 0x1(%r14)
je 0x70ad0
leaq 0x726be(%rip), %rsi     # 0xe3159
leaq 0x7ed5a(%rip), %rdx     # 0xef7fc
leaq 0x7ed04(%rip), %rcx     # 0xef7ad
leaq 0x7ece9(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x5c, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x5d, %edx
jmp 0x70a53
leaq 0x7ecc2(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x5d, %edx
callq 0x35c27
leaq 0x7ed38(%rip), %rdi     # 0xef823
callq 0x707d0
movq %rax, %r14
leaq 0x7ecce(%rip), %rsi     # 0xef7c8
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0x70b45
leaq 0x7264c(%rip), %rsi     # 0xe3159
leaq 0x7ecb8(%rip), %rdx     # 0xef7cc
leaq 0x7ec92(%rip), %rcx     # 0xef7ad
leaq 0x7ec77(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x66, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x67, %edx
jmp 0x70a53
leaq 0x7ec4d(%rip), %r15     # 0xef799
movq %r14, %rdi
movq %r15, %rsi
movl $0x67, %edx
callq 0x35c27
movl $0x2, %edi
movq %r15, %rsi
movl $0x23, %edx
callq 0x35862
movw $0x2e, (%rax)
movq %rax, %rdi
movq %r15, %rsi
movl $0x6d, %edx
callq 0x35c27
leaq 0x7dfad(%rip), %rdi     # 0xeeb37
callq 0x707d0
movq %rax, %r14
cmpb $0x2e, (%rax)
jne 0x70b9e
cmpb $0x0, 0x1(%r14)
je 0x70bdd
leaq 0x725b4(%rip), %rsi     # 0xe3159
leaq 0x7ec84(%rip), %rdx     # 0xef830
leaq 0x7ebfa(%rip), %rcx     # 0xef7ad
leaq 0x7ebdf(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x72, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x73, %edx
jmp 0x70a53
leaq 0x7ebb5(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x73, %edx
callq 0x35c27
leaq 0x79816(%rip), %rdi     # 0xea40e
callq 0x707d0
movq %rax, %r14
cmpb $0x2e, (%rax)
jne 0x70c0c
cmpb $0x0, 0x1(%r14)
je 0x70c4b
leaq 0x72546(%rip), %rsi     # 0xe3159
leaq 0x7ec16(%rip), %rdx     # 0xef830
leaq 0x7eb8c(%rip), %rcx     # 0xef7ad
leaq 0x7eb71(%rip), %r15     # 0xef799
movq %rbx, %rdi
movq %r15, %r8
movl $0x78, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r14, %rdi
movq %r15, %rsi
movl $0x79, %edx
jmp 0x70a53
leaq 0x7eb47(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x79, %edx
callq 0x35c27
leaq 0x7dc1b(%rip), %rdi     # 0xee881
callq 0x707d0
movq %rax, %r14
cmpb $0x2e, (%rax)
jne 0x70c81
cmpb $0x2e, 0x1(%r14)
jne 0x70c81
cmpb $0x0, 0x2(%r14)
je 0x70ccb
leaq 0x724d1(%rip), %rsi     # 0xe3159
leaq 0x7ebb2(%rip), %rdx     # 0xef841
leaq 0x7eb17(%rip), %rcx     # 0xef7ad
leaq 0x7eafc(%rip), %r8      # 0xef799
movq %rbx, %rdi
movl $0x7e, %r9d
xorl %eax, %eax
callq 0x34f1f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x7eae0(%rip), %rsi     # 0xef799
movq %r14, %rdi
movl $0x7f, %edx
callq 0x35c27
jmp 0x70a5d
xorl %ebx, %ebx
jmp 0x70cb2
callq 0x195fc