// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/core/sequence_buffer.c
// Function: gt_sequence_buffer_unit_test
int gt_sequence_buffer_unit_test(GtError *err)
{
  int had_err = 0;
  GtSequenceBuffer *sb;
  GtStrArray *testfiles;
  GtStr *tmpfilename;
  GtUword i;
  FILE *tmpfp;

  gt_error_check(err);

  /* create test seqs */
  testfiles = gt_str_array_new();
  tmpfilename = gt_str_new();
  tmpfp = gt_xtmpfp(tmpfilename);
  fprintf(tmpfp, "ID   Foo\n"
                 "XX\n"
                 "DE   Bar\n"
                 "SQ\n"
                 "     gatcgcgcta\n"
                 "//\n");
  gt_fa_xfclose(tmpfp);
  gt_ensure(gt_file_exists(gt_str_get(tmpfilename)));
  gt_str_array_add(testfiles, tmpfilename);
  gt_str_reset(tmpfilename);
  tmpfp = gt_xtmpfp(tmpfilename);
  fprintf(tmpfp, ">test3\nseq3xx\n"
                 ">test4\nseq4xxx\n");
  gt_fa_xfclose(tmpfp);
  gt_ensure(gt_file_exists(gt_str_get(tmpfilename)));
  gt_str_array_add(testfiles, tmpfilename);
  gt_str_delete(tmpfilename);

  sb = gt_sequence_buffer_new_guess_type(testfiles, err);
  gt_ensure(sb != NULL);

  gt_sequence_buffer_delete(sb);
  for (i=0;i<gt_str_array_size(testfiles);i++) {
    const char *fn;
    fn = gt_str_array_get(testfiles, i);
    gt_xremove(fn);
    gt_ensure(!gt_file_exists(fn));
  }
  gt_str_array_delete(testfiles);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x7f5e2
movq %rbx, %rdi
callq 0x3566a
testb %al, %al
jne 0x7f86e
movq %rbx, (%rsp)
callq 0x3d23c
movq %rax, %r14
callq 0x3bfe0
movq %rax, %r15
leaq 0x73788(%rip), %rdx     # 0xf2d85
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
movl $0xe8, %ecx
callq 0x7425e
movq %rax, %r12
leaq 0x73a31(%rip), %rdi     # 0xf3049
movl $0x2b, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xbcb0
movq %r12, %rdi
callq 0x73f9e
movq %r15, %rdi
callq 0x3c40b
movq %rax, %rdi
callq 0x75bdc
testb %al, %al
je 0x7f6e7
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d3a8
movq %r15, %rdi
callq 0x3c49c
leaq 0x73721(%rip), %rdx     # 0xf2d85
movq %r15, %rdi
xorl %esi, %esi
movl $0xf3, %ecx
callq 0x7425e
movq %rax, %r12
leaq 0x73a20(%rip), %rdi     # 0xf309d
movl $0x1d, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xbcb0
movq %r12, %rdi
callq 0x73f9e
movq %r15, %rdi
callq 0x3c40b
movq %rax, %rdi
callq 0x75bdc
movl $0x0, %r12d
testb %al, %al
movq (%rsp), %r13
jne 0x7f76b
leaq 0x63ab9(%rip), %rsi     # 0xe3179
leaq 0x739ae(%rip), %rdx     # 0xf3075
leaq 0x7395e(%rip), %rcx     # 0xf302c
leaq 0x736b0(%rip), %r8      # 0xf2d85
movq %r13, %rdi
movl $0xf7, %r9d
xorl %eax, %eax
callq 0x3559f
jmp 0x7f763
leaq 0x63a8b(%rip), %rsi     # 0xe3179
leaq 0x73980(%rip), %rdx     # 0xf3075
leaq 0x73930(%rip), %rcx     # 0xf302c
leaq 0x73682(%rip), %r12     # 0xf2d85
movq (%rsp), %r13
movq %r13, %rdi
movq %r12, %r8
movl $0xf0, %r9d
xorl %eax, %eax
callq 0x3559f
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d3a8
movq %r15, %rdi
callq 0x3c49c
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movl $0xf3, %ecx
callq 0x7425e
movq %rax, %r12
leaq 0x73954(%rip), %rdi     # 0xf309d
movl $0x1d, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xbcb0
movq %r12, %rdi
callq 0x73f9e
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movb $0x1, %r12b
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d3a8
movq %r15, %rdi
callq 0x3d1eb
movq %r14, %rdi
movq %r13, %rsi
callq 0x7f21a
movq %rax, %r15
testq %rax, %rax
setne %al
orb %r12b, %al
jne 0x7f7c9
leaq 0x639db(%rip), %rsi     # 0xe3179
leaq 0x73916(%rip), %rdx     # 0xf30bb
leaq 0x73880(%rip), %rcx     # 0xf302c
leaq 0x735d2(%rip), %r8      # 0xf2d85
movq (%rsp), %rdi
movl $0xfc, %r9d
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0x7f191
movq %r14, %rdi
callq 0x3d560
testq %rax, %rax
je 0x7f855
leaq 0x735a0(%rip), %r15     # 0xf2d85
xorl %r12d, %r12d
movl %ebx, %ebp
movq %r14, %rdi
movq %r12, %rsi
callq 0x3d3e2
movq %rax, %r13
movq %rax, %rdi
callq 0x3dd48
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %ebp, %ebp
jne 0x7f845
movq %r13, %rdi
callq 0x75bdc
xorl %ebx, %ebx
testb %al, %al
je 0x7f845
movq (%rsp), %rdi
leaq 0x63957(%rip), %rsi     # 0xe3179
leaq 0x7389d(%rip), %rdx     # 0xf30c6
leaq 0x737fc(%rip), %rcx     # 0xf302c
movq %r15, %r8
movl $0x103, %r9d            # imm = 0x103
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
incq %r12
movq %r14, %rdi
callq 0x3d560
cmpq %rax, %r12
jb 0x7f7e8
movq %r14, %rdi
callq 0x3d573
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1dd37
nop