#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 fromroot_transtable(int **aseqsT, float *weights, int nseq, 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++) {
    ty = assign_cell(i2, j2, aseqsT[i2][idx], aseqsT[j2][idx]);
    if (accum_insl[idx] == 0 && accum_insr[idx] == 0) {
      trans[0][ty] += weights[idx];
    } else if (accum_insl[idx] > 0) {
      trans[0][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[0][5] += weights[idx];
      trans[5][5] += (accum_insr[idx] - 1) * weights[idx];
      trans[5][ty] += weights[idx];
    }
  }
}


x86 assembly (clang, -O0):
<fromroot_transtable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x6,-0x2c(%rbp)
jge    1194 <fromroot_transtable+0x84>
movl   $0x0,-0x30(%rbp)
cmpl   $0x6,-0x30(%rbp)
jge    1181 <fromroot_transtable+0x71>
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    114e <fromroot_transtable+0x3e>
jmp    1186 <fromroot_transtable+0x76>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    113d <fromroot_transtable+0x2d>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    140d <fromroot_transtable+0x2fd>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
call   1030 <assign_cell@plt>
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1227 <fromroot_transtable+0x117>
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1227 <fromroot_transtable+0x117>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    13fa <fromroot_transtable+0x2ea>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    135d <fromroot_transtable+0x24d>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
addsd  0x20(%rax),%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
addsd  0xe0(%rax),%xmm0
movsd  %xmm0,0xe0(%rax)
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    132d <fromroot_transtable+0x21d>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
addsd  0xe8(%rax),%xmm0
movsd  %xmm0,0xe8(%rax)
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
addsd  0x118(%rax),%xmm0
movsd  %xmm0,0x118(%rax)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
addsd  0xf0(%rax,%rcx,8),%xmm0
movsd  %xmm0,0xf0(%rax,%rcx,8)
jmp    1358 <fromroot_transtable+0x248>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
addsd  0xc0(%rax,%rcx,8),%xmm0
movsd  %xmm0,0xc0(%rax,%rcx,8)
jmp    13f5 <fromroot_transtable+0x2e5>
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    13f0 <fromroot_transtable+0x2e0>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
addsd  0x28(%rax),%xmm0
movsd  %xmm0,0x28(%rax)
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
addsd  0x118(%rax),%xmm0
movsd  %xmm0,0x118(%rax)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
addsd  0xf0(%rax,%rcx,8),%xmm0
movsd  %xmm0,0xf0(%rax,%rcx,8)
jmp    13f5 <fromroot_transtable+0x2e5>
jmp    13fa <fromroot_transtable+0x2ea>
jmp    13ff <fromroot_transtable+0x2ef>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    119b <fromroot_transtable+0x8b>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fromroot_transtable>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,0x10(%rsp)
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %rsi,0x8(%rsp)
mov    %rdi,%r12
mov    0x58(%rsp),%rbx
mov    $0x120,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
test   %r15d,%r15d
jle    12db <fromroot_transtable+0x1bb>
movslq %ebp,%r13
movslq %r14d,%rbp
mov    %r15d,%r14d
xor    %r15d,%r15d
jmp    11cf <fromroot_transtable+0xaf>
xchg   %ax,%ax
movsd  0xe8(%rbx),%xmm2
add    $0xffffffff,%ecx
xorps  %xmm3,%xmm3
cvtsi2ss %ecx,%xmm3
addsd  %xmm0,%xmm2
movsd  %xmm2,0xe8(%rbx)
mulss  %xmm3,%xmm1
cvtss2sd %xmm1,%xmm1
addsd  0x118(%rbx),%xmm1
movsd  %xmm1,0x118(%rbx)
mov    $0x5,%ecx
cltq
lea    (%rcx,%rcx,2),%rcx
shl    $0x4,%rcx
add    %rbx,%rcx
addsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
add    $0x1,%r15
cmp    %r15,%r14
je     12db <fromroot_transtable+0x1bb>
mov    (%r12,%r13,8),%rax
mov    (%rax,%r15,4),%edx
mov    (%r12,%rbp,8),%rax
mov    (%rax,%r15,4),%ecx
mov    %r13d,%edi
mov    %ebp,%esi
call   1040 <assign_cell@plt>
mov    0x10(%rsp),%rcx
mov    (%rcx,%r15,4),%ecx
test   %ecx,%ecx
je     1260 <fromroot_transtable+0x140>
jle    1290 <fromroot_transtable+0x170>
mov    0x8(%rsp),%rdx
movss  (%rdx,%r15,4),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  0x20(%rbx),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x20(%rbx)
add    $0xffffffff,%ecx
xorps  %xmm2,%xmm2
cvtsi2ss %ecx,%xmm2
mulss  %xmm1,%xmm2
cvtss2sd %xmm2,%xmm2
addsd  0xe0(%rbx),%xmm2
movsd  %xmm2,0xe0(%rbx)
mov    0x50(%rsp),%rcx
mov    (%rcx,%r15,4),%ecx
test   %ecx,%ecx
jg     1170 <fromroot_transtable+0x50>
mov    $0x4,%ecx
jmp    11ab <fromroot_transtable+0x8b>
nopl   0x0(%rax)
mov    0x50(%rsp),%rcx
mov    (%rcx,%r15,4),%ecx
test   %ecx,%ecx
jne    1299 <fromroot_transtable+0x179>
mov    0x8(%rsp),%rcx
movss  (%rcx,%r15,4),%xmm0
cvtss2sd %xmm0,%xmm0
xor    %ecx,%ecx
jmp    11ab <fromroot_transtable+0x8b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x50(%rsp),%rcx
mov    (%rcx,%r15,4),%ecx
test   %ecx,%ecx
jle    11c2 <fromroot_transtable+0xa2>
mov    0x8(%rsp),%rdx
movss  (%rdx,%r15,4),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  0x28(%rbx),%xmm2
add    $0xffffffff,%ecx
xorps  %xmm3,%xmm3
cvtsi2ss %ecx,%xmm3
addsd  %xmm0,%xmm2
movsd  %xmm2,0x28(%rbx)
mulss  %xmm1,%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
jmp    1196 <fromroot_transtable+0x76>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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