// File: /workspace/github_c_makefile_star2_O3/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 0xa6063
movq %r14, %rdi
callq 0x34fea
testb %al, %al
jne 0xa6437
callq 0x3b728
movq %rax, %rbx
leaq 0x54e62(%rip), %rdx     # 0xfaed4
movq %rax, %rdi
xorl %esi, %esi
movl $0x9c, %ecx
callq 0x747f2
movq %rax, %r15
leaq 0x54f4b(%rip), %rdi     # 0xfafd6
movl $0xf, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xbcb0
movq %r15, %rdi
callq 0x74532
movq %rbx, %rdi
callq 0x3bb5d
leaq 0x48da9(%rip), %rsi     # 0xeee5d
movq %rax, %rdi
callq 0xa4530
movq %rax, %rdi
callq 0xa5e2c
movq %rax, %r15
movq %rax, %rdi
callq 0xa5e5a
movq %r15, %rdi
callq 0xa5fbe
movl %eax, %ebp
testb %al, %al
je 0xa6109
leaq 0x3d075(%rip), %rsi     # 0xe3159
leaq 0x54efb(%rip), %rdx     # 0xfafe6
leaq 0x54ecd(%rip), %rcx     # 0xfafbf
leaq 0x54ddb(%rip), %r8      # 0xfaed4
movq %r14, %rdi
movl $0xa1, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r15, %rdi
callq 0xa643c
movq %rbx, %rdi
callq 0x3bb5d
movq %rax, %rdi
callq 0x3d3d4
leaq 0x54dac(%rip), %rdx     # 0xfaed4
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa6, %ecx
callq 0x747f2
movq %rax, %r15
leaq 0x54ebd(%rip), %rdi     # 0xfb001
movl $0x11, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xbcb0
movq %r15, %rdi
callq 0x74532
movq %rbx, %rdi
callq 0x3bb5d
leaq 0x48cf0(%rip), %rsi     # 0xeee5d
movq %rax, %rdi
callq 0xa4530
movq %rax, %rdi
callq 0xa5e2c
movq %rax, %r15
movq %rax, %rdi
callq 0xa5e6a
movq %rax, %r12
testb %bpl, %bpl
jne 0xa61d6
movq %r12, %rdi
callq 0x3bb5d
cmpb $0x61, (%rax)
jne 0xa61a7
cmpb $0x0, 0x1(%rax)
je 0xa63d8
leaq 0x3cfab(%rip), %rsi     # 0xe3159
leaq 0x54e5e(%rip), %rdx     # 0xfb013
leaq 0x54e03(%rip), %rcx     # 0xfafbf
leaq 0x54d11(%rip), %r8      # 0xfaed4
xorl %r13d, %r13d
movq %r14, %rdi
movl $0xac, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r12, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0xa5ff9
movq %r15, %rdi
callq 0xa5e6a
movq %rax, %r12
testb %r13b, %r13b
je 0xa6243
movq %r12, %rdi
callq 0x3bb5d
cmpb $0x62, (%rax)
jne 0xa6213
cmpb $0x62, 0x1(%rax)
jne 0xa6213
cmpb $0x0, 0x2(%rax)
je 0xa63e0
leaq 0x3cf3f(%rip), %rsi     # 0xe3159
leaq 0x54e12(%rip), %rdx     # 0xfb033
leaq 0x54d97(%rip), %rcx     # 0xfafbf
leaq 0x54ca5(%rip), %r8      # 0xfaed4
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xb1, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0xa6245
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0xa5ff9
movq %r15, %rdi
callq 0xa5e6a
movq %rax, %r12
testb %bpl, %bpl
je 0xa62b0
movq %r12, %rdi
callq 0x3bb5d
leaq 0x54de0(%rip), %rsi     # 0xfb054
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa62b4
leaq 0x3ced2(%rip), %rsi     # 0xe3159
leaq 0x54dcb(%rip), %rdx     # 0xfb059
leaq 0x54d2a(%rip), %rcx     # 0xfafbf
leaq 0x54c38(%rip), %r8      # 0xfaed4
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xb6, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0xa62b7
xorl %ebp, %ebp
jmp 0xa62b7
movb $0x1, %bpl
movq %r12, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0xa5ff9
movq %r15, %rdi
callq 0xa5e6a
movq %rax, %r12
testb %bpl, %bpl
je 0xa6322
movq %r12, %rdi
callq 0x3bb5d
leaq 0x3cfc3(%rip), %rsi     # 0xe32a9
movq %rax, %rdi
callq 0xb890
testl %eax, %eax
je 0xa6326
leaq 0x3ce60(%rip), %rsi     # 0xe3159
leaq 0x54d7d(%rip), %rdx     # 0xfb07d
leaq 0x54cb8(%rip), %rcx     # 0xfafbf
leaq 0x54bc6(%rip), %r8      # 0xfaed4
xorl %ebp, %ebp
movq %r14, %rdi
movl $0xbb, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0xa6329
xorl %ebp, %ebp
jmp 0xa6329
movb $0x1, %bpl
movq %r12, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0xa5ff9
movq %r15, %rdi
callq 0xa5e6a
movq %rax, %r12
testb %bpl, %bpl
je 0xa6392
movq %r12, %rdi
callq 0x3bb5d
cmpb $0x2d, (%rax)
jne 0xa6366
cmpb $0x35, 0x1(%rax)
jne 0xa6366
cmpb $0x0, 0x2(%rax)
je 0xa63e8
leaq 0x3cdec(%rip), %rsi     # 0xe3159
leaq 0x54d2c(%rip), %rdx     # 0xfb0a0
leaq 0x54c44(%rip), %rcx     # 0xfafbf
leaq 0x54b52(%rip), %r8      # 0xfaed4
movq %r14, %rdi
movl $0xc0, %r9d
xorl %eax, %eax
callq 0x34f1f
movq %r12, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0xa5ff9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0xa643c
movq %rbx, %rdi
callq 0x3bb5d
movq %rax, %rdi
callq 0x3d3d4
movq %rbx, %rdi
callq 0x3c87b
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r13b
jmp 0xa61d6
movb $0x1, %bpl
jmp 0xa6245
movq %r12, %rdi
callq 0x3c87b
movq %r15, %rdi
callq 0xa5ff9
movq %r15, %rdi
callq 0xa5fbe
xorl %ebp, %ebp
testb %al, %al
je 0xa63a7
leaq 0x3cd4c(%rip), %rsi     # 0xe3159
leaq 0x54bd2(%rip), %rdx     # 0xfafe6
leaq 0x54ba4(%rip), %rcx     # 0xfafbf
leaq 0x54ab2(%rip), %r8      # 0xfaed4
movq %r14, %rdi
movl $0xc4, %r9d
xorl %eax, %eax
callq 0x34f1f
jmp 0xa63a2
callq 0x23280