// File: /workspace/github_c_makefile_star2_O2/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 0x4d279
movq %rbx, %rdi
callq 0xc103
testb %al, %al
jne 0x4d66a
leaq 0x8b4eb(%rip), %rdi     # 0xd876b
callq 0x4d1c0
movq %rax, %r14
leaq 0x8b4e1(%rip), %rsi     # 0xd8770
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x4d2cf
leaq 0x7eeb7(%rip), %rsi     # 0xcc159
leaq 0x8b4cb(%rip), %rdx     # 0xd8774
leaq 0x8b4a5(%rip), %rcx     # 0xd8755
leaq 0x8b48a(%rip), %r15     # 0xd8741
pushq $0x43
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x44
jmp 0x4d3f7
leaq 0x8b46b(%rip), %rsi     # 0xd8741
pushq $0x44
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x8b49f(%rip), %rdi     # 0xd8787
callq 0x4d1c0
movq %rax, %r14
leaq 0x8b496(%rip), %rsi     # 0xd878d
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x4d337
leaq 0x7ee4f(%rip), %rsi     # 0xcc159
leaq 0x8b480(%rip), %rdx     # 0xd8791
leaq 0x8b43d(%rip), %rcx     # 0xd8755
leaq 0x8b422(%rip), %r15     # 0xd8741
pushq $0x49
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x4a
jmp 0x4d3f7
leaq 0x8b403(%rip), %rsi     # 0xd8741
pushq $0x4a
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x8b43d(%rip), %r15     # 0xd878d
movq %r15, %rdi
callq 0x4d1c0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0xb880
testl %eax, %eax
je 0x4d39b
leaq 0x7ede8(%rip), %rsi     # 0xcc159
leaq 0x8b419(%rip), %rdx     # 0xd8791
leaq 0x8b3d6(%rip), %rcx     # 0xd8755
leaq 0x8b3bb(%rip), %r15     # 0xd8741
pushq $0x4f
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x50
jmp 0x4d3f7
leaq 0x8b39f(%rip), %rsi     # 0xd8741
pushq $0x50
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x8b415(%rip), %rdi     # 0xd87c9
callq 0x4d1c0
movq %rax, %r14
cmpb $0x2f, (%rax)
jne 0x4d3c8
cmpb $0x0, 0x1(%r14)
je 0x4d40e
leaq 0x7ed8a(%rip), %rsi     # 0xcc159
leaq 0x8b3ce(%rip), %rdx     # 0xd87a4
leaq 0x8b378(%rip), %rcx     # 0xd8755
leaq 0x8b35d(%rip), %r15     # 0xd8741
pushq $0x55
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x56
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xd249
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8b32c(%rip), %rsi     # 0xd8741
pushq $0x56
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x8b3a0(%rip), %rdi     # 0xd87c7
callq 0x4d1c0
movq %rax, %r14
cmpb $0x2f, (%rax)
jne 0x4d43b
cmpb $0x0, 0x1(%r14)
je 0x4d46c
leaq 0x7ed17(%rip), %rsi     # 0xcc159
leaq 0x8b35b(%rip), %rdx     # 0xd87a4
leaq 0x8b305(%rip), %rcx     # 0xd8755
leaq 0x8b2ea(%rip), %r15     # 0xd8741
pushq $0x5c
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x5d
jmp 0x4d3f7
leaq 0x8b2ce(%rip), %rsi     # 0xd8741
pushq $0x5d
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x8b346(%rip), %rdi     # 0xd87cb
callq 0x4d1c0
movq %rax, %r14
leaq 0x8b2dc(%rip), %rsi     # 0xd8770
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x4d4d4
leaq 0x7ecb2(%rip), %rsi     # 0xcc159
leaq 0x8b2c6(%rip), %rdx     # 0xd8774
leaq 0x8b2a0(%rip), %rcx     # 0xd8755
leaq 0x8b285(%rip), %r15     # 0xd8741
pushq $0x66
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x67
jmp 0x4d3f7
leaq 0x8b266(%rip), %rsi     # 0xd8741
pushq $0x67
popq %rdx
movq %r14, %rdi
callq 0xd249
xorl %edi, %edi
callq 0x4d1c0
movq %rax, %r14
cmpb $0x2e, (%rax)
jne 0x4d4fc
cmpb $0x0, 0x1(%r14)
je 0x4d530
leaq 0x7ec56(%rip), %rsi     # 0xcc159
leaq 0x8b2ce(%rip), %rdx     # 0xd87d8
leaq 0x8b244(%rip), %rcx     # 0xd8755
leaq 0x8b229(%rip), %r15     # 0xd8741
pushq $0x6c
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x6d
jmp 0x4d3f7
leaq 0x8b20a(%rip), %rsi     # 0xd8741
pushq $0x6d
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x8a596(%rip), %rdi     # 0xd7adf
callq 0x4d1c0
movq %rax, %r14
cmpb $0x2e, (%rax)
jne 0x4d55d
cmpb $0x0, 0x1(%r14)
je 0x4d591
leaq 0x7ebf5(%rip), %rsi     # 0xcc159
leaq 0x8b26d(%rip), %rdx     # 0xd87d8
leaq 0x8b1e3(%rip), %rcx     # 0xd8755
leaq 0x8b1c8(%rip), %r15     # 0xd8741
pushq $0x72
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x73
jmp 0x4d3f7
leaq 0x8b1a9(%rip), %rsi     # 0xd8741
pushq $0x73
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x85e54(%rip), %rdi     # 0xd33fe
callq 0x4d1c0
movq %rax, %r14
cmpb $0x2e, (%rax)
jne 0x4d5be
cmpb $0x0, 0x1(%r14)
je 0x4d5f2
leaq 0x7eb94(%rip), %rsi     # 0xcc159
leaq 0x8b20c(%rip), %rdx     # 0xd87d8
leaq 0x8b182(%rip), %rcx     # 0xd8755
leaq 0x8b167(%rip), %r15     # 0xd8741
pushq $0x78
popq %r9
movq %rbx, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0xc007
pushq $0x79
jmp 0x4d3f7
leaq 0x8b148(%rip), %rsi     # 0xd8741
pushq $0x79
popq %rdx
movq %r14, %rdi
callq 0xd249
leaq 0x8a21e(%rip), %rdi     # 0xd7829
callq 0x4d1c0
movq %rax, %r14
cmpb $0x2e, (%rax)
jne 0x4d626
cmpb $0x2e, 0x1(%r14)
jne 0x4d626
cmpb $0x0, 0x2(%r14)
je 0x4d6a0
leaq 0x7eb2c(%rip), %rsi     # 0xcc159
leaq 0x8b1b5(%rip), %rdx     # 0xd87e9
leaq 0x8b11a(%rip), %rcx     # 0xd8755
leaq 0x8b0ff(%rip), %r8      # 0xd8741
pushq $0x7e
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc007
pushq $-0x1
popq %rbx
leaq 0x8b0e7(%rip), %rsi     # 0xd8741
pushq $0x7f
popq %rdx
movq %r14, %rdi
callq 0xd249
jmp 0x4d406
movq 0xe0947(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x7c9eb(%rip), %rsi     # 0xca066
leaq 0x7cfd7(%rip), %rdx     # 0xca659
leaq 0x8b0cc(%rip), %rcx     # 0xd8755
leaq 0x8b0b1(%rip), %r8      # 0xd8741
pushq $0x3f
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
xorl %ebx, %ebx
jmp 0x4d653