// File: /workspace/github_c_makefile_star2_O3/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 0x34f97d(%rip), %edi    # 0x3b1fa0
leaq 0x495aa(%rip), %rdx     # 0xabbd4
leaq 0x495b9(%rip), %rcx     # 0xabbea
leaq 0x495ed(%rip), %r8      # 0xabc25
movl $0x3, %esi
xorl %eax, %eax
callq 0x3ab3a
testl %eax, %eax
je 0x62825
movslq %ebx, %rax
leaq (%rax,%rax,2), %r14
leaq 0x724c6(%rip), %r15     # 0xd4b20
movl 0x10(%r15,%r14,8), %eax
movl %eax, 0x34f93f(%rip)    # 0x3b1fa4
movl 0x14(%r15,%r14,8), %eax
movl %eax, 0x2d5800(%rip)    # 0x337e70
movq 0x73201(%rip), %rdi     # 0xd5878
movq 0x72eb2(%rip), %rsi     # 0xd5530
callq 0x14fb7
movq %rax, 0x731e6(%rip)     # 0xd5870
testq %rax, %rax
je 0x62836
cmpl $0x0, (%rax)
je 0x62825
leaq (%r15,%r14,8), %r14
movl %ebx, %edi
callq 0x1ed28
movq %rax, %r15
movq 0x731bf(%rip), %rdi     # 0xd5870
leaq 0x2d5778(%rip), %rsi    # 0x337e30
callq 0x5dcbd
callq 0x5f670
movq 0x731a7(%rip), %rdi     # 0xd5870
movq 0x2d5760(%rip), %rsi    # 0x337e30
movq 0x72e61(%rip), %r8      # 0xd5538
leaq 0x8(%rsp), %rcx
movq %r15, %rdx
callq *(%r14)
testq %rax, %rax
je 0x62825
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x15978
movq 0x72e41(%rip), %rdi     # 0xd5540
leaq 0x49267(%rip), %rsi     # 0xab96d
callq 0x40f0
movq %rax, %r12
leaq 0x49278(%rip), %rdi     # 0xab98d
movl $0xb, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x42c0
movq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x16898
leaq 0x49277(%rip), %rdi     # 0xab9b2
movl $0xc, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x42c0
movq %r12, %rdi
callq 0x42a0
movq 0x8(%rsp), %rdi
callq 0x164dc
movq %rax, %r12
leaq 0x441bc(%rip), %rsi     # 0xa6925
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41b0
movq %r12, %rdi
callq 0x3a180
movq %r13, %rdi
callq 0x4100
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
xorl %edi, %edi
callq 0x5d9af
movl %ebx, %edi
movq %r15, %rsi
callq 0x1ee01
movq 0x2d5682(%rip), %rdi    # 0x337e30
testq %rdi, %rdi
je 0x627c3
callq 0x2ff55
movq $0x0, 0x2d566d(%rip) # 0x337e30
movq 0x8(%rsp), %rdi
callq 0x16542
movq %rax, %rbx
leaq 0x49196(%rip), %rsi     # 0xab96d
movq %rax, %rdi
callq 0x40f0
testq %rax, %rax
je 0x62825
movq %rax, %r15
movq 0x8(%rsp), %rdx
movq %rdx, 0x7307d(%rip)     # 0xd5870
movl $0x0, 0x34f7a7(%rip)    # 0x3b1fa4
movq %rax, %rdi
movl $0x20, %esi
movq %r14, %rcx
callq 0x304a2
movq %r15, %rdi
callq 0x42a0
movq %rbx, %rdi
callq 0x3a180
movq %r14, %rdi
callq 0x2ff55
addq $0x7a130, %rsp          # imm = 0x7A130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4bf55(%rip), %rdi     # 0xae792
addq $0x7a130, %rsp          # imm = 0x7A130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4090