LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: read_additive_term_from_string
Atermptr read_additive_term_from_string(char* st)
{
	/*!Last Changed 10.04.2005*/
	Atermptr result;
	Mtermptr tmp, before;
	char** terms;
	int mulcount, i;
	result = safemalloc(sizeof(Aterm), "read_additive_term_from_string", 5);
	result->next = NULL;
	if (st[0] == '-')
		 result->sign = -1;
 else
		 result->sign = 1;
	if (st[0] == '+' || st[0] == '-')
	  terms = extract_multiplicative_terms(&(st[1]), &mulcount);
	else
   terms = extract_multiplicative_terms(st, &mulcount);
 result->start = read_multiplicative_term_from_string(terms[0]);
	before = result->start;
	for (i = 1; i < mulcount; i++)
	 {
		 tmp = read_multiplicative_term_from_string(terms[i]);
			before->next = tmp;
			before = tmp;
	 }
	free_2d((void**)terms, mulcount);
	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x5d8e9(%rip), %rsi     # 0xa7611
movl $0x18, %edi
movl $0x5, %edx
callq 0x390f5
movq %rax, %rbx
movq $0x0, 0x10(%rax)
xorl %eax, %eax
cmpb $0x2d, (%r14)
setne %al
leal -0x1(,%rax,2), %eax
movl %eax, (%rbx)
movzbl (%r14), %eax
cmpl $0x2d, %eax
je 0x49d62
cmpl $0x2b, %eax
jne 0x49d65
incq %r14
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4982b
movq %rax, %r14
movq (%rax), %rdi
callq 0x49c64
movq %rax, 0x8(%rbx)
movslq (%r15), %r15
cmpq $0x2, %r15
jl 0x49daf
movq %rax, %r12
movl $0x1, %r13d
movq (%r14,%r13,8), %rdi
callq 0x49c64
movq %rax, 0x20(%r12)
incq %r13
movq %rax, %r12
cmpq %r13, %r15
jne 0x49d96
movq %r14, %rdi
movl %r15d, %esi
callq 0x3915f
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: read_single_model_from_string
void read_single_model_from_string(Singlemodelptr s, char* modelst)
{
	/*!Last Changed 10.04.2005*/
	int addcount, i;
	char** terms;
	Atermptr tmp, before;
 terms = extract_additive_terms(modelst, &addcount);
	s->start = read_additive_term_from_string(terms[0]);
	before = s->start;
 for (i = 1; i < addcount; i++)
	 {
		 tmp = read_additive_term_from_string(terms[i]);
			before->next = tmp;
			before = tmp;
	 }
	free_2d((void**)terms, addcount);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x49979
movq %rax, %rbx
movq (%rax), %rdi
callq 0x49d11
movq %rax, (%r14)
movslq (%r12), %r14
cmpq $0x2, %r14
jl 0x49e1f
movq %rax, %r15
movl $0x1, %r12d
movq (%rbx,%r12,8), %rdi
callq 0x49d11
movq %rax, 0x10(%r15)
incq %r12
movq %rax, %r15
cmpq %r12, %r14
jne 0x49e07
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3915f
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: read_multiple_model_from_file
Multiplemodelptr read_multiple_model_from_file(char* modelfile)
{
	/*!Last Changed 10.04.2005*/
	FILE* infile;
	int i;
	char modelst[READLINELENGTH];
	Multiplemodelptr result;
 infile = fopen(modelfile, "r");
	if (!infile)
		 return NULL;
	result = safemalloc(sizeof(Multiplemodel), "read_multiple_model_from_file", 8);
	fscanf(infile, "%d", &(result->featurecount));
	result->min = safemalloc(result->featurecount * sizeof(double), "read_multiple_model_from_file", 10);
	result->max = safemalloc(result->featurecount * sizeof(double), "read_multiple_model_from_file", 11);
	for (i = 0; i < result->featurecount; i++)
		 fscanf(infile, "%lf%lf", &(result->min[i]), &(result->max[i]));
	fscanf(infile, "%d", &(result->modelcount));
	result->models = safemalloc(result->modelcount * sizeof(Singlemodel), "read_multiple_model_from_file", 15);
	for (i = 0; i < result->modelcount; i++)
	 {
		 fscanf(infile, "%d%lf", &(result->models[i].datacount), &(result->models[i].noiselevel));
			fscanf(infile, "%s", modelst);
   read_single_model_from_string(&(result->models[i]), modelst);
	 }
	fclose(infile);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a128, %rsp          # imm = 0x7A128
leaq 0x5ea42(%rip), %rsi     # 0xa888f
callq 0x40f0
testq %rax, %rax
je 0x49faa
movq %rax, %rbx
leaq 0x5d7cb(%rip), %r15     # 0xa7630
movl $0x20, %edi
movq %r15, %rsi
movl $0x8, %edx
callq 0x390f5
movq %rax, %r14
leaq 0xc(%rax), %rdx
leaq 0x63cd8(%rip), %rsi     # 0xadb5d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4070
movslq 0xc(%r14), %rdi
shlq $0x3, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x390f5
movq %rax, 0x10(%r14)
movslq 0xc(%r14), %rdi
shlq $0x3, %rdi
movq %r15, %rsi
movl $0xb, %edx
callq 0x390f5
movq %rax, 0x18(%r14)
cmpl $0x0, 0xc(%r14)
jle 0x49f00
leaq 0x5cefc(%rip), %r15     # 0xa6dcb
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%r14), %rdx
addq %r12, %rdx
movq 0x18(%r14), %rcx
addq %r12, %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x4070
incq %r13
movslq 0xc(%r14), %rax
addq $0x8, %r12
cmpq %rax, %r13
jl 0x49ed5
movq %r14, %rdx
addq $0x8, %rdx
leaq 0x63c4f(%rip), %rsi     # 0xadb5d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4070
movslq 0x8(%r14), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
leaq 0x5d705(%rip), %rsi     # 0xa7630
movl $0xf, %edx
callq 0x390f5
movq %rax, (%r14)
cmpl $0x0, 0x8(%r14)
jle 0x49fa0
leaq 0x5afb2(%rip), %r12     # 0xa4ef8
movq %rsp, %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
movq (%r14), %rax
leaq (%rax,%rbp), %rdx
addq $0x8, %rdx
leaq (%rax,%rbp), %rcx
addq $0x10, %rcx
movq %rbx, %rdi
leaq 0x5d6e3(%rip), %rsi     # 0xa764e
xorl %eax, %eax
callq 0x4070
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4070
movq (%r14), %rdi
addq %rbp, %rdi
movq %r13, %rsi
callq 0x49dcb
incq %r15
movslq 0x8(%r14), %rax
addq $0x18, %rbp
cmpq %rax, %r15
jl 0x49f4e
movq %rbx, %rdi
callq 0x42a0
jmp 0x49fad
xorl %r14d, %r14d
movq %r14, %rax
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: free_additive_term
void free_additive_term(Atermptr a)
{
	/*!Last Changed 11.04.2005*/
	Mtermptr tmp, next;
	tmp = a->start;
	while (tmp)
	 {
		 next = tmp->next;
			free_multiplicative_term(tmp);
			safe_free(tmp);
			tmp = next;
	 }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x4a009
movq 0x20(%rbx), %r14
movq %rbx, %rdi
callq 0x49fc2
movq %rbx, %rdi
callq 0x39194
movq %r14, %rbx
testq %r14, %r14
jne 0x49fed
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: free_single_model
void free_single_model(Singlemodel s)
{
	/*!Last Changed 11.04.2005*/
	Atermptr tmp, next;
 tmp = s.start;
	while (tmp)
	 {
		 next = tmp->next;
			free_additive_term(tmp);
			safe_free(tmp);
			tmp = next;
	 }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rsp), %rbx
testq %rbx, %rbx
je 0x4a03b
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x49fe0
movq %rbx, %rdi
callq 0x39194
movq %r14, %rbx
testq %r14, %r14
jne 0x4a01f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: free_multiple_model
void free_multiple_model(Multiplemodelptr m)
{
	/*!Last Changed 11.04.2005*/
	int i;
	safe_free(m->min);
	safe_free(m->max);
	for (i = 0; i < m->modelcount; i++)
		 free_single_model(m->models[i]);
	safe_free(m->models);
	safe_free(m);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x39194
movq 0x18(%rbx), %rdi
callq 0x39194
cmpl $0x0, 0x8(%rbx)
jle 0x4a0a1
xorl %r15d, %r15d
movq (%rbx), %rax
leaq (%r15,%r15,2), %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x4a095
movq 0x10(%r14), %r12
movq %r14, %rdi
callq 0x49fe0
movq %r14, %rdi
callq 0x39194
movq %r12, %r14
testq %r12, %r12
jne 0x4a079
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x4a069
movq (%rbx), %rdi
callq 0x39194
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x39194
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: data_count_of_multiple_model
int data_count_of_multiple_model(Multiplemodelptr m)
{
	/*!Last Changed 11.04.2005*/
	int result = 0, i;
	for (i = 0; i < m->modelcount; i++)
		 result += m->models[i].datacount;
	return result;
}

// Assembly:
movslq 0x8(%rdi), %rax
testq %rax, %rax
jle 0x4a0e2
movq (%rdi), %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
xorl %esi, %esi
xorl %eax, %eax
addl 0x8(%rcx,%rsi), %eax
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x4a0d4
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multiplemodel.c
// Function: generate_data_from_single_model
matrix generate_data_from_single_model(Singlemodel s, int featurecount, double* min, double* max)
{
	/*!Last Changed 11.04.2005*/
	int i, j;
	matrix result;
	result = matrix_alloc(s.datacount, featurecount + 1);
	for (i = 0; i < s.datacount; i++)
	 {
		 for (j = 0; j < featurecount; j++)
				 result.values[i][j] = produce_random_value(min[j], max[j]);
			result.values[i][j] = single_model_value(s, result.values[i]);
	 }
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movslq 0x78(%rsp), %r15
movq %rdi, 0x20(%rsp)
leal 0x1(%rdi), %esi
movl %r15d, %edi
callq 0x3c6e5
movq %rax, 0x28(%rsp)
movq %rdx, %rbp
movq %r15, 0x30(%rsp)
testq %r15, %r15
jle 0x4a18f
movl 0x20(%rsp), %r15d
xorl %r12d, %r12d
cmpl $0x0, 0x20(%rsp)
jle 0x4a158
xorl %r13d, %r13d
movsd (%r14,%r13,8), %xmm0
movsd (%rbx,%r13,8), %xmm1
callq 0x39f62
movq (%rbp,%r12,8), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
cmpq %r13, %r15
jne 0x4a132
jmp 0x4a15b
xorl %r13d, %r13d
movq (%rbp,%r12,8), %rdi
leaq 0x70(%rsp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x10(%rsp)
movups (%rcx), %xmm0
movups %xmm0, (%rsp)
callq 0x497b9
movq (%rbp,%r12,8), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r12
cmpq 0x30(%rsp), %r12
jne 0x4a128
movq 0x28(%rsp), %rax
movq %rbp, %rdx
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/multiplemodel.c
// Function: generate_data_from_multiple_model
matrix generate_data_from_multiple_model(Multiplemodelptr m)
{
	/*!Last Changed 11.04.2005*/
	matrix result;
	int datacount, i, j, k, p;
 datacount = data_count_of_multiple_model(m);
	result = matrix_alloc(datacount, m->featurecount + 1);
	k = 0;
	for (i = 0; i < m->modelcount; i++)
		 for (j = 0; j < m->models[i].datacount; j++)
			 {
		   for (p = 0; p < m->featurecount; p++)
				   result.values[k][p] = produce_random_value(m->min[p], m->max[p]);
     result.values[k][p] = single_model_value(m->models[i], result.values[k]);
			  k++;
			 }
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x4a1de
movq (%rbx), %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %edi, %edi
addl 0x8(%rax,%rdx), %edi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x4a1cf
jmp 0x4a1e0
xorl %edi, %edi
movl 0xc(%rbx), %esi
incl %esi
callq 0x3c6e5
movq %rax, 0x18(%rsp)
movq %rdx, %r15
cmpl $0x0, 0x8(%rbx)
jle 0x4a2b3
xorl %edx, %edx
xorl %r13d, %r13d
movq (%rbx), %rax
leaq (%rdx,%rdx,2), %rcx
cmpl $0x0, 0x8(%rax,%rcx,8)
jle 0x4a2a3
movslq %r13d, %r13
xorl %ebp, %ebp
movq %rdx, 0x20(%rsp)
leaq (,%rdx,8), %rax
leaq (%rax,%rax,2), %r14
cmpl $0x0, 0xc(%rbx)
jle 0x4a263
xorl %r12d, %r12d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movsd (%rax,%r12,8), %xmm0
movsd (%rcx,%r12,8), %xmm1
callq 0x39f62
movq (%r15,%r13,8), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0xc(%rbx), %rax
cmpq %rax, %r12
jl 0x4a232
jmp 0x4a266
xorl %r12d, %r12d
movq (%rbx), %rax
movq (%r15,%r13,8), %rdi
movq 0x10(%rax,%r14), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax,%r14), %xmm0
movups %xmm0, (%rsp)
callq 0x497b9
movq (%r15,%r13,8), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r13
incl %ebp
movq (%rbx), %rax
cmpl 0x8(%rax,%r14), %ebp
jl 0x4a229
movq 0x20(%rsp), %rdx
incq %rdx
movslq 0x8(%rbx), %rax
cmpq %rax, %rdx
jl 0x4a201
movq 0x18(%rsp), %rax
movq %r15, %rdx
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/multiplemodel.c
// Function: remove_instances_according_to_threshold
void remove_instances_according_to_threshold(Instanceptr* parentlist, Instanceptr* removed, double threshold, matrix w, char which)
{
	/*!Last Changed 11.04.2005*/
	double value;
	Instanceptr last, tmp, before, next;
	last = *removed;
	if (last)
		 while (last->next != NULL)
				 last = last->next;
	tmp = *parentlist;
	before = NULL;
	while (tmp)
	 {
		 next = tmp->next;
		 value = fabs(linear_fit_value(w, tmp) - give_regressionvalue(tmp));
			if ((value > threshold && which == '>') || (value < threshold && which == '<'))
			 {
				 if (last)
  				 last->next = tmp;
					else
						 *removed = tmp;
					last = tmp;
					if (before)
						 before->next = tmp->next;
					else
						 *parentlist = tmp->next;
			 }
			else
				 before = tmp;
			tmp = next;
	 }
	last->next = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebx
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq %rdi, (%rsp)
movq %rsi, 0x10(%rsp)
movq (%rsi), %rax
testq %rax, %rax
je 0x4a30a
movq %rax, %r12
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x4a2fc
jmp 0x4a30d
xorl %r12d, %r12d
movq (%rsp), %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x4a3c7
movq $0x0, 0x8(%rsp)
cmpb $0x3c, %bl
sete %r15b
cmpb $0x3e, %bl
sete %r13b
movq 0x10(%rbp), %r14
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rdx
callq 0x75608
movapd %xmm0, 0x30(%rsp)
movq %rbp, %rdi
callq 0x2eaee
movapd 0x30(%rsp), %xmm1
subsd %xmm0, %xmm1
andpd 0x58e76(%rip), %xmm1    # 0xa31e0
movsd 0x18(%rsp), %xmm0
ucomisd %xmm0, %xmm1
seta %cl
ucomisd %xmm1, %xmm0
seta %al
testb %cl, %r13b
jne 0x4a38f
andb %al, %r15b
jne 0x4a38f
movq %rbp, 0x8(%rsp)
jmp 0x4a3bb
leaq 0x10(%r12), %rax
testq %r12, %r12
cmoveq 0x10(%rsp), %rax
movq %rbp, (%rax)
movq 0x8(%rsp), %rcx
leaq 0x10(%rcx), %rax
testq %rcx, %rcx
movq 0x10(%rbp), %rcx
cmoveq (%rsp), %rax
movq %rcx, (%rax)
movq %rbp, %r12
movq %r14, %rbp
testq %r14, %r14
jne 0x4a326
movq $0x0, 0x10(%r12)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: error_of_ruleset_with_deleted_rules
int error_of_ruleset_with_deleted_rules(Ruleset set, Instanceptr data, int* deleted)
{
/*!Last Changed 14.01.2004*/
 int instanceclassno, covered, error, i;
 Instanceptr test = data;
 Decisionruleptr tmp;
 error = 0;
 while (test)
  {
   instanceclassno = give_classno(test);
   covered = 0;
   tmp = set.start;
   i = 0;
   while (tmp)
    {
     if ((!deleted[i]) && rule_cover_instance(test, *tmp))
      {
       if (instanceclassno != tmp->classno)
         error++;
       covered = 1;
       break;
      }
     i++;
     tmp = tmp->next;
    }
   if (!covered)
     if (instanceclassno != set.defaultclass)
       error++;
   test=test->next;
  }
 return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, 0x50(%rsp)
testq %rdi, %rdi
je 0x4a82e
movq %rdi, %r14
leaq 0x90(%rsp), %rax
movq (%rax), %r12
testq %r12, %r12
sete 0x43(%rsp)
movl 0x14(%rax), %eax
movl %eax, 0x44(%rsp)
xorl %ebp, %ebp
movq %r12, 0x48(%rsp)
movq %r14, %rdi
callq 0x2eaca
movl %eax, %r15d
testq %r12, %r12
je 0x4a7f8
movq 0x50(%rsp), %rbx
movb 0x43(%rsp), %r13b
cmpl $0x0, (%rbx)
jne 0x4a7e4
movq 0x30(%r12), %rax
movq %rax, 0x30(%rsp)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x7a0fc
testl %eax, %eax
jne 0x4a7ff
movq 0x30(%r12), %r12
addq $0x4, %rbx
testq %r12, %r12
sete %r13b
jne 0x4a7aa
jmp 0x4a80a
movb 0x43(%rsp), %r13b
jmp 0x4a80f
xorl %eax, %eax
cmpl (%r12), %r15d
setne %al
addl %eax, %ebp
movq 0x48(%rsp), %r12
cmpl 0x44(%rsp), %r15d
setne %al
andb %r13b, %al
movzbl %al, %eax
addl %eax, %ebp
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x4a790
jmp 0x4a830
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: validation_error_after_pruning
int validation_error_after_pruning(Ruleset r, Instanceptr cvdata, int positive)
{
 /*!Last Changed 02.02.2004 added safecalloc*/
 /*!Last Changed 14.01.2004*/
 int result, *deleted, rulecount, tmp, i;
 Decisionruleptr rule;
 deleted = safecalloc(r.rulecount, sizeof(int), "validation_error_after_pruning", 3);
 result = error_of_ruleset_with_deleted_rules(r, cvdata, deleted);
 rule = r.start;
 rulecount = 0;
 while (rule && rule->classno != positive)
  {
   rule = rule->next;
   rulecount++;
  }
 for (i = r.rulecount - 1; i >= rulecount; i--)
  {
   deleted[i] = 1;
   tmp = error_of_ruleset_with_deleted_rules(r, cvdata, deleted);
   if (tmp > result)
     deleted[i] = 0;
   else
     result = tmp;
  }
 safe_free(deleted);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r12d
movq %rdi, %rbx
movslq 0x80(%rsp), %r14
leaq 0x5cdf7(%rip), %rdx     # 0xa765b
movl $0x4, %esi
movq %r14, %rdi
movl $0x3, %ecx
callq 0x39210
movq %rax, %r15
movq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movaps 0x70(%rsp), %xmm0
movaps 0x80(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, 0x30(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a750
movl %eax, %ebp
movq 0x70(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4a8c7
cmpl %r12d, (%rcx)
je 0x4a8c7
incl %eax
movq 0x30(%rcx), %rcx
jmp 0x4a8b5
cmpl %eax, %r14d
jle 0x4a926
leaq 0x70(%rsp), %r13
movslq %eax, %rbx
movl $0x1, -0x4(%r15,%r14,4)
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x4a750
movl %eax, %r12d
cmpl %ebp, %eax
jle 0x4a919
movl $0x0, -0x4(%r15,%r14,4)
movl %ebp, %r12d
decq %r14
movl %r12d, %ebp
cmpq %rbx, %r14
jg 0x4a8d4
jmp 0x4a929
movl %ebp, %r12d
movq %r15, %rdi
callq 0x39194
movl %r12d, %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/multivariaterule.c
// Function: growrule_multivariate
Decisionruleptr growrule_multivariate(Instanceptr* growset, int positive, Ripper_parameterptr param)
{
 /*!Last Changed 21.01.2004*/
 /*!Last Changed 29.12.2003*/
 /*!Last Changed 02.12.2003*/
 /*!Last Changed 10.05.2003*/
 Decisionruleptr result;
 Decisionconditionptr newcondition = NULL;
 Instanceptr obey, notobey = NULL;
 int n, pnew, nnew;
 result = empty_rule(positive);
 obey = (*growset);
 if (rule_cover_negative(obey, *result))
   n = 1;
 else
   n = 0;
 while (n > 0)
  {
   newcondition = find_best_multivariate_condition(&obey, positive, MULTIVARIATE_LINEAR, param);
   if (newcondition && newcondition->featureindex != -1)
    {
     count_examples_for_condition(newcondition, &pnew, &nnew, positive, obey);
     if (result->decisioncount == 0 || nnew != n)
       n = nnew;
     else
      {
       free_condition(*newcondition);
       safe_free(newcondition);
       break;
      }
     send_exceptions(newcondition, &obey, &notobey);
     add_condition(result, newcondition);
    }
   else
    {
     if (newcondition && newcondition->featureindex == -1)
      {
       free_condition(*newcondition);
       safe_free(newcondition);
      }
     break;
    }
  }
 if (notobey)
  {
   merge_instancelist(&notobey, obey);
   (*growset) = notobey;
  }
 else
   (*growset) = obey;
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x98(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, 0x80(%rsp)
movl %esi, %edi
callq 0x7a713
movq %rax, %r14
movq %rbx, 0x90(%rsp)
movq (%rbx), %rdi
movq %rdi, 0x78(%rsp)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7ad4b
testl %eax, %eax
je 0x4b041
setne %al
movzbl %al, %r15d
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movq 0x98(%rsp), %rcx
callq 0x4b5d1
testq %rax, %rax
je 0x4b041
movq %rax, %r13
cmpl $-0x1, (%rax)
je 0x4b026
movq 0x78(%rsp), %r8
movq %r13, %rdi
leaq 0xa4(%rsp), %rsi
leaq 0x8c(%rsp), %rdx
movl %ebp, %ecx
callq 0x7984a
cmpl $0x0, 0x28(%r14)
movl 0x8c(%rsp), %ebx
je 0x4afff
cmpl %r15d, %ebx
je 0x4b026
movq %r13, %rdi
movq %r12, %rsi
leaq 0x80(%rsp), %rdx
callq 0x9c270
movq %r14, %rdi
movq %r13, %rsi
callq 0x7a77b
movl %ebx, %r15d
testl %ebx, %ebx
jg 0x4afa9
jmp 0x4b041
movl $0xe, %ecx
movq %rsp, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x7a935
movq %r13, %rdi
callq 0x39194
cmpq $0x0, 0x80(%rsp)
je 0x4b063
movq 0x78(%rsp), %rsi
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x2fd59
jmp 0x4b068
leaq 0x78(%rsp), %rbx
movq (%rbx), %rax
movq 0x90(%rsp), %rcx
movq %rax, (%rcx)
movq %r14, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: grow_revision_rule_multivariate
Decisionruleptr grow_revision_rule_multivariate(Instanceptr* growset, Decisionruleptr rule, int positive, Ripper_parameterptr param)
{
 /* Last Changed 21.01.2004*/
 /* Last Changed 14.01.2004*/
 /* Last Changed 20.05.2003*/
 Decisionruleptr newrule = create_copy_of_rule(rule);
 Decisionconditionptr newcondition;
 Instanceptr obey, notobey = NULL;
 int n, pnew, nnew;
 obey = (*growset);
 if (rule_cover_negative(obey, *newrule))
   n = 1;
 else
   n = 0;
 while (n > 0)
  {
   newcondition = find_best_multivariate_condition(&obey, positive, MULTIVARIATE_LINEAR, param);
   if (newcondition && newcondition->featureindex != -1)
    {
     count_examples_for_condition(newcondition, &pnew, &nnew, positive, obey);
     if (notobey == NULL || nnew != n)
       n = nnew;
     else
      {
       free_condition(*newcondition);
       safe_free(newcondition);       
       break;
      }
     send_exceptions(newcondition, &obey, &notobey);
     add_condition(newrule, newcondition);
    }
   else
    {
     if (newcondition && newcondition->featureindex == -1)
      {
       free_condition(*newcondition);
       safe_free(newcondition);
      }
     break;
    }
  }
 if (notobey)
  {
   merge_instancelist(&notobey, obey);
   (*growset) = notobey;
  }
 return newrule;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, 0x98(%rsp)
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x7a54a
movq %rax, %r14
movq $0x0, 0x78(%rsp)
movq %rbx, 0x90(%rsp)
movq (%rbx), %rdi
movq %rdi, 0x80(%rsp)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7ad4b
testl %eax, %eax
je 0x4b1aa
setne %al
movzbl %al, %r15d
leaq 0x80(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movq 0x98(%rsp), %rcx
callq 0x4b5d1
testq %rax, %rax
je 0x4b1aa
movq %rax, %r13
cmpl $-0x1, (%rax)
je 0x4b18f
movq 0x80(%rsp), %r8
movq %r13, %rdi
leaq 0xa4(%rsp), %rsi
leaq 0x8c(%rsp), %rdx
movl %ebp, %ecx
callq 0x7984a
cmpq $0x0, 0x78(%rsp)
movl 0x8c(%rsp), %ebx
je 0x4b16b
cmpl %r15d, %ebx
je 0x4b18f
movq %r13, %rdi
movq %r12, %rsi
leaq 0x78(%rsp), %rdx
callq 0x9c270
movq %r14, %rdi
movq %r13, %rsi
callq 0x7a77b
movl %ebx, %r15d
testl %ebx, %ebx
jg 0x4b111
jmp 0x4b1aa
movl $0xe, %ecx
movq %rsp, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x7a935
movq %r13, %rdi
callq 0x39194
cmpq $0x0, 0x78(%rsp)
je 0x4b1d5
movq 0x80(%rsp), %rsi
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x2fd59
movq (%rbx), %rax
movq 0x90(%rsp), %rcx
movq %rax, (%rcx)
movq %r14, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: simplify_ruleset_multivariate
void simplify_ruleset_multivariate(Ruleset* r, int positive, Instanceptr cvdata)
{
 /*!Last Changed 14.01.2004*/
 Decisionruleptr firstrule, deleted, tmprule, deletedbefore;
 int minerror = error_of_ruleset(*r, cvdata), error;
 firstrule = r->start;
 while (firstrule && firstrule->classno != positive)
   firstrule = firstrule->next;
 if (!firstrule)
   return;
 deleted = r->end;
 while (deleted && deleted->next != firstrule)
  {
   tmprule = r->start;
   if (tmprule != deleted)
    {
     while (tmprule->next != deleted)
       tmprule = tmprule->next;
     deletedbefore = tmprule;
    }
   else
     deletedbefore = NULL;
   remove_rule_after(r, deletedbefore, deleted);
   error = error_of_ruleset(*r, cvdata);
   if (error > minerror)
     add_rule_after(r, deletedbefore, deleted);
   else
    {
     free_rule(*deleted);
     safe_free(deleted);
     minerror = error;
    }
   deleted = deletedbefore;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r15d
movq %rdi, %r14
movq 0x20(%rdi), %rax
movq %rax, 0x20(%rsp)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rdx, 0x40(%rsp)
movq %rdx, %rdi
callq 0x7a03b
movq (%r14), %rbx
testq %rbx, %rbx
je 0x4b300
movl %eax, %ebp
cmpl %r15d, (%rbx)
je 0x4b245
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x4b232
jmp 0x4b300
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x4b300
cmpq %rbx, 0x30(%r15)
je 0x4b300
movq (%r14), %rax
cmpq %r15, %rax
je 0x4b272
movq %rax, %r12
movq 0x30(%rax), %rax
cmpq %r15, %rax
jne 0x4b264
jmp 0x4b275
xorl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7afd2
movq 0x20(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x40(%rsp), %rdi
callq 0x7a03b
cmpl %ebp, %eax
jle 0x4b2bc
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7afad
jmp 0x4b2f4
movl %eax, %r13d
movq 0x30(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7a989
movq %r15, %rdi
callq 0x39194
movl %r13d, %ebp
movq %r12, %r15
testq %r12, %r12
jne 0x4b252
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: count_multivariate_condition_over_threshold
int count_multivariate_condition_over_threshold(Instanceptr list, Decisionconditionptr condition)
{
 /*!Last Changed 09.01.2004*/
 int result = 0;
 Instanceptr tmp = list;
 while (tmp)
  {
   if (multiply_with_matrix(tmp, condition->w) > condition->w0)
     result++;
   tmp = tmp->next;
  }
 return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4b347
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x2e700
xorl %eax, %eax
ucomisd 0x30(%rbx), %xmm0
seta %al
addl %eax, %ebp
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x4b320
jmp 0x4b349
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: find_best_multivariate_condition_svm
Decisionconditionptr find_best_multivariate_condition_svm(Instanceptr* growset, int positive)
{
 /*!Last Changed 18.02.2008*/
 Decisionconditionptr result;
 int i;
 Partition p;
 Svm_split split;
 result = empty_condition();
 result->conditiontype = MULTIVARIATE_CONDITION;
 result->featureindex = LINEAR;
 result->freeparam = current_dataset->multifeaturecount - 1;
 result->comparison = '>';
 result->w = matrix_alloc(1, current_dataset->multifeaturecount - 1);
 p = get_two_class_partition_for_one_vs_all(current_dataset, positive);
	split = find_best_svm_split_for_partition(*growset, p);
	result->w0 = split.rho;
	for (i = 0; i < current_dataset->multifeaturecount - 1; i++)
 		result->w.values[0][i] = split.weights[i];
	free_svm_split(split);
 free_partition(p);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movl %esi, %ebp
movq %rdi, %r14
xorl %eax, %eax
callq 0x7aa9e
movq %rax, %rbx
movl $0x1, 0x40(%rax)
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
leaq 0x874ee(%rip), %r12     # 0xd2870
movq (%r12), %rax
movl 0x1c0(%rax), %esi
decl %esi
movl %esi, 0x3c(%rbx)
movb $0x3e, 0x4(%rbx)
movl $0x1, %edi
callq 0x3c6e5
movq %rax, 0x20(%rbx)
movq %rdx, 0x28(%rbx)
movq (%r12), %rsi
leaq 0x90(%rsp), %r15
movq %r15, %rdi
movl %ebp, %edx
callq 0x54314
movq (%r14), %rsi
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x94a3e
movsd 0x70(%r14), %xmm0
movsd %xmm0, 0x30(%rbx)
movq (%r12), %rax
movl 0x1c0(%rax), %eax
cmpl $0x2, %eax
jl 0x4b420
decl %eax
movq 0x120(%rsp), %rcx
movq 0x28(%rbx), %rdx
movq (%rdx), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x4b40e
leaq 0xa8(%rsp), %rsi
movl $0x11, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x8dd6c
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x90(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x54550
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: find_best_multivariate_condition_lp
Decisionconditionptr find_best_multivariate_condition_lp(Instanceptr* growset, int positive)
{
 /*!Last Changed 17.11.2005 added result->freeparam*/
 /*!Last Changed 26.06.2005*/
 /*!Last Changed 28.05.2004*/
 Mlpparameters mlpparams;
 Mlpnetwork neuralnetwork;
 matrix train;
 Decisionconditionptr result;
 int i;
 result = empty_condition();
 result->conditiontype = MULTIVARIATE_CONDITION;
 result->featureindex = LINEAR;
 result->freeparam = current_dataset->multifeaturecount - 1;
 mlpparams = prepare_Mlpparameters(*growset, *growset, 0, 0.0, 0, NULL, 0, 0.0, 0.0, 0, CLASSIFICATION);
 train = instancelist_to_matrix(*growset, 2, positive, MULTIVARIATE_LINEAR);
 neuralnetwork = mlpn_general(train, train, &mlpparams, CLASSIFICATION);
 result->comparison = '>';
 result->w0 = neuralnetwork.weights->values[1][0] - neuralnetwork.weights->values[0][0];
 result->w = matrix_alloc(1, current_dataset->multifeaturecount - 1);
 for (i = 0; i < current_dataset->multifeaturecount - 1; i++)
   result->w.values[0][i] = neuralnetwork.weights->values[0][i + 1] - neuralnetwork.weights->values[1][i + 1];
 free_mlpnnetwork(&neuralnetwork);
 matrix_free(train);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %esi, %ebp
movq %rdi, %r14
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x7aa9e
movq %rax, %rbx
movl $0x1, 0x40(%rax)
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
leaq 0x873d0(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
decl %eax
movl %eax, 0x3c(%rbx)
movq (%r14), %rdx
subq $0x8, %rsp
leaq 0xa0(%rsp), %rdi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rdx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r12
pushq %r12
callq 0x43275
addq $0x20, %rsp
movq (%r14), %rdi
movl $0x2, %esi
movl %ebp, %edx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
callq 0x2f755
movq %rax, %r14
movq %rdx, %r15
subq $0x8, %rsp
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
movq %rax, %rcx
movq %rdx, %r8
leaq 0xa0(%rsp), %r9
pushq %r12
callq 0x42ac4
addq $0x10, %rsp
movb $0x3e, 0x4(%rbx)
movq (%r13), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
subsd (%rcx), %xmm0
movsd %xmm0, 0x30(%rbx)
leaq 0x87327(%rip), %r12     # 0xd2870
movq (%r12), %rax
movl 0x1c0(%rax), %esi
decl %esi
movl $0x1, %edi
callq 0x3c6e5
movq %rax, 0x20(%rbx)
movq %rdx, 0x28(%rbx)
movq (%r12), %rax
movl 0x1c0(%rax), %eax
cmpl $0x2, %eax
jl 0x4b5a9
decl %eax
movq (%rsp), %rcx
movq 0x8(%rcx), %rsi
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
movq (%rdx), %rdx
xorl %edi, %edi
movsd 0x8(%rcx,%rdi,8), %xmm0
subsd 0x8(%rsi,%rdi,8), %xmm0
movsd %xmm0, (%rdx,%rdi,8)
leaq 0x1(%rdi), %r8
movq %r8, %rdi
cmpq %r8, %rax
jne 0x4b58c
movq %rsp, %rdi
callq 0x442bb
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dbad
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariaterule.c
// Function: multivariate_rule_learner
Ruleset multivariate_rule_learner(Instanceptr* instances, Instanceptr cvdata, Ripper_parameterptr param)
{
 /*!Last Changed 09.01.2004*/
 Ruleset result;
 int classno, *counts, *classes, posclass, classcount, i, maxcount;
 Instanceptr removed, totalremoved = NULL;
 empty_ruleset(&result);
 classno = all_in_one_class(*instances, &maxcount);
 if (!(classno % 10))
   return result;
 counts = find_class_counts(*instances);
 classes = find_max_occured(counts, current_dataset->classno, &classcount);
 safe_free(counts);
 result.defaultclass = classes[0];
 for (i = classcount - 1; i > 0; i--)
  {
   posclass = classes[i];
   removed = learn_multivariate_rules_for_positive_class(instances, &result, posclass, cvdata, param);
   merge_instancelist(&totalremoved, removed);
  }
 safe_free(classes);
 merge_instancelist(instances, totalremoved);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
callq 0x7aa63
movq (%r14), %rdi
leaq 0x14(%rsp), %rsi
callq 0x11633
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
addl $0x19999998, %eax       # imm = 0x19999998
rorl %eax
cmpl $0x19999999, %eax       # imm = 0x19999999
jb 0x4baab
movq (%r14), %rdi
callq 0x115e1
movq %rax, %rbp
leaq 0x86e42(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x10(%rax), %esi
leaq 0x4(%rsp), %rdx
movq %rbp, %rdi
callq 0x3758b
movq %rax, %r13
movq %rbp, %rdi
callq 0x39194
movl (%r13), %eax
movl %eax, 0x14(%rbx)
movq %r12, %rbp
movq %r15, %r12
leaq 0x4(%rsp), %rax
movslq (%rax), %r15
cmpq $0x2, %r15
jl 0x4ba96
incq %r15
movl -0x8(%r13,%r15,4), %edx
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rcx
movq %r12, %r8
callq 0x4b7d3
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x2fd59
decq %r15
cmpq $0x2, %r15
jg 0x4ba6a
movq %r13, %rdi
callq 0x39194
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2fd59
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariatetree.c
// Function: decisiontree_multivariate_linear_node_count
int decisiontree_multivariate_linear_node_count(Decisionnodeptr node)
{
 /*!Last Changed 24.11.2004*/
 if (node->featureno == LEAF_NODE)
   return 0;
 else
   if (node->featureno == LINEAR)
     return 1 + decisiontree_multivariate_linear_node_count(node->left) + decisiontree_multivariate_linear_node_count(node->right);
   else
     return decisiontree_multivariate_linear_node_count(node->left) + decisiontree_multivariate_linear_node_count(node->right);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movl 0x30(%rbx), %eax
cmpl $-0x2, %eax
jne 0x4bae6
movq (%rbx), %rdi
callq 0x4bac0
movq 0x8(%rbx), %rbx
addl %eax, %r14d
incl %r14d
jmp 0x4baca
cmpl $-0x1, %eax
jne 0x4baf0
movl %r14d, %eax
jmp 0x4bb08
movq (%rbx), %rdi
callq 0x4bac0
movl %eax, %ebp
movq 0x8(%rbx), %rdi
callq 0x4bac0
addl %ebp, %eax
addl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariatetree.c
// Function: decisiontree_multivariate_quadratic_node_count
int decisiontree_multivariate_quadratic_node_count(Decisionnodeptr node)
{
 /*!Last Changed 29.01.2005*/
 if (node->featureno == LEAF_NODE)
   return 0;
 else
   if (node->featureno == QUADRATIC)
     return 1 + decisiontree_multivariate_quadratic_node_count(node->left) + decisiontree_multivariate_quadratic_node_count(node->right);
   else
     return decisiontree_multivariate_quadratic_node_count(node->left) + decisiontree_multivariate_quadratic_node_count(node->right);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movl 0x30(%rbx), %eax
cmpl $-0x3, %eax
jne 0x4bb33
movq (%rbx), %rdi
callq 0x4bb0d
movq 0x8(%rbx), %rbx
addl %eax, %r14d
incl %r14d
jmp 0x4bb17
cmpl $-0x1, %eax
jne 0x4bb3d
movl %r14d, %eax
jmp 0x4bb55
movq (%rbx), %rdi
callq 0x4bb0d
movl %eax, %ebp
movq 0x8(%rbx), %rdi
callq 0x4bb0d
addl %ebp, %eax
addl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariatetree.c
// Function: createmultivariatecondition
Decisioncondition createmultivariatecondition(matrix w, double w0, char comparison, int node_type)
{
/*!Last Changed 04.10.2004*/
 Decisioncondition condition;
 condition.w = matrix_copy(w);
 condition.w0 = w0;
 condition.comparison = comparison;
 condition.featureindex = node_type;
 return condition;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebx
movl %ecx, %ebp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x3ca3c
movq %rax, 0x20(%r14)
movq %rdx, 0x28(%r14)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x30(%r14)
movb %bpl, 0x4(%r14)
movl %ebx, (%r14)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariatetree.c
// Function: test_multivariate
int test_multivariate(Instanceptr testingdata, matrix w, double w0, int leftclass, int rightclass)
{
 /*!Last Changed 23.09.2004*/
 int i, error = 0;
 double value;
 Instanceptr test = testingdata;
 while (test)
  {
   value = multiply_with_matrix(test, w);
   i = give_classno(test);
   if (value <= w0)
    {
     if (i != leftclass)
       error++;
    }
   else
    {
     if (i != rightclass)
       error++;
    }
   test = test->next;
  }
 return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x4bc0e
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
xorl %r12d, %r12d
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2e700
movsd %xmm0, 0x10(%rsp)
movq %r13, %rdi
callq 0x2eaca
movsd 0x8(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
movl %ebp, %ecx
cmovbl %ebx, %ecx
xorl %edx, %edx
cmpl %ecx, %eax
setne %dl
addl %edx, %r12d
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x4bbcc
jmp 0x4bc11
xorl %r12d, %r12d
movl %r12d, %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/multivariatetree.c
// Function: find_counts_for_multivariate_split
void find_counts_for_multivariate_split(Instanceptr instances, matrix w, double w0, int* leftcounts, int* rightcounts)
{
 /*!Last Changed 22.09.2004*/
 int j;
 double value;
 Instanceptr tmp = instances;
 for (j = 0; j < MAXCLASSES; j++)
  {
   leftcounts[j] = 0;
   rightcounts[j] = 0;
  }
 while (tmp)
  {
   value = multiply_with_matrix(tmp, w);
   j = give_classno(tmp);
   if (value <= w0)
     leftcounts[j]++;
   else
     rightcounts[j]++;
   tmp = tmp->next;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
xorl %eax, %eax
xorl %ecx, %ecx
movl %eax, (%r14,%rcx,4)
movl %eax, (%rbx,%rcx,4)
incq %rcx
cmpq $0x32, %rcx
jne 0x4c991
testq %r13, %r13
je 0x4c9e7
movsd %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2e700
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
callq 0x2eaca
movsd (%rsp), %xmm0
ucomisd 0x8(%rsp), %xmm0
movq %r14, %rcx
cmovbq %rbx, %rcx
cltq
incl (%rcx,%rax,4)
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x4c9ab
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariatetree.c
// Function: find_split_for_partition_multivariate
int find_split_for_partition_multivariate(Instanceptr* instances, Partition p, matrix* w, double*  w0, MULTIVARIATE_TYPE multivariate_type, int* newdim, double variance_explained)
{
 /*!Last Changed 21.09.2004*/
 int result;
 Instanceptr positives = NULL, negatives = NULL;
 divide_instancelist_according_partition(instances, &positives, &negatives, p);
 result = best_multivariate_split_lda_with_pca(positives, negatives, w, w0, multivariate_type, newdim, variance_explained);
 *instances = positives;
 merge_instancelist(instances, negatives);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x30(%rsp), %r13
movq %rax, (%r13)
leaq 0x28(%rsp), %r14
movq %rax, (%r14)
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x70(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rsi
movq %r14, %rdx
callq 0x2ff74
movq (%r13), %rdi
movq (%r14), %rsi
movq %r12, %rdx
movq %r15, %rcx
movl %ebp, %r8d
movq 0x18(%rsp), %r9
movsd 0x20(%rsp), %xmm0
callq 0x4be42
movl %eax, %ebp
movq (%r13), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2fd59
movl %ebp, %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/multivariatetree.c
// Function: find_gain_for_partition_multivariate
double find_gain_for_partition_multivariate(Instanceptr* instances, Partition p, matrix* w, double* w0, MULTIVARIATE_TYPE multivariate_type, int* newdim, double variance_explained)
{
 /*!Last Changed 21.09.2004*/
 if (p.count == 0 || instances == NULL || all_same_side(p))
  {
   *w = identity(1);
   return ISELL;
  }
 if (!find_split_for_partition_multivariate(instances, p, w, w0, multivariate_type, newdim, variance_explained))
   return ISELL;
 return information_gain_for_multivariate_split(*instances, *w, *w0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %rbx
testq %rdi, %rdi
je 0x4cb1b
cmpl $0x0, 0x200(%rsp)
je 0x4cb1b
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r15
leaq 0x1f0(%rsp), %r13
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm1
movups %xmm1, (%rsp)
movsd %xmm0, 0x18(%rsp)
callq 0x543f9
movsd 0x18(%rsp), %xmm0
testl %eax, %eax
je 0x4cb46
movl $0x1, %edi
callq 0x3dc37
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movsd 0x561bc(%rip), %xmm0    # 0xa2cf0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm1
movups %xmm1, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movq %r12, %r8
callq 0x4ca21
testl %eax, %eax
je 0x4cb2c
movq (%r15), %rdi
movsd (%r14), %xmm0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0xe8(%rsp), %r8
leaq 0x20(%rsp), %rbx
movq %rbx, %rcx
callq 0x4c971
movq %rbx, %rdi
callq 0x1d7dc
jmp 0x4cb34
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariatetree.c
// Function: log_likelihood_for_multi_ldt_splits
double log_likelihood_for_multi_ldt_splits(Instanceptr data, matrix w, double w0)
{
 int counts[2][MAXCLASSES];
 double result = 0;
 find_counts_for_multivariate_split(data, w, w0, counts[0], counts[1]);
 result += log_likelihood_for_classification(counts[0]);
 result += log_likelihood_for_classification(counts[1]);
 return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
leaq 0xd8(%rsp), %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rcx
movq %rbx, %r8
callq 0x4c971
movq %r14, %rdi
callq 0x1d726
xorpd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x1d726
addsd 0x8(%rsp), %xmm0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/multivariatetree.c
// Function: create_multildtchildren
int create_multildtchildren(Decisionnodeptr node, Multildt_parameterptr param)
{
 /*!Last Changed 21.09.2004*/
 node->conditiontype = MULTIVARIATE_CONDITION;
 if (!(can_be_divided(node, &(param->c45param))))
   return 1;
 node->lineard = find_best_multi_ldt_split(&(node->instances),&(node->w),&(node->w0), MULTIVARIATE_LINEAR, param->variance_explained);
 if (!(node->lineard))
  {
   matrix_free(node->w);
   make_leaf_node(node);
   return 1;
  }
 node->featureno = LINEAR; 
 if (!(make_multivariate_children(node)))
   return 1;
 create_multildtchildren(node->left, param);
 create_multildtchildren(node->right, param);
 return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movl $0x1, %r12d
movl $0x1, 0x98(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c8e2
testl %eax, %eax
je 0x4cfdb
leaq 0x20(%rbx), %rdi
leaq 0x38(%rbx), %rsi
leaq 0x48(%rbx), %rdx
movsd 0x20(%r14), %xmm0
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
callq 0x4cbee
movl %eax, 0x90(%rbx)
testl %eax, %eax
je 0x4cfc6
movl $0xfffffffe, 0x30(%rbx) # imm = 0xFFFFFFFE
movq %rbx, %rdi
callq 0x4c6b9
testl %eax, %eax
je 0x4cfdb
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x4cf41
movq 0x8(%rbx), %rbx
testb $0x1, %r15b
cmovel %r12d, %ebp
movb $0x1, %r15b
jmp 0x4cf58
movq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rsi
callq 0x3dbad
movq %rbx, %rdi
callq 0x1c39c
testb $0x1, %r15b
movl $0x1, %eax
cmovnel %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/network.c
// Function: table_list
int* table_list(struct node mynode, int pos)
{
	/*!Last Changed 02.02.2004 added safemalloc*/
 int i, *result;
	result = (int *) safemalloc(mynode.parents * sizeof(int), "table_list", 2);
 for (i = mynode.parents - 1; i > -1; i--)
  {
   result[i] = pos % (mynode.parent_counts[i]);
   pos = pos / (mynode.parent_counts[i]);
  }
 return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movslq 0x40(%rsp), %r14
leaq (,%r14,4), %rdi
leaq 0x5a634(%rip), %rsi     # 0xa768c
movl $0x2, %edx
callq 0x390f5
movq %rax, %rcx
testq %r14, %r14
jle 0x4d096
leaq 0x20(%rsp), %rax
movq 0x18(%rax), %rsi
incq %r14
movl %ebx, %eax
cltd
idivl -0x8(%rsi,%r14,4)
movl %edx, -0x8(%rcx,%r14,4)
movl %ebx, %eax
cltd
idivl -0x8(%rsi,%r14,4)
decq %r14
movl %eax, %ebx
cmpq $0x1, %r14
jg 0x4d076
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/network.c
// Function: table_pos
int table_pos(struct node mynode, int *list)
{
 int i, table_index = 0;
 for (i = 0; i < mynode.parents; i++)
   if (i != 0)
     table_index = list[i] + table_index * mynode.parent_counts[i];
   else
     table_index = list[0];
 return table_index;
}

// Assembly:
movslq 0x28(%rsp), %rcx
testq %rcx, %rcx
jle 0x4d0d1
leaq 0x8(%rsp), %rax
movq 0x18(%rax), %rdx
xorl %esi, %esi
xorl %eax, %eax
testq %rsi, %rsi
je 0x4d0c6
imull (%rdx,%rsi,4), %eax
addl (%rdi,%rsi,4), %eax
jmp 0x4d0c8
movl (%rdi), %eax
incq %rsi
cmpq %rsi, %rcx
jne 0x4d0b8
retq
xorl %eax, %eax
retq