// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/process.c
// Function: run_dimension_reduction_algorithm
void run_dimension_reduction_algorithm(int algorithm)
{
 void* parameters;
 char *fname, *dname;
 char tmpcommand[MAXLENGTH];
 FILE* datafile;
 FILE* xmlfile;
 Datasetptr result;
 Instanceptr newdata;
 if (!checkparams(paramcount, 3, m1006, m1391, m1224))
   return; 
 mustrealize = dimension_reduction_algorithms[algorithm].mustrealize;
 mustnormalize = dimension_reduction_algorithms[algorithm].mustnormalize;
 current_dataset = search_dataset(Datasets, params[0]);
 if (!current_dataset)
  {
   printf(m1320);
   return;
  }
 if (current_dataset->active == NO)
   return;
 parameters = prepare_dimension_reduction_algorithm_parameters(algorithm);
 read_from_train_file(current_dataset, &traindata);
 pre_process(); 
 newdata = dimension_reduction_algorithms[algorithm].algorithm(current_dataset, traindata, parameters, &result, params[1]);
 if (!newdata)
   return;
 add_dataset(result);
 xmlfile = fopen(params[2], "w");
 fprintf(xmlfile, "<datasets>\n");
 save_definitions_of_dataset_as_xml(xmlfile, result);
 fprintf(xmlfile, "</datasets>\n");
 fclose(xmlfile);
 dname = dataset_directory_name(result);
 sprintf(tmpcommand, "mkdir %s", dname);
 safe_free(dname);
 system(tmpcommand);
 result->active = NO;
 post_process(NO);
 free_dimension_reduction_algorithm_parameters(algorithm, parameters);
 if (traindata)
  {
   deallocate(traindata);
   traindata = NULL;
  }
 fname = dataset_file_name(result);
 datafile = fopen(fname, "w");
 if (!datafile)
   return;
 current_dataset = result;
 mustrealize = NO;
 print_instance_list(datafile, ' ', result, newdata);
 fclose(datafile);
 safe_free(fname); 
 deallocate(newdata);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a130, %rsp          # imm = 0x7A130
movl %edi, %ebx
movl 0x35031a(%rip), %edi    # 0x3a9fa0
leaq 0x41e6b(%rip), %rdx     # 0x9baf8
leaq 0x41e7a(%rip), %rcx     # 0x9bb0e
leaq 0x41eae(%rip), %r8      # 0x9bb49
pushq $0x3
popq %rsi
xorl %eax, %eax
callq 0x358ba
testl %eax, %eax
je 0x59e76
movslq %ebx, %rax
imulq $0x18, %rax, %r15
leaq 0x72e65(%rip), %r14     # 0xccb20
movl 0x10(%r14,%r15), %eax
movl %eax, 0x3502de(%rip)    # 0x3a9fa4
movl 0x14(%r14,%r15), %eax
movl %eax, 0x2d619f(%rip)    # 0x32fe70
movq 0x73ba0(%rip), %rdi     # 0xcd878
movq 0x73851(%rip), %rsi     # 0xcd530
callq 0x13da6
movq %rax, 0x73b85(%rip)     # 0xcd870
testq %rax, %rax
je 0x59e87
cmpl $0x0, (%rax)
je 0x59e76
addq %r15, %r14
movl %ebx, %edi
callq 0x1c6b6
movq %rax, %r15
movq 0x73b5f(%rip), %rdi     # 0xcd870
leaq 0x2d6118(%rip), %rsi    # 0x32fe30
callq 0x5577a
callq 0x56f57
movq 0x73b47(%rip), %rdi     # 0xcd870
movq 0x2d6100(%rip), %rsi    # 0x32fe30
movq 0x73801(%rip), %r8      # 0xcd538
leaq 0x8(%rsp), %rcx
movq %r15, %rdx
callq *(%r14)
testq %rax, %rax
je 0x59e76
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x145cf
movq 0x737e1(%rip), %rdi     # 0xcd540
leaq 0x41b2b(%rip), %rsi     # 0x9b891
callq 0x40f0
movq %rax, %r12
leaq 0x41b3c(%rip), %rdi     # 0x9b8b1
pushq $0xb
popq %rsi
pushq $0x1
popq %r13
movq %r13, %rdx
movq %rax, %rcx
callq 0x42c0
movq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x152a2
leaq 0x41b3b(%rip), %rdi     # 0x9b8d6
pushq $0xc
popq %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x42c0
movq %r12, %rdi
callq 0x42a0
movq 0x8(%rsp), %rdi
callq 0x14f11
movq %rax, %r12
leaq 0x3cb00(%rip), %rsi     # 0x968c5
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41b0
movq %r12, %rdi
callq 0x34ff7
movq %r13, %rdi
callq 0x4100
movq 0x8(%rsp), %rax
andl $0x0, (%rax)
xorl %edi, %edi
callq 0x5549c
movl %ebx, %edi
movq %r15, %rsi
callq 0x1c784
movq 0x2d6029(%rip), %rdi    # 0x32fe30
testq %rdi, %rdi
je 0x59e19
callq 0x2c010
andq $0x0, 0x2d6017(%rip)    # 0x32fe30
movq 0x8(%rsp), %rdi
callq 0x14f75
movq %rax, %rbx
leaq 0x41a64(%rip), %rsi     # 0x9b891
movq %rax, %rdi
callq 0x40f0
testq %rax, %rax
je 0x59e76
movq %rax, %r15
movq 0x8(%rsp), %rdx
movq %rdx, 0x73a27(%rip)     # 0xcd870
andl $0x0, 0x350154(%rip)    # 0x3a9fa4
pushq $0x20
popq %rsi
movq %rax, %rdi
movq %r14, %rcx
callq 0x2c563
movq %r15, %rdi
callq 0x42a0
movq %rbx, %rdi
callq 0x34ff7
movq %r14, %rdi
callq 0x2c010
addq $0x7a130, %rsp          # imm = 0x7A130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x44828(%rip), %rdi     # 0x9e6b6
addq $0x7a130, %rsp          # imm = 0x7A130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4090