// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x7a160, %rsp          # imm = 0x7A160
movl %edi, -0x4(%rbp)
movl 0x35608c(%rip), %edi    # 0x3e1f70
movl $0x3, %esi
leaq 0x5c598(%rip), %rdx     # 0xe8488
leaq 0x5c5a7(%rip), %rcx     # 0xe849e
leaq 0x5c5db(%rip), %r8      # 0xe84d9
movb $0x0, %al
callq 0x53f70
cmpl $0x0, %eax
jne 0x8bf0f
jmp 0x8c177
movslq -0x4(%rbp), %rcx
leaq 0x78bd6(%rip), %rax     # 0x104af0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, 0x35604a(%rip)    # 0x3e1f74
movslq -0x4(%rbp), %rcx
leaq 0x78bbb(%rip), %rax     # 0x104af0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, 0x2dbefb(%rip)    # 0x367e40
movq 0x798fc(%rip), %rdi     # 0x105848
movq 0x795ad(%rip), %rsi     # 0x105500
callq 0x1db80
movq %rax, 0x798e1(%rip)     # 0x105840
cmpq $0x0, 0x798d9(%rip)     # 0x105840
jne 0x8bf7c
leaq 0x5c4e3(%rip), %rdi     # 0xe8453
movb $0x0, %al
callq 0x4030
jmp 0x8c177
movq 0x798bd(%rip), %rax     # 0x105840
cmpl $0x0, (%rax)
jne 0x8bf8d
jmp 0x8c177
movl -0x4(%rbp), %edi
callq 0x2c000
movq %rax, -0x10(%rbp)
movq 0x798a0(%rip), %rdi     # 0x105840
leaq 0x2dbe59(%rip), %rsi    # 0x367e00
callq 0x85c60
callq 0x87c40
movslq -0x4(%rbp), %rcx
leaq 0x78b34(%rip), %rax     # 0x104af0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x79873(%rip), %rdi     # 0x105840
movq 0x2dbe2c(%rip), %rsi    # 0x367e00
movq -0x10(%rbp), %rdx
movq 0x79529(%rip), %r8      # 0x105508
leaq -0x7a158(%rbp), %rcx
callq *%rax
movq %rax, -0x7a160(%rbp)
cmpq $0x0, -0x7a160(%rbp)
jne 0x8bffe
jmp 0x8c177
movq -0x7a158(%rbp), %rdi
callq 0x1eaf0
movq 0x794ff(%rip), %rdi     # 0x105510
leaq 0x5c1a6(%rip), %rsi     # 0xe81be
callq 0x40c0
movq %rax, -0x7a150(%rbp)
movq -0x7a150(%rbp), %rdi
leaq 0x5c20f(%rip), %rsi     # 0xe8241
movb $0x0, %al
callq 0x4280
movq -0x7a150(%rbp), %rdi
movq -0x7a158(%rbp), %rsi
callq 0x20320
movq -0x7a150(%rbp), %rdi
leaq 0x5c20c(%rip), %rsi     # 0xe8266
movb $0x0, %al
callq 0x4280
movq -0x7a150(%rbp), %rdi
callq 0x4250
movq -0x7a158(%rbp), %rdi
callq 0x1fbf0
movq %rax, -0x20(%rbp)
leaq -0x7a140(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x5749c(%rip), %rsi     # 0xe352b
movb $0x0, %al
callq 0x4170
movq -0x20(%rbp), %rdi
callq 0x52e80
leaq -0x7a140(%rbp), %rdi
callq 0x40d0
movq -0x7a158(%rbp), %rax
movl $0x0, (%rax)
xorl %edi, %edi
callq 0x85860
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x2c140
cmpq $0x0, 0x2dbd2d(%rip)    # 0x367e00
je 0x8c0ec
movq 0x2dbd24(%rip), %rdi    # 0x367e00
callq 0x44510
movq $0x0, 0x2dbd14(%rip) # 0x367e00
movq -0x7a158(%rbp), %rdi
callq 0x1fc90
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x5c0b7(%rip), %rsi     # 0xe81be
callq 0x40c0
movq %rax, -0x7a148(%rbp)
cmpq $0x0, -0x7a148(%rbp)
jne 0x8c11f
jmp 0x8c177
movq -0x7a158(%rbp), %rax
movq %rax, 0x79713(%rip)     # 0x105840
movl $0x0, 0x355e3d(%rip)    # 0x3e1f74
movq -0x7a148(%rbp), %rdi
movq -0x7a158(%rbp), %rdx
movq -0x7a160(%rbp), %rcx
movl $0x20, %esi
callq 0x44c60
movq -0x7a148(%rbp), %rdi
callq 0x4250
movq -0x18(%rbp), %rdi
callq 0x52e80
movq -0x7a160(%rbp), %rdi
callq 0x44510
addq $0x7a160, %rsp          # imm = 0x7A160
popq %rbp
retq