LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/eps.c
// Function: write_dictionary
void write_dictionary(FILE* myfile)
{
 /*!Last Changed 12.09.2006*/
 FILE* infile;
 char myline[READLINELENGTH]; 
 infile = fopen("dictionary.txt", "r");
 if (!infile)
   return;
 while (fgets(myline, READLINELENGTH, infile))
  {
   fprintf(myfile, "%s", myline);
  }
 fclose(infile);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x7a120, %rsp          # imm = 0x7A120
movq %rdi, %rbx
leaq 0x7ed67(%rip), %rdi     # 0xa4faf
leaq 0x82640(%rip), %rsi     # 0xa888f
callq 0x40f0
testq %rax, %rax
je 0x2629c
movq %rax, %r14
movq %rsp, %rdi
movl $0x7a120, %esi          # imm = 0x7A120
movq %rax, %rdx
callq 0x4120
testq %rax, %rax
je 0x26294
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x41f0
movq %r15, %rdi
movl $0x7a120, %esi          # imm = 0x7A120
movq %r14, %rdx
callq 0x4120
testq %rax, %rax
jne 0x26274
movq %r14, %rdi
callq 0x42a0
addq $0x7a120, %rsp          # imm = 0x7A120
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/graphdata.c
// Function: count_data
int count_data(int *list, int *value_list, int list_count)
{
 /*!Last Changed 09.03.2001*/
 int i, j, count = 0;
 BOOLEAN found;
 for (i = 0; i < train.row; i++)
  {
   found = BOOLEAN_TRUE;
   for (j = 0; j < list_count; j++)
     if (train.data[i][list[j]] != value_list[j])
      {
       found = BOOLEAN_FALSE;
       break;
      }
   if (found)
     count++;
  }
 return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0xabc27(%rip), %rax     # 0xd24b8
movslq 0x8(%rax), %rcx
testq %rcx, %rcx
jle 0x268fe
testl %edx, %edx
setle %r8b
movq (%rax), %r9
movslq %edx, %r10
movl %r10d, %r11d
xorl %ebx, %ebx
xorl %eax, %eax
movl %r8d, %ebp
testl %edx, %edx
jle 0x268ee
movq (%r9,%rbx,8), %r14
movslq (%rdi), %r15
movl (%r14,%r15,4), %r15d
movl %r8d, %ebp
cmpl (%rsi), %r15d
jne 0x268ee
movl $0x1, %r12d
movq %r12, %r15
cmpq %r12, %r11
je 0x268e7
movslq (%rdi,%r15,4), %r12
movl (%r14,%r12,4), %ebp
leaq 0x1(%r15), %r12
cmpl (%rsi,%r15,4), %ebp
je 0x268cd
cmpq %r10, %r15
setge %bpl
movzbl %bpl, %ebp
addl %ebp, %eax
incq %rbx
cmpq %rcx, %rbx
jne 0x268ad
jmp 0x26900
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/graphdata.c
// Function: count_data_from_file
int count_data_from_file(char *file_name, int *list, char **value_list, int list_count)
{
/*!Last Changed 13.02.2001*/
 FILE *myfile;
 int i, j, count = 0;
 BOOLEAN found;
 char *st;
 char st1[3];
 char myline[READLINELENGTH];
 if ((myfile = fopen(file_name, "r")) == NULL)
   return 0;
 st1[0] = ' ';
 st1[1] = '\n';
 st1[2] = '\0';
 while (fgets(myline, READLINELENGTH, myfile))
  {
   st = strtok(myline, st1);
   found = BOOLEAN_TRUE;
   i = 0;
   while (st)
    {
     for (j = 0; j < list_count; j++)
       if (list[j] == i)
         if (strcmp(value_list[j], st) != 0)
          {
           found = BOOLEAN_FALSE;
           break;
          }
     if (!found)
       break;
     i++;
     st = strtok(NULL, st1);
    }
   if (found)
     count++;
  }
 fclose(myfile);
 return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a148, %rsp          # imm = 0x7A148
movl %ecx, 0xc(%rsp)
movq %rdx, %r14
movq %rsi, %r15
leaq 0x81f64(%rip), %rsi     # 0xa888f
callq 0x40f0
testq %rax, %rax
je 0x26a11
movq %rax, %rbx
movw $0xa20, 0x9(%rsp)       # imm = 0xA20
movb $0x0, 0xb(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x7a120, %esi          # imm = 0x7A120
movq %rax, %rdx
callq 0x4120
testq %rax, %rax
je 0x26a16
movl 0xc(%rsp), %ebp
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
movq %rbx, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r13, %rdi
leaq 0x9(%rsp), %rsi
callq 0x4280
movq %rax, %r12
testq %rax, %rax
sete %al
je 0x269de
xorl %ebx, %ebx
movb %al, 0x8(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x269bf
xorl %r13d, %r13d
cmpl %ebx, (%r15,%r13,4)
jne 0x269b7
movq (%r14,%r13,8), %rdi
movq %r12, %rsi
callq 0x4260
testl %eax, %eax
jne 0x269da
incq %r13
cmpq %r13, %rbp
jne 0x269a1
incl %ebx
xorl %edi, %edi
leaq 0x9(%rsp), %rsi
callq 0x4280
movq %rax, %r12
testq %rax, %rax
sete %al
jne 0x26993
jmp 0x269de
movb 0x8(%rsp), %al
movzbl %al, %eax
andl $0x1, %eax
movq 0x18(%rsp), %r12
addl %eax, %r12d
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movl $0x7a120, %esi          # imm = 0x7A120
movq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x4120
testq %rax, %rax
jne 0x26974
jmp 0x26a19
xorl %r12d, %r12d
jmp 0x26a21
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x42a0
movl %r12d, %eax
addq $0x7a148, %rsp          # imm = 0x7A148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/graphdata.c
// Function: likelihood_of_data
double likelihood_of_data(bayesiangraphptr mygraph, Bndata mydata)
{
	/*!Last Changed 02.02.2004 added safemalloc*/
 /*!Last Changed 25.02.2001*/
 int i, j, k, pos, value_pos, *parents, *list1;
 double result = 0;
 for (i = 0; i < mydata.row; i++)
   for (j = 0; j < mydata.col; j++)
    {
     value_pos = mydata.data[i][j];
     if (mygraph->nodes[j].parents)
      {
       parents = find_parents(mygraph,j);
       list1 = safemalloc(mygraph->nodes[j].parents * sizeof(int), "likelihood_of_data", 10);
       for (k = 0; k < mygraph->nodes[j].parents; k++)
         list1[k] = mydata.data[i][parents[k]];
       pos = table_pos(mygraph->nodes[j], list1);
       safe_free(parents);
       safe_free(list1);
      }
     else/*No parents*/
       pos = 0;
     if (mygraph->nodes[j].table[pos][value_pos] > 0)
       result += log2(mygraph->nodes[j].table[pos][value_pos]);
    }
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x60(%rsp)
testl %edx, %edx
jle 0x26d86
movq %rdi, %r15
movq %rdx, %rax
shrq $0x20, %rax
movq %rax, 0x58(%rsp)
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq $0x0, 0x50(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
movq %rdx, 0x68(%rsp)
cmpl $0x0, 0x58(%rsp)
jle 0x26d69
xorl %r13d, %r13d
movq 0x60(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax,%r13,4), %rdx
movq 0x8(%r15), %rax
leaq (,%r13,8), %r14
addq %r13, %r14
cmpl $0x0, 0x20(%rax,%r14,8)
je 0x26d28
movq %rdx, 0x70(%rsp)
movq %r15, %rdi
movl %r13d, %esi
callq 0x4d0d4
movq %rax, %rbp
movq 0x8(%r15), %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%rcx,8), %r12
movslq 0x20(%rax,%r12), %rdi
shlq $0x2, %rdi
leaq 0x7e4d5(%rip), %rsi     # 0xa5189
movl $0xa, %edx
callq 0x390f5
movq %rax, %rbx
movq 0x8(%r15), %rax
leaq (%rax,%r12), %rsi
cmpl $0x0, 0x20(%rax,%r12)
jle 0x26cf8
movq 0x60(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
xorl %ecx, %ecx
movslq (%rbp,%rcx,4), %rdx
movl (%rax,%rdx,4), %edx
movl %edx, (%rbx,%rcx,4)
incq %rcx
movslq 0x20(%rsi), %rdx
cmpq %rdx, %rcx
jl 0x26ce1
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x4d0a1
movl %eax, %r12d
movq %rbp, %rdi
callq 0x39194
movq %rbx, %rdi
callq 0x39194
movslq %r12d, %rax
movq 0x70(%rsp), %rdx
jmp 0x26d2a
xorl %eax, %eax
movq 0x8(%r15), %rcx
movq 0x38(%rcx,%r14,8), %rcx
movq (%rcx,%rax,8), %rax
movsd (%rax,%rdx,8), %xmm0
ucomisd 0x7bfc4(%rip), %xmm0    # 0xa2d08
jbe 0x26d5b
callq 0x38e99
movsd 0x48(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x48(%rsp)
incq %r13
cmpq 0x58(%rsp), %r13
jne 0x26c54
movq 0x50(%rsp), %rcx
incq %rcx
movq 0x68(%rsp), %rdx
movq %rcx, 0x50(%rsp)
cmpq %rdx, %rcx
jne 0x26c46
jmp 0x26d90
xorpd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/graphdata.c
// Function: parent_value_combinations
int **parent_value_combinations(bayesiangraphptr mygraph, int *parents, int parentcount, int total_combinations)
{
	/*!Last Changed 02.02.2004 added safemalloc*/
 int i, j;
 int repeat, value, num_values, current_value;
 int **combinations;
 combinations = (int **) safemalloc (total_combinations * sizeof(int *), "parent_value_combinations", 4);
 for (i = 0; i < total_combinations; i++)
   combinations[i] = (int *) safemalloc (parentcount * sizeof(int), "parent_value_combinations", 6);
 num_values = 1;
 for (i = 0; i < parentcount; i++)
  {
   current_value = mygraph->nodes[parents[i]].value_count;
   num_values = num_values * current_value;
   repeat = (int) total_combinations / num_values;
   value = 0;
   for (j = 0; j < total_combinations; j++)
    {
     if (repeat > 0)
      {
       combinations[j][i] = value;
       repeat = repeat - 1;
      }
     else
      {
       repeat = (int) total_combinations / num_values;
       value = (value + 1) % current_value;
       combinations[j][i] = value;
       repeat = repeat -1;
      }
    }
  }
 return combinations;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl %edx, 0x4(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movslq %ecx, %r14
leaq (,%r14,8), %rdi
leaq 0x7e3c7(%rip), %rsi     # 0xa519c
movl $0x4, %edx
callq 0x390f5
movq %rax, %r15
movl %ebx, %ebp
testl %r14d, %r14d
jle 0x26e18
movslq 0x4(%rsp), %r13
shlq $0x2, %r13
xorl %r14d, %r14d
leaq 0x7e3a0(%rip), %r12     # 0xa519c
movq %r13, %rdi
movq %r12, %rsi
movl $0x6, %edx
callq 0x390f5
movq %rax, (%r15,%r14,8)
incq %r14
cmpq %r14, %rbp
jne 0x26dfc
movl 0x4(%rsp), %eax
testl %eax, %eax
movq 0x10(%rsp), %r14
jle 0x26e89
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rsi
movl %eax, %edi
movl $0x1, %r8d
xorl %r9d, %r9d
movslq (%r14,%r9,4), %rax
leaq (%rax,%rax,8), %rax
movl 0x10(%rsi,%rax,8), %r10d
imull %r10d, %r8d
movl %ebx, %eax
cltd
idivl %r8d
testl %ebx, %ebx
jle 0x26e81
movl %eax, %ecx
xorl %r11d, %r11d
xorl %eax, %eax
movl %ecx, %r12d
testl %r12d, %r12d
jg 0x26e6e
incl %eax
cltd
idivl %r10d
movl %ecx, %r12d
movl %edx, %eax
movq (%r15,%r11,8), %rdx
movl %eax, (%rdx,%r9,4)
decl %r12d
incq %r11
cmpq %r11, %rbp
jne 0x26e5e
incq %r9
cmpq %rdi, %r9
jne 0x26e39
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/graphdata.c
// Function: lnfact
double lnfact(int n)
{
 int i;
 double result;
 result = 0;
 for (i = n; i > 0; i--)
   result = result + log(i);
 return result;
}

// Assembly:
testl %edi, %edi
jle 0x26ee1
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
callq 0x4160
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
leal -0x1(%rbx), %eax
cmpl $0x1, %ebx
movl %eax, %ebx
jg 0x26ea9
addq $0x10, %rsp
popq %rbx
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/graphdata.c
// Function: select_node_maximizes_K2_metric
int select_node_maximizes_K2_metric(bayesiangraphptr mygraph, int node, int *parents, int parentcount, int *nodeset, int nodecount)
{
	/*!Last Changed 02.02.2004 added safemalloc*/
 double metricvalue, maxvalue;
 int i, j, maxnode;
 int *currentparents;
 BOOLEAN found;
 currentparents = (int *) safemalloc((parentcount + 1) * sizeof(int), "select_node_maximizes_K2_metric", 4);
 maxvalue = -LONG_MAX;
 maxnode = -1;
 for (i = 0; i < parentcount; i++)
   currentparents[i] = parents[i];
 for (i = 0; i < nodecount; i++)
  {
   found = BOOLEAN_FALSE;
   for (j = 0; j < parentcount; j++)
     if (nodeset[i] == parents[j])
      {
       found = BOOLEAN_TRUE;
       break;
      }
   currentparents[parentcount] = nodeset[i];
   if (!found)
    {
     metricvalue = calculate_K2_metric(mygraph, node, currentparents, parentcount + 1);
     if (metricvalue > maxvalue)
      {
       maxvalue = metricvalue;
       maxnode = nodeset[i];
      }
    }
  }
	safe_free(currentparents);
 return maxnode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r12d
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, 0x14(%rsp)
movq %rdi, 0x30(%rsp)
movslq %ecx, %r15
leaq 0x4(,%r15,4), %rdi
leaq 0x7e020(%rip), %rsi     # 0xa51ca
movl $0x4, %edx
callq 0x390f5
movq %r15, %rdi
movq %rax, %r13
movl %ebp, %r15d
testl %edi, %edi
jle 0x271d4
xorl %eax, %eax
movl (%r14,%rax,4), %ecx
movl %ecx, (%r13,%rax,4)
incq %rax
cmpq %rax, %r15
jne 0x271c3
testl %r12d, %r12d
jle 0x272a5
leal 0x1(%rdi), %eax
movl %eax, 0x10(%rsp)
testl %edi, %edi
setg %r9b
movl %r12d, %r10d
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
movsd 0x7bbcb(%rip), %xmm0    # 0xa2dc8
movsd %xmm0, 0x18(%rsp)
xorl %r12d, %r12d
movq %rdi, 0x28(%rsp)
movq %rbx, 0x20(%rsp)
movl %ebp, 0xc(%rsp)
movl %r9d, %ecx
testl %ebp, %ebp
jle 0x27245
movl (%rbx,%r12,4), %eax
movl %r9d, %ecx
cmpl (%r14), %eax
je 0x27245
movl $0x1, %r8d
movq %r8, %rcx
cmpq %r8, %r15
je 0x2723f
leaq 0x1(%rcx), %r8
cmpl (%r14,%rcx,4), %eax
jne 0x2722d
cmpq %rdi, %rcx
setl %cl
movl (%rbx,%r12,4), %eax
movl %eax, (%r13,%rdi,4)
testb %cl, %cl
jne 0x27297
movq 0x30(%rsp), %rdi
movl 0x14(%rsp), %esi
movq %r13, %rdx
movl 0x10(%rsp), %ecx
movl %r9d, %ebp
movq %r10, %rbx
callq 0x26ee5
movq %rbx, %r10
movl %ebp, %r9d
movq 0x28(%rsp), %rdi
movl 0xc(%rsp), %ebp
movq 0x20(%rsp), %rbx
ucomisd 0x18(%rsp), %xmm0
jbe 0x27297
movl (%rbx,%r12,4), %eax
movl %eax, 0x8(%rsp)
movsd %xmm0, 0x18(%rsp)
incq %r12
cmpq %r10, %r12
jne 0x27214
jmp 0x272ad
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0x39194
movl 0x8(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: empty_hmm
Hmmptr empty_hmm(int statecount, HMM_STATE_TYPE statetype, HMM_MODEL_TYPE hmmtype)
{
 /*!Last Changed 22.01.2007*/
 Hmmptr result;
 result = safemalloc(sizeof(Hmm), "empty_hmm", 2);
 result->states = safemalloc(statecount * sizeof(State), "empty_hmm", 3);
 result->statecount = statecount;
 result->statetype = statetype;
 result->hmmtype = hmmtype;
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
leaq 0x7df01(%rip), %r15     # 0xa52dc
movl $0x18, %edi
movq %r15, %rsi
movl $0x2, %edx
callq 0x390f5
movq %rax, %r12
movslq %r14d, %r14
movq %r14, %rdi
shlq $0x5, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq 0x390f5
movq %rax, (%r12)
movl %r14d, 0x8(%r12)
movl %ebp, 0xc(%r12)
movl %ebx, 0x10(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: free_hmm
void free_hmm(Hmmptr hmm)
{
 /*!Last Changed 25.02.2007 added free_state_model*/
 /*!Last Changed 22.01.2007*/
 int i;
 for (i = 0; i < hmm->statecount; i++)
  {
   free_state_model(hmm->states[i].b, hmm->statetype);
   safe_free(hmm->states[i].a_dot_j);
   safe_free(hmm->states[i].a_i_dot);
  }  
 safe_free(hmm->states);
 safe_free(hmm);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x278c8
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x18(%rax,%r14), %rdi
movl 0xc(%rbx), %esi
callq 0x278dd
movq (%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x39194
movq (%rbx), %rax
movq 0x8(%rax,%r14), %rdi
callq 0x39194
incq %r15
movslq 0x8(%rbx), %rax
addq $0x20, %r14
cmpq %rax, %r15
jl 0x2788f
movq (%rbx), %rdi
callq 0x39194
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x39194
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: free_state_model
void free_state_model(void* model, HMM_STATE_TYPE statetype)
{
 /*!Last Changed 26.02.2007*/
 Gaussianptr g;
 Gaussianmixtureptr gm;
 Multinomialptr m;
 Dirichletptr d;
 Dirichletmixtureptr dm;
 int i;
 switch (statetype)
  {
   case          STATE_DISCRETE:m = (Multinomialptr) model;
                                for (i = 0; i < current_dataset->featurecount - 1; i++)
                                  safe_free(m->prob[i]);
                                safe_free(m->prob);
                                break;
   case          STATE_GAUSSIAN:g = (Gaussianptr) model;
                                safe_free(g->mean);
                                matrix_free(g->covariance);
                                break;
   case  STATE_GAUSSIAN_MIXTURE:gm = (Gaussianmixtureptr) model;
                                safe_free(gm->weights);
                                for (i = 0; i < gm->componentcount; i++)
                                 {
                                  safe_free(gm->components[i].mean);
                                  matrix_free(gm->components[i].covariance);
                                 }
                                safe_free(gm->components);
                                break;
   case         STATE_DIRICHLET:d = (Dirichletptr) model;
                                safe_free(d->alpha);
                                break;
   case STATE_DIRICHLET_MIXTURE:dm = (Dirichletmixtureptr) model;
                                safe_free(dm->weights);
                                for (i = 0; i < dm->componentcount; i++)
                                  safe_free(dm->components[i].alpha);
                                safe_free(dm->components);
                                break;
  }
 safe_free(model);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x4, %esi
ja 0x279ce
movl %esi, %eax
leaq 0x7d91d(%rip), %rcx     # 0xa5214
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xaaf69(%rip), %r14     # 0xd2870
movq (%r14), %rax
cmpl $0x2, 0x1bc(%rax)
jl 0x279c6
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x39194
incq %r15
movq (%r14), %rax
movslq 0x1bc(%rax), %rax
decq %rax
cmpq %rax, %r15
jl 0x2791a
jmp 0x279c6
movq 0x10(%rbx), %rdi
callq 0x39194
cmpl $0x0, 0x8(%rbx)
jle 0x279c6
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x39194
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x27952
jmp 0x279c6
movq (%rbx), %rdi
callq 0x39194
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x3dbad
jmp 0x279ce
movq 0x10(%rbx), %rdi
callq 0x39194
cmpl $0x0, 0x8(%rbx)
jle 0x279c6
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x39194
movq (%rbx), %rax
movq 0x8(%rax,%r14), %rdi
movq 0x10(%rax,%r14), %rsi
callq 0x3dbad
incq %r15
movslq 0x8(%rbx), %rax
addq $0x18, %r14
cmpq %rax, %r15
jl 0x27998
movq (%rbx), %rdi
callq 0x39194
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x39194
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: alloc_hmm
Hmmptr alloc_hmm(int statecount, HMM_STATE_TYPE statetype, int componentcount, HMM_MODEL_TYPE hmmtype)
{
 /*!Last Changed 15.03.2007*/
 int i;
 Hmmptr desthmm = empty_hmm(statecount, statetype, hmmtype);
 for (i = 0; i < statecount; i++)
  {
    desthmm->states[i].pi = 0;
    desthmm->states[i].a_dot_j = safemalloc(sizeof(double) * statecount, "init_hmm", 6);
    desthmm->states[i].a_i_dot = safemalloc(sizeof(double) * statecount, "init_hmm", 7);
    desthmm->states[i].b = alloc_state_model(statetype, componentcount);
  } 
 return desthmm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, 0x4(%rsp)
movl %esi, %ebp
movl %edi, %r15d
movl %ecx, %edx
callq 0x273c5
movq %rax, %r14
testl %r15d, %r15d
jle 0x27a6d
movl %r15d, %r13d
leaq (,%r13,8), %r15
shlq $0x5, %r13
xorl %ebx, %ebx
leaq 0x7d8db(%rip), %r12     # 0xa52f1
movq (%r14), %rax
movq $0x0, 0x10(%rax,%rbx)
movq %r15, %rdi
movq %r12, %rsi
movl $0x6, %edx
callq 0x390f5
movq (%r14), %rcx
movq %rax, (%rcx,%rbx)
movq %r15, %rdi
movq %r12, %rsi
movl $0x7, %edx
callq 0x390f5
movq (%r14), %rcx
movq %rax, 0x8(%rcx,%rbx)
movl %ebp, %edi
movl 0x4(%rsp), %esi
callq 0x27a7f
movq (%r14), %rcx
movq %rax, 0x18(%rcx,%rbx)
addq $0x20, %rbx
cmpq %rbx, %r13
jne 0x27a16
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: calloc_hmm
Hmmptr calloc_hmm(int statecount, HMM_STATE_TYPE statetype, int componentcount, HMM_MODEL_TYPE hmmtype)
{
 /*!Last Changed 15.03.2007*/
 int i;
 Hmmptr desthmm = empty_hmm(statecount, statetype, hmmtype);
 for (i = 0; i < statecount; i++)
  {
    desthmm->states[i].pi = 0;
    desthmm->states[i].a_dot_j = safecalloc(statecount, sizeof(double), "init_hmm", 6);
    desthmm->states[i].a_i_dot = safecalloc(statecount, sizeof(double), "init_hmm", 7);
    desthmm->states[i].b = calloc_state_model(statetype, componentcount);
  } 
 return desthmm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, 0x4(%rsp)
movl %esi, %ebp
movl %edi, %r15d
movl %ecx, %edx
callq 0x273c5
movq %rax, %r14
testl %r15d, %r15d
jle 0x27d8c
movl %r15d, %r15d
movq %r15, %r13
shlq $0x5, %r13
xorl %ebx, %ebx
leaq 0x7d5c6(%rip), %r12     # 0xa52f1
movq (%r14), %rax
movq $0x0, 0x10(%rax,%rbx)
movl $0x8, %esi
movq %r15, %rdi
movq %r12, %rdx
movl $0x6, %ecx
callq 0x39210
movq (%r14), %rcx
movq %rax, (%rcx,%rbx)
movl $0x8, %esi
movq %r15, %rdi
movq %r12, %rdx
movl $0x7, %ecx
callq 0x39210
movq (%r14), %rcx
movq %rax, 0x8(%rcx,%rbx)
movl %ebp, %edi
movl 0x4(%rsp), %esi
callq 0x27d9e
movq (%r14), %rcx
movq %rax, 0x18(%rcx,%rbx)
addq $0x20, %rbx
cmpq %rbx, %r13
jne 0x27d2b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: clone_hmm
Hmmptr clone_hmm(Hmmptr srchmm)
{
 /*!Last Changed 15.03.2007*/
 int i;
 Hmmptr desthmm = empty_hmm(srchmm->statecount, srchmm->statetype, srchmm->hmmtype);
 for (i = 0; i < srchmm->statecount; i++)
  {
    desthmm->states[i].pi = srchmm->states[i].pi;
    desthmm->states[i].a_dot_j = clone_array(srchmm->states[i].a_dot_j, srchmm->statecount);
    desthmm->states[i].a_i_dot = clone_array(srchmm->states[i].a_i_dot, srchmm->statecount);
    desthmm->states[i].b = clone_state_model(srchmm->states[i].b, srchmm->statetype);
  } 
 return desthmm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %edi
movl 0xc(%rbx), %esi
movl 0x10(%rbx), %edx
callq 0x273c5
movq %rax, %r14
movl 0x8(%rbx), %esi
testl %esi, %esi
jle 0x280c9
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rax
movsd 0x10(%rax,%r15), %xmm0
movq (%r14), %rcx
movsd %xmm0, 0x10(%rcx,%r15)
movq (%rax,%r15), %rdi
callq 0x37088
movq (%r14), %rcx
movq %rax, (%rcx,%r15)
movq (%rbx), %rax
movq 0x8(%rax,%r15), %rdi
movl 0x8(%rbx), %esi
callq 0x37088
movq (%r14), %rcx
movq %rax, 0x8(%rcx,%r15)
movq (%rbx), %rax
movq 0x18(%rax,%r15), %rdi
movl 0xc(%rbx), %esi
callq 0x280d8
movq (%r14), %rcx
movq %rax, 0x18(%rcx,%r15)
incq %r12
movslq 0x8(%rbx), %rsi
addq $0x20, %r15
cmpq %rsi, %r12
jl 0x28065
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: init_hmm
void init_hmm(Hmmptr srchmm)
{
 /*!Last Changed 15.03.2007*/
 int i;
 for (i = 0; i < srchmm->statecount; i++)
  {
    srchmm->states[i].pi = 0;
    init_array(srchmm->states[i].a_dot_j, srchmm->statecount);
    init_array(srchmm->states[i].a_i_dot, srchmm->statecount);
    init_state_model(srchmm->states[i].b, srchmm->statetype);
  } 
}

// Assembly:
movl 0x8(%rdi), %esi
testl %esi, %esi
jle 0x283ac
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq $0x0, 0x10(%rax,%r14)
movq (%rax,%r14), %rdi
callq 0x37879
movq (%rbx), %rax
movq 0x8(%rax,%r14), %rdi
movl 0x8(%rbx), %esi
callq 0x37879
movq (%rbx), %rax
movq 0x18(%rax,%r14), %rdi
movl 0xc(%rbx), %esi
callq 0x283ad
incq %r15
movslq 0x8(%rbx), %rsi
addq $0x20, %r14
cmpq %rsi, %r15
jl 0x28362
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: copy_hmm
void copy_hmm(Hmmptr desthmm, Hmmptr srchmm)
{
 /*!Last Changed 15.03.2007*/
 int i;
 desthmm->hmmtype = srchmm->hmmtype;
 desthmm->statetype = srchmm->statetype;
 for (i = 0; i < srchmm->statecount; i++)
  {
    desthmm->states[i].pi = srchmm->states[i].pi;
    memcpy(desthmm->states[i].a_dot_j, srchmm->states[i].a_dot_j, srchmm->statecount * sizeof(double));
    memcpy(desthmm->states[i].a_i_dot, srchmm->states[i].a_i_dot, srchmm->statecount * sizeof(double));
    copy_state_model(desthmm->states[i].b, srchmm->states[i].b, srchmm->statetype);
  } 
}

// Assembly:
movl 0x10(%rsi), %eax
movl %eax, 0x10(%rdi)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%rdi)
movl 0x8(%rsi), %eax
testl %eax, %eax
jle 0x285a7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rcx
movsd 0x10(%rcx,%r15), %xmm0
movq (%r14), %rdx
movsd %xmm0, 0x10(%rdx,%r15)
movq (%rdx,%r15), %rdi
movq (%rcx,%r15), %rsi
movslq %eax, %rdx
shlq $0x3, %rdx
callq 0x4310
movq (%r14), %rax
movq 0x8(%rax,%r15), %rdi
movq (%rbx), %rax
movq 0x8(%rax,%r15), %rsi
movslq 0x8(%rbx), %rdx
shlq $0x3, %rdx
callq 0x4310
movq (%r14), %rax
movq 0x18(%rax,%r15), %rdi
movq (%rbx), %rax
movq 0x18(%rax,%r15), %rsi
movl 0xc(%rbx), %edx
callq 0x285a8
incq %r12
movslq 0x8(%rbx), %rax
addq $0x20, %r15
cmpq %rax, %r12
jl 0x2852f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: sum_hmm
void sum_hmm(Hmmptr desthmm, Hmmptr srchmm)
{
 /*!Last Changed 15.03.2007*/
 int i;
 for (i = 0; i < srchmm->statecount; i++)
  {
    desthmm->states[i].pi += srchmm->states[i].pi;
    add_arrays(desthmm->states[i].a_dot_j, srchmm->states[i].a_dot_j, srchmm->statecount);
    add_arrays(desthmm->states[i].a_i_dot, srchmm->states[i].a_i_dot, srchmm->statecount);
    sum_state_model(desthmm->states[i].b, srchmm->states[i].b, srchmm->statetype);
  } 
}

// Assembly:
movl 0x8(%rsi), %edx
testl %edx, %edx
jle 0x287fa
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rax
movsd 0x10(%rax,%r15), %xmm0
movq (%r14), %rcx
addsd 0x10(%rcx,%r15), %xmm0
movsd %xmm0, 0x10(%rcx,%r15)
movq (%rcx,%r15), %rdi
movq (%rax,%r15), %rsi
callq 0x37068
movq (%r14), %rax
movq 0x8(%rax,%r15), %rdi
movq (%rbx), %rax
movq 0x8(%rax,%r15), %rsi
movl 0x8(%rbx), %edx
callq 0x37068
movq (%r14), %rax
movq 0x18(%rax,%r15), %rdi
movq (%rbx), %rax
movq 0x18(%rax,%r15), %rsi
movl 0xc(%rbx), %edx
callq 0x287fb
incq %r12
movslq 0x8(%rbx), %rdx
addq $0x20, %r15
cmpq %rdx, %r12
jl 0x28787
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: add_probability_conserving
double* add_probability_conserving(double* prob, int count, int added)
{
 /*!Last Changed 05.04.2007*/
 double* result;
 int i;
 result = alloc(prob, (count + added) * sizeof(double), count + added);
 for (i = 0; i < count; i++)
   result[i] *= (count + 0.0) / (count + added);
 for (i = count; i < count + added; i++)
   result[i] = 1.0 / (count + added);
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r15d
movl %esi, %r14d
leal (%r15,%r14), %eax
movslq %eax, %rbx
leaq (,%rbx,8), %rsi
movl %ebx, %edx
callq 0x390c8
cvtsi2sd %ebx, %xmm0
testl %r14d, %r14d
jle 0x28d28
cvtsi2sd %r14d, %xmm1
divsd %xmm0, %xmm1
movl %r14d, %ecx
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x28d12
testl %r15d, %r15d
jle 0x28d49
movsd 0x797eb(%rip), %xmm1    # 0xa2520
divsd %xmm0, %xmm1
movslq %r14d, %rcx
movsd %xmm1, (%rax,%rcx,8)
incq %rcx
cmpq %rbx, %rcx
jl 0x28d3c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: random_gaussian
void random_gaussian(Gaussianptr g, Instanceptr traindata)
{
 /*!Last Changed 07.04.2007*/
 int numrealfeatures = current_dataset->multifeaturecount - 1;
 int size, index, seqlen, i, t;
 matrix m;
 Instanceptr datapoint, tmp;
 size = data_size(traindata);
 index = myrand() % size;
 datapoint = data_x(traindata, index);
 seqlen = frame_count(datapoint);
 m = matrix_alloc(seqlen, numrealfeatures);
 tmp = datapoint;
 t = 0;
 while (tmp)
  {
   for (i = 0; i < numrealfeatures; i++)
     m.values[t][i] = real_feature(tmp, i);
   if (t == 0)
     tmp = tmp->sublist;
   else
     tmp = tmp->next;
   t++;
  }
 g->mean = matrix_average_columns(m);
 g->covariance = identity(numrealfeatures);
 matrix_free(m);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
leaq 0xa9978(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %ebp
leal -0x1(%rbp), %ebx
movq %rsi, %rdi
callq 0x2fa14
movl %eax, %r15d
xorl %eax, %eax
callq 0x39f18
cltd
idivl %r15d
movq %r14, %rdi
movl %edx, %esi
callq 0x30fe5
movq %rax, %r12
movq %rax, %rdi
callq 0x2e3d4
movl %eax, %edi
movl %ebx, 0x4(%rsp)
movl %ebx, %esi
callq 0x3c6e5
movq %rax, 0x8(%rsp)
movq %rdx, %r15
testq %r12, %r12
je 0x28f91
movl 0x4(%rsp), %ebx
xorl %r14d, %r14d
cmpl $0x2, %ebp
jl 0x28f75
xorl %r13d, %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0x2e4b6
movq (%r15,%r14,8), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
cmpq %r13, %rbx
jne 0x28f58
leaq 0x10(%r12), %rax
addq $0x28, %r12
testq %r14, %r14
cmovneq %rax, %r12
movq (%r12), %r12
incq %r14
testq %r12, %r12
jne 0x28f50
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x3eab7
movq 0x10(%rsp), %rbx
movq %rax, (%rbx)
movl 0x4(%rsp), %edi
callq 0x3dc37
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %r14, %rdi
movq %r15, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3dbad
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: multinomial_multivariate
double multinomial_multivariate(Instanceptr inst, Multinomialptr m)
{
 /*!Last Changed 26.02.2007*/
 double prod = 1.0;
 int i, j = 0;
 for (i = 0; i < current_dataset->featurecount; i++)
   if (current_dataset->features[i].type == STRING)
    {
     prod *= m->prob[j][inst->values[i].stringindex];
     j++; 
    } 
 return prod;
}

// Assembly:
leaq 0xa8fdb(%rip), %rax     # 0xd2870
movq (%rax), %rax
movslq 0x1bc(%rax), %rcx
testq %rcx, %rcx
jle 0x298e5
addq $0x30f08, %rax          # imm = 0x30F08
movsd 0x78c6e(%rip), %xmm0    # 0xa2520
xorl %edx, %edx
xorl %r8d, %r8d
cmpl $0x1, (%rax)
jne 0x298d6
movq (%rsi), %r9
movslq %r8d, %r8
movq (%r9,%r8,8), %r9
movq (%rdi), %r10
movslq (%r10,%rdx,8), %r10
mulsd (%r9,%r10,8), %xmm0
incl %r8d
incq %rdx
addq $0x340, %rax            # imm = 0x340
cmpq %rdx, %rcx
jne 0x298b7
retq
movsd 0x78c33(%rip), %xmm0    # 0xa2520
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x7ed8b(%rip), %rsi     # 0xa888f
callq 0x40f0
testq %rax, %rax
je 0x29c71
movq %rax, %r14
leaq 0x84041(%rip), %rbp     # 0xadb5d
leaq 0xc(%rsp), %rdx
movq %rax, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4070
leaq 0x7ba9b(%rip), %r13     # 0xa55d0
movl $0x18, %edi
movq %r13, %rsi
movl $0x7, %edx
callq 0x390f5
movq %rax, %r15
leaq 0x8(%rax), %r12
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4070
movslq 0x8(%r15), %rdi
shlq $0x2, %rdi
movq %r13, %rsi
movl $0x9, %edx
callq 0x390f5
movq %rbx, 0x10(%rsp)
movq %rax, (%rbx)
movslq 0x8(%r15), %rdi
shlq $0x3, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x390f5
movq %rax, 0x10(%r15)
movslq 0x8(%r15), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
movq %r13, %rsi
movl $0xb, %edx
callq 0x390f5
movq %rax, (%r15)
cmpl $0x0, 0x8(%r15)
jle 0x29be6
leaq 0x7d052(%rip), %r13     # 0xa6c10
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x10(%r15), %rdx
addq %rbx, %rdx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4070
incq %rbp
movslq 0x8(%r15), %rax
addq $0x8, %rbx
cmpq %rax, %rbp
jl 0x29bc2
cmpl $0x0, (%r12)
movq %r15, %r12
movq %r14, %r15
movq 0x10(%rsp), %rax
jle 0x29c64
movl $0x4, %r13d
xorl %ebp, %ebp
xorl %ebx, %ebx
movq (%rax), %rdx
addq %rbp, %rdx
movq %r15, %rdi
leaq 0x83f4b(%rip), %rsi     # 0xadb5d
xorl %eax, %eax
callq 0x4070
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0x3a514
movq %r12, %r14
movq (%r12), %r12
movq %rax, -0x10(%r12,%r13,4)
movl 0xc(%rsp), %edx
movq %r15, %rdi
movl %edx, %esi
callq 0x3a488
movq %rax, -0x8(%r12,%r13,4)
movq %rdx, (%r12,%r13,4)
movq %r14, %r12
incq %rbx
movslq 0x8(%r14), %rax
addq $0x6, %r13
addq $0x4, %rbp
cmpq %rax, %rbx
movq 0x10(%rsp), %rax
jl 0x29c02
movq %r15, %rdi
callq 0x42a0
movq %r12, %rax
jmp 0x29c73
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: gaussian_mixture_multivariate
double gaussian_mixture_multivariate(Instanceptr inst, Gaussianmixtureptr gm)
{
 /*!Last Changed 26.02.2007*/
 double sum = 0.0;
 int i;
 for (i = 0; i < gm->componentcount; i++)
   sum += gm->weights[i] * gaussian_multivariate(inst, gm->components[i].mean, gm->components[i].covariance);
 return sum;
}

// Assembly:
cmpl $0x0, 0x8(%rsi)
jle 0x29d10
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movl $0x2, %r15d
xorl %r12d, %r12d
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movsd (%rcx,%r12,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq -0x10(%rax,%r15,8), %rsi
movq -0x8(%rax,%r15,8), %rdx
movq (%rax,%r15,8), %rcx
movq %r14, %rdi
callq 0x8b4ab
mulsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
incq %r12
movslq 0x8(%rbx), %rax
addq $0x3, %r15
cmpq %rax, %r12
jl 0x29ca9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: dirichlet_mixture_multivariate
double dirichlet_mixture_multivariate(Instanceptr inst, Dirichletmixtureptr dm)
{
 /*!Last Changed 28.02.2007*/
 double sum = 0.0;
 int i;
 for (i = 0; i < dm->componentcount; i++)
   sum += dm->weights[i] * dirichlet(inst, dm->components[i].alpha);
 return sum;
}

// Assembly:
cmpl $0x0, 0x8(%rsi)
jle 0x29db5
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
xorl %r15d, %r15d
movsd %xmm0, (%rsp)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movsd (%rcx,%r15,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x1fa01
mulsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x29d62
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: calc_obslik
double calc_obslik(Hmmptr hmm, Instanceptr inst, int stateindex)
{
 /*!Last Changed 26.03.2007*/
 double obslik;
 Gaussianptr g;
 Gaussianmixtureptr gm;
 Multinomialptr m;
 Dirichletptr d;
 Dirichletmixtureptr dm;
 switch (hmm->statetype)
  {
   case          STATE_DISCRETE:m = (Multinomialptr) (hmm->states[stateindex].b);
                                obslik = multinomial_multivariate(inst, m);
                                break;
   case          STATE_GAUSSIAN:g = (Gaussianptr) (hmm->states[stateindex].b);
                                obslik = gaussian_multivariate(inst, g->mean, g->covariance);
                                break;
   case  STATE_GAUSSIAN_MIXTURE:gm = (Gaussianmixtureptr) (hmm->states[stateindex].b);
                                obslik = gaussian_mixture_multivariate(inst, gm);
                                break;
   case         STATE_DIRICHLET:d = (Dirichletptr) (hmm->states[stateindex].b);
                                obslik = dirichlet(inst, d->alpha);
                                break;
   case STATE_DIRICHLET_MIXTURE:dm = (Dirichletmixtureptr) (hmm->states[stateindex].b);
                                obslik = dirichlet_mixture_multivariate(inst, dm);
                                break;
   default                     :obslik = 1.0;
                                break;
  }
 return obslik;
}

// Assembly:
movl 0xc(%rdi), %eax
cmpq $0x4, %rax
ja 0x29e8b
leaq 0x7b4d6(%rip), %rcx     # 0xa52c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdi), %rax
movslq %edx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x2988e
movq (%rdi), %rax
movslq %edx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x29d47
movq (%rdi), %rax
movslq %edx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x29c82
movq (%rdi), %rax
movslq %edx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movq (%rax), %rax
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x1fa01
movq (%rdi), %rax
movslq %edx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
movq 0x10(%rcx), %rcx
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x8b4ab
movsd 0x7868d(%rip), %xmm0    # 0xa2520
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: calc_obslikMix
double calc_obslikMix(Hmmptr hmm, Instanceptr inst, int stateindex, int componentindex)
{
 /*!Last Changed 26.03.2007*/
 double obslik;
 Gaussianmixtureptr gm;
 Dirichletmixtureptr dm;
 switch (hmm->statetype)
  {
   case  STATE_GAUSSIAN_MIXTURE:gm = (Gaussianmixtureptr) (hmm->states[stateindex].b);
                                obslik = get_gaussian_mixture_multivariate_component(inst, gm, componentindex);
                                break;
   case STATE_DIRICHLET_MIXTURE:dm = (Dirichletmixtureptr) (hmm->states[stateindex].b);
                                obslik = get_dirichlet_mixture_multivariate_component(inst, dm, componentindex);
                                break;
   default                     :obslik = 1.0;
                                break;
  }
 return obslik;
}

// Assembly:
pushq %rax
movl 0xc(%rdi), %eax
cmpl $0x4, %eax
je 0x29ee4
cmpl $0x2, %eax
jne 0x29f1d
movq (%rdi), %rax
movslq %edx, %rdx
shlq $0x5, %rdx
movq 0x18(%rax,%rdx), %rax
movq (%rax), %rdi
movq 0x10(%rax), %rax
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rsp)
leaq (%rcx,%rcx,2), %rcx
movq (%rdi,%rcx,8), %rax
movq 0x8(%rdi,%rcx,8), %rdx
movq 0x10(%rdi,%rcx,8), %rcx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x8b4ab
jmp 0x29f16
movq (%rdi), %rax
movslq %edx, %rdx
shlq $0x5, %rdx
movq 0x18(%rax,%rdx), %rax
movq (%rax), %rdx
movq 0x10(%rax), %rax
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rsp)
movq (%rdx,%rcx,8), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1fa01
mulsd (%rsp), %xmm0
jmp 0x29f25
movsd 0x785fb(%rip), %xmm0    # 0xa2520
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: calc_gamma
void calc_gamma(Hmmptr hmm, int seqlen, double **alpha, double **beta, double **gamma)
{
 /*!Last Changed 26.03.2007*/
 int i, j, t;
 double denominator;
 for (t = 0; t < seqlen; t++) 
  {
   denominator = 0.0;
   for (j = 0; j < hmm->statecount; j++) 
    {
     gamma[t][j] = alpha[t][j] * beta[t][j];
     denominator += gamma[t][j];
    }
   for (i = 0; i < hmm->statecount; i++) 
     gamma[t][i] = gamma[t][i] / denominator;
  }
}

// Assembly:
testl %esi, %esi
jle 0x2aef6
pushq %rbx
movl 0x8(%rdi), %eax
movl %esi, %esi
xorl %edi, %edi
testl %eax, %eax
jle 0x2aec6
movq (%rdx,%rdi,8), %r9
movq (%rcx,%rdi,8), %r10
movq (%r8,%rdi,8), %r11
xorpd %xmm0, %xmm0
xorl %ebx, %ebx
movsd (%r9,%rbx,8), %xmm1
mulsd (%r10,%rbx,8), %xmm1
movsd %xmm1, (%r11,%rbx,8)
addsd %xmm1, %xmm0
incq %rbx
cmpq %rbx, %rax
jne 0x2aea6
jmp 0x2aeca
xorpd %xmm0, %xmm0
testl %eax, %eax
jle 0x2aeed
movq (%r8,%rdi,8), %r9
xorl %r10d, %r10d
movsd (%r9,%r10,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r9,%r10,8)
incq %r10
cmpq %r10, %rax
jne 0x2aed5
incq %rdi
cmpq %rsi, %rdi
jne 0x2ae90
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: calc_xi
void calc_xi(Hmmptr hmm, Instanceptr traindata, int seqlen, double **alpha, double **beta, double ***xi)
{
 /*!Last Changed 26.03.2007*/
 int i, j, t;
 double sum, obslik;
 Instanceptr inst = traindata;
 inst = inst->sublist;
 for (t = 0; t < seqlen - 1; t++) 
  {
   sum = 0.0;  
   for (i = 0; i < hmm->statecount; i++) 
     for (j = 0; j < hmm->statecount; j++) 
      {
       obslik = calc_obslik(hmm, inst, j);
       xi[t][i][j] = alpha[t][i] * beta[t + 1][j] * (hmm->states[i].a_i_dot[j]) * obslik;
       sum += xi[t][i][j];
      }
   for (i = 0; i < hmm->statecount; i++) 
     for (j = 0; j < hmm->statecount; j++)
       xi[t][i][j] /= sum;
   inst = inst->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, (%rsp)
cmpl $0x2, %edx
jl 0x2b03c
movq %r9, %r13
movq %r8, %r15
movq %rcx, %rbp
movq (%rsp), %rax
decl %eax
movq %rax, (%rsp)
addq $0x28, %rsi
xorl %r14d, %r14d
movq (%rsi), %rsi
movl 0x8(%rdi), %eax
xorpd %xmm1, %xmm1
testl %eax, %eax
jle 0x2aff8
xorl %edx, %edx
movq %r14, 0x10(%rsp)
cmpl $0x0, 0x8(%rdi)
jle 0x2afe8
movq %rdx, %rax
shlq $0x5, %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
movq %rdx, 0x20(%rsp)
movsd %xmm1, 0x8(%rsp)
movl %r12d, %edx
movq %rdi, %r14
movq %rsi, %rbx
callq 0x29dde
movq 0x20(%rsp), %rdx
movq %rbx, %rsi
movq %r14, %rdi
movq 0x10(%rsp), %r14
movq (%rbp,%r14,8), %rax
movsd (%rax,%rdx,8), %xmm1
movq 0x8(%r15,%r14,8), %rax
mulsd (%rax,%r12,8), %xmm1
movq (%rdi), %rax
movq 0x18(%rsp), %r10
movq 0x8(%rax,%r10), %rax
mulsd (%rax,%r12,8), %xmm1
mulsd %xmm0, %xmm1
movq (%r13,%r14,8), %rax
movq (%rax,%rdx,8), %rax
movsd %xmm1, (%rax,%r12,8)
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm1
incq %r12
movslq 0x8(%rdi), %rax
cmpq %rax, %r12
jl 0x2af63
incq %rdx
movslq 0x8(%rdi), %rax
cmpq %rax, %rdx
jl 0x2af45
testl %eax, %eax
jle 0x2b02b
movl %eax, %eax
movq (%r13,%r14,8), %r10
xorl %edx, %edx
movq (%r10,%rdx,8), %r11
xorl %ebx, %ebx
movsd (%r11,%rbx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%r11,%rbx,8)
incq %rbx
cmpq %rbx, %rax
jne 0x2b00b
incq %rdx
cmpq %rax, %rdx
jne 0x2b005
addq $0x10, %rsi
incq %r14
cmpq (%rsp), %r14
jne 0x2af2c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: calc_gammaMix
void calc_gammaMix(Hmmptr hmm, Instanceptr traindata, int seqlen, double **gamma, double ***gammaMix)
{
 /*!Last Changed 26.03.2007*/
 int j, t, m;
 int componentcount;
 double obslik, obslikMix;
 Instanceptr inst = traindata;
 for (t = 0; t < seqlen; t++) 
  {
   for (j = 0; j < hmm->statecount; j++) 
    {
     obslik = calc_obslik(hmm, inst, j);
     componentcount = get_component_count(hmm->states[j], hmm->statetype);
     for (m = 0; m < componentcount; m++)
      {        
       obslikMix = calc_obslikMix(hmm, inst, j, m);
       gammaMix[t][j][m] = gamma[t][j] * obslikMix / obslik;
      }
    }
   if (t == 0)
     inst = inst->sublist;
   else
     inst = inst->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
testl %edx, %edx
jle 0x2b15c
movl %edx, %eax
movq %rax, 0x10(%rsp)
xorl %ecx, %ecx
movq %rdi, (%rsp)
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %rbx
movq %rcx, 0x8(%rsp)
cmpl $0x0, 0x8(%rdi)
jle 0x2b137
xorl %r13d, %r13d
movq (%rsp), %rdi
movq %rsi, %r12
movl %r13d, %edx
callq 0x29dde
movq (%rsp), %rdi
movapd %xmm0, %xmm1
movl 0xc(%rdi), %ecx
cmpl $0x4, %ecx
je 0x2b0ba
xorl %eax, %eax
cmpl $0x2, %ecx
jne 0x2b0cc
movq (%rdi), %rax
movq %r13, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movl 0x8(%rax), %eax
testl %eax, %eax
movq 0x8(%rsp), %r15
jle 0x2b124
movl %eax, %eax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
movsd %xmm1, 0x30(%rsp)
movq (%rsp), %rdi
movq %r12, %rsi
movl %r13d, %edx
movl %ebp, %ecx
callq 0x29e94
movsd 0x30(%rsp), %xmm1
movq (%rsp), %rdi
movq (%rbx,%r15,8), %rax
mulsd (%rax,%r13,8), %xmm0
divsd %xmm1, %xmm0
movq (%r14,%r15,8), %rax
movq (%rax,%r13,8), %rax
movsd %xmm0, (%rax,%rbp,8)
incq %rbp
cmpq %rbp, 0x28(%rsp)
jne 0x2b0e4
incq %r13
movslq 0x8(%rdi), %rax
cmpq %rax, %r13
movq %r12, %rsi
jl 0x2b094
leaq 0x10(%rsi), %rax
addq $0x28, %rsi
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
cmovneq %rax, %rsi
movq (%rsi), %rsi
incq %rcx
cmpq 0x10(%rsp), %rcx
jne 0x2b082
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: printcontemission
void printcontemission(FILE *controlfile, Gaussianptr g)
{
 int ft, ft2;
 int numrealfeatures = current_dataset->multifeaturecount - 1;
 fprintf(controlfile, "\n mean\n");
 for (ft = 0; ft < numrealfeatures; ft++)
  {
	  fprintf(controlfile, "%.14f ", g->mean[ft]);
  }
 fprintf(controlfile,"\n\ncovariance\n");
 for (ft = 0; ft < numrealfeatures; ft++)
  {
   for (ft2 = 0; ft2 < numrealfeatures; ft2++)
	    fprintf(controlfile, "%.14f ", g->covariance.values[ft][ft2]);
   fprintf(controlfile,"\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xa76ed(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %r13d
leal -0x1(%r13), %ebp
leaq 0x7a53f(%rip), %rdi     # 0xa56d7
movl $0x7, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
movl %ebp, %r12d
cmpl $0x2, %r13d
jl 0x2b1d9
xorl %ebp, %ebp
leaq 0x7a58a(%rip), %r15     # 0xa5746
movq (%rbx), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x42e0
incq %rbp
cmpq %rbp, %r12
jne 0x2b1bc
leaq 0x7a41d(%rip), %rdi     # 0xa55fd
movl $0xd, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x42c0
cmpl $0x2, %r13d
jl 0x2b23b
xorl %r13d, %r13d
leaq 0x7a544(%rip), %r15     # 0xa5746
xorl %ebp, %ebp
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x42e0
incq %rbp
cmpq %rbp, %r12
jne 0x2b204
movl $0xa, %edi
movq %r14, %rsi
callq 0x4150
incq %r13
cmpq %r12, %r13
jne 0x2b202
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: printcontobservation
void printcontobservation(FILE *controlfile, Instanceptr inst)
{
 int i;
 int numrealfeatures = current_dataset->multifeaturecount - 1;
 Instanceptr inst1 = inst;
 fprintf(controlfile, "observation\n ");
 for (i = 0; i < numrealfeatures; i++)
  {
	  fprintf(controlfile, "inst :%f feature:%d \n ", real_feature(inst1, i), i);
  }
 fprintf(controlfile, "\n\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa70a4(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %r12d
leaq 0x79e8d(%rip), %rdi     # 0xa566a
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x2, %r12d
jl 0x2b821
decl %r12d
xorl %ebp, %ebp
leaq 0x79e77(%rip), %r15     # 0xa5678
movq %r14, %rdi
movl %ebp, %esi
callq 0x2e4b6
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
movb $0x1, %al
callq 0x42e0
incl %ebp
cmpl %ebp, %r12d
jne 0x2b801
leaq 0x78afc(%rip), %rdi     # 0xa4324
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x42c0