#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ isinf(double);
scalar_t__ isnan(double);
int /*<<< orphan*/ stderr;
void _tram_direct_update_biased_conf_weights(
    double *bias_sequence, int *state_sequence, int seq_length, double *R_K_i,
    int n_therm_states, int n_conf_states, double *new_biased_conf_weights) {
  int i, K, Ki, x;
  double divisor;
  for (x = 0; x < seq_length; ++x) {
    i = state_sequence[x];
    if (i < 0)
      continue;
    divisor = 0;
    for (K = 0; K < n_therm_states; ++K) {
      Ki = K * n_conf_states + i;
      if (0 < R_K_i[Ki]) {
        divisor += R_K_i[Ki] * bias_sequence[x * n_therm_states + K];
      }
    }
    if (divisor == 0)
      fprintf(stderr, "divisor is zero. should never happen!\n");
    if (isnan(divisor))
      fprintf(stderr, "divisor is NaN. should never happen!\n");
    for (K = 0; K < n_therm_states; ++K) {
      Ki = K * n_conf_states + i;
      new_biased_conf_weights[Ki] +=
          bias_sequence[x * n_therm_states + K] / divisor;
      if (isnan(new_biased_conf_weights[Ki]))
        fprintf(stderr, "Z:Warning Z[%d,%d]=NaN (%f,%f) %d\n", K, i,
                bias_sequence[x * n_therm_states + K], divisor, x);
      if (isinf(new_biased_conf_weights[Ki]))
        fprintf(stderr, "Z:Warning Z[%d,%d]=Inf (%f,%f) %d\n", K, i,
                bias_sequence[x * n_therm_states + K], divisor, x);
    }
  }
}


x86 assembly (clang, -O0):
<_tram_direct_update_biased_conf_weights>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    138a <_tram_direct_update_biased_conf_weights+0x25a>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jge    1183 <_tram_direct_update_biased_conf_weights+0x53>
jmp    137c <_tram_direct_update_biased_conf_weights+0x24c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    120d <_tram_direct_update_biased_conf_weights+0xdd>
mov    -0x30(%rbp),%eax
imul   -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11fa <_tram_direct_update_biased_conf_weights+0xca>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    11ff <_tram_direct_update_biased_conf_weights+0xcf>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1192 <_tram_direct_update_biased_conf_weights+0x62>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    123c <_tram_direct_update_biased_conf_weights+0x10c>
jp     123c <_tram_direct_update_biased_conf_weights+0x10c>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0xdcb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movsd  -0x40(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     1267 <_tram_direct_update_biased_conf_weights+0x137>
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
lea    0xdc7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1377 <_tram_direct_update_biased_conf_weights+0x247>
mov    -0x30(%rbp),%eax
imul   -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     130c <_tram_direct_update_biased_conf_weights+0x1dc>
mov    0x2d09(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%esi
imul   -0x24(%rbp),%esi
add    -0x30(%rbp),%esi
movslq %esi,%rsi
movsd  (%rax,%rsi,8),%xmm0
movsd  -0x40(%rbp),%xmm1
mov    -0x38(%rbp),%r8d
lea    0xd48(%rip),%rsi
mov    $0x2,%al
call   1030 <fprintf@plt>
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     1364 <_tram_direct_update_biased_conf_weights+0x234>
mov    0x2cb1(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%esi
imul   -0x24(%rbp),%esi
add    -0x30(%rbp),%esi
movslq %esi,%rsi
movsd  (%rax,%rsi,8),%xmm0
movsd  -0x40(%rbp),%xmm1
mov    -0x38(%rbp),%r8d
lea    0xd13(%rip),%rsi
mov    $0x2,%al
call   1030 <fprintf@plt>
jmp    1369 <_tram_direct_update_biased_conf_weights+0x239>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    126e <_tram_direct_update_biased_conf_weights+0x13e>
jmp    137c <_tram_direct_update_biased_conf_weights+0x24c>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    115a <_tram_direct_update_biased_conf_weights+0x2a>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tram_direct_update_biased_conf_weights>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r8d,0xc(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rsi,0x68(%rsp)
mov    %rdi,0x18(%rsp)
test   %edx,%edx
jle    13ec <_tram_direct_update_biased_conf_weights+0x2bc>
movslq %r9d,%rcx
movslq 0xc(%rsp),%rsi
mov    %edx,%eax
mov    %rax,0x60(%rsp)
mov    %esi,%ebp
mov    %ebp,%eax
and    $0xfffffffe,%eax
mov    %rax,0x40(%rsp)
mov    0x10(%rsp),%rax
lea    (%rax,%rcx,8),%rax
mov    %rax,0x38(%rsp)
lea    (%rcx,%rcx,1),%rax
mov    %rax,0x30(%rsp)
mov    0x18(%rsp),%rbx
lea    0x8(%rbx),%rax
mov    %rsi,0x28(%rsp)
lea    0x0(,%rsi,8),%rdx
mov    %rdx,0x58(%rsp)
mov    %rcx,0x48(%rsp)
lea    0x0(,%rcx,8),%rcx
mov    %rcx,0x70(%rsp)
xor    %r12d,%r12d
mov    %rbp,0x50(%rsp)
jmp    11ef <_tram_direct_update_biased_conf_weights+0xbf>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r12
mov    0x20(%rsp),%rax
mov    0x58(%rsp),%rcx
add    %rcx,%rax
add    %rcx,%rbx
cmp    0x60(%rsp),%r12
je     13ec <_tram_direct_update_biased_conf_weights+0x2bc>
mov    %rax,0x20(%rsp)
mov    0x68(%rsp),%rax
mov    (%rax,%r12,4),%r14d
test   %r14d,%r14d
js     11d0 <_tram_direct_update_biased_conf_weights+0xa0>
mov    0xc(%rsp),%r15d
xorpd  %xmm0,%xmm0
test   %r15d,%r15d
jle    126a <_tram_direct_update_biased_conf_weights+0x13a>
cmp    $0x1,%r15d
jne    137f <_tram_direct_update_biased_conf_weights+0x24f>
xor    %eax,%eax
mov    0x10(%rsp),%r8
xorpd  %xmm1,%xmm1
mov    0x50(%rsp),%rbp
test   $0x1,%bpl
je     1262 <_tram_direct_update_biased_conf_weights+0x132>
mov    %rax,%rcx
imul   0x48(%rsp),%rcx
add    %r14,%rcx
movsd  (%r8,%rcx,8),%xmm2
ucomisd %xmm1,%xmm2
jbe    1262 <_tram_direct_update_biased_conf_weights+0x132>
mov    %r12,%rcx
imul   0x28(%rsp),%rcx
add    %rcx,%rax
mov    0x18(%rsp),%rcx
mulsd  (%rcx,%rax,8),%xmm2
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jne    128b <_tram_direct_update_biased_conf_weights+0x15b>
jp     128b <_tram_direct_update_biased_conf_weights+0x15b>
movsd  %xmm0,(%rsp)
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
lea    0xd81(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
movsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <isnan@plt>
test   %rax,%rax
je     12b1 <_tram_direct_update_biased_conf_weights+0x181>
mov    0x2d3f(%rip),%rax
mov    (%rax),%edi
lea    0xd7d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
test   %r15d,%r15d
movsd  (%rsp),%xmm1
jle    11d0 <_tram_direct_update_biased_conf_weights+0xa0>
movslq %r14d,%rax
mov    0xb0(%rsp),%rcx
lea    (%rcx,%rax,8),%r15
xor    %r13d,%r13d
jmp    12f7 <_tram_direct_update_biased_conf_weights+0x1c7>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r13
add    0x70(%rsp),%r15
cmp    %r13,%rbp
movsd  (%rsp),%xmm1
je     11d0 <_tram_direct_update_biased_conf_weights+0xa0>
movsd  (%rbx,%r13,8),%xmm0
divsd  %xmm1,%xmm0
addsd  (%r15),%xmm0
movsd  %xmm0,(%r15)
call   1040 <isnan@plt>
test   %rax,%rax
je     1340 <_tram_direct_update_biased_conf_weights+0x210>
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
movsd  (%rbx,%r13,8),%xmm0
lea    0xd22(%rip),%rsi
mov    %r13d,%edx
mov    %r14d,%ecx
movsd  (%rsp),%xmm1
mov    %r12d,%r8d
mov    $0x2,%al
call   1030 <fprintf@plt>
movsd  (%r15),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
je     12e0 <_tram_direct_update_biased_conf_weights+0x1b0>
mov    0x2c8a(%rip),%rax
mov    (%rax),%edi
movsd  (%rbx,%r13,8),%xmm0
lea    0xd0b(%rip),%rsi
mov    %r13d,%edx
mov    %r14d,%ecx
movsd  (%rsp),%xmm1
mov    %r12d,%r8d
mov    $0x2,%al
call   1030 <fprintf@plt>
jmp    12e0 <_tram_direct_update_biased_conf_weights+0x1b0>
mov    %r14,%rcx
xor    %eax,%eax
mov    0x10(%rsp),%r8
mov    0x40(%rsp),%rsi
mov    0x38(%rsp),%rdi
mov    0x30(%rsp),%rbp
mov    0x20(%rsp),%rdx
xorpd  %xmm1,%xmm1
jmp    13c0 <_tram_direct_update_biased_conf_weights+0x290>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x2,%rax
add    %rbp,%rcx
cmp    %rax,%rsi
je     1225 <_tram_direct_update_biased_conf_weights+0xf5>
movsd  (%r8,%rcx,8),%xmm2
ucomisd %xmm1,%xmm2
jbe    13d6 <_tram_direct_update_biased_conf_weights+0x2a6>
mulsd  -0x8(%rdx,%rax,8),%xmm2
addsd  %xmm2,%xmm0
movsd  (%rdi,%rcx,8),%xmm2
ucomisd %xmm1,%xmm2
jbe    13b0 <_tram_direct_update_biased_conf_weights+0x280>
mulsd  (%rdx,%rax,8),%xmm2
addsd  %xmm2,%xmm0
jmp    13b0 <_tram_direct_update_biased_conf_weights+0x280>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"divisor is zero. should never happen!\0A\00"
@.str.1 = [38 x i8] c"divisor is NaN. should never happen!\0A\00"
@.str.2 = [35 x i8] c"Z:Warning Z[%d,%d]=NaN (%f,%f) %d\0A\00"
@.str.3 = [35 x i8] c"Z:Warning Z[%d,%d]=Inf (%f,%f) %d\0A\00"
define void @_tram_direct_update_biased_conf_weights(double* %0, i32* %1, i32 %2, double* %3, i32 %4, i32 %5, double* %6) {
%8 = alloca double*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
store double* %0, double** %8
store i32* %1, i32** %9
store i32 %2, i32* %10
store double* %3, double** %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store double* %6, double** %14
store i32 0, i32* %18
br label %20
20: ; preds = %164, %7
%21 = load i32, i32* %18
%22 = load i32, i32* %10
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %167
24: ; preds = %20
%25 = load i32*, i32** %9
%26 = load i32, i32* %18
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
%29 = load i32, i32* %28
store i32 %29, i32* %15
%30 = load i32, i32* %15
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %24
br label %164
33: ; preds = %24
store double 0.000000e+00, double* %19
store i32 0, i32* %16
br label %34
34: ; preds = %68, %33
%35 = load i32, i32* %16
%36 = load i32, i32* %12
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %71
38: ; preds = %34
%39 = load i32, i32* %16
%40 = load i32, i32* %13
%41 = mul nsw i32 %39, %40
%42 = load i32, i32* %15
%43 = add nsw i32 %41, %42
store i32 %43, i32* %17
%44 = load double*, double** %11
%45 = load i32, i32* %17
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %44, i64 %46
%48 = load double, double* %47
%49 = fcmp olt double 0.000000e+00, %48
br i1 %49, label %50, label %67
50: ; preds = %38
%51 = load double*, double** %11
%52 = load i32, i32* %17
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
%55 = load double, double* %54
%56 = load double*, double** %8
%57 = load i32, i32* %18
%58 = load i32, i32* %12
%59 = mul nsw i32 %57, %58
%60 = load i32, i32* %16
%61 = add nsw i32 %59, %60
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %56, i64 %62
%64 = load double, double* %63
%65 = load double, double* %19
%66 = call double @llvm.fmuladd.f64(double %55, double %64, double %65)
store double %66, double* %19
br label %67
67: ; preds = %50, %38
br label %68
68: ; preds = %67
%69 = load i32, i32* %16
%70 = add nsw i32 %69, 1
store i32 %70, i32* %16
br label %34
71: ; preds = %34
%72 = load double, double* %19
%73 = fcmp oeq double %72, 0.000000e+00
br i1 %73, label %74, label %77
74: ; preds = %71
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %77
77: ; preds = %74, %71
%78 = load double, double* %19
%79 = call i64 @isnan(double %78)
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %84
81: ; preds = %77
%82 = load i32, i32* @stderr
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %84
84: ; preds = %81, %77
store i32 0, i32* %16
br label %85
85: ; preds = %160, %84
%86 = load i32, i32* %16
%87 = load i32, i32* %12
%88 = icmp slt i32 %86, %87
br i1 %88, label %89, label %163
89: ; preds = %85
%90 = load i32, i32* %16
%91 = load i32, i32* %13
%92 = mul nsw i32 %90, %91
%93 = load i32, i32* %15
%94 = add nsw i32 %92, %93
store i32 %94, i32* %17
%95 = load double*, double** %8
%96 = load i32, i32* %18
%97 = load i32, i32* %12
%98 = mul nsw i32 %96, %97
%99 = load i32, i32* %16
%100 = add nsw i32 %98, %99
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %95, i64 %101
%103 = load double, double* %102
%104 = load double, double* %19
%105 = fdiv double %103, %104
%106 = load double*, double** %14
%107 = load i32, i32* %17
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %106, i64 %108
%110 = load double, double* %109
%111 = fadd double %110, %105
store double %111, double* %109
%112 = load double*, double** %14
%113 = load i32, i32* %17
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = call i64 @isnan(double %116)
%118 = icmp ne i64 %117, 0
br i1 %118, label %119, label %135
119: ; preds = %89
%120 = load i32, i32* @stderr
%121 = load i32, i32* %16
%122 = load i32, i32* %15
%123 = load double*, double** %8
%124 = load i32, i32* %18
%125 = load i32, i32* %12
%126 = mul nsw i32 %124, %125
%127 = load i32, i32* %16
%128 = add nsw i32 %126, %127
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %123, i64 %129
%131 = load double, double* %130
%132 = load double, double* %19
%133 = load i32, i32* %18
%134 = call i32 (i32, i8*, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %121, i32 %122, double %131, double %132, i32 %133)
br label %135
135: ; preds = %119, %89
%136 = load double*, double** %14
%137 = load i32, i32* %17
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds double, double* %136, i64 %138
%140 = load double, double* %139
%141 = call i64 @isinf(double %140)
%142 = icmp ne i64 %141, 0
br i1 %142, label %143, label %159
143: ; preds = %135
%144 = load i32, i32* @stderr
%145 = load i32, i32* %16
%146 = load i32, i32* %15
%147 = load double*, double** %8
%148 = load i32, i32* %18
%149 = load i32, i32* %12
%150 = mul nsw i32 %148, %149
%151 = load i32, i32* %16
%152 = add nsw i32 %150, %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %147, i64 %153
%155 = load double, double* %154
%156 = load double, double* %19
%157 = load i32, i32* %18
%158 = call i32 (i32, i8*, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %145, i32 %146, double %155, double %156, i32 %157)
br label %159
159: ; preds = %143, %135
br label %160
160: ; preds = %159
%161 = load i32, i32* %16
%162 = add nsw i32 %161, 1
store i32 %162, i32* %16
br label %85
163: ; preds = %85
br label %164
164: ; preds = %163, %32
%165 = load i32, i32* %18
%166 = add nsw i32 %165, 1
store i32 %166, i32* %18
br label %20
167: ; preds = %20
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"divisor is zero. should never happen!\0A\00"
@.str.1 = [38 x i8] c"divisor is NaN. should never happen!\0A\00"
@.str.2 = [35 x i8] c"Z:Warning Z[%d,%d]=NaN (%f,%f) %d\0A\00"
@.str.3 = [35 x i8] c"Z:Warning Z[%d,%d]=Inf (%f,%f) %d\0A\00"
define void @_tram_direct_update_biased_conf_weights(double* nocapture %0, i32* nocapture %1, i32 %2, double* nocapture %3, i32 %4, i32 %5, double* nocapture %6) {
%8 = icmp sgt i32 %2, 0
br i1 %8, label %9, label %129
9: ; preds = %7
%10 = icmp sgt i32 %4, 0
%11 = sext i32 %5 to i64
%12 = sext i32 %4 to i64
%13 = zext i32 %2 to i64
%14 = zext i32 %4 to i64
%15 = zext i32 %4 to i64
%16 = and i64 %14, 1
%17 = icmp eq i32 %4, 1
%18 = and i64 %14, 4294967294
%19 = icmp eq i64 %16, 0
br label %20
20: ; preds = %9, %126
%21 = phi i64 [ 0, %9 ], [ %127, %126 ]
%22 = getelementptr inbounds i32, i32* %1, i64 %21
%23 = load i32, i32* %22
%24 = icmp slt i32 %23, 0
br i1 %24, label %126, label %25
25: ; preds = %20
br i1 %10, label %26, label %79
26: ; preds = %25
%27 = mul nsw i64 %21, %12
%28 = zext i32 %23 to i64
br i1 %17, label %61, label %29
29: ; preds = %26, %56
%30 = phi i64 [ %58, %56 ], [ 0, %26 ]
%31 = phi double [ %57, %56 ], [ 0.000000e+00, %26 ]
%32 = phi i64 [ %59, %56 ], [ 0, %26 ]
%33 = mul nsw i64 %30, %11
%34 = add nsw i64 %33, %28
%35 = getelementptr inbounds double, double* %3, i64 %34
%36 = load double, double* %35
%37 = fcmp ogt double %36, 0.000000e+00
br i1 %37, label %38, label %43
38: ; preds = %29
%39 = add nsw i64 %30, %27
%40 = getelementptr inbounds double, double* %0, i64 %39
%41 = load double, double* %40
%42 = tail call double @llvm.fmuladd.f64(double %36, double %41, double %31)
br label %43
43: ; preds = %29, %38
%44 = phi double [ %42, %38 ], [ %31, %29 ]
%45 = or i64 %30, 1
%46 = mul nsw i64 %45, %11
%47 = add nsw i64 %46, %28
%48 = getelementptr inbounds double, double* %3, i64 %47
%49 = load double, double* %48
%50 = fcmp ogt double %49, 0.000000e+00
br i1 %50, label %51, label %56
51: ; preds = %43
%52 = add nsw i64 %45, %27
%53 = getelementptr inbounds double, double* %0, i64 %52
%54 = load double, double* %53
%55 = tail call double @llvm.fmuladd.f64(double %49, double %54, double %44)
br label %56
56: ; preds = %51, %43
%57 = phi double [ %55, %51 ], [ %44, %43 ]
%58 = add nuw nsw i64 %30, 2
%59 = add i64 %32, 2
%60 = icmp eq i64 %59, %18
br i1 %60, label %61, label %29
61: ; preds = %56, %26
%62 = phi double [ undef, %26 ], [ %57, %56 ]
%63 = phi i64 [ 0, %26 ], [ %58, %56 ]
%64 = phi double [ 0.000000e+00, %26 ], [ %57, %56 ]
br i1 %19, label %76, label %65
65: ; preds = %61
%66 = mul nsw i64 %63, %11
%67 = add nsw i64 %66, %28
%68 = getelementptr inbounds double, double* %3, i64 %67
%69 = load double, double* %68
%70 = fcmp ogt double %69, 0.000000e+00
br i1 %70, label %71, label %76
71: ; preds = %65
%72 = add nsw i64 %63, %27
%73 = getelementptr inbounds double, double* %0, i64 %72
%74 = load double, double* %73
%75 = tail call double @llvm.fmuladd.f64(double %69, double %74, double %64)
br label %76
76: ; preds = %65, %71, %61
%77 = phi double [ %62, %61 ], [ %75, %71 ], [ %64, %65 ]
%78 = fcmp oeq double %77, 0.000000e+00
br i1 %78, label %79, label %83
79: ; preds = %25, %76
%80 = phi double [ %77, %76 ], [ 0.000000e+00, %25 ]
%81 = load i32, i32* @stderr
%82 = tail call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %83
83: ; preds = %79, %76
%84 = phi double [ %80, %79 ], [ %77, %76 ]
%85 = tail call i64 @isnan(double %84)
%86 = icmp eq i64 %85, 0
br i1 %86, label %90, label %87
87: ; preds = %83
%88 = load i32, i32* @stderr
%89 = tail call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %90
90: ; preds = %87, %83
br i1 %10, label %91, label %126
91: ; preds = %90
%92 = mul nsw i64 %21, %12
%93 = sext i32 %23 to i64
%94 = trunc i64 %21 to i32
%95 = trunc i64 %21 to i32
br label %96
96: ; preds = %91, %123
%97 = phi i64 [ 0, %91 ], [ %124, %123 ]
%98 = mul nsw i64 %97, %11
%99 = add nsw i64 %98, %93
%100 = add nsw i64 %97, %92
%101 = getelementptr inbounds double, double* %0, i64 %100
%102 = load double, double* %101
%103 = fdiv double %102, %84
%104 = getelementptr inbounds double, double* %6, i64 %99
%105 = load double, double* %104
%106 = fadd double %105, %103
store double %106, double* %104
%107 = tail call i64 @isnan(double %106)
%108 = icmp eq i64 %107, 0
br i1 %108, label %114, label %109
109: ; preds = %96
%110 = load i32, i32* @stderr
%111 = load double, double* %101
%112 = trunc i64 %97 to i32
%113 = tail call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %112, i32 %23, double %111, double %84, i32 %94)
br label %114
114: ; preds = %109, %96
%115 = load double, double* %104
%116 = tail call i64 @isinf(double %115)
%117 = icmp eq i64 %116, 0
br i1 %117, label %123, label %118
118: ; preds = %114
%119 = load i32, i32* @stderr
%120 = load double, double* %101
%121 = trunc i64 %97 to i32
%122 = tail call i32 (i32, i8*, ...) @fprintf(i32 %119, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %121, i32 %23, double %120, double %84, i32 %95)
br label %123
123: ; preds = %114, %118
%124 = add nuw nsw i64 %97, 1
%125 = icmp eq i64 %124, %15
br i1 %125, label %126, label %96
126: ; preds = %123, %90, %20
%127 = add nuw nsw i64 %21, 1
%128 = icmp eq i64 %127, %13
br i1 %128, label %129, label %20
129: ; preds = %126, %7
ret void
}