// File: /workspace/github_c_makefile_star2_O2/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 0x869a0
movq %r14, %rdi
callq 0xc103
testb %al, %al
jne 0x86d6a
callq 0x13d5c
movq %rax, %rbx
leaq 0x5d835(%rip), %rdx     # 0xe41e4
movq %rax, %rdi
xorl %esi, %esi
movl $0x9c, %ecx
callq 0x522ce
movq %rax, %r15
leaq 0x5d91e(%rip), %rdi     # 0xe42e6
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0xbca0
movq %r15, %rdi
callq 0x51cc9
movq %rbx, %rdi
callq 0x143d2
leaq 0x51418(%rip), %rsi     # 0xd7e05
movq %rax, %rdi
callq 0x8443c
movq %rax, %rdi
callq 0x8659c
movq %rax, %r15
movq %rax, %rdi
callq 0x865f5
movq %r15, %rdi
callq 0x86803
movl %eax, %ebp
testb %al, %al
je 0x86a42
leaq 0x4573c(%rip), %rsi     # 0xcc159
leaq 0x5d8d2(%rip), %rdx     # 0xe42f6
leaq 0x5d8a4(%rip), %rcx     # 0xe42cf
leaq 0x5d7b2(%rip), %r8      # 0xe41e4
movq %r14, %rdi
movl $0xa1, %r9d
xorl %eax, %eax
callq 0xc007
movq %r15, %rdi
callq 0x86da2
movq %rbx, %rdi
callq 0x143d2
movq %rax, %rdi
callq 0x165e9
leaq 0x5d783(%rip), %rdx     # 0xe41e4
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa6, %ecx
callq 0x522ce
movq %rax, %r15
leaq 0x5d894(%rip), %rdi     # 0xe4311
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0xbca0
movq %r15, %rdi
callq 0x51cc9
movq %rbx, %rdi
callq 0x143d2
leaq 0x51363(%rip), %rsi     # 0xd7e05
movq %rax, %rdi
callq 0x8443c
movq %rax, %rdi
callq 0x8659c
movq %rax, %r15
movq %rax, %rdi
callq 0x86636
movq %rax, %r12
testb %bpl, %bpl
jne 0x86b0b
movq %r12, %rdi
callq 0x143d2
cmpb $0x61, (%rax)
jne 0x86adc
cmpb $0x0, 0x1(%rax)
je 0x86d0b
leaq 0x45676(%rip), %rsi     # 0xcc159
leaq 0x5d839(%rip), %rdx     # 0xe4323
leaq 0x5d7de(%rip), %rcx     # 0xe42cf
leaq 0x5d6ec(%rip), %r8      # 0xe41e4
xorl %r13d, %r13d
movq %r14, %rdi
movl $0xac, %r9d
xorl %eax, %eax
callq 0xc007
movq %r12, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x868a0
movq %r15, %rdi
callq 0x86636
movq %rax, %r12
testb %r13b, %r13b
je 0x86b78
movq %r12, %rdi
callq 0x143d2
cmpb $0x62, (%rax)
jne 0x86b48
cmpb $0x62, 0x1(%rax)
jne 0x86b48
cmpb $0x0, 0x2(%rax)
je 0x86d13
leaq 0x4560a(%rip), %rsi     # 0xcc159
leaq 0x5d7ed(%rip), %rdx     # 0xe4343
leaq 0x5d772(%rip), %rcx     # 0xe42cf
leaq 0x5d680(%rip), %r8      # 0xe41e4
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xb1, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x86b7a
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x868a0
movq %r15, %rdi
callq 0x86636
movq %rax, %r12
testb %bpl, %bpl
je 0x86be5
movq %r12, %rdi
callq 0x143d2
leaq 0x5d7bb(%rip), %rsi     # 0xe4364
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x86be9
leaq 0x4559d(%rip), %rsi     # 0xcc159
leaq 0x5d7a6(%rip), %rdx     # 0xe4369
leaq 0x5d705(%rip), %rcx     # 0xe42cf
leaq 0x5d613(%rip), %r8      # 0xe41e4
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xb6, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x86bec
xorl %ebp, %ebp
jmp 0x86bec
movb $0x1, %bpl
movq %r12, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x868a0
movq %r15, %rdi
callq 0x86636
movq %rax, %r12
testb %bpl, %bpl
je 0x86c57
movq %r12, %rdi
callq 0x143d2
leaq 0x4568e(%rip), %rsi     # 0xcc2a9
movq %rax, %rdi
callq 0xb880
testl %eax, %eax
je 0x86c5b
leaq 0x4552b(%rip), %rsi     # 0xcc159
leaq 0x5d758(%rip), %rdx     # 0xe438d
leaq 0x5d693(%rip), %rcx     # 0xe42cf
leaq 0x5d5a1(%rip), %r8      # 0xe41e4
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xbb, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x86c5e
xorl %ebp, %ebp
jmp 0x86c5e
movb $0x1, %bpl
movq %r12, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x868a0
movq %r15, %rdi
callq 0x86636
movq %rax, %r12
testb %bpl, %bpl
je 0x86cc7
movq %r12, %rdi
callq 0x143d2
cmpb $0x2d, (%rax)
jne 0x86c9b
cmpb $0x35, 0x1(%rax)
jne 0x86c9b
cmpb $0x0, 0x2(%rax)
je 0x86d1b
leaq 0x454b7(%rip), %rsi     # 0xcc159
leaq 0x5d707(%rip), %rdx     # 0xe43b0
leaq 0x5d61f(%rip), %rcx     # 0xe42cf
leaq 0x5d52d(%rip), %r8      # 0xe41e4
movq %r14, %rdi
movl $0xc0, %r9d
xorl %eax, %eax
callq 0xc007
movq %r12, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x868a0
pushq $-0x1
popq %rbp
movq %r15, %rdi
callq 0x86da2
movq %rbx, %rdi
callq 0x143d2
movq %rax, %rdi
callq 0x165e9
movq %rbx, %rdi
callq 0x152db
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r13b
jmp 0x86b0b
movb $0x1, %bpl
jmp 0x86b7a
movq %r12, %rdi
callq 0x152db
movq %r15, %rdi
callq 0x868a0
movq %r15, %rdi
callq 0x86803
xorl %ebp, %ebp
testb %al, %al
je 0x86cda
leaq 0x45419(%rip), %rsi     # 0xcc159
leaq 0x5d5af(%rip), %rdx     # 0xe42f6
leaq 0x5d581(%rip), %rcx     # 0xe42cf
leaq 0x5d48f(%rip), %r8      # 0xe41e4
movq %r14, %rdi
movl $0xc4, %r9d
xorl %eax, %eax
callq 0xc007
jmp 0x86cd7
movq 0xa7247(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x432eb(%rip), %rsi     # 0xca066
leaq 0x438d7(%rip), %rdx     # 0xca659
leaq 0x5d546(%rip), %rcx     # 0xe42cf
leaq 0x5d454(%rip), %r8      # 0xe41e4
movl $0x98, %r9d
xorl %eax, %eax
callq 0xb8c0
callq 0xb300