// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_sain.c
// Function: gt_sain_getalphabet
static GtAlphabet *gt_sain_getalphabet(const GtSainArguments *arguments,
                                       GtError *err)
{
  GtAlphabet *alphabet;
  int had_err = 0;

  if (arguments->dnaalphabet)
  {
    alphabet = gt_alphabet_new_dna();
  } else
  {
    if (arguments->proteinalphabet)
    {
      alphabet = gt_alphabet_new_protein();
    } else
    {
      if (gt_str_length(arguments->smap) > 0)
      {
        alphabet = gt_alphabet_new_from_file_no_suffix(
                                           gt_str_get(arguments->smap),
                                           err);
      } else
      {
        GtStrArray *filenametab = gt_str_array_new();

        gt_assert(gt_str_length(arguments->fastafile) > 0);
        gt_str_array_add_cstr(filenametab,gt_str_get(arguments->fastafile));
        alphabet = gt_alphabet_new_from_sequence(filenametab, err);
        gt_str_array_delete(filenametab);
      }
      if (alphabet == NULL)
      {
        had_err = -1;
      } else
      {
        if (!gt_alphabet_is_dna(alphabet) &&
            (arguments->readmode == GT_READMODE_COMPL ||
             arguments->readmode == GT_READMODE_REVCOMPL))
        {
          gt_error_set(err,"option -dir cpl and -dir rcl is only "
                           "possible for DNA sequences");
          had_err = -1;
        }
      }
    }
  }
  if (had_err)
  {
    gt_alphabet_delete(alphabet);
    return NULL;
  }
  gt_assert(alphabet != NULL);
  return alphabet;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x28(%rsp), %rax
testb $0x1, 0x6(%rax)
je 0x5bd70
callq 0x7e4b0
movq %rax, 0x18(%rsp)
jmp 0x5beb3
movq 0x28(%rsp), %rax
testb $0x1, 0x7(%rax)
je 0x5bd8a
callq 0x7e610
movq %rax, 0x18(%rsp)
jmp 0x5beb1
movq 0x28(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jbe 0x5bdc3
movq 0x28(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x7fa00
movq %rax, 0x18(%rsp)
jmp 0x5be5c
callq 0x11f5c0
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
ja 0x5be19
movq 0x5e01b8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4ba221(%rip), %rsi    # 0x516013
leaq 0x4cadeb(%rip), %rdx    # 0x526be4
leaq 0x4cae0c(%rip), %rcx    # 0x526c0c
leaq 0x4cab09(%rip), %r8     # 0x526910
movl $0x108, %r9d            # imm = 0x108
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x5be1b
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dee0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x11f720
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x7e140
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rdi
callq 0x11fd20
cmpq $0x0, 0x18(%rsp)
jne 0x5be6e
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x5beaf
movq 0x18(%rsp), %rdi
callq 0x7f400
testb $0x1, %al
jne 0x5bead
movq 0x28(%rsp), %rax
cmpl $0x2, 0x38(%rax)
je 0x5be92
movq 0x28(%rsp), %rax
cmpl $0x3, 0x38(%rax)
jne 0x5bead
movq 0x20(%rsp), %rdi
leaq 0x4cac80(%rip), %rsi    # 0x526b1e
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x5beaf
jmp 0x5beb1
jmp 0x5beb3
cmpl $0x0, 0x14(%rsp)
je 0x5becf
movq 0x18(%rsp), %rdi
callq 0x7e3d0
movq $0x0, 0x30(%rsp)
jmp 0x5bf1d
jmp 0x5bed1
cmpq $0x0, 0x18(%rsp)
jne 0x5bf11
movq 0x5e00c0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4ba129(%rip), %rsi    # 0x516013
leaq 0x51a49f(%rip), %rdx    # 0x576390
leaq 0x4cad14(%rip), %rcx    # 0x526c0c
leaq 0x4caa11(%rip), %r8     # 0x526910
movl $0x122, %r9d            # imm = 0x122
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x5bf13
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw (%rax,%rax)