// File: /workspace/github_c_makefile_star2_O1/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 0x34e027(%rip), %edi    # 0x3aefa0
leaq 0x47b88(%rip), %rdx     # 0xa8b08
leaq 0x47b97(%rip), %rcx     # 0xa8b1e
leaq 0x47bcb(%rip), %r8      # 0xa8b59
movl $0x3, %esi
xorl %eax, %eax
callq 0x39b2e
testl %eax, %eax
je 0x6117b
movslq %ebx, %rax
leaq (%rax,%rax,2), %r14
leaq 0x70b70(%rip), %r15     # 0xd1b20
movl 0x10(%r15,%r14,8), %eax
movl %eax, 0x34dfe9(%rip)    # 0x3aefa4
movl 0x14(%r15,%r14,8), %eax
movl %eax, 0x2d3eaa(%rip)    # 0x334e70
movq 0x718ab(%rip), %rdi     # 0xd2878
movq 0x7155c(%rip), %rsi     # 0xd2530
callq 0x14f16
movq %rax, 0x71890(%rip)     # 0xd2870
testq %rax, %rax
je 0x6118c
cmpl $0x0, (%rax)
je 0x6117b
leaq (%r15,%r14,8), %r14
movl %ebx, %edi
callq 0x1e5ac
movq %rax, %r15
movq 0x71869(%rip), %rdi     # 0xd2870
leaq 0x2d3e22(%rip), %rsi    # 0x334e30
callq 0x5c7af
callq 0x5e071
movq 0x71851(%rip), %rdi     # 0xd2870
movq 0x2d3e0a(%rip), %rsi    # 0x334e30
movq 0x7150b(%rip), %r8      # 0xd2538
leaq 0x8(%rsp), %rcx
movq %r15, %rdx
callq *(%r14)
testq %rax, %rax
je 0x6117b
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x157f6
movq 0x714eb(%rip), %rdi     # 0xd2540
leaq 0x47845(%rip), %rsi     # 0xa88a1
callq 0x40f0
movq %rax, %r12
leaq 0x47856(%rip), %rdi     # 0xa88c1
movl $0xb, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x42c0
movq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x165fa
leaq 0x47855(%rip), %rdi     # 0xa88e6
movl $0xc, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x42c0
movq %r12, %rdi
callq 0x42a0
movq 0x8(%rsp), %rdi
callq 0x1621f
movq %rax, %r12
leaq 0x42822(%rip), %rsi     # 0xa38e1
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41b0
movq %r12, %rdi
callq 0x39194
movq %r13, %rdi
callq 0x4100
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
xorl %edi, %edi
callq 0x5c49b
movl %ebx, %edi
movq %r15, %rsi
callq 0x1e685
movq 0x2d3d2c(%rip), %rdi    # 0x334e30
testq %rdi, %rdi
je 0x61119
callq 0x2f616
movq $0x0, 0x2d3d17(%rip) # 0x334e30
movq 0x8(%rsp), %rdi
callq 0x16285
movq %rax, %rbx
leaq 0x47774(%rip), %rsi     # 0xa88a1
movq %rax, %rdi
callq 0x40f0
testq %rax, %rax
je 0x6117b
movq %rax, %r15
movq 0x8(%rsp), %rdx
movq %rdx, 0x71727(%rip)     # 0xd2870
movl $0x0, 0x34de51(%rip)    # 0x3aefa4
movq %rax, %rdi
movl $0x20, %esi
movq %r14, %rcx
callq 0x2fbad
movq %r15, %rdi
callq 0x42a0
movq %rbx, %rdi
callq 0x39194
movq %r14, %rdi
callq 0x2f616
addq $0x7a130, %rsp          # imm = 0x7A130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4a533(%rip), %rdi     # 0xab6c6
addq $0x7a130, %rsp          # imm = 0x7A130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4090