// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/mixture.c
// Function: read_mixture_from_file
Mixtureptr read_mixture_from_file(char* modeldefinition)
{
	/*!Last Changed 26.01.2005*/
	int i, j;
	FILE* infile;
	Mixtureptr mix;
	mix = safemalloc(sizeof(Mixture), "read_mixture_from_file", 4);
	infile = fopen(modeldefinition, "r");
	if (!infile)
		 return NULL;
	fscanf(infile, "%d", &(mix->classcount));
	mix->classpriors = safemalloc(mix->classcount * sizeof(double), "read_mixture_from_file", 7);
	for (i = 0; i < mix->classcount; i++)
		 fscanf(infile, "%lf", &(mix->classpriors[i]));
	mix->numberofmodels = safemalloc(mix->classcount * sizeof(int), "read_mixture_from_file", 10);
 mix->mixtureprob = safemalloc(mix->classcount * sizeof(double*), "read_mixture_from_file", 11);
 mix->mixturemeans = safemalloc(mix->classcount * sizeof(double*), "read_mixture_from_file", 12);
 mix->mixturedeviations = safemalloc(mix->classcount * sizeof(double*), "read_mixture_from_file", 13);
 for (i = 0; i < mix->classcount; i++)
	 {
		 fscanf(infile, "%d", &(mix->numberofmodels[i]));
   mix->mixtureprob[i] = safemalloc(mix->numberofmodels[i] * sizeof(double), "read_mixture_from_file", 17);
   mix->mixturemeans[i] = safemalloc(mix->numberofmodels[i] * sizeof(double), "read_mixture_from_file", 18);
   mix->mixturedeviations[i] = safemalloc(mix->numberofmodels[i] * sizeof(double), "read_mixture_from_file", 19);
			for (j = 0; j < mix->numberofmodels[i]; j++)
				 fscanf(infile, "%lf", &(mix->mixtureprob[i][j]));
	 }
	for (i = 0; i < mix->classcount; i++)
		 for (j = 0; j < mix->numberofmodels[i]; j++)
				 fscanf(infile, "%lf%lf", &(mix->mixturemeans[i][j]), &(mix->mixturedeviations[i][j]));
	fclose(infile);
	return mix;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x30, %edi
leaq 0x860d3(%rip), %rsi     # 0xe6e7b
movl $0x4, %edx
callq 0x52d70
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x873e5(%rip), %rsi     # 0xe81a6
callq 0x40c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x60dde
movq $0x0, -0x8(%rbp)
jmp 0x610e0
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x8c478(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4070
movq -0x28(%rbp), %rax
movslq (%rax), %rdi
shlq $0x3, %rdi
leaq 0x86075(%rip), %rsi     # 0xe6e7b
movl $0x7, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x60e5d
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x8597d(%rip), %rsi     # 0xe67c8
movb $0x0, %al
callq 0x4070
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x60e22
movq -0x28(%rbp), %rax
movslq (%rax), %rdi
shlq $0x2, %rdi
leaq 0x8600c(%rip), %rsi     # 0xe6e7b
movl $0xa, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movslq (%rax), %rdi
shlq $0x3, %rdi
leaq 0x85fe5(%rip), %rsi     # 0xe6e7b
movl $0xb, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movslq (%rax), %rdi
shlq $0x3, %rdi
leaq 0x85fbe(%rip), %rsi     # 0xe6e7b
movl $0xc, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movslq (%rax), %rdi
shlq $0x3, %rdi
leaq 0x85f97(%rip), %rsi     # 0xe6e7b
movl $0xd, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x6103f
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
movslq -0x14(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
leaq 0x8c338(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4070
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
movslq (%rax,%rcx,4), %rdi
shlq $0x3, %rdi
leaq 0x85f2c(%rip), %rsi     # 0xe6e7b
movl $0x11, %edx
callq 0x52d70
movq %rax, %rdx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
movslq (%rax,%rcx,4), %rdi
shlq $0x3, %rdi
leaq 0x85ef4(%rip), %rsi     # 0xe6e7b
movl $0x12, %edx
callq 0x52d70
movq %rax, %rdx
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
movslq (%rax,%rcx,4), %rdi
shlq $0x3, %rdi
leaq 0x85ebc(%rip), %rsi     # 0xe6e7b
movl $0x13, %edx
callq 0x52d70
movq %rax, %rdx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x14(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x6102f
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movslq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x857ab(%rip), %rsi     # 0xe67c8
movb $0x0, %al
callq 0x4070
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x60fe3
jmp 0x61031
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x60f00
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x610cf
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x14(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x610bf
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movslq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movslq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
leaq 0x858d6(%rip), %rsi     # 0xe6983
movb $0x0, %al
callq 0x4070
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x61058
jmp 0x610c1
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x61046
movq -0x20(%rbp), %rdi
callq 0x4250
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)