#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 */
int assign_cell(int, int, int, int);
void frommatp_transtable(int **aseqsT, float *weights, int nseq, int i, int j,
                         int i2, int j2, int *accum_insl, int *accum_insr,
                         double trans[6][6]) {
  int fy, ty;
  int idx;
  for (fy = 0; fy < 6; fy++)
    for (ty = 0; ty < 6; ty++)
      trans[fy][ty] = 0.0;
  for (idx = 0; idx < nseq; idx++) {
    fy = assign_cell(i, j, aseqsT[i][idx], aseqsT[j][idx]);
    ty = assign_cell(i2, j2, aseqsT[i2][idx], aseqsT[j2][idx]);
    if (accum_insl[idx] == 0 && accum_insr[idx] == 0) {
      trans[fy][ty] += weights[idx];
    } else if (accum_insl[idx] > 0) {
      trans[fy][4] += weights[idx];
      trans[4][4] += (accum_insl[idx] - 1) * weights[idx];
      if (accum_insr[idx] > 0) {
        trans[4][5] += weights[idx];
        trans[5][5] += (accum_insr[idx] - 1) * weights[idx];
        trans[5][ty] += weights[idx];
      } else {
        trans[4][ty] += weights[idx];
      }
    } else if (accum_insr[idx] > 0) {
      trans[fy][5] += weights[idx];
      trans[5][5] += (accum_insr[idx] - 1) * weights[idx];
      trans[5][ty] += weights[idx];
    }
  }
}


x86 assembly (clang, -O0):
<frommatp_transtable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    119b <frommatp_transtable+0x8b>
movl   $0x0,-0x28(%rbp)
cmpl   $0x6,-0x28(%rbp)
jge    1188 <frommatp_transtable+0x78>
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1155 <frommatp_transtable+0x45>
jmp    118d <frommatp_transtable+0x7d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1144 <frommatp_transtable+0x34>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1469 <frommatp_transtable+0x359>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
call   1030 <assign_cell@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%edi
mov    0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq 0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
call   1030 <assign_cell@plt>
mov    %eax,-0x28(%rbp)
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    126d <frommatp_transtable+0x15d>
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    126d <frommatp_transtable+0x15d>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1456 <frommatp_transtable+0x346>
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    13ae <frommatp_transtable+0x29e>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
addsd  0x20(%rax),%xmm0
movsd  %xmm0,0x20(%rax)
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
addsd  0xe0(%rax),%xmm0
movsd  %xmm0,0xe0(%rax)
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    137e <frommatp_transtable+0x26e>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
addsd  0xe8(%rax),%xmm0
movsd  %xmm0,0xe8(%rax)
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
addsd  0x118(%rax),%xmm0
movsd  %xmm0,0x118(%rax)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
movslq -0x28(%rbp),%rcx
addsd  0xf0(%rax,%rcx,8),%xmm0
movsd  %xmm0,0xf0(%rax,%rcx,8)
jmp    13a9 <frommatp_transtable+0x299>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
movslq -0x28(%rbp),%rcx
addsd  0xc0(%rax,%rcx,8),%xmm0
movsd  %xmm0,0xc0(%rax,%rcx,8)
jmp    1451 <frommatp_transtable+0x341>
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    144c <frommatp_transtable+0x33c>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,0x28(%rax)
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
addsd  0x118(%rax),%xmm0
movsd  %xmm0,0x118(%rax)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x28(%rbp),%rax
movslq -0x28(%rbp),%rcx
addsd  0xf0(%rax,%rcx,8),%xmm0
movsd  %xmm0,0xf0(%rax,%rcx,8)
jmp    1451 <frommatp_transtable+0x341>
jmp    1456 <frommatp_transtable+0x346>
jmp    145b <frommatp_transtable+0x34b>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11a2 <frommatp_transtable+0x92>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frommatp_transtable>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9d,%r14d
mov    %r8d,%r13d
mov    %ecx,%ebp
mov    %edx,%r12d
mov    %rsi,0x8(%rsp)
mov    %rdi,%rbx
mov    0x78(%rsp),%r15
mov    $0x120,%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
test   %r12d,%r12d
jle    134a <frommatp_transtable+0x22a>
mov    0x60(%rsp),%eax
movslq %ebp,%rcx
mov    %rcx,0x20(%rsp)
movslq %r13d,%rcx
mov    %rcx,0x18(%rsp)
movslq %r14d,%rbp
movslq %eax,%r14
mov    %r12d,%eax
mov    %rax,0x10(%rsp)
xor    %r13d,%r13d
jmp    11f5 <frommatp_transtable+0xd5>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0xe8(%r15),%xmm2
add    $0xffffffff,%ecx
xorps  %xmm3,%xmm3
cvtsi2ss %ecx,%xmm3
addsd  %xmm0,%xmm2
movsd  %xmm2,0xe8(%r15)
mulss  %xmm3,%xmm1
cvtss2sd %xmm1,%xmm1
addsd  0x118(%r15),%xmm1
movsd  %xmm1,0x118(%r15)
mov    $0x5,%ecx
cltq
lea    (%rcx,%rcx,2),%rcx
shl    $0x4,%rcx
add    %r15,%rcx
addsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
add    $0x1,%r13
cmp    %r13,0x10(%rsp)
je     134a <frommatp_transtable+0x22a>
mov    0x20(%rsp),%rdi
mov    (%rbx,%rdi,8),%rax
mov    (%rax,%r13,4),%edx
mov    0x18(%rsp),%rsi
mov    (%rbx,%rsi,8),%rax
mov    (%rax,%r13,4),%ecx
call   1040 <assign_cell@plt>
mov    %eax,%r12d
mov    (%rbx,%rbp,8),%rax
mov    (%rax,%r13,4),%edx
mov    (%rbx,%r14,8),%rax
mov    (%rax,%r13,4),%ecx
mov    %ebp,%edi
mov    %r14d,%esi
call   1040 <assign_cell@plt>
mov    0x68(%rsp),%rcx
mov    (%rcx,%r13,4),%ecx
test   %ecx,%ecx
je     12c0 <frommatp_transtable+0x1a0>
jle    12f0 <frommatp_transtable+0x1d0>
mov    0x8(%rsp),%rdx
movss  (%rdx,%r13,4),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movslq %r12d,%rdx
lea    (%rdx,%rdx,2),%rdx
shl    $0x4,%rdx
movsd  0x20(%r15,%rdx,1),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x20(%r15,%rdx,1)
add    $0xffffffff,%ecx
xorps  %xmm2,%xmm2
cvtsi2ss %ecx,%xmm2
mulss  %xmm1,%xmm2
cvtss2sd %xmm2,%xmm2
addsd  0xe0(%r15),%xmm2
movsd  %xmm2,0xe0(%r15)
mov    0x70(%rsp),%rcx
mov    (%rcx,%r13,4),%ecx
test   %ecx,%ecx
jg     1190 <frommatp_transtable+0x70>
mov    $0x4,%ecx
jmp    11cf <frommatp_transtable+0xaf>
cs nopw 0x0(%rax,%rax,1)
mov    0x70(%rsp),%rcx
mov    (%rcx,%r13,4),%ecx
test   %ecx,%ecx
jne    12f9 <frommatp_transtable+0x1d9>
mov    0x8(%rsp),%rcx
movss  (%rcx,%r13,4),%xmm0
cvtss2sd %xmm0,%xmm0
movslq %r12d,%rcx
jmp    11cf <frommatp_transtable+0xaf>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x70(%rsp),%rcx
mov    (%rcx,%r13,4),%ecx
test   %ecx,%ecx
jle    11e6 <frommatp_transtable+0xc6>
mov    0x8(%rsp),%rdx
movss  (%rdx,%r13,4),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movslq %r12d,%rdx
lea    (%rdx,%rdx,2),%rdx
shl    $0x4,%rdx
movsd  0x28(%r15,%rdx,1),%xmm2
add    $0xffffffff,%ecx
xorps  %xmm3,%xmm3
cvtsi2ss %ecx,%xmm3
addsd  %xmm0,%xmm2
movsd  %xmm2,0x28(%r15,%rdx,1)
mulss  %xmm1,%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
jmp    11b8 <frommatp_transtable+0x98>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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