// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/ltr/ltrdigest_ppt_visitor.c
// Function: gt_ppt_hmm_new
static GtHMM* gt_ppt_hmm_new(const GtAlphabet *alpha, GtLTRdigestPPTVisitor *lv)
{
  GtHMM *hmm;
  double non_u_prob = 0.0;

  gt_assert(alpha);

  hmm = gt_hmm_new((unsigned int) PPT_NOF_STATES, gt_alphabet_size(alpha));

  /* set emission probabilities */
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_OUT,
                                  (unsigned int) gt_alphabet_encode(alpha, 'G'),
                                  lv->bkg_g_prob);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_OUT,
                                  (unsigned int) gt_alphabet_encode(alpha, 'A'),
                                  lv->bkg_a_prob);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_OUT,
                                  (unsigned int) gt_alphabet_encode(alpha, 'C'),
                                  lv->bkg_c_prob);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_OUT,
                                  (unsigned int) gt_alphabet_encode(alpha, 'T'),
                                  lv->bkg_t_prob);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_IN,
                                  (unsigned int) gt_alphabet_encode(alpha, 'G'),
                                  lv->ppt_purine_prob/2);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_IN,
                                  (unsigned int) gt_alphabet_encode(alpha, 'A'),
                                  lv->ppt_purine_prob/2);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_IN,
                                  (unsigned int) gt_alphabet_encode(alpha, 'C'),
                                  lv->ppt_pyrimidine_prob/2);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_IN,
                                  (unsigned int) gt_alphabet_encode(alpha, 'T'),
                                  lv->ppt_pyrimidine_prob/2);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_UBOX,
                                  (unsigned int) gt_alphabet_encode(alpha, 'T'),
                                  lv->ubox_u_prob);
  /* calculate non-U probabilities (still uniform, may be optimised) */
  non_u_prob = (1.0 - (lv->ubox_u_prob)) / ((double) 3);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_UBOX,
                                  (unsigned int) gt_alphabet_encode(alpha, 'G'),
                                  non_u_prob);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_UBOX,
                                  (unsigned int) gt_alphabet_encode(alpha, 'A'),
                                  non_u_prob);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_UBOX,
                                  (unsigned int) gt_alphabet_encode(alpha, 'C'),
                                  non_u_prob);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_N,
                                  (unsigned int) gt_alphabet_encode(alpha, 'G'),
                                  0.00);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_N,
                                  (unsigned int) gt_alphabet_encode(alpha, 'A'),
                                  0.00);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_N,
                                  (unsigned int) gt_alphabet_encode(alpha, 'C'),
                                  0.00);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_N,
                                  (unsigned int) gt_alphabet_encode(alpha, 'T'),
                                  0.00);
  gt_hmm_set_emission_probability(hmm, (unsigned int) PPT_N,
                                  (unsigned int) gt_alphabet_encode(alpha, 'N'),
                                  1.00);

  /* set transition probabilities */
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_OUT,
                                    (unsigned int) PPT_IN, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_OUT,
                                    (unsigned int) PPT_N, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_OUT,
                                    (unsigned int) PPT_UBOX, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_UBOX,
                                    (unsigned int) PPT_OUT, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_UBOX,
                                    (unsigned int) PPT_N, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_UBOX,
                                    (unsigned int) PPT_IN, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_IN,
                                    (unsigned int) PPT_UBOX, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_IN,
                                    (unsigned int) PPT_OUT, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_IN,
                                    (unsigned int) PPT_N, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_N,
                                    (unsigned int) PPT_UBOX, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_N,
                                    (unsigned int) PPT_OUT, 0.05);
  gt_hmm_set_transition_probability(hmm, (unsigned int) PPT_N,
                                    (unsigned int) PPT_IN, 0.05);
  gt_hmm_set_missing_transition_probabilities(hmm);

  if (!gt_hmm_is_valid(hmm))
  {
    gt_hmm_delete(hmm);
    return NULL;
  } else
    return hmm;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x90(%rsp)
cmpq $0x0, 0xa8(%rsp)
jne 0x30bd06
movq 0x3302cb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x20a334(%rip), %rsi    # 0x516013
leaq 0x2a8c50(%rip), %rdx    # 0x5b4936
leaq 0x2882d2(%rip), %rcx    # 0x593fbf
leaq 0x288062(%rip), %r8     # 0x593d56
movl $0xa5, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x30bd08
movq 0xa8(%rsp), %rdi
callq 0x7e920
movl %eax, %esi
movl $0x4, %edi
callq 0x18a550
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x47, %esi
callq 0x7f6f0
movq 0x8(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x68(%rax), %xmm0
movl $0x1, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x41, %esi
callq 0x7f6f0
movq 0x10(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x60(%rax), %xmm0
movl $0x1, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x43, %esi
callq 0x7f6f0
movq 0x18(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x78(%rax), %xmm0
movl $0x1, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x54, %esi
callq 0x7f6f0
movq 0x20(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x70(%rax), %xmm0
movl $0x1, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x47, %esi
callq 0x7f6f0
movq 0x28(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x58(%rax), %xmm0
movsd 0x20cf03(%rip), %xmm1   # 0x518d60
divsd %xmm1, %xmm0
xorl %esi, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x41, %esi
callq 0x7f6f0
movq 0x30(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x58(%rax), %xmm0
movsd 0x20cebc(%rip), %xmm1   # 0x518d60
divsd %xmm1, %xmm0
xorl %esi, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x43, %esi
callq 0x7f6f0
movq 0x38(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x50(%rax), %xmm0
movsd 0x20ce75(%rip), %xmm1   # 0x518d60
divsd %xmm1, %xmm0
xorl %esi, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x54, %esi
callq 0x7f6f0
movq 0x40(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x50(%rax), %xmm0
movsd 0x20ce2e(%rip), %xmm1   # 0x518d60
divsd %xmm1, %xmm0
xorl %esi, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x54, %esi
callq 0x7f6f0
movq 0x48(%rsp), %rdi
movzbl %al, %edx
movq 0xa0(%rsp), %rax
movsd 0x80(%rax), %xmm0
movl $0x2, %esi
callq 0x18ab50
movq 0xa0(%rsp), %rax
movsd 0x20b2b2(%rip), %xmm0   # 0x517240
subsd 0x80(%rax), %xmm0
movsd 0x287d9a(%rip), %xmm1   # 0x593d38
divsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x47, %esi
callq 0x7f6f0
movq 0x50(%rsp), %rdi
movzbl %al, %edx
movsd 0x90(%rsp), %xmm0
movl $0x2, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x41, %esi
callq 0x7f6f0
movq 0x58(%rsp), %rdi
movzbl %al, %edx
movsd 0x90(%rsp), %xmm0
movl $0x2, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x43, %esi
callq 0x7f6f0
movq 0x60(%rsp), %rdi
movzbl %al, %edx
movsd 0x90(%rsp), %xmm0
movl $0x2, %esi
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x47, %esi
callq 0x7f6f0
movq 0x68(%rsp), %rdi
movzbl %al, %edx
movl $0x3, %esi
xorps %xmm0, %xmm0
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x41, %esi
callq 0x7f6f0
movq 0x70(%rsp), %rdi
movzbl %al, %edx
movl $0x3, %esi
xorps %xmm0, %xmm0
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x43, %esi
callq 0x7f6f0
movq 0x78(%rsp), %rdi
movzbl %al, %edx
movl $0x3, %esi
xorps %xmm0, %xmm0
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x54, %esi
callq 0x7f6f0
movq 0x80(%rsp), %rdi
movzbl %al, %edx
movl $0x3, %esi
xorps %xmm0, %xmm0
callq 0x18ab50
movq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xa8(%rsp), %rdi
movl $0x4e, %esi
callq 0x7f6f0
movq 0x88(%rsp), %rdi
movzbl %al, %edx
movl $0x3, %esi
movsd 0x20b0d7(%rip), %xmm0   # 0x517240
callq 0x18ab50
movq 0x98(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
movsd 0x287bab(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x1, %esi
movl $0x3, %edx
movsd 0x287b8c(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x1, %esi
movl $0x2, %edx
movsd 0x287b6d(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
movsd 0x287b4e(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x2, %esi
movl $0x3, %edx
movsd 0x287b2f(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
movsd 0x287b13(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x2, %edx
movsd 0x287af7(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %edx
movsd 0x287adb(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
xorl %esi, %esi
movl $0x3, %edx
movsd 0x287abf(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x3, %esi
movl $0x2, %edx
movsd 0x287aa0(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x3, %esi
movl $0x1, %edx
movsd 0x287a81(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movsd 0x287a65(%rip), %xmm0   # 0x593d30
callq 0x18a9b0
movq 0x98(%rsp), %rdi
callq 0x18af60
movq 0x98(%rsp), %rdi
callq 0x18b260
testb $0x1, %al
jne 0x30c309
movq 0x98(%rsp), %rdi
callq 0x18d780
movq $0x0, 0xb0(%rsp)
jmp 0x30c319
movq 0x98(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopl (%rax)