int main(int argc, char **argv) {
  int i, rec_images_num, data_dim, num_images, num_exmpls;
  num_images = atoi(argv[6]);
  data_dim = atoi(argv[5]);
  num_exmpls = atoi(argv[4]);
  rec_images_num = num_exmpls;
  double **result = (double **)malloc(num_images * sizeof(double));
  for (i = 0; i < num_images; i++) {
    result[i] = (double *)malloc(rec_images_num * sizeof(double));
  }
  double **exmpls = (double **)malloc(num_exmpls * sizeof(double));
  for (i = 0; i < num_exmpls; i++) {
    exmpls[i] = (double *)malloc(data_dim * sizeof(double));
  }
  double **exmpl_vals = (double **)malloc(num_exmpls * sizeof(double));
  for (i = 0; i < num_exmpls; i++) {
    exmpl_vals[i] = (double *)malloc(num_exmpls * sizeof(double));
  }
  double **images = (double **)malloc(num_images * sizeof(double));
  for (i = 0; i < num_images; i++) {
    images[i] = (double *)malloc(data_dim * sizeof(double));
  }
  double ***neurons = (double **)malloc(rec_images_num * sizeof(double));
  for (i = 0; i < rec_images_num; i++) {
    neurons[i] = (double *)malloc(data_dim * sizeof(double));
  }
  if (imagesFromFile(argv[1], exmpls, num_exmpls, data_dim)) {
    printf("File can not be openned.\n");
  }
  if (imagesFromFile(argv[2], exmpl_vals, num_exmpls, num_exmpls)) {
    printf("File can not be openned.\n");
  }
  if (imagesFromFile(argv[3], images, num_images, data_dim)) {
    printf("File can not be openned.\n");
  }
  learn(neurons, exmpls, exmpl_vals, num_exmpls, rec_images_num, data_dim);
  groupRecognize(neurons, images, result, num_images, rec_images_num, data_dim);
  out(result, num_images, rec_images_num);
  free(images);
  free(neurons);
  free(exmpls);
  free(result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
mov    $0x0,%al
call   1090 <atoi@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x18(%rbp)
movslq -0x20(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1220 <main+0xa0>
movslq -0x18(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11ea <main+0x6a>
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    126e <main+0xee>
movslq -0x1c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1238 <main+0xb8>
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12bc <main+0x13c>
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x40(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1286 <main+0x106>
movslq -0x20(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    130a <main+0x18a>
movslq -0x1c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x48(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12d4 <main+0x154>
movslq -0x18(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1358 <main+0x1d8>
movslq -0x1c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x50(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1322 <main+0x1a2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    $0x0,%al
call   1050 <imagesFromFile@plt>
cmp    $0x0,%eax
je     1388 <main+0x208>
lea    0xc7f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    $0x0,%al
call   1050 <imagesFromFile@plt>
cmp    $0x0,%eax
je     13b8 <main+0x238>
lea    0xc4f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    $0x0,%al
call   1050 <imagesFromFile@plt>
cmp    $0x0,%eax
je     13e8 <main+0x268>
lea    0xc1f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    $0x0,%al
call   1040 <learn@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    $0x0,%al
call   1060 <groupRecognize@plt>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    $0x0,%al
call   10a0 <out@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbx
mov    0x30(%rsi),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    %eax,%r14d
mov    0x28(%rbx),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    %eax,0x18(%rsp)
mov    %rbx,0x38(%rsp)
mov    0x20(%rbx),%rdi
xor    %eax,%eax
call   1090 <atoi@plt>
mov    %eax,%ebx
movslq %r14d,%r12
shl    $0x3,%r12
mov    %r12,%rdi
call   1080 <malloc@plt>
mov    %rax,%rbp
mov    %ebx,0xc(%rsp)
movslq %ebx,%r15
shl    $0x3,%r15
mov    %r14d,%r13d
mov    %r14d,0x1c(%rsp)
test   %r14d,%r14d
jle    1206 <main+0x86>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r15,%rdi
call   1080 <malloc@plt>
mov    %rax,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    11f0 <main+0x70>
mov    %rbp,0x40(%rsp)
mov    %r15,%rdi
call   1080 <malloc@plt>
movslq 0x18(%rsp),%rcx
mov    0xc(%rsp),%edx
mov    %edx,%r14d
test   %edx,%edx
mov    %rax,0x30(%rsp)
mov    %rcx,0x28(%rsp)
jle    128c <main+0x10c>
mov    %r12,0x10(%rsp)
lea    0x0(,%rcx,8),%rbx
xor    %r12d,%r12d
mov    %rax,%rbp
mov    %rbx,%rdi
call   1080 <malloc@plt>
mov    %rax,0x0(%rbp,%r12,8)
add    $0x1,%r12
cmp    %r12,%r14
jne    1240 <main+0xc0>
mov    %r15,%rdi
call   1080 <malloc@plt>
cmpl   $0x0,0xc(%rsp)
mov    %rax,0x20(%rsp)
jle    1285 <main+0x105>
xor    %ebx,%ebx
mov    %rax,%r12
nop
mov    %r15,%rdi
call   1080 <malloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1270 <main+0xf0>
mov    0x10(%rsp),%r12
jmp    1299 <main+0x119>
mov    %r15,%rdi
call   1080 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %r12,%rdi
call   1080 <malloc@plt>
mov    %rax,%rbp
cmpl   $0x0,0x1c(%rsp)
jle    12d6 <main+0x156>
mov    0x28(%rsp),%rax
lea    0x0(,%rax,8),%rbx
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1080 <malloc@plt>
mov    %rax,0x0(%rbp,%r12,8)
add    $0x1,%r12
cmp    %r12,%r13
jne    12c0 <main+0x140>
mov    %rbp,0x10(%rsp)
mov    %r15,%rdi
call   1080 <malloc@plt>
mov    %rax,%r15
mov    0xc(%rsp),%r12d
test   %r12d,%r12d
mov    0x28(%rsp),%rbx
jle    1315 <main+0x195>
shl    $0x3,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1080 <malloc@plt>
mov    %rax,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1300 <main+0x180>
mov    0x38(%rsp),%rbp
mov    0x8(%rbp),%rdi
mov    0x30(%rsp),%rsi
mov    %r12d,%edx
mov    0x18(%rsp),%r14d
mov    %r14d,%ecx
xor    %eax,%eax
call   1060 <imagesFromFile@plt>
test   %eax,%eax
je     1345 <main+0x1c5>
lea    0xcc0(%rip),%rdi
call   1050 <puts@plt>
mov    0x10(%rbp),%rdi
mov    0x20(%rsp),%rsi
mov    %r12d,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1060 <imagesFromFile@plt>
test   %eax,%eax
mov    0x1c(%rsp),%r13d
mov    0x40(%rsp),%rbx
je     1375 <main+0x1f5>
lea    0xc90(%rip),%rdi
call   1050 <puts@plt>
mov    0x18(%rbp),%rdi
mov    0x10(%rsp),%rsi
mov    %r13d,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1060 <imagesFromFile@plt>
test   %eax,%eax
je     139b <main+0x21b>
lea    0xc6a(%rip),%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
mov    0x30(%rsp),%rbp
mov    %rbp,%rsi
mov    0x20(%rsp),%rdx
mov    %r12d,%ecx
mov    %r12d,%r8d
mov    %r14d,%r9d
xor    %eax,%eax
call   1040 <learn@plt>
mov    %r15,%rdi
mov    %r14d,%r9d
mov    0x10(%rsp),%r14
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r13d,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1070 <groupRecognize@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   10a0 <out@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"File can not be openned.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double**
%12 = alloca double**
%13 = alloca double**
%14 = alloca double**
%15 = alloca double***
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 6
%18 = load i8*, i8** %17
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %18)
store i32 %19, i32* %9
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 5
%22 = load i8*, i8** %21
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %22)
store i32 %23, i32* %8
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 4
%26 = load i8*, i8** %25
%27 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %26)
store i32 %27, i32* %10
%28 = load i32, i32* %10
store i32 %28, i32* %7
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = mul i64 %30, 8
%32 = call i8* @malloc(i64 %31)
%33 = bitcast i8* %32 to double**
store double** %33, double*** %11
store i32 0, i32* %6
br label %34
34: ; preds = %48, %2
%35 = load i32, i32* %6
%36 = load i32, i32* %9
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %51
38: ; preds = %34
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = mul i64 %40, 8
%42 = call i8* @malloc(i64 %41)
%43 = bitcast i8* %42 to double*
%44 = load double**, double*** %11
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double*, double** %44, i64 %46
store double* %43, double** %47
br label %48
48: ; preds = %38
%49 = load i32, i32* %6
%50 = add nsw i32 %49, 1
store i32 %50, i32* %6
br label %34
51: ; preds = %34
%52 = load i32, i32* %10
%53 = sext i32 %52 to i64
%54 = mul i64 %53, 8
%55 = call i8* @malloc(i64 %54)
%56 = bitcast i8* %55 to double**
store double** %56, double*** %12
store i32 0, i32* %6
br label %57
57: ; preds = %71, %51
%58 = load i32, i32* %6
%59 = load i32, i32* %10
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %74
61: ; preds = %57
%62 = load i32, i32* %8
%63 = sext i32 %62 to i64
%64 = mul i64 %63, 8
%65 = call i8* @malloc(i64 %64)
%66 = bitcast i8* %65 to double*
%67 = load double**, double*** %12
%68 = load i32, i32* %6
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double*, double** %67, i64 %69
store double* %66, double** %70
br label %71
71: ; preds = %61
%72 = load i32, i32* %6
%73 = add nsw i32 %72, 1
store i32 %73, i32* %6
br label %57
74: ; preds = %57
%75 = load i32, i32* %10
%76 = sext i32 %75 to i64
%77 = mul i64 %76, 8
%78 = call i8* @malloc(i64 %77)
%79 = bitcast i8* %78 to double**
store double** %79, double*** %13
store i32 0, i32* %6
br label %80
80: ; preds = %94, %74
%81 = load i32, i32* %6
%82 = load i32, i32* %10
%83 = icmp slt i32 %81, %82
br i1 %83, label %84, label %97
84: ; preds = %80
%85 = load i32, i32* %10
%86 = sext i32 %85 to i64
%87 = mul i64 %86, 8
%88 = call i8* @malloc(i64 %87)
%89 = bitcast i8* %88 to double*
%90 = load double**, double*** %13
%91 = load i32, i32* %6
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double*, double** %90, i64 %92
store double* %89, double** %93
br label %94
94: ; preds = %84
%95 = load i32, i32* %6
%96 = add nsw i32 %95, 1
store i32 %96, i32* %6
br label %80
97: ; preds = %80
%98 = load i32, i32* %9
%99 = sext i32 %98 to i64
%100 = mul i64 %99, 8
%101 = call i8* @malloc(i64 %100)
%102 = bitcast i8* %101 to double**
store double** %102, double*** %14
store i32 0, i32* %6
br label %103
103: ; preds = %117, %97
%104 = load i32, i32* %6
%105 = load i32, i32* %9
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %120
107: ; preds = %103
%108 = load i32, i32* %8
%109 = sext i32 %108 to i64
%110 = mul i64 %109, 8
%111 = call i8* @malloc(i64 %110)
%112 = bitcast i8* %111 to double*
%113 = load double**, double*** %14
%114 = load i32, i32* %6
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double*, double** %113, i64 %115
store double* %112, double** %116
br label %117
117: ; preds = %107
%118 = load i32, i32* %6
%119 = add nsw i32 %118, 1
store i32 %119, i32* %6
br label %103
120: ; preds = %103
%121 = load i32, i32* %7
%122 = sext i32 %121 to i64
%123 = mul i64 %122, 8
%124 = call i8* @malloc(i64 %123)
%125 = bitcast i8* %124 to double**
%126 = bitcast double** %125 to double***
store double*** %126, double**** %15
store i32 0, i32* %6
br label %127
127: ; preds = %142, %120
%128 = load i32, i32* %6
%129 = load i32, i32* %7
%130 = icmp slt i32 %128, %129
br i1 %130, label %131, label %145
131: ; preds = %127
%132 = load i32, i32* %8
%133 = sext i32 %132 to i64
%134 = mul i64 %133, 8
%135 = call i8* @malloc(i64 %134)
%136 = bitcast i8* %135 to double*
%137 = bitcast double* %136 to double**
%138 = load double***, double**** %15
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double**, double*** %138, i64 %140
store double** %137, double*** %141
br label %142
142: ; preds = %131
%143 = load i32, i32* %6
%144 = add nsw i32 %143, 1
store i32 %144, i32* %6
br label %127
145: ; preds = %127
%146 = load i8**, i8*** %5
%147 = getelementptr inbounds i8*, i8** %146, i64 1
%148 = load i8*, i8** %147
%149 = load double**, double*** %12
%150 = load i32, i32* %10
%151 = load i32, i32* %8
%152 = call i32 (i8*, double**, i32, i32, ...) bitcast (i32 (...)* @imagesFromFile to i32 (i8*, double**, i32, i32, ...)*)(i8* %148, double** %149, i32 %150, i32 %151)
%153 = icmp ne i32 %152, 0
br i1 %153, label %154, label %156
154: ; preds = %145
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %156
156: ; preds = %154, %145
%157 = load i8**, i8*** %5
%158 = getelementptr inbounds i8*, i8** %157, i64 2
%159 = load i8*, i8** %158
%160 = load double**, double*** %13
%161 = load i32, i32* %10
%162 = load i32, i32* %10
%163 = call i32 (i8*, double**, i32, i32, ...) bitcast (i32 (...)* @imagesFromFile to i32 (i8*, double**, i32, i32, ...)*)(i8* %159, double** %160, i32 %161, i32 %162)
%164 = icmp ne i32 %163, 0
br i1 %164, label %165, label %167
165: ; preds = %156
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %167
167: ; preds = %165, %156
%168 = load i8**, i8*** %5
%169 = getelementptr inbounds i8*, i8** %168, i64 3
%170 = load i8*, i8** %169
%171 = load double**, double*** %14
%172 = load i32, i32* %9
%173 = load i32, i32* %8
%174 = call i32 (i8*, double**, i32, i32, ...) bitcast (i32 (...)* @imagesFromFile to i32 (i8*, double**, i32, i32, ...)*)(i8* %170, double** %171, i32 %172, i32 %173)
%175 = icmp ne i32 %174, 0
br i1 %175, label %176, label %178
176: ; preds = %167
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %178
178: ; preds = %176, %167
%179 = load double***, double**** %15
%180 = load double**, double*** %12
%181 = load double**, double*** %13
%182 = load i32, i32* %10
%183 = load i32, i32* %7
%184 = load i32, i32* %8
%185 = call i32 (double***, double**, double**, i32, i32, i32, ...) bitcast (i32 (...)* @learn to i32 (double***, double**, double**, i32, i32, i32, ...)*)(double*** %179, double** %180, double** %181, i32 %182, i32 %183, i32 %184)
%186 = load double***, double**** %15
%187 = load double**, double*** %14
%188 = load double**, double*** %11
%189 = load i32, i32* %9
%190 = load i32, i32* %7
%191 = load i32, i32* %8
%192 = call i32 (double***, double**, double**, i32, i32, i32, ...) bitcast (i32 (...)* @groupRecognize to i32 (double***, double**, double**, i32, i32, i32, ...)*)(double*** %186, double** %187, double** %188, i32 %189, i32 %190, i32 %191)
%193 = load double**, double*** %11
%194 = load i32, i32* %9
%195 = load i32, i32* %7
%196 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @out to i32 (double**, i32, i32, ...)*)(double** %193, i32 %194, i32 %195)
%197 = load double**, double*** %14
%198 = bitcast double** %197 to i8*
%199 = load double***, double**** %15
%200 = bitcast double*** %199 to i8*
%201 = load double**, double*** %12
%202 = bitcast double** %201 to i8*
%203 = load double**, double*** %11
%204 = bitcast double** %203 to i8*
ret i32 0
}

LLVM IR (-O2):
@str.2 = [25 x i8] c"File can not be openned.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 6
%4 = load i8*, i8** %3
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 5
%7 = load i8*, i8** %6
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %7)
%9 = getelementptr inbounds i8*, i8** %1, i64 4
%10 = load i8*, i8** %9
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %10)
%12 = sext i32 %5 to i64
%13 = shl nsw i64 %12, 3
%14 = tail call i8* @malloc(i64 %13)
%15 = bitcast i8* %14 to double**
%16 = icmp sgt i32 %5, 0
%17 = sext i32 %11 to i64
%18 = shl nsw i64 %17, 3
br i1 %16, label %19, label %28
19: ; preds = %2
%20 = zext i32 %5 to i64
br label %21
21: ; preds = %19, %21
%22 = phi i64 [ 0, %19 ], [ %26, %21 ]
%23 = tail call i8* @malloc(i64 %18)
%24 = getelementptr inbounds double*, double** %15, i64 %22
%25 = bitcast double** %24 to i8**
store i8* %23, i8** %25
%26 = add nuw nsw i64 %22, 1
%27 = icmp eq i64 %26, %20
br i1 %27, label %28, label %21
28: ; preds = %21, %2
%29 = tail call i8* @malloc(i64 %18)
%30 = bitcast i8* %29 to double**
%31 = icmp sgt i32 %11, 0
br i1 %31, label %35, label %32
32: ; preds = %28
%33 = tail call i8* @malloc(i64 %18)
%34 = bitcast i8* %33 to double**
br label %58
35: ; preds = %28
%36 = sext i32 %8 to i64
%37 = shl nsw i64 %36, 3
%38 = zext i32 %11 to i64
br label %39
39: ; preds = %35, %39
%40 = phi i64 [ 0, %35 ], [ %44, %39 ]
%41 = tail call i8* @malloc(i64 %37)
%42 = getelementptr inbounds double*, double** %30, i64 %40
%43 = bitcast double** %42 to i8**
store i8* %41, i8** %43
%44 = add nuw nsw i64 %40, 1
%45 = icmp eq i64 %44, %38
br i1 %45, label %46, label %39
46: ; preds = %39
%47 = tail call i8* @malloc(i64 %18)
%48 = bitcast i8* %47 to double**
br i1 %31, label %49, label %58
49: ; preds = %46
%50 = zext i32 %11 to i64
br label %51
51: ; preds = %49, %51
%52 = phi i64 [ 0, %49 ], [ %56, %51 ]
%53 = tail call i8* @malloc(i64 %18)
%54 = getelementptr inbounds double*, double** %48, i64 %52
%55 = bitcast double** %54 to i8**
store i8* %53, i8** %55
%56 = add nuw nsw i64 %52, 1
%57 = icmp eq i64 %56, %50
br i1 %57, label %58, label %51
58: ; preds = %51, %32, %46
%59 = phi double** [ %34, %32 ], [ %48, %46 ], [ %48, %51 ]
%60 = tail call i8* @malloc(i64 %13)
%61 = bitcast i8* %60 to double**
br i1 %16, label %62, label %73
62: ; preds = %58
%63 = sext i32 %8 to i64
%64 = shl nsw i64 %63, 3
%65 = zext i32 %5 to i64
br label %66
66: ; preds = %62, %66
%67 = phi i64 [ 0, %62 ], [ %71, %66 ]
%68 = tail call i8* @malloc(i64 %64)
%69 = getelementptr inbounds double*, double** %61, i64 %67
%70 = bitcast double** %69 to i8**
store i8* %68, i8** %70
%71 = add nuw nsw i64 %67, 1
%72 = icmp eq i64 %71, %65
br i1 %72, label %73, label %66
73: ; preds = %66, %58
%74 = tail call i8* @malloc(i64 %18)
%75 = bitcast i8* %74 to double***
br i1 %31, label %76, label %87
76: ; preds = %73
%77 = sext i32 %8 to i64
%78 = shl nsw i64 %77, 3
%79 = zext i32 %11 to i64
br label %80
80: ; preds = %76, %80
%81 = phi i64 [ 0, %76 ], [ %85, %80 ]
%82 = tail call i8* @malloc(i64 %78)
%83 = getelementptr inbounds double**, double*** %75, i64 %81
%84 = bitcast double*** %83 to i8**
store i8* %82, i8** %84
%85 = add nuw nsw i64 %81, 1
%86 = icmp eq i64 %85, %79
br i1 %86, label %87, label %80
87: ; preds = %80, %73
%88 = getelementptr inbounds i8*, i8** %1, i64 1
%89 = load i8*, i8** %88
%90 = tail call i32 (i8*, double**, i32, i32, ...) bitcast (i32 (...)* @imagesFromFile to i32 (i8*, double**, i32, i32, ...)*)(i8* %89, double** %30, i32 %11, i32 %8)
%91 = icmp eq i32 %90, 0
br i1 %91, label %94, label %92
92: ; preds = %87
%93 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
br label %94
94: ; preds = %92, %87
%95 = getelementptr inbounds i8*, i8** %1, i64 2
%96 = load i8*, i8** %95
%97 = tail call i32 (i8*, double**, i32, i32, ...) bitcast (i32 (...)* @imagesFromFile to i32 (i8*, double**, i32, i32, ...)*)(i8* %96, double** %59, i32 %11, i32 %11)
%98 = icmp eq i32 %97, 0
br i1 %98, label %101, label %99
99: ; preds = %94
%100 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
br label %101
101: ; preds = %99, %94
%102 = getelementptr inbounds i8*, i8** %1, i64 3
%103 = load i8*, i8** %102
%104 = tail call i32 (i8*, double**, i32, i32, ...) bitcast (i32 (...)* @imagesFromFile to i32 (i8*, double**, i32, i32, ...)*)(i8* %103, double** %61, i32 %5, i32 %8)
%105 = icmp eq i32 %104, 0
br i1 %105, label %108, label %106
106: ; preds = %101
%107 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
br label %108
108: ; preds = %106, %101
%109 = tail call i32 (double***, double**, double**, i32, i32, i32, ...) bitcast (i32 (...)* @learn to i32 (double***, double**, double**, i32, i32, i32, ...)*)(double*** %75, double** %30, double** %59, i32 %11, i32 %11, i32 %8)
%110 = tail call i32 (double***, double**, double**, i32, i32, i32, ...) bitcast (i32 (...)* @groupRecognize to i32 (double***, double**, double**, i32, i32, i32, ...)*)(double*** %75, double** %61, double** %15, i32 %5, i32 %11, i32 %8)
%111 = tail call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @out to i32 (double**, i32, i32, ...)*)(double** %15, i32 %5, i32 %11)
tail call void @free(i8* %60)
tail call void @free(i8* %74)
tail call void @free(i8* %29)
tail call void @free(i8* %14)
ret i32 0
}