// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/hmm.c
// Function: printgaussianhmm
void printgaussianhmm(FILE *controlfile, Hmmptr hmm)
{
 int i, j, st, ft, ft2, numrealfeatures;
 Gaussianptr g;
 numrealfeatures = current_dataset->multifeaturecount - 1;
 fprintf(controlfile, "a :\n");
 for (i = 0; i < hmm->statecount; i++)
 	for (j = 0; j < hmm->statecount; j++)
   {
 		 fprintf(controlfile, "%i %i %f", i, j, hmm->states[i].a_i_dot[j]);
 		 fprintf(controlfile, "\n");
 	 }
 fprintf(controlfile, "Pi :\n");
 for (i = 0; i < hmm->statecount; i++)
   fprintf(controlfile, "%f ", hmm->states[i].pi);
 fprintf(controlfile, "\n");
 fprintf(controlfile, "number of states %d\n", hmm->statecount);
 fprintf(controlfile, "b:\n");
 for (st = 0; st < hmm->statecount; st++)
  {
	  g = (Gaussianptr)(hmm->states[st].b);
 	 fprintf(controlfile, "mean state %d\n", st);
	  for (ft = 0; ft < numrealfeatures; ft++)
 		  fprintf(controlfile,"%f ", g->mean[ft]);
   fprintf(controlfile, "\n"); 
  }
 for (st = 0; st < hmm->statecount; st++)
  {
	  g = (Gaussianptr)(hmm->states[st].b);
 	 fprintf(controlfile, "cov state %d\n", st);
 	 for (ft = 0; ft < numrealfeatures; ft++)
    {
			  for (ft2 = 0; ft2 < numrealfeatures; ft2++)
 				  fprintf(controlfile, "%.25f ", g->covariance.values[ft][ft2]);
     fprintf(controlfile, "\n");
    } 
   fprintf(controlfile, "\n"); 
  }	
 fprintf(controlfile, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa5687(%rip), %rax     # 0xcd870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
movl %eax, (%rsp)
leaq 0x703f1(%rip), %rdi     # 0x985ed
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
movq %r14, 0x8(%rsp)
movl 0x8(%r14), %eax
xorl %r15d, %r15d
pushq $0xa
popq %rbp
movq 0x8(%rsp), %r12
movslq %eax, %rcx
cmpq %rcx, %r15
jge 0x28277
movq %r15, %r14
shlq $0x5, %r14
xorl %r13d, %r13d
movslq %eax, %rcx
cmpq %rcx, %r13
jge 0x28272
movq (%r12), %rax
movq 0x8(%rax,%r14), %rax
movsd (%rax,%r13,8), %xmm0
movq %rbx, %rdi
leaq 0x703a1(%rip), %rsi     # 0x985f2
movl %r15d, %edx
movl %r13d, %ecx
movb $0x1, %al
callq 0x42e0
movl %ebp, %edi
movq %rbx, %rsi
callq 0x4150
incq %r13
movl 0x8(%r12), %eax
jmp 0x28230
incq %r15
jmp 0x2821e
leaq 0x7037d(%rip), %rdi     # 0x985fb
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
pushq $0x10
popq %r14
xorl %r12d, %r12d
leaq 0x70367(%rip), %r15     # 0x98601
movq 0x8(%rsp), %r13
movslq 0x8(%r13), %rax
cmpq %rax, %r12
jge 0x282c8
movq (%r13), %rax
movsd (%rax,%r14), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x42e0
incq %r12
addq $0x20, %r14
jmp 0x2829f
movl (%rsp), %ebp
decl %ebp
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x4150
movl 0x8(%r13), %edx
leaq 0x70322(%rip), %rsi     # 0x98605
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
leaq 0x70326(%rip), %rdi     # 0x9861a
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x42c0
testl %ebp, %ebp
movl $0x0, %eax
movl %ebp, (%rsp)
cmovgl %ebp, %eax
movq %rax, 0x10(%rsp)
leaq 0x70303(%rip), %rbp     # 0x9861e
leaq 0x702df(%rip), %r12     # 0x98601
xorl %r13d, %r13d
movq 0x8(%rsp), %rcx
movslq 0x8(%rcx), %rax
cmpq %rax, %r13
jge 0x28387
movq (%rcx), %rax
movq %r13, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %r14
movq %rbx, %rdi
movq %rbp, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x42e0
xorl %r15d, %r15d
cmpq %r15, 0x10(%rsp)
je 0x28377
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm0
movq %rbx, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x42e0
incq %r15
jmp 0x28355
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x4150
incq %r13
jmp 0x28325
movl (%rsp), %r13d
leaq 0x702a9(%rip), %r12     # 0x9863b
xorl %edx, %edx
cltq
cmpq %rax, %rdx
jge 0x28424
movq (%rcx), %rax
movq %rdx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rbp
movq %rbx, %rdi
leaq 0x70275(%rip), %rsi     # 0x9862d
movq %rdx, (%rsp)
xorl %eax, %eax
callq 0x42e0
xorl %r14d, %r14d
cmpq 0x10(%rsp), %r14
je 0x28405
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x283f5
movq 0x10(%rbp), %rax
movq (%rax,%r14,8), %rax
movsd (%rax,%r15,8), %xmm0
movq %rbx, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x42e0
incq %r15
jmp 0x283d0
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x4150
incq %r14
jmp 0x283c6
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x4150
movq (%rsp), %rdx
incq %rdx
movq 0x8(%rsp), %rcx
movl 0x8(%rcx), %eax
jmp 0x28394
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4150