// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/hmm.c
// Function: printgaussianmixtureemission
void printgaussianmixtureemission(FILE *controlfile, Gaussianmixtureptr gm, int numberofcomponents)
{
 int i, j, k;
 int numrealfeatures = current_dataset->multifeaturecount - 1;
 fprintf(controlfile, "\ngaussian mixture:\n mean\n");
 for (i = 0; i < numberofcomponents; i++)
  {
   fprintf(controlfile, " component %d\n ", i + 1);
	  for (j = 0; j < numrealfeatures; j++)
		   fprintf(controlfile, "%.14f ", gm->components[i].mean[j]);
   fprintf(controlfile, "\n");
  }
 fprintf(controlfile, "\ngaussian mixture:\n covariance\n");
 for (i = 0; i < numberofcomponents; i++)
  {
   fprintf(controlfile, " component %d\n", i + 1);
	  for (j = 0; j < numrealfeatures; j++)
    {
		   for (k = 0; k < numrealfeatures; k++)
 	 		  fprintf(controlfile, "%.19f ", gm->components[i].covariance.values[j][k]);
		   fprintf(controlfile, "\n");
		  }
  }
 fprintf(controlfile,"\ngaussian mixture:\n components\n");
 for (i = 0; i < numberofcomponents; i++)
  {
		 fprintf(controlfile, " %.14f ", gm->weights[i]);
  }
 fprintf(controlfile,"\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa95dc(%rip), %rax     # 0xd5870
movq (%rax), %rax
movl 0x1c0(%rax), %r13d
leaq 0x7c478(%rip), %rdi     # 0xa871d
movl $0x19, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
testl %ebp, %ebp
jle 0x2c46c
leal -0x1(%r13), %eax
movl %ebp, 0xc(%rsp)
movl %ebp, %ecx
movq %rcx, 0x10(%rsp)
movl %eax, %r15d
leaq 0x7c4c6(%rip), %r12     # 0xa879e
xorl %ebp, %ebp
movq %r13, 0x18(%rsp)
leaq 0x1(%rbp), %rdx
movq %rbx, %rdi
leaq 0x7c44a(%rip), %rsi     # 0xa8737
movq %rdx, (%rsp)
xorl %eax, %eax
callq 0x42e0
cmpl $0x2, %r13d
movq %rbx, %r13
jl 0x2c329
leaq (%rbp,%rbp,2), %rbp
xorl %ebx, %ebx
movq (%r14), %rax
movq (%rax,%rbp,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r13, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x42e0
incq %rbx
cmpq %rbx, %r15
jne 0x2c308
movl $0xa, %edi
movq %r13, %rsi
callq 0x4150
movq (%rsp), %rax
movq %rax, %rbp
cmpq 0x10(%rsp), %rax
movq %r13, %rbx
movq 0x18(%rsp), %r13
jne 0x2c2df
leaq 0x7c3f4(%rip), %rdi     # 0xa8747
movl $0x1f, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0xc(%rsp)
jle 0x2c485
movq %r14, 0x20(%rsp)
movq %rbx, (%rsp)
xorl %ebx, %ebx
movq (%rsp), %r14
movq 0x20(%rsp), %r12
leaq 0x1(%rbx), %rdx
movq (%rsp), %rdi
leaq 0x7c3d4(%rip), %rsi     # 0xa8767
movq %rdx, 0x28(%rsp)
xorl %eax, %eax
callq 0x42e0
cmpl $0x2, %r13d
jl 0x2c3fe
leaq (%rbx,%rbx,2), %rax
movq %rax, 0x30(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r15, %rbp
movq 0x30(%rsp), %r15
movq (%r12), %rax
movq 0x10(%rax,%r15,8), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r14, %rdi
leaq 0x7c39f(%rip), %rsi     # 0xa8776
movb $0x1, %al
callq 0x42e0
incq %rbx
cmpq %rbx, %rbp
jne 0x2c3bb
movl $0xa, %edi
movq %r14, %rsi
callq 0x4150
incq %r13
cmpq %rbp, %r13
movq %rbp, %r15
jne 0x2c3b1
movq 0x28(%rsp), %rbx
cmpq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r13
jne 0x2c384
leaq 0x7c363(%rip), %rdi     # 0xa877d
movl $0x1f, %esi
movl $0x1, %edx
movq (%rsp), %rbx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x0, 0xc(%rsp)
movq 0x20(%rsp), %r14
movq 0x10(%rsp), %r13
jle 0x2c49e
xorl %r12d, %r12d
leaq 0x7c352(%rip), %r15     # 0xa879d
movq 0x10(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x42e0
incq %r12
cmpq %r12, %r13
jne 0x2c44b
jmp 0x2c49e
leaq 0x7c2d4(%rip), %rdi     # 0xa8747
movl $0x1f, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x7c2f1(%rip), %rdi     # 0xa877d
movl $0x1f, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
movl $0xa, %edi
movq %rbx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4150