#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*/ printf(char *, double);
int main() {
  static double buffer[2][1000 * 2 + 1][1000 + 1];
  double(*src)[1000 + 1] = buffer[0], (*dst)[1000 + 1] = buffer[1];
  src[1000][0] = 1;
  for (int n = 0; n < 1000; ++n) {
    for (int i = 1000 - n; i <= 1000 + n; ++i) {
      for (int j = i < 1000 ? 1000 - i : 0; j <= n; ++j) {
        double x = src[i][j];
        if (x != 0) {
          dst[i - 1][j + 1] += x * 0.5;
          dst[i + 1][j > 0 ? j - 1 : 0] += x * 0.4;
          dst[i][j] += x * 0.1;
          src[i][j] = 0;
        }
      }
    }
    double(*tmp)[1000 + 1] = src;
    src = dst;
    dst = tmp;
  }
  double e = 0;
  for (int i = 0; i < 1000 * 2 + 1; ++i)
    for (int j = 0; j < 1000 + 1; ++j)
      e += src[i][j] * (i + j - 1000);
  printf("%f\n", e);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0x2f1a(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0x2f0f(%rip),%rax
add    $0xf481c8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,0x7a3140(%rax)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3e8,-0x1c(%rbp)
jge    1346 <main+0x236>
mov    $0x3e8,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x3e8,%ecx
cmp    %ecx,%eax
jg     1320 <main+0x210>
cmpl   $0x3e8,-0x20(%rbp)
jge    119f <main+0x8f>
mov    $0x3e8,%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    11a9 <main+0x99>
xor    %eax,%eax
mov    %eax,-0x4c(%rbp)
jmp    11a9 <main+0x99>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     130d <main+0x1fd>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
imul   $0x1f48,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11f8 <main+0xe8>
jp     11f8 <main+0xe8>
jmp    12fa <main+0x1ea>
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x1f48,%rcx,%rcx
add    %rcx,%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xdde(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x1f48,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
cmpl   $0x0,-0x24(%rbp)
jle    1274 <main+0x164>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    127e <main+0x16e>
xor    %eax,%eax
mov    %eax,-0x64(%rbp)
jmp    127e <main+0x16e>
mov    -0x58(%rbp),%rax
movsd  -0x60(%rbp),%xmm0
mov    -0x64(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xd7e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
imul   $0x1f48,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xd41(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
imul   $0x1f48,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12ff <main+0x1ef>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11af <main+0x9f>
jmp    1312 <main+0x202>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    116e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1156 <main+0x46>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x7d1,-0x44(%rbp)
jge    13d3 <main+0x2c3>
movl   $0x0,-0x48(%rbp)
cmpl   $0x3e9,-0x48(%rbp)
jge    13c0 <main+0x2b0>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
imul   $0x1f48,%rcx,%rcx
add    %rcx,%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x44(%rbp),%eax
add    -0x48(%rbp),%eax
sub    $0x3e8,%eax
cvtsi2sd %eax,%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1369 <main+0x259>
jmp    13c5 <main+0x2b5>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1355 <main+0x245>
movsd  -0x40(%rbp),%xmm0
lea    0xc41(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movabs $0x3ff0000000000000,%rax
mov    %rax,0x7a6054(%rip)
lea    0xf4b0d5(%rip),%r11
lea    0x2f06(%rip),%rcx
mov    $0xfffffc18,%r12d
mov    $0x3e8,%r9d
mov    $0x3e9,%r14d
xor    %r15d,%r15d
movabs $0x3e800000000,%r10
xorpd  %xmm0,%xmm0
movsd  0xe9b(%rip),%xmm1
movsd  0xe9b(%rip),%xmm2
movsd  0xe9b(%rip),%xmm3
xor    %esi,%esi
jmp    11a5 <main+0x95>
nopl   0x0(%rax)
add    $0x1,%rsi
mov    0x4(%rsp),%r12d
add    $0x1,%r12d
add    $0xffffffffffffffff,%r9
add    $0x1,%r14
mov    %r13,%rcx
cmp    $0x3e8,%rsi
je     1297 <main+0x187>
mov    %r11,%r13
mov    %rcx,%r11
mov    %r9,%rcx
mov    %r12d,0x4(%rsp)
jmp    11cd <main+0xbd>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rcx
add    $0xffffffff,%r12d
cmp    %r14,%rcx
je     1180 <main+0x70>
mov    %rcx,%rdx
shl    $0x20,%rdx
mov    %r10,%rdi
sub    %rdx,%rdi
sar    $0x20,%rdi
cmp    $0x3e8,%rcx
cmovae %r15,%rdi
cmp    %rsi,%rdi
jg     11c0 <main+0xb0>
cmp    $0x3e9,%ecx
mov    $0x3e8,%edx
cmovge %ecx,%edx
add    %r12d,%edx
movslq %edx,%rbx
imul   $0x1f48,%rcx,%rdi
add    $0x1,%rcx
lea    (%rdi,%r13,1),%rdx
add    %r11,%rdi
jmp    122c <main+0x11c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rbp),%rax
mov    %rbp,%rbx
cmp    %rsi,%rax
jge    11c4 <main+0xb4>
movsd  (%rdi,%rbx,8),%xmm4
lea    0x1(%rbx),%rbp
ucomisd %xmm0,%xmm4
jne    123d <main+0x12d>
jnp    1220 <main+0x110>
movapd %xmm4,%xmm5
mulsd  %xmm1,%xmm5
addsd  -0x1f40(%rdx,%rbx,8),%xmm5
ff ff
lea    -0x1(%rbx),%eax
test   %rbx,%rbx
cmovle %r15,%rax
movsd  %xmm5,-0x1f40(%rdx,%rbx,8)
ff ff
imul   $0x1f48,%rcx,%r8
add    %r13,%r8
movapd %xmm4,%xmm5
mulsd  %xmm2,%xmm5
addsd  (%r8,%rax,8),%xmm5
movsd  %xmm5,(%r8,%rax,8)
mulsd  %xmm3,%xmm4
addsd  (%rdx,%rbx,8),%xmm4
movsd  %xmm4,(%rdx,%rbx,8)
movq   $0x0,(%rdi,%rbx,8)
jmp    1220 <main+0x110>
xorpd  %xmm0,%xmm0
mov    $0xfffffc18,%ecx
xor    %edx,%edx
jmp    12c7 <main+0x1b7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rdx
add    $0x1f48,%r13
add    $0x1,%ecx
cmp    $0x7d1,%rdx
je     1319 <main+0x209>
mov    $0x8,%esi
mov    %ecx,%edi
movapd %xmm0,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd  -0x8(%r13,%rsi,1),%xmm0
addsd  %xmm1,%xmm0
cmp    $0x1f48,%rsi
je     12b0 <main+0x1a0>
lea    0x1(%rdi),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x0(%r13,%rsi,1),%xmm1
addsd  %xmm0,%xmm1
add    $0x10,%rsi
add    $0x2,%edi
jmp    12e0 <main+0x1d0>
lea    0xcf8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.buffer = internal global [2 x [2001 x [1001 x double]]] zeroinitializer
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1001 x double]*
%3 = alloca [1001 x double]*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca [1001 x double]*
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store [1001 x double]* getelementptr inbounds ([2 x [2001 x [1001 x double]]], [2 x [2001 x [1001 x double]]]* @main.buffer, i64 0, i64 0, i64 0), [1001 x double]** %2
store [1001 x double]* getelementptr inbounds ([2 x [2001 x [1001 x double]]], [2 x [2001 x [1001 x double]]]* @main.buffer, i64 0, i64 1, i64 0), [1001 x double]** %3
%12 = load [1001 x double]*, [1001 x double]** %2
%13 = getelementptr inbounds [1001 x double], [1001 x double]* %12, i64 1000
%14 = getelementptr inbounds [1001 x double], [1001 x double]* %13, i64 0, i64 0
store double 1.000000e+00, double* %14
store i32 0, i32* %4
br label %15
15: ; preds = %110, %0
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 1000
br i1 %17, label %18, label %113
18: ; preds = %15
%19 = load i32, i32* %4
%20 = sub nsw i32 1000, %19
store i32 %20, i32* %5
br label %21
21: ; preds = %103, %18
%22 = load i32, i32* %5
%23 = load i32, i32* %4
%24 = add nsw i32 1000, %23
%25 = icmp sle i32 %22, %24
br i1 %25, label %26, label %106
26: ; preds = %21
%27 = load i32, i32* %5
%28 = icmp slt i32 %27, 1000
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* %5
%31 = sub nsw i32 1000, %30
br label %33
32: ; preds = %26
br label %33
33: ; preds = %32, %29
%34 = phi i32 [ %31, %29 ], [ 0, %32 ]
store i32 %34, i32* %6
br label %35
35: ; preds = %99, %33
%36 = load i32, i32* %6
%37 = load i32, i32* %4
%38 = icmp sle i32 %36, %37
br i1 %38, label %39, label %102
39: ; preds = %35
%40 = load [1001 x double]*, [1001 x double]** %2
%41 = load i32, i32* %5
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [1001 x double], [1001 x double]* %40, i64 %42
%44 = load i32, i32* %6
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [1001 x double], [1001 x double]* %43, i64 0, i64 %45
%47 = load double, double* %46
store double %47, double* %7
%48 = load double, double* %7
%49 = fcmp une double %48, 0.000000e+00
br i1 %49, label %50, label %98
50: ; preds = %39
%51 = load double, double* %7
%52 = load [1001 x double]*, [1001 x double]** %3
%53 = load i32, i32* %5
%54 = sub nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [1001 x double], [1001 x double]* %52, i64 %55
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 1
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [1001 x double], [1001 x double]* %56, i64 0, i64 %59
%61 = load double, double* %60
%62 = call double @llvm.fmuladd.f64(double %51, double 5.000000e-01, double %61)
store double %62, double* %60
%63 = load double, double* %7
%64 = load [1001 x double]*, [1001 x double]** %3
%65 = load i32, i32* %5
%66 = add nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [1001 x double], [1001 x double]* %64, i64 %67
%69 = load i32, i32* %6
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %50
%72 = load i32, i32* %6
%73 = sub nsw i32 %72, 1
br label %75
74: ; preds = %50
br label %75
75: ; preds = %74, %71
%76 = phi i32 [ %73, %71 ], [ 0, %74 ]
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [1001 x double], [1001 x double]* %68, i64 0, i64 %77
%79 = load double, double* %78
%80 = call double @llvm.fmuladd.f64(double %63, double 4.000000e-01, double %79)
store double %80, double* %78
%81 = load double, double* %7
%82 = load [1001 x double]*, [1001 x double]** %3
%83 = load i32, i32* %5
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [1001 x double], [1001 x double]* %82, i64 %84
%86 = load i32, i32* %6
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [1001 x double], [1001 x double]* %85, i64 0, i64 %87
%89 = load double, double* %88
%90 = call double @llvm.fmuladd.f64(double %81, double 1.000000e-01, double %89)
store double %90, double* %88
%91 = load [1001 x double]*, [1001 x double]** %2
%92 = load i32, i32* %5
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [1001 x double], [1001 x double]* %91, i64 %93
%95 = load i32, i32* %6
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [1001 x double], [1001 x double]* %94, i64 0, i64 %96
store double 0.000000e+00, double* %97
br label %98
98: ; preds = %75, %39
br label %99
99: ; preds = %98
%100 = load i32, i32* %6
%101 = add nsw i32 %100, 1
store i32 %101, i32* %6
br label %35
102: ; preds = %35
br label %103
103: ; preds = %102
%104 = load i32, i32* %5
%105 = add nsw i32 %104, 1
store i32 %105, i32* %5
br label %21
106: ; preds = %21
%107 = load [1001 x double]*, [1001 x double]** %2
store [1001 x double]* %107, [1001 x double]** %8
%108 = load [1001 x double]*, [1001 x double]** %3
store [1001 x double]* %108, [1001 x double]** %2
%109 = load [1001 x double]*, [1001 x double]** %8
store [1001 x double]* %109, [1001 x double]** %3
br label %110
110: ; preds = %106
%111 = load i32, i32* %4
%112 = add nsw i32 %111, 1
store i32 %112, i32* %4
br label %15
113: ; preds = %15
store double 0.000000e+00, double* %9
store i32 0, i32* %10
br label %114
114: ; preds = %141, %113
%115 = load i32, i32* %10
%116 = icmp slt i32 %115, 2001
br i1 %116, label %117, label %144
117: ; preds = %114
store i32 0, i32* %11
br label %118
118: ; preds = %137, %117
%119 = load i32, i32* %11
%120 = icmp slt i32 %119, 1001
br i1 %120, label %121, label %140
121: ; preds = %118
%122 = load [1001 x double]*, [1001 x double]** %2
%123 = load i32, i32* %10
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [1001 x double], [1001 x double]* %122, i64 %124
%126 = load i32, i32* %11
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [1001 x double], [1001 x double]* %125, i64 0, i64 %127
%129 = load double, double* %128
%130 = load i32, i32* %10
%131 = load i32, i32* %11
%132 = add nsw i32 %130, %131
%133 = sub nsw i32 %132, 1000
%134 = sitofp i32 %133 to double
%135 = load double, double* %9
%136 = call double @llvm.fmuladd.f64(double %129, double %134, double %135)
store double %136, double* %9
br label %137
137: ; preds = %121
%138 = load i32, i32* %11
%139 = add nsw i32 %138, 1
store i32 %139, i32* %11
br label %118
140: ; preds = %118
br label %141
141: ; preds = %140
%142 = load i32, i32* %10
%143 = add nsw i32 %142, 1
store i32 %143, i32* %10
br label %114
144: ; preds = %114
%145 = load double, double* %9
%146 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %145)
%147 = load i32, i32* %1
ret i32 %147
}

LLVM IR (-O2):
@main.buffer = internal unnamed_addr global [2 x [2001 x [1001 x double]]] zeroinitializer
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
store double 1.000000e+00, double* getelementptr inbounds ([2 x [2001 x [1001 x double]]], [2 x [2001 x [1001 x double]]]* @main.buffer, i64 0, i64 0, i64 1000, i64 0)
br label %1
1: ; preds = %8, %0
%2 = phi i64 [ 0, %0 ], [ %9, %8 ]
%3 = phi i64 [ 1001, %0 ], [ %12, %8 ]
%4 = phi i64 [ 1000, %0 ], [ %11, %8 ]
%5 = phi i32 [ -1000, %0 ], [ %10, %8 ]
%6 = phi [1001 x double]* [ getelementptr inbounds ([2 x [2001 x [1001 x double]]], [2 x [2001 x [1001 x double]]]* @main.buffer, i64 0, i64 0, i64 0), %0 ], [ %7, %8 ]
%7 = phi [1001 x double]* [ getelementptr inbounds ([2 x [2001 x [1001 x double]]], [2 x [2001 x [1001 x double]]]* @main.buffer, i64 0, i64 1, i64 0), %0 ], [ %6, %8 ]
br label %14
8: ; preds = %32
%9 = add nuw nsw i64 %2, 1
%10 = add nsw i32 %5, 1
%11 = add nsw i64 %4, -1
%12 = add nuw nsw i64 %3, 1
%13 = icmp eq i64 %9, 1000
br i1 %13, label %58, label %1
14: ; preds = %1, %32
%15 = phi i64 [ %4, %1 ], [ %33, %32 ]
%16 = phi i32 [ %5, %1 ], [ %34, %32 ]
%17 = icmp ult i64 %15, 1000
%18 = mul i64 %15, -4294967296
%19 = add i64 %18, 4294967296000
%20 = ashr exact i64 %19, 32
%21 = select i1 %17, i64 %20, i64 0
%22 = icmp sgt i64 %21, %2
br i1 %22, label %23, label %25
23: ; preds = %14
%24 = add nuw nsw i64 %15, 1
br label %32
25: ; preds = %14
%26 = trunc i64 %15 to i32
%27 = call i32 @llvm.smax.i32(i32 %26, i32 1000)
%28 = add i32 %27, %16
%29 = sext i32 %28 to i64
%30 = add nsw i64 %15, -1
%31 = add nuw nsw i64 %15, 1
br label %36
32: ; preds = %56, %23
%33 = phi i64 [ %24, %23 ], [ %31, %56 ]
%34 = add nsw i32 %16, -1
%35 = icmp eq i64 %33, %3
br i1 %35, label %8, label %14
36: ; preds = %25, %56
%37 = phi i64 [ %29, %25 ], [ %41, %56 ]
%38 = getelementptr inbounds [1001 x double], [1001 x double]* %6, i64 %15, i64 %37
%39 = load double, double* %38
%40 = fcmp une double %39, 0.000000e+00
%41 = add nsw i64 %37, 1
br i1 %40, label %42, label %56
42: ; preds = %36
%43 = getelementptr inbounds [1001 x double], [1001 x double]* %7, i64 %30, i64 %41
%44 = load double, double* %43
%45 = tail call double @llvm.fmuladd.f64(double %39, double 5.000000e-01, double %44)
store double %45, double* %43
%46 = icmp sgt i64 %37, 0
%47 = add i64 %37, 4294967295
%48 = and i64 %47, 4294967295
%49 = select i1 %46, i64 %48, i64 0
%50 = getelementptr inbounds [1001 x double], [1001 x double]* %7, i64 %31, i64 %49
%51 = load double, double* %50
%52 = tail call double @llvm.fmuladd.f64(double %39, double 4.000000e-01, double %51)
store double %52, double* %50
%53 = getelementptr inbounds [1001 x double], [1001 x double]* %7, i64 %15, i64 %37
%54 = load double, double* %53
%55 = tail call double @llvm.fmuladd.f64(double %39, double 1.000000e-01, double %54)
store double %55, double* %53
store double 0.000000e+00, double* %38
br label %56
56: ; preds = %36, %42
%57 = icmp slt i64 %37, %2
br i1 %57, label %36, label %32
58: ; preds = %8, %64
%59 = phi i64 [ %65, %64 ], [ 0, %8 ]
%60 = phi double [ %75, %64 ], [ 0.000000e+00, %8 ]
%61 = add nuw i64 %59, 4294966296
br label %67
62: ; preds = %64
%63 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %75)
ret i32 0
64: ; preds = %67
%65 = add nuw nsw i64 %59, 1
%66 = icmp eq i64 %65, 2001
br i1 %66, label %62, label %58
67: ; preds = %78, %58
%68 = phi i64 [ 0, %58 ], [ %85, %78 ]
%69 = phi double [ %60, %58 ], [ %84, %78 ]
%70 = getelementptr inbounds [1001 x double], [1001 x double]* %7, i64 %59, i64 %68
%71 = load double, double* %70
%72 = add nuw nsw i64 %61, %68
%73 = trunc i64 %72 to i32
%74 = sitofp i32 %73 to double
%75 = tail call double @llvm.fmuladd.f64(double %71, double %74, double %69)
%76 = or i64 %68, 1
%77 = icmp eq i64 %76, 1001
br i1 %77, label %64, label %78
78: ; preds = %67
%79 = getelementptr inbounds [1001 x double], [1001 x double]* %7, i64 %59, i64 %76
%80 = load double, double* %79
%81 = add nuw nsw i64 %61, %76
%82 = trunc i64 %81 to i32
%83 = sitofp i32 %82 to double
%84 = tail call double @llvm.fmuladd.f64(double %80, double %83, double %75)
%85 = add nuw nsw i64 %68, 2
br label %67
}