// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
testq %rdi, %rdi
je 0x5e8bf
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x5e79e
movq %rbx, %rdi
callq 0xc103
testb %al, %al
jne 0x5e8e9
movq %r14, %rdi
callq 0x157f4
testq %rax, %rax
je 0x5e830
movq %rsp, %rdi
xorl %r15d, %r15d
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0xb2f0
movq %r14, %rdi
xorl %esi, %esi
callq 0x1555e
movq %rax, %rdi
callq 0x53b58
movl %eax, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x1555e
leaq 0x783b8(%rip), %rdx     # 0xd6b9e
movl %ebp, %edi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x53d4e
testq %rax, %rax
je 0x5e896
movq %rax, %r12
movq %rsp, %r15
movl $0x1fff, %edx           # imm = 0x1FFF
movq %rax, %rdi
movq %r15, %rsi
callq 0x54709
movq %r12, %rdi
callq 0x548ae
movq %r15, %rdi
callq 0x603d3
testb %al, %al
je 0x5e853
movq %r14, %rdi
callq 0x603e3
jmp 0x5e893
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x1555e
leaq 0x7d8e3(%rip), %rsi     # 0xdc127
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc007
jmp 0x5e896
movq %rsp, %rdi
callq 0x6054c
testb %al, %al
je 0x5e869
movq %r14, %rdi
callq 0x60948
jmp 0x5e893
movq %rsp, %rdi
callq 0x61880
testb %al, %al
je 0x5e87f
movq %r14, %rdi
callq 0x618ab
jmp 0x5e893
movq %rsp, %rdi
callq 0x60e1b
testb %al, %al
je 0x5e8a9
movq %r14, %rdi
callq 0x60e22
movq %rax, %r15
movq %r15, %rax
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x1555e
leaq 0x7d8a7(%rip), %rsi     # 0xdc164
jmp 0x5e844
movq 0xcf6f2(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6b796(%rip), %rsi     # 0xca066
leaq 0x947c9(%rip), %rdx     # 0xf30a0
leaq 0x7d827(%rip), %rcx     # 0xdc105
leaq 0x7d7b0(%rip), %r8      # 0xdc095
pushq $0x45
jmp 0x5e911
movq 0xcf6c8(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6b76c(%rip), %rsi     # 0xca066
leaq 0x6bd58(%rip), %rdx     # 0xca659
leaq 0x7d7fd(%rip), %rcx     # 0xdc105
leaq 0x7d786(%rip), %r8      # 0xdc095
pushq $0x46
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300