// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/hmm.c
// Function: read_gaussian_mixture
Gaussianmixtureptr read_gaussian_mixture(char* filename, int** classes)
{ 
 /*!Last Changed 28.04.2007*/
 Gaussianmixtureptr gm;
 FILE* infile;
 int i, dimension;
 infile = fopen(filename, "r");
 if (!infile)
   return NULL;
 fscanf(infile, "%d", &dimension);
 gm = safemalloc(sizeof(Gaussianmixture), "read_gaussian_mixture", 7);
 fscanf(infile, "%d", &(gm->componentcount));
 *classes = safemalloc(gm->componentcount * sizeof(int), "read_gaussian_mixture", 9);
 gm->weights = safemalloc(gm->componentcount * sizeof(double), "read_gaussian_mixture", 10);
 gm->components = safemalloc(gm->componentcount * sizeof(Gaussian), "read_gaussian_mixture", 11);
 for (i = 0; i < gm->componentcount; i++)
   fscanf(infile, "%lf", &(gm->weights[i]));
 for (i = 0; i < gm->componentcount; i++)
  {
   fscanf(infile, "%d", &((*classes)[i]));
   gm->components[i].mean = load_array(infile, dimension);
   gm->components[i].covariance = load_matrix(infile, dimension, dimension);
  }
 fclose(infile);
 return gm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xac5ab(%rip), %rsi     # 0xe81a6
callq 0x40c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x3bc18
movq $0x0, -0x8(%rbp)
jmp 0x3bddd
movq -0x28(%rbp), %rdi
leaq 0xb1642(%rip), %rsi     # 0xed265
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0x4070
movl $0x18, %edi
leaq 0xa958e(%rip), %rsi     # 0xe51c8
movl $0x7, %edx
callq 0x52d70
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rdx
addq $0x8, %rdx
leaq 0xb160a(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4070
movq -0x20(%rbp), %rax
movslq 0x8(%rax), %rdi
shlq $0x2, %rdi
leaq 0xa9553(%rip), %rsi     # 0xe51c8
movl $0x9, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movslq 0x8(%rax), %rdi
shlq $0x3, %rdi
leaq 0xa952c(%rip), %rsi     # 0xe51c8
movl $0xa, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movslq 0x8(%rax), %rax
imulq $0x18, %rax, %rdi
leaq 0xa9504(%rip), %rsi     # 0xe51c8
movl $0xb, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3bd1b
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
movslq -0x2c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0xaaabf(%rip), %rsi     # 0xe67c8
movb $0x0, %al
callq 0x4070
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3bcdf
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3bdcc
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movslq -0x2c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
leaq 0xb1516(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4070
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x54d70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x54cc0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3bd22
movq -0x28(%rbp), %rdi
callq 0x4250
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)