// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/process.c
// Function: outlier_features
int outlier_features(char* datasetname)
{
 /*!Last Changed 23.02.2007 added free of variancefeatures*/
 /*!Last Changed 26.03.2004*/
 Datasetptr tmp;
 Instanceptr list;
 Instance variancefeatures;
 int i, count = 0, size, j, start, end;
 double sum;
 tmp = search_dataset(Datasets, datasetname);
 if (!tmp)
  {
   printf(m1279, datasetname);
   return -1;
  }
 current_dataset = tmp;
 if (traindata)
  {
   deallocate(traindata);
   traindata = NULL;
  }
 read_from_train_file(tmp, &traindata);
 variancefeatures = find_variance(traindata);
 for (i = 0; i < tmp->featurecount; i++)
   if (in_list(tmp->features[i].type, 2, REAL, INTEGER))
    {
     list = sort_instances(traindata, i, &size);
     sum = 0;
     start = (int)(size * 0.05);
     end = (int)(size * 0.95);
     for (j = start; j <= end; j++)
       sum += list[j].values[i].floatvalue;
     sum /= (end - start + 1);
     if (variancefeatures.values[i].floatvalue / sum < 0.7)
       count++;
     safe_free(list);
    }
 safe_free(variancefeatures.values);
 return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x58(%rbp)
movq 0x7fddb(%rip), %rdi     # 0x105848
movq -0x10(%rbp), %rsi
callq 0x1db80
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x85a9f
movq -0x10(%rbp), %rsi
leaq 0x62751(%rip), %rdi     # 0xe81dd
movb $0x0, %al
callq 0x4030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x85c49
movq -0x18(%rbp), %rax
movq %rax, 0x7fd96(%rip)     # 0x105840
cmpq $0x0, 0x2e234e(%rip)    # 0x367e00
je 0x85acb
movq 0x2e2345(%rip), %rdi    # 0x367e00
callq 0x44510
movq $0x0, 0x2e2335(%rip) # 0x367e00
movq -0x18(%rbp), %rdi
leaq 0x2e232a(%rip), %rsi    # 0x367e00
callq 0x85c60
movq 0x2e231e(%rip), %rsi    # 0x367e00
leaq -0xa0(%rbp), %rdi
callq 0x1a0a0
leaq -0x50(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x30, %edx
callq 0x42b0
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x85c3a
movq -0x18(%rbp), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x54(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl (%rax), %edi
movl $0x2, %edx
xorl %ecx, %ecx
movl %edx, %esi
movb $0x0, %al
callq 0x53e40
cmpl $0x0, %eax
je 0x85c2a
movq 0x2e22a9(%rip), %rdi    # 0x367e00
movl -0x54(%rbp), %esi
leaq -0x5c(%rbp), %rdx
callq 0xdc050
movq %rax, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
cvtsi2sdl -0x5c(%rbp), %xmm0
movsd 0x61d64(%rip), %xmm1    # 0xe78e0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x64(%rbp)
cvtsi2sdl -0x5c(%rbp), %xmm0
movsd 0x60e9c(%rip), %xmm1    # 0xe6a30
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x68(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpl -0x68(%rbp), %eax
jg 0x85bdd
movq -0x20(%rbp), %rax
movslq -0x60(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x54(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x85ba5
movl -0x68(%rbp), %eax
subl -0x64(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd -0x70(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x50(%rbp), %rax
movslq -0x54(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
divsd -0x70(%rbp), %xmm1
movsd 0x61cd6(%rip), %xmm0    # 0xe78e8
ucomisd %xmm1, %xmm0
jbe 0x85c21
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
callq 0x52e80
jmp 0x85c2c
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x85b0a
movq -0x50(%rbp), %rdi
callq 0x52e80
movl -0x58(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)