LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: k_way_anova_dataset
int k_way_anova_dataset(Datasetptr d, Instanceptr data, char** featurenos, int fcount)
{
 /*!Last Changed 07.05.2004*/
 int* features, i, fdependent, fno;
 fdependent = atoi(featurenos[1]) - 1;
 features = (int *) safemalloc((fcount - 2) * sizeof(int), "k_way_anova_dataset", 3);
 for (i = 2; i < fcount; i++)
  {
   fno = atoi(featurenos[i]) - 1;
   features[i - 2] = fno;
   if (in_list(d->features[fno].type, 3, REAL, INTEGER, REGDEF))
     return 0;
  }
 switch (d->features[fdependent].type)
  {
   case   REGDEF:
   case     REAL:
   case  INTEGER:k_way_anova_dataset_cont(d, data, features, fdependent);
                 break;
   case   STRING:
   case CLASSDEF:k_way_anova_dataset_discrete(d, data, features, fdependent);
                 break;
  }
 safe_free(features);
 return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x8(%rdx), %rdi
callq 0x4200
movl %eax, %ebp
movslq %r13d, %rbx
leaq -0x8(,%rbx,4), %rdi
leaq 0x8eaae(%rip), %rsi     # 0xa3820
movl $0x3, %edx
callq 0x390f5
movq %rax, %r15
cmpl $0x3, %ebx
jl 0x14ddb
movq 0x10(%rsp), %rax
leaq 0x30f08(%rax), %rbx
movl %r13d, %r14d
addq $-0x2, %r14
xorl %r13d, %r13d
movq 0x10(%r12,%r13,8), %rdi
callq 0x4200
decl %eax
movl %eax, (%r15,%r13,4)
cltq
imulq $0x340, %rax, %rax      # imm = 0x340
movl (%rbx,%rax), %edi
movl $0x3, %esi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
jne 0x14e13
incq %r13
cmpq %r13, %r14
jne 0x14d9a
decl %ebp
movslq %ebp, %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movq 0x10(%rsp), %rdi
movl 0x30f08(%rdi,%rax), %eax
cmpl $0x4, %eax
ja 0x14e26
movl $0x15, %ecx
btl %eax, %ecx
jae 0x14e17
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x13b36
jmp 0x14e26
xorl %eax, %eax
jmp 0x14e33
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x1414c
movq %r15, %rdi
callq 0x39194
movl $0x1, %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/dataset.c
// Function: class_entropy
double class_entropy(char* datasetname)
{
 /*!Last Changed 25.03.2004*/
 Datasetptr tmp;
 int i;
 double result = 0, p;
 tmp = search_dataset(Datasets, datasetname);
 if (!tmp)
   return -1;
 for (i = 0; i < tmp->classno; i++)
   if (tmp->classcounts[i] != 0)
    {
     p = tmp->classcounts[i] / ((double)(tmp->datacount));
     result += tmp->classcounts[i] * (-p * log2(p));
    }
 result /= tmp->datacount;
 return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0xbda28(%rip), %rax     # 0xd2878
movq (%rax), %r14
testq %r14, %r14
je 0x14e77
movq %rdi, %rbx
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x4260
testl %eax, %eax
je 0x14e7a
movq 0x1407270(%r14), %r14
testq %r14, %r14
jne 0x14e5b
xorl %r14d, %r14d
testq %r14, %r14
je 0x14eec
cmpl $0x0, 0x10(%r14)
jle 0x14ef6
xorpd %xmm1, %xmm1
xorl %ebx, %ebx
movl 0x1407140(%r14,%rbx,4), %eax
testl %eax, %eax
je 0x14ede
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
movsd %xmm2, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x1407120(%r14), %xmm0
divsd %xmm0, %xmm2
movsd %xmm2, (%rsp)
movapd %xmm2, %xmm0
movsd %xmm1, 0x10(%rsp)
callq 0x38e99
movsd 0x10(%rsp), %xmm1
mulsd (%rsp), %xmm0
mulsd 0x8(%rsp), %xmm0
subsd %xmm0, %xmm1
incq %rbx
movslq 0x10(%r14), %rax
cmpq %rax, %rbx
jl 0x14e8c
jmp 0x14efa
movsd 0x8deb4(%rip), %xmm1    # 0xa2da8
jmp 0x14f0a
xorpd %xmm1, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x1407120(%r14), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: search_dataset
Datasetptr search_dataset(Datasetptr header, char *dataset_name)
{
 Datasetptr dataset = header;
 while (dataset)
  {
   if (!strcmp(dataset->name, dataset_name))
     return dataset;
   dataset = dataset->next;
  }
 return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x14f41
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x4260
testl %eax, %eax
je 0x14f43
movq 0x1407270(%rbx), %rbx
testq %rbx, %rbx
jne 0x14f25
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: average_valuecount
double average_valuecount(Datasetptr d)
{
 /*!Last Changed 01.10.2006*/
 double sum = 0;
 int i, count = 0;
 for (i = 0; i < d->featurecount; i++)
   switch (d->features[i].type)
    {
     case REAL   :
     case INTEGER:sum += 1;
                  count++;
                  break;
     case STRING :sum += d->features[i].valuecount - 1;
                  count++;
                  break;
    }
 return sum/count;
}

// Assembly:
movslq 0x1bc(%rdi), %rax
testq %rax, %rax
jle 0x14fba
imulq $0x340, %rax, %rax      # imm = 0x340
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movsd 0x8d5b1(%rip), %xmm1    # 0xa2520
xorl %edx, %edx
movl 0x30f08(%rdi,%rcx), %esi
cmpl $0x2, %esi
je 0x14f86
cmpl $0x1, %esi
je 0x14f8c
testl %esi, %esi
jne 0x14fa2
addsd %xmm1, %xmm0
jmp 0x14fa0
movl 0x30f20(%rdi,%rcx), %esi
decl %esi
xorps %xmm2, %xmm2
cvtsi2sd %esi, %xmm2
addsd %xmm2, %xmm0
incl %edx
addq $0x340, %rcx            # imm = 0x340
cmpq %rcx, %rax
jne 0x14f71
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
divsd %xmm1, %xmm0
retq
movsd 0x8dd4e(%rip), %xmm0    # 0xa2d10
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: symbolic_features
int* symbolic_features(Datasetptr d, int* count)
{
 /*!Last Changed 12.06.2006*/
 int *result = NULL, i;
 *count = 0;
 for (i = 0; i < d->featurecount; i++)
   if (d->features[i].type == STRING)
    {
     (*count)++;
     result = alloc(result, (*count) * sizeof(int), *count);
     result[(*count) - 1] = i;
    }
 return result;
}

// Assembly:
movl $0x0, (%rsi)
cmpl $0x0, 0x1bc(%rdi)
jle 0x15035
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30f08(%rdi), %r15
xorl %r12d, %r12d
xorl %eax, %eax
cmpl $0x1, (%r15)
jne 0x15013
movslq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movl %edx, (%rbx)
leaq 0x4(,%rcx,4), %rsi
movq %rax, %rdi
callq 0x390c8
movslq (%rbx), %rcx
movl %r12d, -0x4(%rax,%rcx,4)
incq %r12
movslq 0x1bc(%r14), %rcx
addq $0x340, %r15            # imm = 0x340
cmpq %rcx, %r12
jl 0x14fec
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: number_of_symbolic_features
int number_of_symbolic_features(char* datasetname)
{
 /*!Last Changed 25.03.2004*/
 Datasetptr tmp;
 int i, count = 0;
 tmp = search_dataset(Datasets, datasetname);
 if (!tmp)
   return -1;
 for (i = 0; i < tmp->featurecount; i++)
   if (tmp->features[i].type == STRING)
     count++;
 return count;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xbd835(%rip), %rax     # 0xd2878
movq (%rax), %r14
testq %r14, %r14
je 0x1506a
movq %rdi, %rbx
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x4260
testl %eax, %eax
je 0x1506d
movq 0x1407270(%r14), %r14
testq %r14, %r14
jne 0x1504e
xorl %r14d, %r14d
testq %r14, %r14
je 0x150a8
movslq 0x1bc(%r14), %rax
testq %rax, %rax
jle 0x150af
imulq $0x340, %rax, %rcx      # imm = 0x340
xorl %edx, %edx
xorl %eax, %eax
xorl %esi, %esi
cmpl $0x1, 0x30f08(%r14,%rdx)
sete %sil
addl %esi, %eax
addq $0x340, %rdx            # imm = 0x340
cmpq %rdx, %rcx
jne 0x15089
jmp 0x150b1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x150b1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: numeric_features
int* numeric_features(Datasetptr d, int* count)
{
 /*!Last Changed 12.06.2006*/
 int i, *result = NULL;
 *count = 0;
 for (i = 0; i < d->featurecount; i++)
   if (in_list(d->features[i].type, 2, REAL, INTEGER))
    {
     result = alloc(result, (*count + 1) * sizeof(int), *count + 1);
     result[*count] = i;
     (*count)++;
    }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%rsi)
cmpl $0x0, 0x1bc(%rdi)
jle 0x15139
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30f08(%rdi), %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
movl (%r12), %edi
movl $0x2, %esi
movl $0x2, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x15121
movslq (%rbx), %rdx
leaq 0x4(,%rdx,4), %rsi
incq %rdx
movq %r15, %rdi
callq 0x390c8
movq %rax, %r15
movslq (%rbx), %rax
movl %r13d, (%r15,%rax,4)
incl (%rbx)
incq %r13
movslq 0x1bc(%r14), %rax
addq $0x340, %r12            # imm = 0x340
cmpq %rax, %r13
jl 0x150e4
jmp 0x1513c
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: number_of_numeric_features
int number_of_numeric_features(char * datasetname)
{
 /*!Last Changed 25.03.2004*/
 Datasetptr tmp;
 int i, count = 0;
 tmp = search_dataset(Datasets, datasetname);
 if (!tmp)
   return -1;
 for (i = 0; i < tmp->featurecount; i++)
   if (in_list(tmp->features[i].type, 2, REAL, INTEGER))
     count++;
 return count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xbd720(%rip), %rax     # 0xd2878
movq (%rax), %r14
testq %r14, %r14
je 0x1517f
movq %rdi, %rbx
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x4260
testl %eax, %eax
je 0x15182
movq 0x1407270(%r14), %r14
testq %r14, %r14
jne 0x15163
xorl %r14d, %r14d
testq %r14, %r14
je 0x151d1
cmpl $0x0, 0x1bc(%r14)
jle 0x151d8
leaq 0x30f08(%r14), %r15
xorl %r12d, %r12d
xorl %ebx, %ebx
movl (%r15), %edi
movl $0x2, %esi
movl $0x2, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x39a80
cmpl $0x1, %eax
sbbl $-0x1, %ebx
incq %r12
movslq 0x1bc(%r14), %rax
addq $0x340, %r15            # imm = 0x340
cmpq %rax, %r12
jl 0x1519d
jmp 0x151da
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x151da
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: generate_random_data
Instanceptr generate_random_data(Datasetptr d, int datasize)
{
 /*!Last Changed 24.09.2006 added string type*/
 /*!Last Changed 09.03.2006*/
 Instanceptr tmp, head = NULL, tmpbefore = NULL;
 double value;
 int i, j;
 for (i = 0; i < datasize; i++)
  {
   tmp = empty_instance(d->featurecount);
   for (j = 0; j < d->featurecount - 1; j++)
     switch (d->features[j].type)
      {
       case REAL  :tmp->values[j].floatvalue = produce_random_value(-1, 1);
                   break;
       case STRING:tmp->values[j].stringindex = myrand() % d->features[j].valuecount;
                   break;
      }
   value = produce_random_value(-1, 1);
   if (value < 0)
     tmp->values[d->featurecount - 1].stringindex = 0;
   else
     tmp->values[d->featurecount - 1].stringindex = 1;
   if (tmpbefore)
     tmpbefore->next = tmp;
   else
     head = tmp;
   tmpbefore = tmp;
  }
 return head;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, 0x4(%rsp)
testl %esi, %esi
jle 0x152eb
movq %rdi, %r14
leaq 0x30f20(%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
xorl %ecx, %ecx
xorl %r12d, %r12d
movq %rcx, 0x10(%rsp)
movl 0x1bc(%r14), %edi
callq 0x152fc
movq %rax, %r15
cmpl $0x2, 0x1bc(%r14)
jl 0x15295
movq 0x8(%rsp), %rbx
xorl %r13d, %r13d
movl -0x18(%rbx), %eax
cmpl $0x1, %eax
je 0x1526b
cmpl $0x2, %eax
jne 0x1527c
movsd 0x8db55(%rip), %xmm0    # 0xa2da8
movsd 0x8d2c5(%rip), %xmm1    # 0xa2520
callq 0x39f62
movq (%r15), %rax
movsd %xmm0, (%rax,%r13,8)
jmp 0x1527c
xorl %eax, %eax
callq 0x39f18
cltd
idivl (%rbx)
movq (%r15), %rax
movl %edx, (%rax,%r13,8)
incq %r13
movslq 0x1bc(%r14), %rax
decq %rax
addq $0x340, %rbx            # imm = 0x340
cmpq %rax, %r13
jl 0x1523e
movsd 0x8db0b(%rip), %xmm0    # 0xa2da8
movsd 0x8d27b(%rip), %xmm1    # 0xa2520
callq 0x39f62
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
setbe %al
movq (%r15), %rcx
movslq 0x1bc(%r14), %rdx
movl %eax, -0x8(%rcx,%rdx,8)
movq %r15, %rax
testq %r12, %r12
je 0x152d7
movq %r15, 0x10(%r12)
movq 0x10(%rsp), %rax
incl %ebp
movq %rax, %rcx
movq %r15, %r12
cmpl 0x4(%rsp), %ebp
jne 0x15218
jmp 0x152ed
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/dataset.c
// Function: empty_instance
Instanceptr empty_instance(int fcount)
{
 /*!Last Changed 07.01.2007 added sublist*/
 /*!Last Changed 26.11.2005 removed unused dataset parameter*/
 /*!Last Changed 24.03.2005*/
 Instanceptr currentinstance;
 currentinstance = (Instanceptr)safemalloc(sizeof(Instance), "empty_instance", 2);
 currentinstance->values = (union value*) safemalloc(fcount * sizeof(union value), "empty_instance", 3);
 currentinstance->isexception = NO;
 currentinstance->next = NULL;
 currentinstance->sublist = NULL;
 currentinstance->class_labels = NULL;
 return currentinstance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x8ee0c(%rip), %r14     # 0xa4116
movl $0x30, %edi
movq %r14, %rsi
movl $0x2, %edx
callq 0x390f5
movq %rax, %r15
movslq %ebx, %rdi
shlq $0x3, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq 0x390f5
movq %rax, (%r15)
movl $0x0, 0x20(%r15)
movq $0x0, 0x28(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: empty_dataset
Datasetptr empty_dataset(char* datasetname, char* directoryname, char* filename, char separator)
{
 /*!Last Changed 24.12.2006*/
 Datasetptr tmp;
 tmp = safemalloc(sizeof(Dataset), "create_dataset", 12);
 tmp->name = strcopy(tmp->name, datasetname);
 tmp->directory = strcopy(tmp->directory, directoryname);
 tmp->file = strcopy(tmp->file, filename);
 tmp->separator = separator;
 tmp->active = 1;
 tmp->dsnname = NULL;
 tmp->tablename = NULL;
 tmp->storetype = STORE_TEXT;
 tmp->kernel = NULL;
 tmp->next = NULL;
 tmp->sigma = 0.0;
 return tmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x8e895(%rip), %rsi     # 0xa3e09
movl $0x1407278, %edi        # imm = 0x1407278
movl $0xc, %edx
callq 0x390f5
movq %rax, %r14
movq 0x8(%rax), %rdi
movq %r13, %rsi
callq 0x3a404
movq %rax, 0x8(%r14)
movq 0x1407118(%r14), %rdi
movq %r12, %rsi
callq 0x3a404
movq %rax, 0x1407118(%r14)
movq 0x1b0(%r14), %rdi
movq %r15, %rsi
callq 0x3a404
movq %rax, 0x1b0(%r14)
movb %bl, 0x1a8(%r14)
movl $0x1, (%r14)
movl $0x0, 0x140713c(%r14)
xorl %eax, %eax
movq %rax, 0x1407210(%r14)
movq %rax, 0x1407270(%r14)
movq %rax, 0x1407130(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x1407108(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: discretization_equalwidth
double* discretization_equalwidth(Datasetptr original, int fno, int valuecount)
{
 int i;
 double* splits, max, min;
 splits = safemalloc((valuecount - 1) * sizeof(double), "discretization_equalwidth", 1);
 switch (original->features[fno].type)
  {
   case INTEGER:min = original->features[fno].min.intvalue;
                max = original->features[fno].max.intvalue;
                break;
   case    REAL:min = original->features[fno].min.floatvalue;
                max = original->features[fno].max.floatvalue;
                break;
  }
 for (i = 0; i < valuecount - 1; i++)
   splits[i] = min + (i + 1) * ((max - min) / valuecount);
 return splits;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movslq %edx, %rax
leaq -0x8(,%rax,8), %rdi
leaq 0x8e047(%rip), %rsi     # 0xa3882
movl $0x1, %edx
callq 0x390f5
movslq %ebp, %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %r14, %rcx
addq $0x30f08, %rcx          # imm = 0x30F08
movl (%rcx), %edx
cmpl $0x2, %edx
je 0x15876
testl %edx, %edx
jne 0x15880
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rcx), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x10(%rcx), %xmm1
jmp 0x15880
movsd 0x8(%rcx), %xmm0
movsd 0x10(%rcx), %xmm1
cmpl $0x2, %ebx
jl 0x158b7
subsd %xmm0, %xmm1
cvtsi2sd %ebx, %xmm2
decl %ebx
divsd %xmm2, %xmm1
movl %ebx, %ecx
xorl %edx, %edx
leaq 0x1(%rdx), %rsi
xorps %xmm2, %xmm2
cvtsi2sd %esi, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, (%rax,%rdx,8)
movq %rsi, %rdx
cmpq %rsi, %rcx
jne 0x15897
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: kernel_file_name
char* kernel_file_name(Datasetptr dataset)
{
 char *fname;
 fname = (char *)safemalloc(200, "kernel_file_name", 2);
 if (get_parameter_l("currentos"))
   sprintf(fname, "%s/%s/%s", datadir, dataset->directory, dataset->kernelfiles[get_parameter_i("kernelindex")]);
 else
   sprintf(fname, "%s\\%s\\%s", datadir, dataset->directory, dataset->kernelfiles[get_parameter_i("kernelindex")]);
 return fname;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x8d538(%rip), %rsi     # 0xa421d
movl $0xc8, %edi
movl $0x2, %edx
callq 0x390f5
movq %rax, %rbx
leaq 0x8d4be(%rip), %rdi     # 0xa41bc
callq 0x535f7
movl %eax, %ebp
leaq 0xbbb74(%rip), %rax     # 0xd2880
movq (%rax), %r15
movq 0x1407118(%r14), %r12
leaq 0x8d511(%rip), %rdi     # 0xa422e
callq 0x5341c
testl %ebp, %ebp
cltq
movq 0x1407218(%r14,%rax,8), %r8
leaq 0x8d4df(%rip), %rax     # 0xa4214
leaq 0x8d4cf(%rip), %rsi     # 0xa420b
cmoveq %rax, %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x41b0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: delete_dataset
void delete_dataset(char *dataset_name)
{
 Datasetptr previous = NULL, dataset = Datasets;
 while (dataset)
  {
   if (!strcmp(dataset->name, dataset_name))
    {
     if (previous)
       previous->next = dataset->next;
     else
       Datasets = dataset->next;
     free_dataset(dataset);
     break;
    }
   previous = dataset;
   dataset = dataset->next;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xbb7c9(%rip), %r15     # 0xd2878
movq (%r15), %rbx
testq %rbx, %rbx
je 0x170f2
movq %rdi, %r14
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x4260
testl %eax, %eax
je 0x170fe
movq %rbx, %r12
movq 0x1407270(%r12), %rbx
testq %rbx, %rbx
je 0x170f2
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x4260
movq %r12, %rcx
movq %rbx, %r12
testl %eax, %eax
jne 0x170cd
jmp 0x17100
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %ecx, %ecx
movq 0x1407270(%rbx), %rax
testq %rcx, %rcx
je 0x17116
addq $0x1407270, %rcx        # imm = 0x1407270
movq %rcx, %r15
movq %rax, (%r15)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x13765
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: type_change
void type_change(Datasetptr d)
{
/*!Last Changed 19.03.2002*/
 int i;
 for (i = 0; i < d->featurecount; i++)
  {
   d->features[i].oldtype = d->features[i].type;
   if (d->features[i].type == INTEGER)
     d->features[i].type = REAL;
  }
}

// Assembly:
movslq 0x1bc(%rdi), %rax
testq %rax, %rax
jle 0x1826a
imulq $0x340, %rax, %rax      # imm = 0x340
xorl %ecx, %ecx
movl 0x30f08(%rdi,%rcx), %edx
movl %edx, 0x30f0c(%rdi,%rcx)
testl %edx, %edx
jne 0x1825e
movl $0x2, 0x30f08(%rdi,%rcx)
addq $0x340, %rcx            # imm = 0x340
cmpq %rcx, %rax
jne 0x18241
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: print_datasets
void print_datasets(Datasetptr header, DATASET_TYPE printwhat)
{
 int i=1;
 Datasetptr dataset=header;
 if (!dataset)
  {
   printf(m1056);
   return;
  }
 printf("|Dataset Name      |# of Classes|# of Features|# of Instances|Base Error|\n");
 while (dataset)
  {
   if (printwhat == ALL || (printwhat == CLASSIFICATION_DATASETS && dataset->classno > 0) || (printwhat == REGRESSION_DATASETS && dataset->classno == 0) || (printwhat == TWOCLASS_DATASETS && dataset->classno == 2) || (printwhat == KCLASS_DATASETS && dataset->classno > 2) || (printwhat == DISCRETE_DATASETS && number_of_symbolic_features(dataset->name) == dataset->featurecount - 1) || (printwhat == CONTINUOUS_DATASETS && number_of_numeric_features(dataset->name) == dataset->featurecount - 1) || (printwhat == MIXED_DATASETS && number_of_numeric_features(dataset->name) != dataset->featurecount - 1 && number_of_symbolic_features(dataset->name) != dataset->featurecount - 1))
    {
     printf("|%18s|%12d|%13d|%14d|%10.2f|\n", dataset->name, dataset->classno, dataset->featurecount, dataset->datacount, dataset->baseerror);
     i++;  
    }
   dataset=dataset->next;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1843d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8c465(%rip), %rdi     # 0xa4723
callq 0x4090
movl %ebx, %r12d
leaq 0x8b1d7(%rip), %r13     # 0xa34a4
leaq 0x8be24(%rip), %r15     # 0xa40f8
leal -0x2(%rbx), %eax
movq %rax, (%rsp)
leal -0x3(%rbx), %eax
movq %rax, 0x10(%rsp)
leal -0x4(%rbx), %eax
movq %rax, 0x8(%rsp)
cmpl $0x7, %ebx
ja 0x1841e
movslq (%r13,%r12,4), %rax
addq %r13, %rax
jmpq *%rax
cmpl $0x0, 0x10(%r14)
jg 0x183f5
cmpl $0x5, (%rsp)
ja 0x1841e
movq (%rsp), %rax
leaq 0x8b1a6(%rip), %rcx     # 0xa34c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x10(%r14)
je 0x183f5
cmpl $0x4, 0x10(%rsp)
ja 0x1841e
movq 0x10(%rsp), %rax
leaq 0x8b193(%rip), %rcx     # 0xa34dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x2, 0x10(%r14)
je 0x183f5
cmpl $0x3, 0x8(%rsp)
ja 0x1841e
movq 0x8(%rsp), %rax
leaq 0x8b17c(%rip), %rcx     # 0xa34f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x2, 0x10(%r14)
jg 0x183f5
cmpl $0x7, %ebx
je 0x183d2
cmpl $0x6, %ebx
je 0x183b7
cmpl $0x5, %ebx
jne 0x1841e
movq 0x8(%r14), %rdi
callq 0x15038
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
je 0x183f5
cmpl $0x7, %ebx
je 0x183d2
cmpl $0x6, %ebx
jne 0x1841e
movq 0x8(%r14), %rdi
callq 0x15149
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
je 0x183f5
cmpl $0x7, %ebx
jne 0x1841e
movq 0x8(%r14), %rdi
callq 0x15149
movl 0x1bc(%r14), %ebp
decl %ebp
cmpl %ebp, %eax
je 0x1841e
movq 0x8(%r14), %rdi
callq 0x15038
cmpl %ebp, %eax
je 0x1841e
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movl 0x1bc(%r14), %ecx
movl 0x1407120(%r14), %r8d
movsd 0x1407208(%r14), %xmm0
movq %r15, %rdi
movb $0x1, %al
callq 0x4030
movq 0x1407270(%r14), %r14
testq %r14, %r14
jne 0x182eb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8c2c9(%rip), %rdi     # 0xa470d
jmp 0x4090
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: print_cmu_data_header
void print_cmu_data_header(FILE* outfile, Datasetptr d)
{
 /*!Last Changed 02.05.2007 added regression*/
 /*!Last Changed 21.04.2007*/
 int i;
 fprintf(outfile, "$SETUP\n\n");
 fprintf(outfile, "PROTOCOL:  IO;\n");
 fprintf(outfile, "OFFSET:     0;\n");
 fprintf(outfile, "INPUTS:     %d;\n", d->multifeaturecount - 1);
 if (d->classno != 0)
   fprintf(outfile, "OUTPUTS:    %d;\n\n", d->classno);
 else
   fprintf(outfile, "OUTPUTS:    1;\n\n");
 for (i = 0; i < d->multifeaturecount - 1; i++)
   fprintf(outfile, "IN [%d]: CONT;\n", i + 1);
 fprintf(outfile, "\n");
 if (d->classno != 0)
   for (i = 0; i < d->classno; i++)
     fprintf(outfile, "OUT [%d]: BINARY;\n", i + 1);
 else
   fprintf(outfile, "OUT [1]: CONT;\n");
 fprintf(outfile, "\n\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8b1c5(%rip), %rdi     # 0xa42ca
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x8b1b5(%rip), %rdi     # 0xa42d3
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x8b1ac(%rip), %rdi     # 0xa42e3
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
movl 0x1c0(%r14), %edx
decl %edx
leaq 0x8b19a(%rip), %rsi     # 0xa42f3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
movl 0x10(%r14), %edx
testl %edx, %edx
je 0x1917e
leaq 0x8b192(%rip), %rsi     # 0xa4304
movq %rbx, %rdi
xorl %eax, %eax
callq 0x42e0
jmp 0x19197
leaq 0x8b191(%rip), %rdi     # 0xa4316
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
cmpl $0x2, 0x1c0(%r14)
jl 0x191c8
leaq 0x8b17f(%rip), %r15     # 0xa4327
xorl %ebp, %ebp
incl %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
movl 0x1c0(%r14), %eax
decl %eax
cmpl %eax, %ebp
jl 0x191aa
movl $0xa, %edi
movq %rbx, %rsi
callq 0x4150
cmpl $0x0, 0x10(%r14)
je 0x19205
cmpl $0x0, 0x10(%r14)
jle 0x1921e
leaq 0x8b14d(%rip), %r15     # 0xa4337
xorl %ebp, %ebp
incl %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x42e0
cmpl 0x10(%r14), %ebp
jl 0x191ec
jmp 0x1921e
leaq 0x8b13e(%rip), %rdi     # 0xa434a
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x8b0ff(%rip), %rdi     # 0xa4324
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x42c0
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: graph_connected
BOOLEAN graph_connected(matrix distancematrix)
{
 int i, j;
 for (i = 0; i < distancematrix.row; i++)
   for (j = i + 1; j < distancematrix.col; j++)
     if (distancematrix.values[i][j] == +LONG_MAX)
       return BOOLEAN_FALSE;
 return BOOLEAN_TRUE;
}

// Assembly:
movl $0x1, %eax
testl %edi, %edi
jle 0x1acd1
movq %rdi, %rcx
shrq $0x20, %rcx
movq %rdi, %rdx
sarq $0x20, %rdx
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %r8d, %r8d
movsd 0x8869c(%rip), %xmm0    # 0xa3330
xorl %r9d, %r9d
movq %r9, %r10
incq %r9
cmpq %rdx, %r9
jge 0x1acc5
movq (%rsi,%r10,8), %r10
addq %r8, %r10
movl $0x1, %r11d
movsd (%r10,%r11,8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1acbd
jnp 0x1acd2
incq %r11
cmpq %r11, %rcx
jne 0x1acaf
addq $0x8, %r8
decq %rcx
cmpq %rdi, %r9
jne 0x1ac97
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: simple_dfs
void simple_dfs(matrix adjacencymatrix, BOOLEAN* discovered, int v)
{
 /*!Last Changed 04.04.2008*/
 int i;
 discovered[v] = BOOLEAN_TRUE;
 for (i = 0; i < adjacencymatrix.row; i++)
   if (discovered[i] == BOOLEAN_FALSE && adjacencymatrix.values[v][i] == BOOLEAN_TRUE)
     simple_dfs(adjacencymatrix, discovered, i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movslq %ecx, %r13
movl $0x1, (%rdx,%r13,4)
testl %r15d, %r15d
jle 0x1ad3b
movq %rdx, %rbx
movq %rsi, %r14
movl %r15d, %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r12d, %r12d
cmpl $0x0, (%rbx,%r12,4)
jne 0x1ad33
movq (%r14,%r13,8), %rax
movsd (%rax,%r12,8), %xmm0
ucomisd 0x87802(%rip), %xmm0    # 0xa2520
jne 0x1ad33
jp 0x1ad33
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x1acd5
incq %r12
cmpq %r12, %rbp
jne 0x1ad05
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/datastructure.c
// Function: is_graph_connected
int is_graph_connected(matrix adjacencymatrix)
{
 /*!Last Changed 04.04.2008*/
 int i; 
 BOOLEAN* discovered = safemalloc(adjacencymatrix.row * sizeof(BOOLEAN), "is_graph_connected", 1);
 BOOLEAN connected = BOOLEAN_TRUE;
 simple_dfs(adjacencymatrix, discovered, 0);
 for (i = 0; i < adjacencymatrix.row; i++)
   if (!discovered[i])
    {
     connected = BOOLEAN_FALSE;
     break;
    } 
 safe_free(discovered);
 return connected;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r14
movslq %r14d, %r13
leaq (,%r13,4), %rdi
leaq 0x89a35(%rip), %rsi     # 0xa47a0
movl $0x1, %ebx
movl $0x1, %edx
callq 0x390f5
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x1acd5
testl %r13d, %r13d
jle 0x1adae
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %eax, %eax
cmpl $0x0, (%r15,%rax,4)
je 0x1adac
incq %rax
cmpq %rax, %r14
jne 0x1ad9b
jmp 0x1adae
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x39194
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: floyds_all_pairs_shortest_path_algorithm
void floyds_all_pairs_shortest_path_algorithm(matrix* distancematrix)
{
 int i, j, k, N = distancematrix->row;
 for (k = 0; k < N; k++)
   for (i = 0; i < N; i++)
     for (j = 0; j < N; j++)
       if (distancematrix->values[i][j] > distancematrix->values[i][k] + distancematrix->values[k][j])
         distancematrix->values[i][j] = distancematrix->values[i][k] + distancematrix->values[k][j];
}

// Assembly:
movslq (%rdi), %rax
testq %rax, %rax
jle 0x1ae13
movq 0x8(%rdi), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
xorl %edi, %edi
movq (%rcx,%rdi,8), %r8
xorl %r9d, %r9d
movsd (%r8,%r9,8), %xmm1
movsd (%r8,%rdx,8), %xmm0
addsd (%rsi,%r9,8), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x1adfb
movsd %xmm0, (%r8,%r9,8)
incq %r9
cmpq %r9, %rax
jne 0x1addd
incq %rdi
cmpq %rax, %rdi
jne 0x1add6
incq %rdx
cmpq %rax, %rdx
jne 0x1add0
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: graph
Graphptr graph(int vertexcount)
{
 int i;
 Graphptr g;
 g = malloc(sizeof(Graph));
 g->nedges = 0;
 g->nvertices = vertexcount;
 for (i = 0; i < vertexcount; i++)
  {
   g->visitorder[i] = 0;
   g->height[i] = 0;
   g->degree[i] = 0;
  }
 return g;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0xf46288, %edi         # imm = 0xF46288
callq 0x40e0
movl $0x0, 0xf46284(%rax)
movl %ebx, 0xf46280(%rax)
testl %ebx, %ebx
jle 0x1ae58
movl %ebx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl %edx, 0xf433a0(%rax,%rsi,4)
movl %edx, 0xf44340(%rax,%rsi,4)
movl %edx, 0xf42400(%rax,%rsi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x1ae3b
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: print_graph
void print_graph(Graphptr g)
{
 int i, j;
 for (i = 0; i < g->nvertices; i++)
   for (j = 0; j < g->degree[i]; j++)
     printf("%d -> %d (%.2f)\n", i, g->edges[i][j].v, g->edges[i][j].weight);
}

// Assembly:
cmpl $0x0, 0xf46280(%rdi)
jle 0x1aede
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r12
xorl %r14d, %r14d
leaq 0x89934(%rip), %r15     # 0xa47b3
cmpl $0x0, 0xf42400(%rbx,%r14,4)
jle 0x1aeba
movq %r12, %r13
xorl %ebp, %ebp
movl -0x8(%r13), %edx
movsd (%r13), %xmm0
movq %r15, %rdi
movl %r14d, %esi
movb $0x1, %al
callq 0x4030
incq %rbp
movslq 0xf42400(%rbx,%r14,4), %rax
addq $0x10, %r13
cmpq %rax, %rbp
jl 0x1ae8f
incq %r14
movslq 0xf46280(%rbx), %rax
addq $0x3e80, %r12           # imm = 0x3E80
cmpq %rax, %r14
jl 0x1ae7f
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/datastructure.c
// Function: graph_insert_edge
void graph_insert_edge(Graphptr g, int x, int y, double weight)
{
 if (g->degree[x] >= MAXDEGREE - 1)
  {
   printf(m1443, x, y);
   return;
  }
 g->edges[x][g->degree[x]].v = y;
 g->edges[x][g->degree[x]].weight = weight;
 g->degree[x]++;
 g->nedges++;
}

// Assembly:
movslq %esi, %rax
movslq 0xf42400(%rdi,%rax,4), %rcx
cmpq $0x3e7, %rcx            # imm = 0x3E7
jl 0x1af01
leaq 0x898ca(%rip), %rdi     # 0xa47c4
xorl %eax, %eax
jmp 0x4030
imulq $0x3e80, %rax, %rsi     # imm = 0x3E80
addq %rdi, %rsi
shlq $0x4, %rcx
movl %edx, (%rcx,%rsi)
movslq 0xf42400(%rdi,%rax,4), %rcx
leal 0x1(%rcx), %edx
shlq $0x4, %rcx
movsd %xmm0, 0x8(%rcx,%rsi)
movl %edx, 0xf42400(%rdi,%rax,4)
incl 0xf46284(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: compute_indegrees
void compute_indegrees(Graphptr g, int* in)
{
 int i, j;
 for (i = 0; i < g->nvertices; i++)
   in[i] = 0;
 for (i = 0; i < g->nvertices; i++)
   for (j = 0; j < g->degree[i]; j++)
     in[g->edges[i][j].v]++;
}

// Assembly:
cmpl $0x0, 0xf46280(%rdi)
jle 0x1af56
xorl %eax, %eax
movl $0x0, (%rsi,%rax,4)
incq %rax
movslq 0xf46280(%rdi), %rcx
cmpq %rcx, %rax
jl 0x1af40
cmpl $0x0, 0xf46280(%rdi)
jle 0x1afa5
xorl %eax, %eax
movq %rdi, %rcx
cmpl $0x0, 0xf42400(%rdi,%rax,4)
jle 0x1af8f
movq %rcx, %rdx
xorl %r8d, %r8d
movslq (%rdx), %r9
incl (%rsi,%r9,4)
incq %r8
movslq 0xf42400(%rdi,%rax,4), %r9
addq $0x10, %rdx
cmpq %r9, %r8
jl 0x1af74
incq %rax
movslq 0xf46280(%rdi), %rdx
addq $0x3e80, %rcx           # imm = 0x3E80
cmpq %rdx, %rax
jl 0x1af64
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: minimum_spanning_tree_prim
Graphptr minimum_spanning_tree_prim(Graphptr g)
{
 int i, v, w;
 int intree[MAXV];
 double distance[MAXV], weight, dist;
 int parent[MAXV];
 Graphptr mst = graph(g->nvertices);
 for (i = 0; i < g->nvertices; i++)
  {
   intree[i] = BOOLEAN_FALSE;
   distance[i] = +LONG_MAX;
   parent[i] = -1;
  }
 distance[0] = 0;
 v = 0;
 while (!intree[v])
  {
   intree[v] = BOOLEAN_TRUE;
   for (i = 0; i < g->degree[v]; i++)
    {
     w = g->edges[v][i].v;
     weight = g->edges[v][i].weight;
     if (distance[w] > weight && !intree[w])
      {
       distance[w] = weight;
       parent[w] = v;
      }
    }
   v = 0;
   dist = +LONG_MAX;
   for (i = 1; i < g->nvertices; i++)
     if (!intree[i] && dist > distance[i])
      {
       dist = distance[i];
       v = i;
      }
  }
 for (i = 1; i < g->nvertices; i++)
   if (parent[i] != -1)
    {
     graph_insert_edge(mst, parent[i], i, 1);
     graph_insert_edge(mst, i, parent[i], 1);
    }
 return mst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e88, %rsp           # imm = 0x3E88
movq %rdi, %rbx
movl 0xf46280(%rdi), %edi
callq 0x1ae14
movq %rax, %r14
movslq 0xf46280(%rbx), %r12
testq %r12, %r12
jle 0x1b01b
leaq (,%r12,4), %r15
movq %rsp, %rdi
xorl %r13d, %r13d
xorl %esi, %esi
movq %r15, %rdx
callq 0x4050
leaq 0xfa0(%rsp), %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x4050
movabsq $0x43e0000000000000, %rax # imm = 0x43E0000000000000
movq %rax, 0x1f40(%rsp,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x1b00b
movq $0x0, 0x1f40(%rsp)
cmpl $0x0, (%rsp)
jne 0x1b0e9
movl %r12d, %eax
leaq 0x8(%rbx), %rcx
xorl %edi, %edi
movsd 0x882ee(%rip), %xmm0    # 0xa3330
xorl %edx, %edx
movl $0x1, (%rsp,%rdi,4)
movslq 0xf42400(%rbx,%rdi,4), %rsi
testq %rsi, %rsi
jle 0x1b0a6
imulq $0x3e80, %rdi, %rdi     # imm = 0x3E80
addq %rcx, %rdi
shlq $0x4, %rsi
xorl %r8d, %r8d
movslq -0x8(%rdi,%r8), %r9
movsd (%rdi,%r8), %xmm1
movsd 0x1f40(%rsp,%r9,8), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x1b09d
cmpl $0x0, (%rsp,%r9,4)
jne 0x1b09d
movsd %xmm1, 0x1f40(%rsp,%r9,8)
movl %edx, 0xfa0(%rsp,%r9,4)
addq $0x10, %r8
cmpq %r8, %rsi
jne 0x1b069
xorl %edx, %edx
cmpl $0x2, %r12d
jl 0x1b0dc
xorl %edx, %edx
movl $0x1, %esi
movapd %xmm0, %xmm1
cmpl $0x0, (%rsp,%rsi,4)
jne 0x1b0d4
movsd 0x1f40(%rsp,%rsi,8), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x1b0d4
movl %esi, %edx
movapd %xmm2, %xmm1
incq %rsi
cmpq %rsi, %rax
jne 0x1b0b9
movslq %edx, %rdi
cmpl $0x0, (%rsp,%rdi,4)
je 0x1b044
cmpl $0x2, 0xf46280(%rbx)
jl 0x1b13e
movl $0x1, %r15d
movl 0xfa0(%rsp,%r15,4), %ebp
cmpl $-0x1, %ebp
je 0x1b12f
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movsd 0x8740b(%rip), %xmm0    # 0xa2520
callq 0x1aedf
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movsd 0x873f6(%rip), %xmm0    # 0xa2520
callq 0x1aedf
incq %r15
movslq 0xf46280(%rbx), %rax
cmpq %rax, %r15
jl 0x1b0f8
movq %r14, %rax
addq $0x3e88, %rsp           # imm = 0x3E88
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: shortest_path
double* shortest_path(Graphptr g, int start)
{
 int i, v, w;
 int intree[MAXV];
 double* distance, weight, dist;
 distance = safemalloc(g->nvertices * sizeof(double), "shortest_path", 3);
 for (i = 0; i < g->nvertices; i++)
  {
   intree[i] = BOOLEAN_FALSE;
   distance[i] = +LONG_MAX;
  }
 distance[start] = 0;
 v = start;
 g->parents[v] = -1;
 while (!intree[v])
  {
   intree[v] = BOOLEAN_TRUE;
   for (i = 0; i < g->degree[v]; i++)
    {
     w = g->edges[v][i].v;
     weight = g->edges[v][i].weight;
     if (distance[w] > distance[v] + weight)
      {
       distance[w] = distance[v] + weight;
       g->parents[w] = v;
      }
    }
   v = 0;
   dist = +LONG_MAX;
   for (i = 1; i < g->nvertices; i++)
     if (!intree[i] && dist > distance[i])
      {
       dist = distance[i];
       v = i;
      }
  }
 return distance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xfa0, %rsp            # imm = 0xFA0
movl %esi, %ebp
movq %rdi, %rbx
movslq 0xf46280(%rdi), %rdi
shlq $0x3, %rdi
leaq 0x89680(%rip), %rsi     # 0xa47f9
movl $0x3, %edx
callq 0x390f5
movq %rax, %r14
movslq 0xf46280(%rbx), %r15
testq %r15, %r15
jle 0x1b1bd
leaq (,%r15,4), %rdx
movq %rsp, %rdi
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x4050
movabsq $0x43e0000000000000, %rax # imm = 0x43E0000000000000
movq %rax, (%r14,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x1b1b1
movslq %ebp, %rcx
movq $0x0, (%r14,%rcx,8)
movl $0xffffffff, 0xf452e0(%rbx,%rcx,4) # imm = 0xFFFFFFFF
cmpl $0x0, (%rsp,%rcx,4)
jne 0x1b288
leaq 0x8(%rbx), %rax
movsd 0x88147(%rip), %xmm0    # 0xa3330
movl $0x1, (%rsp,%rcx,4)
cmpl $0x0, 0xf42400(%rbx,%rcx,4)
jle 0x1b241
imulq $0x3e80, %rcx, %rdx     # imm = 0x3E80
addq %rax, %rdx
xorl %esi, %esi
movslq -0x8(%rdx), %rdi
movsd (%rdx), %xmm1
movsd (%r14,%rdi,8), %xmm2
addsd (%r14,%rcx,8), %xmm1
ucomisd %xmm1, %xmm2
jbe 0x1b22d
movsd %xmm1, (%r14,%rdi,8)
movl %ebp, 0xf452e0(%rbx,%rdi,4)
incq %rsi
movslq 0xf42400(%rbx,%rcx,4), %rdi
addq $0x10, %rdx
cmpq %rdi, %rsi
jl 0x1b206
movslq 0xf46280(%rbx), %rcx
xorl %ebp, %ebp
cmpq $0x2, %rcx
jl 0x1b27b
xorl %ebp, %ebp
movl $0x1, %edx
movapd %xmm0, %xmm1
cmpl $0x0, (%rsp,%rdx,4)
jne 0x1b273
movsd (%r14,%rdx,8), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x1b273
movl %edx, %ebp
movapd %xmm2, %xmm1
incq %rdx
cmpq %rdx, %rcx
jne 0x1b25b
movslq %ebp, %rcx
cmpl $0x0, (%rsp,%rcx,4)
je 0x1b1e9
movq %r14, %rax
addq $0xfa0, %rsp            # imm = 0xFA0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: eccentricity
int eccentricity(Graphptr g, int node)
{
 int i, eccentricity = 0;
 double* path_lengths = shortest_path(g, node);
 for (i = 0; i < g->nvertices; i++)
   if (path_lengths[i] > eccentricity)
     eccentricity = path_lengths[i];
 safe_free(path_lengths);
 return eccentricity;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1b153
movslq 0xf46280(%rbx), %rcx
testq %rcx, %rcx
jle 0x1b2d5
xorl %edx, %edx
xorl %ebx, %ebx
movsd (%rax,%rdx,8), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
ucomisd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
cmoval %esi, %ebx
incq %rdx
cmpq %rdx, %rcx
jne 0x1b2b4
jmp 0x1b2d7
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x39194
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: topological_sort
int* topological_sort(Graphptr g)
{
 int x, y, i, j;
 int *node;
 int* sorted = safemalloc(sizeof(int) * g->nvertices, "topological_sort", 1);
 int indegree[MAXV];
 Queueptr zeroin = queue();
 compute_indegrees(g, indegree);
 for (i = 0; i < g->nvertices; i++)
   if (indegree[i] == 0)
    {
     node = safemalloc(sizeof(int), "topological_sort", 11);
     node[0] = i;
     enqueue(zeroin, node);
    }
 j = 0;
 while (!queue_empty(zeroin))
  {
   node = dequeue(zeroin);
   x = node[0];
   safe_free(node);
   sorted[j] = x;
   j++;
   for (i = 0; i < g->degree[x]; i++)
    {
     y = g->edges[x][i].v;
     indegree[y]--;
     if (indegree[y] == 0)
      {
       node = safemalloc(sizeof(int), "topological_sort", 29);
       node[0] = y;
       enqueue(zeroin, node);
      }
    }
  }
 free_queue(zeroin);
 return sorted;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xfb8, %rsp            # imm = 0xFB8
movq %rdi, %rbx
movslq 0xf46280(%rdi), %rdi
shlq $0x2, %rdi
leaq 0x894fe(%rip), %rsi     # 0xa4807
movl $0x1, %edx
callq 0x390f5
movq %rax, (%rsp)
leaq 0x89572(%rip), %rsi     # 0xa4890
movl $0x1f58, %edi           # imm = 0x1F58
movl $0x2, %edx
callq 0x390f5
movq %rax, %r15
movabsq $0x3e700000000, %rax    # imm = 0x3E700000000
movq %rax, 0x1f48(%r15)
movl $0x0, 0x1f50(%r15)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1af35
cmpl $0x0, 0xf46280(%rbx)
jle 0x1b3a3
xorl %r14d, %r14d
leaq 0x8949b(%rip), %r12     # 0xa4807
cmpl $0x0, 0x10(%rsp,%r14,4)
jne 0x1b394
movl $0x4, %edi
movq %r12, %rsi
movl $0xb, %edx
callq 0x390f5
movl %r14d, (%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b467
incq %r14
movslq 0xf46280(%rbx), %rax
cmpq %rax, %r14
jl 0x1b36c
cmpl $0x0, 0x1f50(%r15)
jle 0x1b449
xorl %r14d, %r14d
movq %r15, %r13
movq %r15, %rdi
callq 0x1b4d1
movslq (%rax), %rbp
movq %rax, %rdi
callq 0x39194
movq (%rsp), %rax
movq %r14, 0x8(%rsp)
movl %ebp, (%rax,%r14,4)
cmpl $0x0, 0xf42400(%rbx,%rbp,4)
jle 0x1b430
imulq $0x3e80, %rbp, %r14     # imm = 0x3E80
addq %rbx, %r14
xorl %r12d, %r12d
movslq (%r14), %r15
decl 0x10(%rsp,%r15,4)
jne 0x1b41c
movl $0x4, %edi
leaq 0x89403(%rip), %rsi     # 0xa4807
movl $0x1d, %edx
callq 0x390f5
movl %r15d, (%rax)
movq %r13, %rdi
movq %rax, %rsi
callq 0x1b467
incq %r12
movslq 0xf42400(%rbx,%rbp,4), %rax
addq $0x10, %r14
cmpq %rax, %r12
jl 0x1b3ee
movq 0x8(%rsp), %r14
incq %r14
movq %r13, %r15
cmpl $0x0, 0x1f50(%r13)
jg 0x1b3b4
movq %r15, %rdi
callq 0x39194
movq (%rsp), %rax
addq $0xfb8, %rsp            # imm = 0xFB8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: enqueue
void enqueue(Queueptr q, void* x)
{
 /*!Last Changed 21.01.2009*/
 if (q->count >= QUEUESIZE)
   printf("Queue overflow\n");
 else
  {
   q->last = (q->last + 1) % QUEUESIZE;
   q->elements[q->last] = x;
   q->count = q->count + 1;
  }
}

// Assembly:
movl 0x1f50(%rdi), %eax
cmpl $0x3e8, %eax            # imm = 0x3E8
jl 0x1b480
leaq 0x893ef(%rip), %rdi     # 0xa486a
jmp 0x4090
movl 0x1f4c(%rdi), %ecx
movl %ecx, %edx
incl %edx
movslq %edx, %rdx
imulq $0x10624dd3, %rdx, %rdx # imm = 0x10624DD3
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x26, %rdx
addl %r8d, %edx
imull $0x3e8, %edx, %edx      # imm = 0x3E8
negl %edx
addl %edx, %ecx
incl %ecx
movl %ecx, 0x1f4c(%rdi)
movslq %ecx, %rcx
movq %rsi, (%rdi,%rcx,8)
incl %eax
movl %eax, 0x1f50(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: dequeue
void* dequeue(Queueptr q)
{
 /*!Last Changed 21.01.2009*/
 void* x = NULL;
 if (q->count <= 0)
   printf("Warning: Empty queue dequeue\n");
 else
  {
   x = q->elements[q->first];
   q->first = (q->first + 1) % QUEUESIZE;
   q->count = q->count - 1;
  }
 return x;
}

// Assembly:
movl 0x1f50(%rdi), %ecx
testl %ecx, %ecx
jle 0x1b517
movslq 0x1f48(%rdi), %rdx
movq (%rdi,%rdx,8), %rax
incl %edx
movslq %edx, %rdx
imulq $0x10624dd3, %rdx, %rsi # imm = 0x10624DD3
movq %rsi, %r8
shrq $0x3f, %r8
sarq $0x26, %rsi
addl %r8d, %esi
imull $0x3e8, %esi, %esi      # imm = 0x3E8
subl %esi, %edx
movl %edx, 0x1f48(%rdi)
decl %ecx
movl %ecx, 0x1f50(%rdi)
retq
pushq %rax
leaq 0x8935a(%rip), %rdi     # 0xa4879
callq 0x4090
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: graph_from_distancematrix
Graphptr graph_from_distancematrix(matrix distancematrix)
{
 int i, j;
 Graphptr g;
 g = graph(distancematrix.row);
 for (i = 0; i < distancematrix.row; i++)
   for (j = 0; j < distancematrix.row; j++)
     if (distancematrix.values[i][j] != -1)
      {
       (g->nedges)++;
       g->edges[i][g->degree[i]].v = j;
       g->edges[i][g->degree[i]].weight = distancematrix.values[i][j];
       (g->degree[i])++;
      }
 return g;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1ae14
testl %r14d, %r14d
jle 0x1b5bc
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movsd 0x8784e(%rip), %xmm0    # 0xa2da8
movq (%rbx,%rcx,8), %rdx
imulq $0x3e80, %rcx, %rsi     # imm = 0x3E80
addq %rax, %rsi
xorl %edi, %edi
movsd (%rdx,%rdi,8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1b577
jnp 0x1b5ac
incl 0xf46284(%rax)
movslq 0xf42400(%rax,%rcx,4), %r8
shlq $0x4, %r8
movl %edi, (%r8,%rsi)
movslq 0xf42400(%rax,%rcx,4), %r8
leal 0x1(%r8), %r9d
shlq $0x4, %r8
movsd %xmm1, 0x8(%r8,%rsi)
movl %r9d, 0xf42400(%rax,%rcx,4)
incq %rdi
cmpq %rdi, %r14
jne 0x1b56a
incq %rcx
cmpq %r14, %rcx
jne 0x1b55a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: list_item
Listitemptr list_item(void* item)
{
 /*!Last Changed 21.01.2009*/
 Listitemptr l;
 l = safemalloc(sizeof(Listitem), "list_item", 2);
 l->item = item;
 l->next = NULL;
 return l;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x891eb(%rip), %rsi     # 0xa481e
movl $0x10, %edi
movl $0x2, %edx
callq 0x390f5
movq %rbx, (%rax)
movq $0x0, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: link_list_insert
void link_list_insert(Linklistptr l, void* item)
{
 /*!Last Changed 21.01.2009*/
 Listitemptr listitem = list_item(item);
 if (l->head == NULL)
   l->head = listitem;
 else
   l->tail->next = listitem;
 l->tail = listitem;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8919f(%rip), %rsi     # 0xa481e
movl $0x10, %edi
movl $0x2, %edx
callq 0x390f5
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
cmpq $0x0, (%rbx)
movq %rbx, %rcx
je 0x1b6aa
movq 0x8(%rbx), %rcx
addq $0x8, %rcx
movq %rax, (%rcx)
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: link_list_remove
BOOLEAN link_list_remove(Linklistptr l, void* item, int (*compare)(const void *a, const void *b))
{
 /*!Last Changed 21.01.2009*/
 Listitemptr tmp = l->head, tmpbefore = NULL;
 while (tmp && compare(item, tmp->item) != 0)
  {
   tmpbefore = tmp;
   tmp = tmp->next;
  }
 if (tmp != NULL)
  {
   if (tmpbefore == NULL) /*first element is deleted*/
     l->head = l->head->next;
   else
     tmpbefore->next = tmp->next;
   if (l->tail == tmp) /*last element is deleted*/
     l->tail = tmpbefore;
   safe_free(tmp);
   return BOOLEAN_TRUE;
  }
 else
   return BOOLEAN_FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x1b6fa
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rbx), %rsi
movq %r12, %rdi
callq *%rdx
testl %eax, %eax
je 0x1b6fe
movq %rbx, %r13
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x1b6fa
movq (%rbx), %rsi
movq %r12, %rdi
callq *%r15
testl %eax, %eax
jne 0x1b6df
jmp 0x1b701
xorl %eax, %eax
jmp 0x1b731
xorl %r13d, %r13d
testq %r13, %r13
je 0x1b710
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r13)
jmp 0x1b71a
movq (%r14), %rax
movq 0x8(%rax), %rax
movq %rax, (%r14)
cmpq %rbx, 0x8(%r14)
jne 0x1b724
movq %r13, 0x8(%r14)
movq %rbx, %rdi
callq 0x39194
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/datastructure.c
// Function: link_list_search
void* link_list_search(Linklistptr l, void* item, int (*compare)(const void *a, const void *b))
{
 /*!Last Changed 21.01.2009*/
 Listitemptr tmp = l->head;
 while (tmp && compare(item, tmp->item) != 0)
   tmp = tmp->next;
 if (tmp)
   return tmp->item;
 else
   return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
testq %r12, %r12
je 0x1b76d
movq %rdx, %r14
movq %rsi, %r15
xorl %ebx, %ebx
movq (%r12), %rsi
movq %r15, %rdi
callq *%r14
testl %eax, %eax
je 0x1b771
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1b753
jmp 0x1b775
xorl %ebx, %ebx
jmp 0x1b775
movq (%r12), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq