// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/core/tokenizer.c
// Function: gt_tokenizer_unit_test
int gt_tokenizer_unit_test(GtError *err)
{
  GtStr *tmpfilename;
  GtTokenizer *t;
  FILE *tmpfp;
  GtStr *token;
  int had_err = 0;
  gt_error_check(err);

  /* empty file (except comment line) */
  tmpfilename = gt_str_new();
  tmpfp = gt_xtmpfp(tmpfilename);
  fprintf(tmpfp, "# comment line\n");
  gt_fa_xfclose(tmpfp);
  t = gt_tokenizer_new(gt_io_new(gt_str_get(tmpfilename), "r"));
  gt_tokenizer_skip_comment_lines(t);
  gt_ensure(!gt_tokenizer_has_token(t));
  gt_tokenizer_delete(t);
  gt_xremove(gt_str_get(tmpfilename));

  /* larger test */
  tmpfp = gt_xtmpfp(tmpfilename);
  fprintf(tmpfp, " a bb ccc\ndddd -5");
  gt_fa_xfclose(tmpfp);
  t = gt_tokenizer_new(gt_io_new(gt_str_get(tmpfilename), "r"));

  token = gt_tokenizer_get_token(t);
  gt_ensure(!strcmp(gt_str_get(token), "a"));
  gt_str_delete(token);

  gt_tokenizer_next_token(t);
  token = gt_tokenizer_get_token(t);
  gt_ensure(!strcmp(gt_str_get(token), "bb"));
  gt_str_delete(token);

  gt_tokenizer_next_token(t);
  token = gt_tokenizer_get_token(t);
  gt_ensure(!strcmp(gt_str_get(token), "ccc\n"));
  gt_str_delete(token);

  gt_tokenizer_next_token(t);
  token = gt_tokenizer_get_token(t);
  gt_ensure(!strcmp(gt_str_get(token), "dddd"));
  gt_str_delete(token);

  gt_tokenizer_next_token(t);
  token = gt_tokenizer_get_token(t);
  gt_ensure(!strcmp(gt_str_get(token), "-5"));
  gt_str_delete(token);

  gt_tokenizer_next_token(t);
  gt_ensure(!gt_tokenizer_has_token(t));
  gt_tokenizer_delete(t);
  gt_xremove(gt_str_get(tmpfilename));
  gt_str_delete(tmpfilename);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
testq %rdi, %rdi
je 0xa6930
movq %r14, %rdi
callq 0x3566a
testb %al, %al
jne 0xa6cfe
callq 0x3bfe0
movq %rax, %rbx
leaq 0x54625(%rip), %rdx     # 0xfaf64
movq %rax, %rdi
xorl %esi, %esi
movl $0x9c, %ecx
callq 0x7425e
movq %rax, %r15
leaq 0x5470e(%rip), %rdi     # 0xfb066
movl $0xf, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xbcb0
movq %r15, %rdi
callq 0x73f9e
movq %rbx, %rdi
callq 0x3c40b
leaq 0x48527(%rip), %rsi     # 0xeeea8
movq %rax, %rdi
callq 0xa4d64
movq %rax, %rdi
callq 0xa6700
movq %rax, %r15
movq %rax, %rdi
callq 0xa672e
movq %r15, %rdi
callq 0xa688b
movl %eax, %ebp
testb %al, %al
je 0xa69d6
leaq 0x3c7c8(%rip), %rsi     # 0xe3179
leaq 0x546be(%rip), %rdx     # 0xfb076
leaq 0x54690(%rip), %rcx     # 0xfb04f
leaq 0x5459e(%rip), %r8      # 0xfaf64
movq %r14, %rdi
movl $0xa1, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r15, %rdi
callq 0xa6d03
movq %rbx, %rdi
callq 0x3c40b
movq %rax, %rdi
callq 0x3dd48
leaq 0x5456f(%rip), %rdx     # 0xfaf64
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa6, %ecx
callq 0x7425e
movq %rax, %r15
leaq 0x54680(%rip), %rdi     # 0xfb091
movl $0x11, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xbcb0
movq %r15, %rdi
callq 0x73f9e
movq %rbx, %rdi
callq 0x3c40b
leaq 0x4846e(%rip), %rsi     # 0xeeea8
movq %rax, %rdi
callq 0xa4d64
movq %rax, %rdi
callq 0xa6700
movq %rax, %r15
movq %rax, %rdi
callq 0xa673e
movq %rax, %r12
testb %bpl, %bpl
jne 0xa6aac
movq %r12, %rdi
callq 0x3c40b
leaq 0x49758(%rip), %rsi     # 0xf01c4
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa6aa9
leaq 0x3c6fa(%rip), %rsi     # 0xe3179
leaq 0x5461d(%rip), %rdx     # 0xfb0a3
leaq 0x545c2(%rip), %rcx     # 0xfb04f
leaq 0x544d0(%rip), %r8      # 0xfaf64
xorl %r13d, %r13d
movq %r14, %rdi
movl $0xac, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0xa6aac
movb $0x1, %r13b
movq %r12, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0xa68c6
movq %r15, %rdi
callq 0xa673e
movq %rax, %r12
testb %r13b, %r13b
je 0xa6b17
movq %r12, %rdi
callq 0x3c40b
leaq 0x4a7d4(%rip), %rsi     # 0xf12af
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa6b1b
leaq 0x3c68b(%rip), %rsi     # 0xe3179
leaq 0x545ce(%rip), %rdx     # 0xfb0c3
leaq 0x54553(%rip), %rcx     # 0xfb04f
leaq 0x54461(%rip), %r8      # 0xfaf64
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xb1, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0xa6b1e
xorl %ebp, %ebp
jmp 0xa6b1e
movb $0x1, %bpl
movq %r12, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0xa68c6
movq %r15, %rdi
callq 0xa673e
movq %rax, %r12
testb %bpl, %bpl
je 0xa6b89
movq %r12, %rdi
callq 0x3c40b
leaq 0x54597(%rip), %rsi     # 0xfb0e4
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa6b8d
leaq 0x3c619(%rip), %rsi     # 0xe3179
leaq 0x54582(%rip), %rdx     # 0xfb0e9
leaq 0x544e1(%rip), %rcx     # 0xfb04f
leaq 0x543ef(%rip), %r8      # 0xfaf64
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xb6, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0xa6b90
xorl %ebp, %ebp
jmp 0xa6b90
movb $0x1, %bpl
movq %r12, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0xa68c6
movq %r15, %rdi
callq 0xa673e
movq %rax, %r12
testb %bpl, %bpl
je 0xa6bfb
movq %r12, %rdi
callq 0x3c40b
leaq 0x3c70a(%rip), %rsi     # 0xe32c9
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa6bff
leaq 0x3c5a7(%rip), %rsi     # 0xe3179
leaq 0x54534(%rip), %rdx     # 0xfb10d
leaq 0x5446f(%rip), %rcx     # 0xfb04f
leaq 0x5437d(%rip), %r8      # 0xfaf64
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xbb, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0xa6c02
xorl %ebp, %ebp
jmp 0xa6c02
movb $0x1, %bpl
movq %r12, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0xa68c6
movq %r15, %rdi
callq 0xa673e
movq %rax, %r12
testb %bpl, %bpl
je 0xa6c69
movq %r12, %rdi
callq 0x3c40b
leaq 0x5446f(%rip), %rsi     # 0xfb0a0
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa6caf
leaq 0x3c535(%rip), %rsi     # 0xe3179
leaq 0x544e5(%rip), %rdx     # 0xfb130
leaq 0x543fd(%rip), %rcx     # 0xfb04f
leaq 0x5430b(%rip), %r8      # 0xfaf64
movq %r14, %rdi
movl $0xc0, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r12, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0xa68c6
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0xa6d03
movq %rbx, %rdi
callq 0x3c40b
movq %rax, %rdi
callq 0x3dd48
movq %rbx, %rdi
callq 0x3d1eb
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x3d1eb
movq %r15, %rdi
callq 0xa68c6
movq %r15, %rdi
callq 0xa688b
xorl %ebp, %ebp
testb %al, %al
je 0xa6c7e
leaq 0x3c4a5(%rip), %rsi     # 0xe3179
leaq 0x5439b(%rip), %rdx     # 0xfb076
leaq 0x5436d(%rip), %rcx     # 0xfb04f
leaq 0x5427b(%rip), %r8      # 0xfaf64
movq %r14, %rdi
movl $0xc4, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0xa6c79
callq 0x23358