// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/model.c
// Function: hmm_model_simulation_one_backward
Hmm_model hmm_model_simulation_one_backward(char* simulationdirectory, int maxstates, int* tries)
{
 /*!Last Changed 10.01.2009*/
 char **two_file;
 int i;
 Hmm_model bestmodel;
 Hmm_modelptr models;
 models = safemalloc(sizeof(Hmm_model) * maxstates, "hmm_model_simulation_one_backward", 4);
 for (i = 0; i < maxstates; i++)
  {
   models[i].states = i + 1;
   models[i].mixture = 1;
   models[i].index = i;
  }
 bestmodel = models[maxstates - 1];
 two_file = (char**) safemalloc_2d(sizeof(char *), sizeof(char), 2, 500, "hmm_model_simulation_one_backward", 12);
 *tries = 1;
 while (bestmodel.index > 0)
  {
   (*tries)++;
   if (compare_two_hmm_models(two_file, simulationdirectory, bestmodel, models[bestmodel.index - 1]) == 0)
     break;
   bestmodel = models[bestmodel.index - 1];
  }
 safe_free(models);
 free_2d((void**)two_file, 2);
 return bestmodel;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, -0x68(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movslq -0xc(%rbp), %rax
imulq $0x14, %rax, %rdi
leaq 0x7d86a(%rip), %rsi     # 0xe7097
movl $0x4, %edx
callq 0x52d70
movq %rax, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x69897
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movq -0x30(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x4(%rax)
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x69842
movq -0x70(%rbp), %rax
movq -0x30(%rbp), %rcx
movl -0xc(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movl $0x8, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x1f4, %ecx            # imm = 0x1F4
leaq 0x7d7b9(%rip), %r8      # 0xe7097
movl $0xc, %r9d
callq 0x53120
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x70(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x699ce
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movl (%rax), %edx
addl $0x1, %edx
movl %edx, (%rax)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x30(%rbp), %rax
movl 0x8(%rcx), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
movq 0x8(%rcx), %rdx
movq %rdx, -0x40(%rbp)
movl 0x10(%rcx), %ecx
movl %ecx, -0x38(%rbp)
movq (%rax), %rcx
movq %rcx, -0x60(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x50(%rbp)
leaq -0x48(%rbp), %rcx
leaq -0x60(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x28(%rsp)
callq 0x690a0
cmpl $0x0, %eax
jne 0x6999d
jmp 0x699ce
movq -0x70(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x8(%rax), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
jmp 0x698f7
movq -0x30(%rbp), %rdi
callq 0x52e80
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x52e20
movq -0x68(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)