#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double **aln2prf(char *, double **);
int /*<<< orphan*/ deallocate2D_double(double **, int);
int *dirichlet_code2aa_lu();
int /*<<< orphan*/ free(int *);
int strlen(char *);
int get_tot_prob2(char *s1, char *s2, int nstates, float **matchProb,
                  float **insProb, float *TmatchProb, float ***TinsProb) {
  int *lu, I, J, i, j, ij, k, r, r1, r2;
  double **prf1, **prf2;
  I = strlen(s1);
  J = strlen(s2);
  lu = dirichlet_code2aa_lu();
  prf1 = aln2prf(s1, prf1);
  prf2 = aln2prf(s2, prf2);
  for (i = 1; i <= I; i++) {
    for (k = 0; k < nstates; k++) {
      TinsProb[0][k][i] = 0;
      for (r = 0; r < 20; r++) {
        TinsProb[0][k][i] += (float)prf1[i - 1][r] * insProb[lu[r]][k];
      }
    }
  }
  for (j = 1; j <= J; j++) {
    for (k = 0; k < nstates; k++) {
      TinsProb[1][k][j] = 0;
      for (r = 0; r < 20; r++) {
        TinsProb[1][k][j] += (float)prf2[j - 1][r] * insProb[lu[r]][k];
      }
    }
  }
  for (ij = 0, i = 0; i <= I; i++)
    for (j = 0; j <= J; j++, ij++) {
      float tot = 0, f;
      if (i == 0 || j == 0)
        continue;
      TmatchProb[ij] = 0;
      for (tot = 0, r1 = 0; r1 < 20; r1++) {
        for (r2 = 0; r2 < 20; r2++) {
          f = (float)prf1[i - 1][r1] * (float)prf2[j - 1][r2];
          TmatchProb[ij] += matchProb[lu[r1]][lu[r2]] * f;
        }
      }
    }
  free(lu);
  deallocate2D_double(prf1, I);
  deallocate2D_double(prf2, J);
  return 1;
}


x86 assembly (clang, -O0):
<get_tot_prob2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x40(%rbp)
mov    $0x0,%al
call   1050 <dirichlet_code2aa_lu@plt>
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x68(%rbp),%rsi
call   1070 <aln2prf@plt>
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x70(%rbp),%rsi
call   1070 <aln2prf@plt>
mov    %rax,-0x70(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jg     12a1 <get_tot_prob2+0x151>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    128e <get_tot_prob2+0x13e>
mov    0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movl   $0x0,-0x54(%rbp)
cmpl   $0x14,-0x54(%rbp)
jge    127b <get_tot_prob2+0x12b>
mov    -0x68(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq -0x54(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1203 <get_tot_prob2+0xb3>
jmp    1280 <get_tot_prob2+0x130>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11d5 <get_tot_prob2+0x85>
jmp    1293 <get_tot_prob2+0x143>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11c2 <get_tot_prob2+0x72>
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     1389 <get_tot_prob2+0x239>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1376 <get_tot_prob2+0x226>
mov    0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movl   $0x0,-0x54(%rbp)
cmpl   $0x14,-0x54(%rbp)
jge    1363 <get_tot_prob2+0x213>
mov    -0x70(%rbp),%rax
mov    -0x48(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq -0x54(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    12ea <get_tot_prob2+0x19a>
jmp    1368 <get_tot_prob2+0x218>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    12bb <get_tot_prob2+0x16b>
jmp    137b <get_tot_prob2+0x22b>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12a8 <get_tot_prob2+0x158>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jg     14ea <get_tot_prob2+0x39a>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     14d7 <get_tot_prob2+0x387>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x74(%rbp)
cmpl   $0x0,-0x44(%rbp)
je     13d2 <get_tot_prob2+0x282>
cmpl   $0x0,-0x48(%rbp)
jne    13d7 <get_tot_prob2+0x287>
jmp    14c0 <get_tot_prob2+0x370>
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x74(%rbp)
movl   $0x0,-0x58(%rbp)
cmpl   $0x14,-0x58(%rbp)
jge    14bb <get_tot_prob2+0x36b>
movl   $0x0,-0x5c(%rbp)
cmpl   $0x14,-0x5c(%rbp)
jge    14a8 <get_tot_prob2+0x358>
mov    -0x68(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x70(%rbp),%rax
mov    -0x48(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
cvtsd2ss %xmm1,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%rcx
movslq -0x58(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%rcx
movslq -0x5c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  -0x78(%rbp),%xmm2
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1407 <get_tot_prob2+0x2b7>
jmp    14ad <get_tot_prob2+0x35d>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    13f6 <get_tot_prob2+0x2a6>
jmp    14c0 <get_tot_prob2+0x370>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13aa <get_tot_prob2+0x25a>
jmp    14dc <get_tot_prob2+0x38c>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1397 <get_tot_prob2+0x247>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
mov    -0x3c(%rbp),%esi
call   1060 <deallocate2D_double@plt>
mov    -0x70(%rbp),%rdi
mov    -0x40(%rbp),%esi
call   1060 <deallocate2D_double@plt>
mov    $0x1,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tot_prob2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%r13
mov    %r8,%r12
mov    %rcx,%r14
mov    %edx,0x24(%rsp)
mov    %rsi,%r15
mov    %rdi,%rbp
call   1040 <strlen@plt>
mov    %rax,0x8(%rsp)
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %rax,0x10(%rsp)
xor    %eax,%eax
call   1050 <dirichlet_code2aa_lu@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1070 <aln2prf@plt>
mov    %rax,0x18(%rsp)
mov    %r15,%rdi
call   1070 <aln2prf@plt>
mov    0x24(%rsp),%r11d
mov    %rax,%r15
mov    %r11d,%r9d
cmpl   $0x0,0x8(%rsp)
jle    1278 <get_tot_prob2+0x128>
mov    0x8(%rsp),%rax
lea    0x1(%rax),%r8d
mov    $0x1,%edx
jmp    11dd <get_tot_prob2+0x8d>
nopl   (%rax)
add    $0x1,%rdx
cmp    %r8,%rdx
je     1278 <get_tot_prob2+0x128>
test   %r11d,%r11d
jle    11d0 <get_tot_prob2+0x80>
mov    0x60(%rsp),%rax
mov    (%rax),%r10
mov    0x18(%rsp),%rax
mov    -0x8(%rax,%rdx,8),%rdi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    (%r10,%rbp,8),%rcx
movl   $0x0,(%rcx,%rdx,4)
xorps  %xmm0,%xmm0
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  -0x8(%rdi,%rax,8),%xmm1
cvtsd2ss %xmm1,%xmm1
movslq -0x4(%rbx,%rax,4),%rsi
mov    (%r12,%rsi,8),%rsi
mulss  (%rsi,%rbp,4),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rcx,%rdx,4)
movsd  (%rdi,%rax,8),%xmm0
cvtsd2ss %xmm0,%xmm0
movslq (%rbx,%rax,4),%rsi
mov    (%r12,%rsi,8),%rsi
mulss  (%rsi,%rbp,4),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rcx,%rdx,4)
add    $0x2,%rax
cmp    $0x15,%rax
jne    1220 <get_tot_prob2+0xd0>
add    $0x1,%rbp
cmp    %r9,%rbp
jne    1200 <get_tot_prob2+0xb0>
jmp    11d0 <get_tot_prob2+0x80>
cmpl   $0x0,0x10(%rsp)
jle    1348 <get_tot_prob2+0x1f8>
mov    0x10(%rsp),%rax
lea    0x1(%rax),%r8d
mov    $0x1,%edx
jmp    12ad <get_tot_prob2+0x15d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rdx
cmp    %r8,%rdx
je     1348 <get_tot_prob2+0x1f8>
test   %r11d,%r11d
jle    12a0 <get_tot_prob2+0x150>
mov    0x60(%rsp),%rax
mov    0x8(%rax),%r10
mov    -0x8(%r15,%rdx,8),%rdi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r10,%rbp,8),%rcx
movl   $0x0,(%rcx,%rdx,4)
xorps  %xmm0,%xmm0
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  -0x8(%rdi,%rax,8),%xmm1
cvtsd2ss %xmm1,%xmm1
movslq -0x4(%rbx,%rax,4),%rsi
mov    (%r12,%rsi,8),%rsi
mulss  (%rsi,%rbp,4),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rcx,%rdx,4)
movsd  (%rdi,%rax,8),%xmm0
cvtsd2ss %xmm0,%xmm0
movslq (%rbx,%rax,4),%rsi
mov    (%r12,%rsi,8),%rsi
mulss  (%rsi,%rbp,4),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rcx,%rdx,4)
add    $0x2,%rax
cmp    $0x15,%rax
jne    12f0 <get_tot_prob2+0x1a0>
add    $0x1,%rbp
cmp    %r9,%rbp
jne    12d0 <get_tot_prob2+0x180>
jmp    12a0 <get_tot_prob2+0x150>
cmpl   $0x0,0x8(%rsp)
js     144e <get_tot_prob2+0x2fe>
mov    0x10(%rsp),%rax
lea    0x1(%rax),%r9d
mov    0x8(%rsp),%r8
add    $0x1,%r8d
xor    %r10d,%r10d
xor    %esi,%esi
jmp    137d <get_tot_prob2+0x22d>
nopl   0x0(%rax)
add    $0x1,%r10
cmp    %r8,%r10
je     144e <get_tot_prob2+0x2fe>
cmpl   $0x0,0x10(%rsp)
js     1370 <get_tot_prob2+0x220>
movslq %esi,%rsi
xor    %r11d,%r11d
jmp    139d <get_tot_prob2+0x24d>
nopl   0x0(%rax)
add    $0x1,%r11
add    $0x1,%rsi
cmp    %r9,%r11
je     1370 <get_tot_prob2+0x220>
test   %r10,%r10
je     1390 <get_tot_prob2+0x240>
test   %r11,%r11
je     1390 <get_tot_prob2+0x240>
movl   $0x0,0x0(%r13,%rsi,4)
mov    0x18(%rsp),%rax
mov    -0x8(%rax,%r10,8),%r12
mov    -0x8(%r15,%r11,8),%rbp
xorps  %xmm0,%xmm0
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r12,%rax,8),%xmm1
cvtsd2ss %xmm1,%xmm1
movslq (%rbx,%rax,4),%rdx
mov    (%r14,%rdx,8),%rdx
mov    $0x1,%edi
nopw   0x0(%rax,%rax,1)
movsd  -0x8(%rbp,%rdi,8),%xmm2
cvtsd2ss %xmm2,%xmm2
mulss  %xmm1,%xmm2
movslq -0x4(%rbx,%rdi,4),%rcx
mulss  (%rdx,%rcx,4),%xmm2
addss  %xmm0,%xmm2
movss  %xmm2,0x0(%r13,%rsi,4)
movsd  0x0(%rbp,%rdi,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mulss  %xmm1,%xmm0
movslq (%rbx,%rdi,4),%rcx
mulss  (%rdx,%rcx,4),%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,0x0(%r13,%rsi,4)
add    $0x2,%rdi
cmp    $0x15,%rdi
jne    13f0 <get_tot_prob2+0x2a0>
add    $0x1,%rax
cmp    $0x14,%rax
jne    13d0 <get_tot_prob2+0x280>
jmp    1390 <get_tot_prob2+0x240>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1060 <deallocate2D_double@plt>
mov    %r15,%rdi
mov    0x10(%rsp),%rsi
call   1060 <deallocate2D_double@plt>
mov    $0x1,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_tot_prob2(i8* %0, i8* %1, i32 %2, float** %3, float** %4, float* %5, float*** %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca float**
%12 = alloca float**
%13 = alloca float*
%14 = alloca float***
%15 = alloca i32*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca double**
%26 = alloca double**
%27 = alloca float
%28 = alloca float
store i8* %0, i8** %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store float** %3, float*** %11
store float** %4, float*** %12
store float* %5, float** %13
store float*** %6, float**** %14
%29 = load i8*, i8** %8
%30 = call i32 @strlen(i8* %29)
store i32 %30, i32* %16
%31 = load i8*, i8** %9
%32 = call i32 @strlen(i8* %31)
store i32 %32, i32* %17
%33 = call i32* (...) @dirichlet_code2aa_lu()
store i32* %33, i32** %15
%34 = load i8*, i8** %8
%35 = load double**, double*** %25
%36 = call double** @aln2prf(i8* %34, double** %35)
store double** %36, double*** %25
%37 = load i8*, i8** %9
%38 = load double**, double*** %26
%39 = call double** @aln2prf(i8* %37, double** %38)
store double** %39, double*** %26
store i32 1, i32* %18
br label %40
40: ; preds = %108, %7
%41 = load i32, i32* %18
%42 = load i32, i32* %16
%43 = icmp sle i32 %41, %42
br i1 %43, label %44, label %111
44: ; preds = %40
store i32 0, i32* %21
br label %45
45: ; preds = %104, %44
%46 = load i32, i32* %21
%47 = load i32, i32* %10
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %107
49: ; preds = %45
%50 = load float***, float**** %14
%51 = getelementptr inbounds float**, float*** %50, i64 0
%52 = load float**, float*** %51
%53 = load i32, i32* %21
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds float*, float** %52, i64 %54
%56 = load float*, float** %55
%57 = load i32, i32* %18
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds float, float* %56, i64 %58
store float 0.000000e+00, float* %59
store i32 0, i32* %22
br label %60
60: ; preds = %100, %49
%61 = load i32, i32* %22
%62 = icmp slt i32 %61, 20
br i1 %62, label %63, label %103
63: ; preds = %60
%64 = load double**, double*** %25
%65 = load i32, i32* %18
%66 = sub nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds double*, double** %64, i64 %67
%69 = load double*, double** %68
%70 = load i32, i32* %22
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
%73 = load double, double* %72
%74 = fptrunc double %73 to float
%75 = load float**, float*** %12
%76 = load i32*, i32** %15
%77 = load i32, i32* %22
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i32, i32* %76, i64 %78
%80 = load i32, i32* %79
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds float*, float** %75, i64 %81
%83 = load float*, float** %82
%84 = load i32, i32* %21
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds float, float* %83, i64 %85
%87 = load float, float* %86
%88 = load float***, float**** %14
%89 = getelementptr inbounds float**, float*** %88, i64 0
%90 = load float**, float*** %89
%91 = load i32, i32* %21
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds float*, float** %90, i64 %92
%94 = load float*, float** %93
%95 = load i32, i32* %18
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds float, float* %94, i64 %96
%98 = load float, float* %97
%99 = call float @llvm.fmuladd.f32(float %74, float %87, float %98)
store float %99, float* %97
br label %100
100: ; preds = %63
%101 = load i32, i32* %22
%102 = add nsw i32 %101, 1
store i32 %102, i32* %22
br label %60
103: ; preds = %60
br label %104
104: ; preds = %103
%105 = load i32, i32* %21
%106 = add nsw i32 %105, 1
store i32 %106, i32* %21
br label %45
107: ; preds = %45
br label %108
108: ; preds = %107
%109 = load i32, i32* %18
%110 = add nsw i32 %109, 1
store i32 %110, i32* %18
br label %40
111: ; preds = %40
store i32 1, i32* %19
br label %112
112: ; preds = %180, %111
%113 = load i32, i32* %19
%114 = load i32, i32* %17
%115 = icmp sle i32 %113, %114
br i1 %115, label %116, label %183
116: ; preds = %112
store i32 0, i32* %21
br label %117
117: ; preds = %176, %116
%118 = load i32, i32* %21
%119 = load i32, i32* %10
%120 = icmp slt i32 %118, %119
br i1 %120, label %121, label %179
121: ; preds = %117
%122 = load float***, float**** %14
%123 = getelementptr inbounds float**, float*** %122, i64 1
%124 = load float**, float*** %123
%125 = load i32, i32* %21
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds float*, float** %124, i64 %126
%128 = load float*, float** %127
%129 = load i32, i32* %19
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds float, float* %128, i64 %130
store float 0.000000e+00, float* %131
store i32 0, i32* %22
br label %132
132: ; preds = %172, %121
%133 = load i32, i32* %22
%134 = icmp slt i32 %133, 20
br i1 %134, label %135, label %175
135: ; preds = %132
%136 = load double**, double*** %26
%137 = load i32, i32* %19
%138 = sub nsw i32 %137, 1
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double*, double** %136, i64 %139
%141 = load double*, double** %140
%142 = load i32, i32* %22
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %141, i64 %143
%145 = load double, double* %144
%146 = fptrunc double %145 to float
%147 = load float**, float*** %12
%148 = load i32*, i32** %15
%149 = load i32, i32* %22
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %148, i64 %150
%152 = load i32, i32* %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds float*, float** %147, i64 %153
%155 = load float*, float** %154
%156 = load i32, i32* %21
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds float, float* %155, i64 %157
%159 = load float, float* %158
%160 = load float***, float**** %14
%161 = getelementptr inbounds float**, float*** %160, i64 1
%162 = load float**, float*** %161
%163 = load i32, i32* %21
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds float*, float** %162, i64 %164
%166 = load float*, float** %165
%167 = load i32, i32* %19
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds float, float* %166, i64 %168
%170 = load float, float* %169
%171 = call float @llvm.fmuladd.f32(float %146, float %159, float %170)
store float %171, float* %169
br label %172
172: ; preds = %135
%173 = load i32, i32* %22
%174 = add nsw i32 %173, 1
store i32 %174, i32* %22
br label %132
175: ; preds = %132
br label %176
176: ; preds = %175
%177 = load i32, i32* %21
%178 = add nsw i32 %177, 1
store i32 %178, i32* %21
br label %117
179: ; preds = %117
br label %180
180: ; preds = %179
%181 = load i32, i32* %19
%182 = add nsw i32 %181, 1
store i32 %182, i32* %19
br label %112
183: ; preds = %112
store i32 0, i32* %20
store i32 0, i32* %18
br label %184
184: ; preds = %274, %183
%185 = load i32, i32* %18
%186 = load i32, i32* %16
%187 = icmp sle i32 %185, %186
br i1 %187, label %188, label %277
188: ; preds = %184
store i32 0, i32* %19
br label %189
189: ; preds = %268, %188
%190 = load i32, i32* %19
%191 = load i32, i32* %17
%192 = icmp sle i32 %190, %191
br i1 %192, label %193, label %273
193: ; preds = %189
store float 0.000000e+00, float* %27
%194 = load i32, i32* %18
%195 = icmp eq i32 %194, 0
br i1 %195, label %199, label %196
196: ; preds = %193
%197 = load i32, i32* %19
%198 = icmp eq i32 %197, 0
br i1 %198, label %199, label %200
199: ; preds = %196, %193
br label %268
200: ; preds = %196
%201 = load float*, float** %13
%202 = load i32, i32* %20
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds float, float* %201, i64 %203
store float 0.000000e+00, float* %204
store float 0.000000e+00, float* %27
store i32 0, i32* %23
br label %205
205: ; preds = %264, %200
%206 = load i32, i32* %23
%207 = icmp slt i32 %206, 20
br i1 %207, label %208, label %267
208: ; preds = %205
store i32 0, i32* %24
br label %209
209: ; preds = %260, %208
%210 = load i32, i32* %24
%211 = icmp slt i32 %210, 20
br i1 %211, label %212, label %263
212: ; preds = %209
%213 = load double**, double*** %25
%214 = load i32, i32* %18
%215 = sub nsw i32 %214, 1
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double*, double** %213, i64 %216
%218 = load double*, double** %217
%219 = load i32, i32* %23
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double, double* %218, i64 %220
%222 = load double, double* %221
%223 = fptrunc double %222 to float
%224 = load double**, double*** %26
%225 = load i32, i32* %19
%226 = sub nsw i32 %225, 1
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds double*, double** %224, i64 %227
%229 = load double*, double** %228
%230 = load i32, i32* %24
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double, double* %229, i64 %231
%233 = load double, double* %232
%234 = fptrunc double %233 to float
%235 = fmul float %223, %234
store float %235, float* %28
%236 = load float**, float*** %11
%237 = load i32*, i32** %15
%238 = load i32, i32* %23
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds i32, i32* %237, i64 %239
%241 = load i32, i32* %240
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds float*, float** %236, i64 %242
%244 = load float*, float** %243
%245 = load i32*, i32** %15
%246 = load i32, i32* %24
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds i32, i32* %245, i64 %247
%249 = load i32, i32* %248
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds float, float* %244, i64 %250
%252 = load float, float* %251
%253 = load float, float* %28
%254 = load float*, float** %13
%255 = load i32, i32* %20
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds float, float* %254, i64 %256
%258 = load float, float* %257
%259 = call float @llvm.fmuladd.f32(float %252, float %253, float %258)
store float %259, float* %257
br label %260
260: ; preds = %212
%261 = load i32, i32* %24
%262 = add nsw i32 %261, 1
store i32 %262, i32* %24
br label %209
263: ; preds = %209
br label %264
264: ; preds = %263
%265 = load i32, i32* %23
%266 = add nsw i32 %265, 1
store i32 %266, i32* %23
br label %205
267: ; preds = %205
br label %268
268: ; preds = %267, %199
%269 = load i32, i32* %19
%270 = add nsw i32 %269, 1
store i32 %270, i32* %19
%271 = load i32, i32* %20
%272 = add nsw i32 %271, 1
store i32 %272, i32* %20
br label %189
273: ; preds = %189
br label %274
274: ; preds = %273
%275 = load i32, i32* %18
%276 = add nsw i32 %275, 1
store i32 %276, i32* %18
br label %184
277: ; preds = %184
%278 = load i32*, i32** %15
%279 = call i32 @free(i32* %278)
%280 = load double**, double*** %25
%281 = load i32, i32* %16
%282 = call i32 @deallocate2D_double(double** %280, i32 %281)
%283 = load double**, double*** %26
%284 = load i32, i32* %17
%285 = call i32 @deallocate2D_double(double** %283, i32 %284)
ret i32 1
}

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