// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/sequence_buffer.c
// Function: gt_sequence_buffer_new_guess_type
GtSequenceBuffer* gt_sequence_buffer_new_guess_type(const GtStrArray *seqs,
                                                    GtError *err)
{
  GtFile *file;
  GtSequenceBuffer *sb;
  char firstcontents[BUFSIZ];
  gt_assert(seqs);
  gt_error_check(err);

  if (gt_str_array_size(seqs) == 0) {
    gt_error_set(err, "cannot guess file type of file %s -- no sequence files "
                      "given",
                      gt_str_array_get(seqs, 0));
    return NULL;
  }

  memset(firstcontents, 0, BUFSIZ);
  file = gt_file_open(gt_file_mode_determine(gt_str_array_get(seqs, 0)),
                      gt_str_array_get(seqs, 0),
                      "rb", err);
  if (!file)
    return NULL;
  gt_file_xread(file, &firstcontents, BUFSIZ-1);
  gt_file_delete(file);

  if (gt_sequence_buffer_embl_guess(firstcontents)) {
    sb = gt_sequence_buffer_embl_new(seqs);
  } else if (gt_sequence_buffer_fasta_guess(firstcontents)) {
    sb = gt_sequence_buffer_fasta_new(seqs);
  } else if (gt_sequence_buffer_gb_guess(firstcontents)) {
    sb = gt_sequence_buffer_gb_new(seqs);
    } else if (gt_sequence_buffer_fastq_guess(firstcontents)) {
    sb = gt_sequence_buffer_fastq_new(seqs);
  } else {
    gt_error_set(err, "cannot guess file type of file %s -- unknown file "
                      "contents",
                      gt_str_array_get(seqs, 0));
    return NULL;
  }
  return sb;
}

// Assembly:
subq $0x2048, %rsp           # imm = 0x2048
movq %rdi, 0x2038(%rsp)
movq %rsi, 0x2030(%rsp)
cmpq $0x0, 0x2038(%rsp)
jne 0x9b6fa
movq 0x11890f(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xc2993(%rip), %rsi     # 0x15e066
leaq 0xf1743(%rip), %rdx     # 0x18ce1d
leaq 0xd57e4(%rip), %rcx     # 0x170ec5
leaq 0xd576d(%rip), %r8      # 0x170e55
movl $0x45, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x9b6fc
jmp 0x9b6fe
cmpq $0x0, 0x2030(%rsp)
je 0x9b754
movq 0x2030(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x9b71c
jmp 0x9b754
movq 0x1188b5(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xc2939(%rip), %rsi     # 0x15e066
leaq 0xc2f14(%rip), %rdx     # 0x15e648
leaq 0xd578a(%rip), %rcx     # 0x170ec5
leaq 0xd5713(%rip), %r8      # 0x170e55
movl $0x46, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x9b756
movq 0x2038(%rsp), %rdi
callq 0x1b720
cmpq $0x0, %rax
jne 0x9b7ae
movq 0x2030(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x2038(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1b320
movq 0x18(%rsp), %rdi
movq %rax, %rdx
leaq 0xd5751(%rip), %rsi     # 0x170ee7
movb $0x0, %al
callq 0xc0d0
movq $0x0, 0x2040(%rsp)
jmp 0x9b94a
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0xb2d0
movq 0x2038(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1b320
movq %rax, %rdi
callq 0x82c10
movl %eax, 0x14(%rsp)
movq 0x2038(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1b320
movl 0x14(%rsp), %edi
movq %rax, %rsi
movq 0x2030(%rsp), %rcx
leaq 0xcf7a8(%rip), %rdx     # 0x16afab
callq 0x82f00
movq %rax, 0x2028(%rsp)
cmpq $0x0, 0x2028(%rsp)
jne 0x9b82c
movq $0x0, 0x2040(%rsp)
jmp 0x9b94a
movq 0x2028(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x1fff, %edx           # imm = 0x1FFF
callq 0x83c20
movq 0x2028(%rsp), %rdi
callq 0x83f40
leaq 0x20(%rsp), %rdi
callq 0x9e870
testb $0x1, %al
jne 0x9b860
jmp 0x9b87a
movq 0x2038(%rsp), %rdi
callq 0x9e8a0
movq %rax, 0x2020(%rsp)
jmp 0x9b93a
leaq 0x20(%rsp), %rdi
callq 0x9f0c0
testb $0x1, %al
jne 0x9b88a
jmp 0x9b8a4
movq 0x2038(%rsp), %rdi
callq 0x9f660
movq %rax, 0x2020(%rsp)
jmp 0x9b938
leaq 0x20(%rsp), %rdi
callq 0xa1380
testb $0x1, %al
jne 0x9b8b4
jmp 0x9b8cb
movq 0x2038(%rsp), %rdi
callq 0xa13f0
movq %rax, 0x2020(%rsp)
jmp 0x9b936
leaq 0x20(%rsp), %rdi
callq 0xa02b0
testb $0x1, %al
jne 0x9b8db
jmp 0x9b8f2
movq 0x2038(%rsp), %rdi
callq 0xa02d0
movq %rax, 0x2020(%rsp)
jmp 0x9b934
movq 0x2030(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x2038(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1b320
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0xd5605(%rip), %rsi     # 0x170f24
movb $0x0, %al
callq 0xc0d0
movq $0x0, 0x2040(%rsp)
jmp 0x9b94a
jmp 0x9b936
jmp 0x9b938
jmp 0x9b93a
movq 0x2020(%rsp), %rax
movq %rax, 0x2040(%rsp)
movq 0x2040(%rsp), %rax
addq $0x2048, %rsp           # imm = 0x2048
retq
nopw (%rax,%rax)