int main(int argc, char **argv) {
  char *data_dir, *prot1, *prot2, chn1, chn2;
  char pdb_file1[256], pdb_file2[256];
  int prot1_len, prot2_len, iter, iter2, min_len, max_aln_len;
  float(*prot1_coords)[3], (*prot2_coords)[3];
  float **dist, **score;
  int **alignment;
  switch (argc) {
  case 6:
    data_dir = argv[1];
    prot1 = argv[2];
    chn1 = *argv[3];
    prot2 = argv[4];
    chn2 = *argv[5];
    break;
  default:
    print_usage();
  }
  make_full_path_pdb(pdb_file1, data_dir, prot1);
  make_full_path_pdb(pdb_file2, data_dir, prot2);
  prot1_len = count_ca(pdb_file1, &chn1);
  prot2_len = count_ca(pdb_file2, &chn2);
  min_len = (((prot1_len) < (prot2_len)) ? (prot1_len) : (prot2_len));
  max_aln_len = min_len;
  printf("%s:%d, %s:%d\n", prot1, prot1_len, prot2, prot2_len);
  prot1_coords = malloc(prot1_len * 3 * sizeof(float));
  prot2_coords = malloc(prot2_len * 3 * sizeof(float));
  read_ca(pdb_file1, &chn1, prot1_coords);
  read_ca(pdb_file2, &chn2, prot2_coords);
  dist = (float **)malloc(sizeof(float *) * prot1_len);
  for (iter = 0; iter < prot1_len; iter++)
    dist[iter] = (float *)malloc(sizeof(float) * prot2_len);
  alignment = (int **)malloc(sizeof(int *) * max_aln_len);
  for (iter = 0; iter < max_aln_len; iter++)
    alignment[iter] = (int *)malloc(sizeof(int) * 2);
  score = (float **)malloc(sizeof(float *) * prot1_len);
  for (iter = 0; iter < prot1_len; iter++)
    score[iter] = (float *)malloc(sizeof(float) * prot2_len);
  fill_euclid_dist(prot1_coords, prot2_coords, dist, &prot1_len, &prot2_len);
  fill_score(dist, score, &prot1_len, &prot2_len, &min_len);
  free(prot1_coords);
  free(prot2_coords);
  for (iter = 0; iter < prot1_len; iter++)
    free(dist[iter]);
  free(dist);
  for (iter = 0; iter < prot1_len; iter++)
    free(score[iter]);
  free(score);
  for (iter = 0; iter < max_aln_len; iter++)
    free(alignment[iter]);
  free(alignment);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x280,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x6,%eax
jne    11fd <main+0x6d>
jmp    11ba <main+0x2a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%al
mov    %al,-0x29(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
mov    (%rax),%al
mov    %al,-0x2a(%rbp)
jmp    1204 <main+0x74>
mov    $0x0,%al
call   10a0 <print_usage@plt>
lea    -0x130(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    $0x0,%al
call   10b0 <make_full_path_pdb@plt>
lea    -0x230(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x0,%al
call   10b0 <make_full_path_pdb@plt>
lea    -0x130(%rbp),%rdi
lea    -0x29(%rbp),%rsi
mov    $0x0,%al
call   1040 <count_ca@plt>
mov    %eax,-0x234(%rbp)
lea    -0x230(%rbp),%rdi
lea    -0x2a(%rbp),%rsi
mov    $0x0,%al
call   1040 <count_ca@plt>
mov    %eax,-0x238(%rbp)
mov    -0x234(%rbp),%eax
cmp    -0x238(%rbp),%eax
jge    1283 <main+0xf3>
mov    -0x234(%rbp),%eax
mov    %eax,-0x274(%rbp)
jmp    128f <main+0xff>
mov    -0x238(%rbp),%eax
mov    %eax,-0x274(%rbp)
mov    -0x274(%rbp),%eax
mov    %eax,-0x244(%rbp)
mov    -0x244(%rbp),%eax
mov    %eax,-0x248(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x234(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x238(%rbp),%r8d
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
imul   $0x3,-0x234(%rbp),%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x250(%rbp)
imul   $0x3,-0x238(%rbp),%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x258(%rbp)
lea    -0x130(%rbp),%rdi
mov    -0x250(%rbp),%rdx
lea    -0x29(%rbp),%rsi
mov    $0x0,%al
call   1050 <read_ca@plt>
lea    -0x230(%rbp),%rdi
mov    -0x258(%rbp),%rdx
lea    -0x2a(%rbp),%rsi
mov    $0x0,%al
call   1050 <read_ca@plt>
movslq -0x234(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x260(%rbp)
movl   $0x0,-0x23c(%rbp)
mov    -0x23c(%rbp),%eax
cmp    -0x234(%rbp),%eax
jge    139c <main+0x20c>
movslq -0x238(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x260(%rbp),%rax
movslq -0x23c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x23c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x23c(%rbp)
jmp    1351 <main+0x1c1>
movslq -0x248(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x270(%rbp)
movl   $0x0,-0x23c(%rbp)
mov    -0x23c(%rbp),%eax
cmp    -0x248(%rbp),%eax
jge    1402 <main+0x272>
mov    $0x8,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x270(%rbp),%rax
movslq -0x23c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x23c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x23c(%rbp)
jmp    13bd <main+0x22d>
movslq -0x234(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x268(%rbp)
movl   $0x0,-0x23c(%rbp)
mov    -0x23c(%rbp),%eax
cmp    -0x234(%rbp),%eax
jge    146e <main+0x2de>
movslq -0x238(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x268(%rbp),%rax
movslq -0x23c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x23c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x23c(%rbp)
jmp    1423 <main+0x293>
mov    -0x250(%rbp),%rdi
mov    -0x258(%rbp),%rsi
mov    -0x260(%rbp),%rdx
lea    -0x234(%rbp),%rcx
lea    -0x238(%rbp),%r8
mov    $0x0,%al
call   1080 <fill_euclid_dist@plt>
mov    -0x260(%rbp),%rdi
mov    -0x268(%rbp),%rsi
lea    -0x234(%rbp),%rdx
lea    -0x238(%rbp),%rcx
lea    -0x244(%rbp),%r8
mov    $0x0,%al
call   1090 <fill_score@plt>
mov    -0x250(%rbp),%rdi
call   1030 <free@plt>
mov    -0x258(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x23c(%rbp)
mov    -0x23c(%rbp),%eax
cmp    -0x234(%rbp),%eax
jge    1521 <main+0x391>
mov    -0x260(%rbp),%rax
movslq -0x23c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x23c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x23c(%rbp)
jmp    14e4 <main+0x354>
mov    -0x260(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x23c(%rbp)
mov    -0x23c(%rbp),%eax
cmp    -0x234(%rbp),%eax
jge    1574 <main+0x3e4>
mov    -0x268(%rbp),%rax
movslq -0x23c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x23c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x23c(%rbp)
jmp    1537 <main+0x3a7>
mov    -0x268(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x23c(%rbp)
mov    -0x23c(%rbp),%eax
cmp    -0x248(%rbp),%eax
jge    15c7 <main+0x437>
mov    -0x270(%rbp),%rax
movslq -0x23c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x23c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x23c(%rbp)
jmp    158a <main+0x3fa>
mov    -0x270(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x280,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x248,%rsp
cmp    $0x6,%edi
jne    11c8 <main+0x38>
mov    0x8(%rsi),%rbp
mov    0x10(%rsi),%r12
mov    0x18(%rsi),%rax
mov    (%rax),%al
mov    %al,0x7(%rsp)
mov    0x20(%rsi),%rbx
mov    0x28(%rsi),%rax
mov    (%rax),%al
mov    %al,0x6(%rsp)
jmp    11cf <main+0x3f>
xor    %eax,%eax
call   10a0 <print_usage@plt>
lea    0x140(%rsp),%r14
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   10b0 <make_full_path_pdb@plt>
lea    0x40(%rsp),%r15
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <make_full_path_pdb@plt>
lea    0x7(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <count_ca@plt>
mov    %eax,%ebp
mov    %eax,0x8(%rsp)
lea    0x6(%rsp),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <count_ca@plt>
mov    %eax,%r13d
mov    %eax,0x14(%rsp)
cmp    %eax,%ebp
cmovl  %ebp,%eax
mov    %eax,0xc(%rsp)
mov    %eax,0x10(%rsp)
lea    0xdc5(%rip),%rdi
mov    %r12,%rsi
mov    %ebp,%edx
mov    %rbx,%rcx
mov    %r13d,%r8d
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x0(%rbp,%rbp,2),%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%r12
lea    0x0(%r13,%r13,2),%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
lea    0x7(%rsp),%rsi
mov    %r12,0x30(%rsp)
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <read_ca@plt>
mov    %r15,%rdi
lea    0x6(%rsp),%rsi
mov    %rbx,0x28(%rsp)
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <read_ca@plt>
mov    %rbp,0x20(%rsp)
movslq %ebp,%rbx
lea    0x0(,%rbx,8),%r12
mov    %r12,%rdi
call   1070 <malloc@plt>
mov    %rax,%r15
movslq %r13d,%rax
mov    %rax,0x18(%rsp)
mov    %ebx,%r13d
test   %ebx,%ebx
jle    12f5 <main+0x165>
mov    0x18(%rsp),%rax
lea    0x0(,%rax,4),%rbp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
call   1070 <malloc@plt>
mov    %rax,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    12e0 <main+0x150>
mov    0xc(%rsp),%ebp
movslq %ebp,%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    %ebp,%ebx
test   %ebp,%ebp
jle    1327 <main+0x197>
xor    %ebp,%ebp
mov    $0x8,%edi
call   1070 <malloc@plt>
mov    %rax,(%r14,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1310 <main+0x180>
mov    %rbx,0x38(%rsp)
mov    %r12,%rdi
call   1070 <malloc@plt>
mov    %rax,%r12
cmpl   $0x0,0x20(%rsp)
mov    0x18(%rsp),%rbp
jle    1365 <main+0x1d5>
shl    $0x2,%rbp
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1070 <malloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1350 <main+0x1c0>
lea    0x8(%rsp),%rcx
lea    0x14(%rsp),%r13
mov    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    0x28(%rsp),%rbx
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r13,%r8
xor    %eax,%eax
call   1080 <fill_euclid_dist@plt>
lea    0x10(%rsp),%r8
mov    %r15,%rdi
mov    %r12,%rsi
lea    0x8(%rsp),%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1090 <fill_score@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
cmpl   $0x0,0x8(%rsp)
jle    1409 <main+0x279>
xor    %ebx,%ebx
nop
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rbp
cmp    %rbp,%rbx
jl     13c0 <main+0x230>
mov    %r15,%rdi
call   1030 <free@plt>
test   %ebp,%ebp
jle    1411 <main+0x281>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r12,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
cmp    %rax,%rbx
jl     13f0 <main+0x260>
jmp    1411 <main+0x281>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
cmpl   $0x0,0xc(%rsp)
mov    0x38(%rsp),%rbp
jle    1442 <main+0x2b2>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1430 <main+0x2a0>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x248,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"%s:%d, %s:%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca [256 x i8]
%6 = alloca [256 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%12 = bitcast i32* %7 to i8*
%13 = bitcast i32* %8 to i8*
%14 = bitcast i32* %9 to i8*
%15 = icmp eq i32 %0, 6
br i1 %15, label %16, label %29
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = getelementptr inbounds i8*, i8** %1, i64 3
%22 = load i8*, i8** %21
%23 = load i8, i8* %22
store i8 %23, i8* %3
%24 = getelementptr inbounds i8*, i8** %1, i64 4
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8*, i8** %1, i64 5
%27 = load i8*, i8** %26
%28 = load i8, i8* %27
store i8 %28, i8* %4
br label %31
29: ; preds = %2
%30 = tail call i32 (...) @print_usage()
br label %31
31: ; preds = %29, %16
%32 = phi i8* [ %25, %16 ], [ undef, %29 ]
%33 = phi i8* [ %20, %16 ], [ undef, %29 ]
%34 = phi i8* [ %18, %16 ], [ undef, %29 ]
%35 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @make_full_path_pdb to i32 (i8*, i8*, i8*, ...)*)(i8* %10, i8* %34, i8* %33)
%36 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @make_full_path_pdb to i32 (i8*, i8*, i8*, ...)*)(i8* %11, i8* %34, i8* %32)
%37 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @count_ca to i32 (i8*, i8*, ...)*)(i8* %10, i8* %3)
store i32 %37, i32* %7
%38 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @count_ca to i32 (i8*, i8*, ...)*)(i8* %11, i8* %4)
store i32 %38, i32* %8
%39 = icmp slt i32 %37, %38
%40 = select i1 %39, i32 %37, i32 %38
store i32 %40, i32* %9
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %33, i32 %37, i8* %32, i32 %38)
%42 = mul nsw i32 %37, 3
%43 = sext i32 %42 to i64
%44 = shl nsw i64 %43, 2
%45 = call i8* @malloc(i64 %44)
%46 = bitcast i8* %45 to [3 x float]*
%47 = mul nsw i32 %38, 3
%48 = sext i32 %47 to i64
%49 = shl nsw i64 %48, 2
%50 = call i8* @malloc(i64 %49)
%51 = bitcast i8* %50 to [3 x float]*
%52 = call i32 (i8*, i8*, [3 x float]*, ...) bitcast (i32 (...)* @read_ca to i32 (i8*, i8*, [3 x float]*, ...)*)(i8* %10, i8* %3, [3 x float]* %46)
%53 = call i32 (i8*, i8*, [3 x float]*, ...) bitcast (i32 (...)* @read_ca to i32 (i8*, i8*, [3 x float]*, ...)*)(i8* %11, i8* %4, [3 x float]* %51)
%54 = sext i32 %37 to i64
%55 = shl nsw i64 %54, 3
%56 = call i8* @malloc(i64 %55)
%57 = bitcast i8* %56 to float**
%58 = icmp sgt i32 %37, 0
br i1 %58, label %59, label %70
59: ; preds = %31
%60 = sext i32 %38 to i64
%61 = shl nsw i64 %60, 2
%62 = zext i32 %37 to i64
br label %63
63: ; preds = %59, %63
%64 = phi i64 [ 0, %59 ], [ %68, %63 ]
%65 = call i8* @malloc(i64 %61)
%66 = getelementptr inbounds float*, float** %57, i64 %64
%67 = bitcast float** %66 to i8**
store i8* %65, i8** %67
%68 = add nuw nsw i64 %64, 1
%69 = icmp eq i64 %68, %62
br i1 %69, label %70, label %63
70: ; preds = %63, %31
%71 = sext i32 %40 to i64
%72 = shl nsw i64 %71, 3
%73 = call i8* @malloc(i64 %72)
%74 = bitcast i8* %73 to i32**
%75 = icmp sgt i32 %40, 0
br i1 %75, label %76, label %85
76: ; preds = %70
%77 = zext i32 %40 to i64
br label %78
78: ; preds = %76, %78
%79 = phi i64 [ 0, %76 ], [ %83, %78 ]
%80 = call dereferenceable_or_null(8) i8* @malloc(i64 8)
%81 = getelementptr inbounds i32*, i32** %74, i64 %79
%82 = bitcast i32** %81 to i8**
store i8* %80, i8** %82
%83 = add nuw nsw i64 %79, 1
%84 = icmp eq i64 %83, %77
br i1 %84, label %85, label %78
85: ; preds = %78, %70
%86 = call i8* @malloc(i64 %55)
%87 = bitcast i8* %86 to float**
br i1 %58, label %88, label %99
88: ; preds = %85
%89 = sext i32 %38 to i64
%90 = shl nsw i64 %89, 2
%91 = zext i32 %37 to i64
br label %92
92: ; preds = %88, %92
%93 = phi i64 [ 0, %88 ], [ %97, %92 ]
%94 = call i8* @malloc(i64 %90)
%95 = getelementptr inbounds float*, float** %87, i64 %93
%96 = bitcast float** %95 to i8**
store i8* %94, i8** %96
%97 = add nuw nsw i64 %93, 1
%98 = icmp eq i64 %97, %91
br i1 %98, label %99, label %92
99: ; preds = %92, %85
%100 = call i32 ([3 x float]*, [3 x float]*, float**, i32*, i32*, ...) bitcast (i32 (...)* @fill_euclid_dist to i32 ([3 x float]*, [3 x float]*, float**, i32*, i32*, ...)*)([3 x float]* %46, [3 x float]* %51, float** %57, i32* %7, i32* %8)
%101 = call i32 (float**, float**, i32*, i32*, i32*, ...) bitcast (i32 (...)* @fill_score to i32 (float**, float**, i32*, i32*, i32*, ...)*)(float** %57, float** %87, i32* %7, i32* %8, i32* %9)
%102 = load i32, i32* %7
%103 = icmp sgt i32 %102, 0
br i1 %103, label %105, label %104
104: ; preds = %99
br label %125
105: ; preds = %99, %105
%106 = phi i64 [ %110, %105 ], [ 0, %99 ]
%107 = getelementptr inbounds float*, float** %57, i64 %106
%108 = bitcast float** %107 to i8**
%109 = load i8*, i8** %108
%110 = add nuw nsw i64 %106, 1
%111 = load i32, i32* %7
%112 = sext i32 %111 to i64
%113 = icmp slt i64 %110, %112
br i1 %113, label %105, label %114
114: ; preds = %105
%115 = icmp sgt i32 %111, 0
br i1 %115, label %116, label %125
116: ; preds = %114, %116
%117 = phi i64 [ %121, %116 ], [ 0, %114 ]
%118 = getelementptr inbounds float*, float** %87, i64 %117
%119 = bitcast float** %118 to i8**
%120 = load i8*, i8** %119
%121 = add nuw nsw i64 %117, 1
%122 = load i32, i32* %7
%123 = sext i32 %122 to i64
%124 = icmp slt i64 %121, %123
br i1 %124, label %116, label %125
125: ; preds = %116, %104, %114
br i1 %75, label %126, label %135
126: ; preds = %125
%127 = zext i32 %40 to i64
br label %128
128: ; preds = %126, %128
%129 = phi i64 [ 0, %126 ], [ %133, %128 ]
%130 = getelementptr inbounds i32*, i32** %74, i64 %129
%131 = bitcast i32** %130 to i8**
%132 = load i8*, i8** %131
%133 = add nuw nsw i64 %129, 1
%134 = icmp eq i64 %133, %127
br i1 %134, label %135, label %128
135: ; preds = %128, %125
ret i32 0
}