// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/hmm.c
// Function: gt_hmm_new
GtHMM* gt_hmm_new(unsigned int num_of_states, unsigned int num_of_symbols)
{
  GtHMM *hmm;
  unsigned int i, j;

  gt_assert(num_of_states && num_of_symbols);

  /* alloc */
  hmm = gt_malloc(sizeof *hmm);
  hmm->initial_state_prob = gt_malloc(sizeof (double) * num_of_states);
  gt_array2dim_malloc(hmm->transition_prob, num_of_states, num_of_states);
  gt_array2dim_malloc(hmm->emission_prob, num_of_states, num_of_symbols);

  /* init */
  hmm->num_of_states = num_of_states;
  hmm->num_of_symbols = num_of_symbols;

  for (i = 0; i < num_of_states; i++)
    gt_hmm_set_initial_state_probability(hmm, i, 1.0 / num_of_states);

  for (i = 0; i < num_of_states; i++) {
    for (j = 0; j < num_of_states; j++)
      gt_hmm_set_transition_probability(hmm, i, j, 0.0);
  }

  for (i = 0; i < num_of_states; i++) {
    for (j = 0; j < num_of_symbols; j++)
      gt_hmm_set_emission_probability(hmm, i, j, 0.0);
  }

  return hmm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %edi, %edi
je 0xec36b
movl %esi, %ebx
testl %esi, %esi
je 0xec36b
movl %edi, %ebp
leaq 0x236fa9(%rip), %r12    # 0x3231a3
pushq $0x20
popq %rdi
pushq $0x3c
popq %rdx
movq %r12, %rsi
callq 0x93160
movq %rax, %r14
movl %ebp, %r13d
leaq (,%r13,8), %r15
pushq $0x3d
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x93160
movq %rax, 0x8(%r14)
pushq $0x3e
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x93160
movq %rax, 0x10(%r14)
movq %r15, %rdi
imulq %r13, %rdi
movq %r12, %rsi
pushq $0x3e
popq %rdx
callq 0x93160
movq 0x10(%r14), %rcx
movq %rax, (%rcx)
pushq $0x1
popq %rax
cmpq %rax, %r13
je 0xec270
movq 0x10(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdx
addq %r15, %rdx
movq %rdx, (%rcx,%rax,8)
incq %rax
jmp 0xec256
leaq 0x236f2c(%rip), %rsi    # 0x3231a3
pushq $0x3f
popq %rdx
movq %r15, %rdi
callq 0x93160
movq %rax, 0x18(%r14)
movl %ebx, %r12d
imulq %r12, %r15
movq %r15, %rdi
leaq 0x236f0c(%rip), %rsi    # 0x3231a3
pushq $0x3f
popq %rdx
callq 0x93160
movq 0x18(%r14), %rcx
movq %rax, (%rcx)
pushq $0x1
popq %rax
shlq $0x3, %r12
cmpq %rax, %r13
je 0xec2c7
movq 0x18(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdx
addq %r12, %rdx
movq %rdx, (%rcx,%rax,8)
incq %rax
jmp 0xec2ad
movl %ebp, (%r14)
cvtsi2sd %r13, %xmm0
movl %ebx, 0x4(%r14)
movsd 0x1f9f4d(%rip), %xmm1   # 0x2e6228
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
xorl %r15d, %r15d
cmpl %r15d, %ebp
je 0xec301
movq %r14, %rdi
movl %r15d, %esi
movsd (%rsp), %xmm0
callq 0xec3a1
incl %r15d
jmp 0xec2e7
xorl %r15d, %r15d
cmpl %ebp, %r15d
je 0xec32d
xorl %r12d, %r12d
cmpl %r12d, %ebp
je 0xec328
xorpd %xmm0, %xmm0
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0xec487
incl %r12d
jmp 0xec30c
incl %r15d
jmp 0xec304
xorl %r15d, %r15d
cmpl %ebp, %r15d
je 0xec359
xorl %r12d, %r12d
cmpl %r12d, %ebx
je 0xec354
xorpd %xmm0, %xmm0
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0xec5aa
incl %r12d
jmp 0xec338
incl %r15d
jmp 0xec330
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x34bbf6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f8c97(%rip), %rsi    # 0x2e5013
leaq 0x236df5(%rip), %rdx    # 0x323178
leaq 0x236e0e(%rip), %rcx    # 0x323198
leaq 0x236e12(%rip), %r8     # 0x3231a3
pushq $0x39
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390