// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x18a56a
cmpl $0x0, 0x20(%rsp)
jne 0x18a5a2
movq 0x4b1a2f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38ba98(%rip), %rsi    # 0x516013
leaq 0x3caeae(%rip), %rdx    # 0x555430
leaq 0x3caec7(%rip), %rcx    # 0x555450
leaq 0x3caecb(%rip), %r8     # 0x55545b
movl $0x39, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x18a5a4
movl $0x20, %edi
leaq 0x3caeab(%rip), %rsi    # 0x55545b
movl $0x3c, %edx
callq 0xe80f0
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
leaq 0x3cae8b(%rip), %rsi    # 0x55545b
movl $0x3d, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0x24(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
leaq 0x3cae64(%rip), %rsi    # 0x55545b
movl $0x3e, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0x24(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
movl 0x24(%rsp), %eax
imulq %rax, %rdi
leaq 0x3cae35(%rip), %rsi    # 0x55545b
movl $0x3e, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq $0x1, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0x24(%rsp), %ecx
cmpq %rcx, %rax
jae 0x18a699
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movl 0x24(%rsp), %eax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x18a648
movl 0x24(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
leaq 0x3cadb1(%rip), %rsi    # 0x55545b
movl $0x3f, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x18(%rax)
movl 0x24(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
movl 0x20(%rsp), %eax
imulq %rax, %rdi
leaq 0x3cad82(%rip), %rsi    # 0x55545b
movl $0x3f, %edx
callq 0xe80f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
movq $0x1, (%rsp)
movq (%rsp), %rax
movl 0x24(%rsp), %ecx
cmpq %rcx, %rax
jae 0x18a746
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movl 0x20(%rsp), %eax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x18a6fa
movl 0x24(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movl 0x20(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x18a79f
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x24(%rsp), %eax
cvtsi2sd %rax, %xmm1
movsd 0x38cab7(%rip), %xmm0   # 0x517240
divsd %xmm1, %xmm0
callq 0x18a860
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x18a765
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x18a7f4
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x18a7e5
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
xorps %xmm0, %xmm0
callq 0x18a9b0
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x18a7b9
jmp 0x18a7e7
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x18a7a7
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jae 0x18a849
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x20(%rsp), %eax
jae 0x18a83a
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
xorps %xmm0, %xmm0
callq 0x18ab50
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x18a80e
jmp 0x18a83c
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x18a7fc
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)