#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
double pow(double, double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  int n_points = 100;
  int n_t = 1000;
  int i, j;
  double x[n_points];
  double u_past[n_points];
  double u[n_points][n_t];
  double dx;
  double dt;
  double nu = 0.07;
  double sigma = 0.02;
  double alpha;
  FILE *fileout;
  double final = 1.0;
  double inicial = 0.0;
  dx = (final - inicial) / n_points;
  printf("%f\n", dx);
  for (i = 0; i < n_points; i++) {
    x[i] = i * dx;
    u[i][0] = 0;
    if (x[i] < 0.66 && x[i] > 0.33) {
      u[i][0] = 1.0;
    }
  }
  dt = (sigma * pow(dx, 2.0)) / nu;
  printf("%f\n", dt);
  alpha = dt / pow(dx, 2.0);
  for (j = 0; j < n_t - 1; j++) {
    for (i = 0; i < n_points; i++) {
      u_past[i] = u[i][j];
    }
    for (i = 1; i < (n_points - 1); i++) {
      u[i][j + 1] = nu * alpha * u_past[i + 1] +
                    (1.0 - 2.0 * nu * alpha) * u_past[i] +
                    nu * alpha * u_past[i - 1];
    }
  }
  fileout = fopen("ResultsDifusionAnim.dat", "w");
  for (i = 0; i < n_points; i++) {
    fprintf(fileout, "%f ", x[i]);
    for (j = 0; j < n_t; j++) {
      fprintf(fileout, "%f ", u[i][j]);
    }
    fprintf(fileout, "\n");
  }
  fclose(fileout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x3e8,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x98(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
mov    %rax,-0x90(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,8),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x88(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x38(%rbp)
mov    %rax,-0x40(%rbp)
movsd  0xe11(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xdfc(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xde7(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
subsd  -0x80(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
lea    0xde6(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1309 <main+0x1b9>
mov    -0xa0(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    -0x90(%rbp),%rsi
cvtsi2sdl -0x10(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movslq -0x10(%rbp),%rdx
movsd  %xmm0,(%rax,%rdx,8)
movslq -0x10(%rbp),%rdx
imul   %rsi,%rdx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
movslq -0x10(%rbp),%rcx
movsd  0xd7a(%rip),%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    12f6 <main+0x1a6>
mov    -0xa0(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xd5f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12f6 <main+0x1a6>
mov    -0x88(%rbp),%rax
mov    -0x90(%rbp),%rdx
movslq -0x10(%rbp),%rcx
imul   %rdx,%rcx
movsd  0xd0f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12fb <main+0x1ab>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1256 <main+0x106>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  0xcf5(%rip),%xmm1
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xce3(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  0xcac(%rip),%xmm1
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14e1 <main+0x391>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13f4 <main+0x2a4>
mov    -0x98(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    -0x90(%rbp),%rsi
movslq -0x10(%rbp),%rdx
imul   %rsi,%rdx
shl    $0x3,%rdx
add    %rdx,%rcx
movslq -0x14(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13a4 <main+0x254>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14ce <main+0x37e>
mov    -0x88(%rbp),%rax
mov    -0x90(%rbp),%rdx
mov    -0x98(%rbp),%rcx
movsd  -0x58(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
mov    -0x10(%rbp),%esi
add    $0x1,%esi
movslq %esi,%rsi
movsd  (%rcx,%rsi,8),%xmm2
movsd  0xbd7(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm3
movq   %xmm0,%rsi
movabs $0x8000000000000000,%rdi
xor    %rdi,%rsi
movq   %rsi,%xmm0
mulsd  %xmm3,%xmm0
movsd  0xb92(%rip),%xmm3
addsd  %xmm3,%xmm0
movslq -0x10(%rbp),%rsi
mulsd  (%rcx,%rsi,8),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%esi
sub    $0x1,%esi
movslq %esi,%rsi
movsd  (%rcx,%rsi,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x10(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13fb <main+0x2ab>
jmp    14d3 <main+0x383>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    138c <main+0x23c>
lea    0xb4c(%rip),%rdi
lea    0xb5d(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    15a6 <main+0x456>
mov    -0xa0(%rbp),%rax
mov    -0x70(%rbp),%rdi
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xb28(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1586 <main+0x436>
mov    -0x88(%rbp),%rax
mov    -0x90(%rbp),%rdx
mov    -0x70(%rbp),%rdi
movslq -0x10(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xadd(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1534 <main+0x3e4>
mov    -0x70(%rbp),%rdi
lea    0xaa1(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    14ff <main+0x3af>
mov    -0x70(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc3b40,%rsp
lea    0xee9(%rip),%rdi
movsd  0xe91(%rip),%xmm0
call   1040 <printf@plt>
movsd  0xe84(%rip),%xmm5
lea    0x640(%rsp),%rax
xor    %ecx,%ecx
movsd  0xe7a(%rip),%xmm0
movsd  0xe7a(%rip),%xmm1
movsd  0xe7a(%rip),%xmm2
xchg   %ax,%ax
xorps  %xmm3,%xmm3
cvtsi2sd %ecx,%xmm3
mulsd  %xmm5,%xmm3
movsd  %xmm3,0x320(%rsp,%rcx,8)
movapd %xmm1,%xmm4
cmpltsd %xmm3,%xmm4
cmpltsd %xmm0,%xmm3
andpd  %xmm2,%xmm4
andpd  %xmm3,%xmm4
movlpd %xmm4,(%rax)
lea    0x1(%rcx),%edx
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
mulsd  %xmm5,%xmm3
movsd  %xmm3,0x328(%rsp,%rcx,8)
movapd %xmm1,%xmm4
cmpltsd %xmm3,%xmm4
cmpltsd %xmm0,%xmm3
andpd  %xmm2,%xmm4
andpd  %xmm3,%xmm4
movlpd %xmm4,0x1f40(%rax)
add    $0x3e80,%rax
add    $0x2,%rcx
cmp    $0x64,%rcx
jne    11a0 <main+0x50>
lea    0xe36(%rip),%rdi
movsd  0xdfe(%rip),%xmm0
call   1040 <printf@plt>
lea    0x640(%rsp),%rax
lea    0x10(%rsp),%rcx
xor    %edx,%edx
movapd 0xdf2(%rip),%xmm0
movapd 0xdfa(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
mov    $0x2,%esi
mov    %rax,%rdi
nopl   0x0(%rax,%rax,1)
movsd  (%rdi),%xmm2
movhps 0x1f40(%rdi),%xmm2
movaps %xmm2,-0x10(%rsp,%rsi,8)
movsd  0x3e80(%rdi),%xmm2
movhpd 0x5dc0(%rdi),%xmm2
movapd %xmm2,(%rsp,%rsi,8)
add    $0x7d00,%rdi
add    $0x4,%rsi
cmp    $0x66,%rsi
jne    1260 <main+0x110>
add    $0x1,%rdx
movhpd 0x8(%rsp),%xmm2
mov    $0x7d1,%esi
mov    %rcx,%rdi
nopl   0x0(%rax,%rax,1)
movapd (%rdi),%xmm3
shufpd $0x1,%xmm3,%xmm2
mulpd  %xmm0,%xmm2
movapd %xmm3,%xmm4
mulpd  %xmm1,%xmm4
addpd  %xmm2,%xmm4
movapd -0x10(%rdi),%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
movlpd %xmm2,-0x1f40(%rax,%rsi,8)
ff ff
movhpd %xmm2,(%rax,%rsi,8)
add    $0x7d0,%rsi
add    $0x10,%rdi
movapd %xmm3,%xmm2
cmp    $0x186a1,%rsi
jne    12b0 <main+0x160>
add    $0x8,%rax
cmp    $0x3e7,%rdx
jne    1250 <main+0x100>
lea    0xd40(%rip),%rdi
lea    0xd51(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%r15
lea    0x640(%rsp),%r13
xor    %r12d,%r12d
lea    0xd39(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x320(%rsp,%r12,8),%xmm0
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  0x0(%r13,%rbx,8),%xmm0
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
add    $0x1,%rbx
cmp    $0x3e8,%rbx
jne    1360 <main+0x210>
mov    $0xa,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
add    $0x1,%r12
add    $0x1f40,%r13
cmp    $0x64,%r12
jne    1340 <main+0x1f0>
mov    %r15,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0xc3b40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [24 x i8] c"ResultsDifusionAnim.dat\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [4 x i8] c"%f \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca i32*
%17 = alloca double
%18 = alloca double
store i32 0, i32* %1
store i32 100, i32* %2
store i32 1000, i32* %3
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %6
%22 = alloca double, i64 %20
store i64 %20, i64* %7
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
%25 = alloca double, i64 %24
store i64 %24, i64* %8
%26 = load i32, i32* %2
%27 = zext i32 %26 to i64
%28 = load i32, i32* %3
%29 = zext i32 %28 to i64
%30 = mul nuw i64 %27, %29
%31 = alloca double, i64 %30
store i64 %27, i64* %9
store i64 %29, i64* %10
store double 7.000000e-02, double* %13
store double 2.000000e-02, double* %14
store double 1.000000e+00, double* %17
store double 0.000000e+00, double* %18
%32 = load double, double* %17
%33 = load double, double* %18
%34 = fsub double %32, %33
%35 = load i32, i32* %2
%36 = sitofp i32 %35 to double
%37 = fdiv double %34, %36
store double %37, double* %11
%38 = load double, double* %11
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %38)
store i32 0, i32* %4
br label %40
40: ; preds = %75, %0
%41 = load i32, i32* %4
%42 = load i32, i32* %2
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %78
44: ; preds = %40
%45 = load i32, i32* %4
%46 = sitofp i32 %45 to double
%47 = load double, double* %11
%48 = fmul double %46, %47
%49 = load i32, i32* %4
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %22, i64 %50
store double %48, double* %51
%52 = load i32, i32* %4
%53 = sext i32 %52 to i64
%54 = mul nsw i64 %53, %29
%55 = getelementptr inbounds double, double* %31, i64 %54
%56 = getelementptr inbounds double, double* %55, i64 0
store double 0.000000e+00, double* %56
%57 = load i32, i32* %4
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double, double* %22, i64 %58
%60 = load double, double* %59
%61 = fcmp olt double %60, 6.600000e-01
br i1 %61, label %62, label %74
62: ; preds = %44
%63 = load i32, i32* %4
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %22, i64 %64
%66 = load double, double* %65
%67 = fcmp ogt double %66, 3.300000e-01
br i1 %67, label %68, label %74
68: ; preds = %62
%69 = load i32, i32* %4
%70 = sext i32 %69 to i64
%71 = mul nsw i64 %70, %29
%72 = getelementptr inbounds double, double* %31, i64 %71
%73 = getelementptr inbounds double, double* %72, i64 0
store double 1.000000e+00, double* %73
br label %74
74: ; preds = %68, %62, %44
br label %75
75: ; preds = %74
%76 = load i32, i32* %4
%77 = add nsw i32 %76, 1
store i32 %77, i32* %4
br label %40
78: ; preds = %40
%79 = load double, double* %14
%80 = load double, double* %11
%81 = call double @pow(double %80, double 2.000000e+00)
%82 = fmul double %79, %81
%83 = load double, double* %13
%84 = fdiv double %82, %83
store double %84, double* %12
%85 = load double, double* %12
%86 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %85)
%87 = load double, double* %12
%88 = load double, double* %11
%89 = call double @pow(double %88, double 2.000000e+00)
%90 = fdiv double %87, %89
store double %90, double* %15
store i32 0, i32* %5
br label %91
91: ; preds = %163, %78
%92 = load i32, i32* %5
%93 = load i32, i32* %3
%94 = sub nsw i32 %93, 1
%95 = icmp slt i32 %92, %94
br i1 %95, label %96, label %166
96: ; preds = %91
store i32 0, i32* %4
br label %97
97: ; preds = %113, %96
%98 = load i32, i32* %4
%99 = load i32, i32* %2
%100 = icmp slt i32 %98, %99
br i1 %100, label %101, label %116
101: ; preds = %97
%102 = load i32, i32* %4
%103 = sext i32 %102 to i64
%104 = mul nsw i64 %103, %29
%105 = getelementptr inbounds double, double* %31, i64 %104
%106 = load i32, i32* %5
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
%110 = load i32, i32* %4
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %25, i64 %111
store double %109, double* %112
br label %113
113: ; preds = %101
%114 = load i32, i32* %4
%115 = add nsw i32 %114, 1
store i32 %115, i32* %4
br label %97
116: ; preds = %97
store i32 1, i32* %4
br label %117
117: ; preds = %159, %116
%118 = load i32, i32* %4
%119 = load i32, i32* %2
%120 = sub nsw i32 %119, 1
%121 = icmp slt i32 %118, %120
br i1 %121, label %122, label %162
122: ; preds = %117
%123 = load double, double* %13
%124 = load double, double* %15
%125 = fmul double %123, %124
%126 = load i32, i32* %4
%127 = add nsw i32 %126, 1
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %25, i64 %128
%130 = load double, double* %129
%131 = load double, double* %13
%132 = fmul double 2.000000e+00, %131
%133 = load double, double* %15
%134 = fneg double %132
%135 = call double @llvm.fmuladd.f64(double %134, double %133, double 1.000000e+00)
%136 = load i32, i32* %4
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %25, i64 %137
%139 = load double, double* %138
%140 = fmul double %135, %139
%141 = call double @llvm.fmuladd.f64(double %125, double %130, double %140)
%142 = load double, double* %13
%143 = load double, double* %15
%144 = fmul double %142, %143
%145 = load i32, i32* %4
%146 = sub nsw i32 %145, 1
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds double, double* %25, i64 %147
%149 = load double, double* %148
%150 = call double @llvm.fmuladd.f64(double %144, double %149, double %141)
%151 = load i32, i32* %4
%152 = sext i32 %151 to i64
%153 = mul nsw i64 %152, %29
%154 = getelementptr inbounds double, double* %31, i64 %153
%155 = load i32, i32* %5
%156 = add nsw i32 %155, 1
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %154, i64 %157
store double %150, double* %158
br label %159
159: ; preds = %122
%160 = load i32, i32* %4
%161 = add nsw i32 %160, 1
store i32 %161, i32* %4
br label %117
162: ; preds = %117
br label %163
163: ; preds = %162
%164 = load i32, i32* %5
%165 = add nsw i32 %164, 1
store i32 %165, i32* %5
br label %91
166: ; preds = %91
%167 = call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %167, i32** %16
store i32 0, i32* %4
br label %168
168: ; preds = %200, %166
%169 = load i32, i32* %4
%170 = load i32, i32* %2
%171 = icmp slt i32 %169, %170
br i1 %171, label %172, label %203
172: ; preds = %168
%173 = load i32*, i32** %16
%174 = load i32, i32* %4
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double, double* %22, i64 %175
%177 = load double, double* %176
%178 = call i32 (i32*, i8*, ...) @fprintf(i32* %173, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %177)
store i32 0, i32* %5
br label %179
179: ; preds = %194, %172
%180 = load i32, i32* %5
%181 = load i32, i32* %3
%182 = icmp slt i32 %180, %181
br i1 %182, label %183, label %197
183: ; preds = %179
%184 = load i32*, i32** %16
%185 = load i32, i32* %4
%186 = sext i32 %185 to i64
%187 = mul nsw i64 %186, %29
%188 = getelementptr inbounds double, double* %31, i64 %187
%189 = load i32, i32* %5
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds double, double* %188, i64 %190
%192 = load double, double* %191
%193 = call i32 (i32*, i8*, ...) @fprintf(i32* %184, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %192)
br label %194
194: ; preds = %183
%195 = load i32, i32* %5
%196 = add nsw i32 %195, 1
store i32 %196, i32* %5
br label %179
197: ; preds = %179
%198 = load i32*, i32** %16
%199 = call i32 (i32*, i8*, ...) @fprintf(i32* %198, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %200
200: ; preds = %197
%201 = load i32, i32* %4
%202 = add nsw i32 %201, 1
store i32 %202, i32* %4
br label %168
203: ; preds = %168
%204 = load i32*, i32** %16
%205 = call i32 @fclose(i32* %204)
store i32 0, i32* %1
%206 = load i8*, i8** %6
%207 = load i32, i32* %1
ret i32 %207
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [24 x i8] c"ResultsDifusionAnim.dat\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [4 x i8] c"%f \00"
define i32 @main() {
%1 = alloca [100 x double]
%2 = alloca [100 x double]
%3 = alloca [100000 x double]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.000000e-02)
br label %5
5: ; preds = %5, %0
%6 = phi i64 [ 0, %0 ], [ %28, %5 ]
%7 = trunc i64 %6 to i32
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 1.000000e-02
%10 = getelementptr inbounds [100 x double], [100 x double]* %1, i64 0, i64 %6
store double %9, double* %10
%11 = mul nuw nsw i64 %6, 1000
%12 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %11
%13 = fcmp olt double %9, 6.600000e-01
%14 = fcmp ogt double %9, 3.300000e-01
%15 = and i1 %13, %14
%16 = select i1 %15, double 1.000000e+00, double 0.000000e+00
store double %16, double* %12
%17 = or i64 %6, 1
%18 = trunc i64 %17 to i32
%19 = sitofp i32 %18 to double
%20 = fmul double %19, 1.000000e-02
%21 = getelementptr inbounds [100 x double], [100 x double]* %1, i64 0, i64 %17
store double %20, double* %21
%22 = mul nuw nsw i64 %17, 1000
%23 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %22
%24 = fcmp olt double %20, 6.600000e-01
%25 = fcmp ogt double %20, 3.300000e-01
%26 = and i1 %24, %25
%27 = select i1 %26, double 1.000000e+00, double 0.000000e+00
store double %27, double* %23
%28 = add nuw nsw i64 %6, 2
%29 = icmp eq i64 %28, 100
br i1 %29, label %30, label %5
30: ; preds = %5
%31 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 0x3EFDF5959EFBBA7D)
%32 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 1
br label %33
33: ; preds = %96, %30
%34 = phi i64 [ 0, %30 ], [ %67, %96 ]
br label %35
35: ; preds = %35, %33
%36 = phi i64 [ 0, %33 ], [ %64, %35 ]
%37 = or i64 %36, 1
%38 = mul nuw nsw i64 %36, 1000
%39 = mul nuw nsw i64 %37, 1000
%40 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %38
%41 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %39
%42 = getelementptr inbounds double, double* %40, i64 %34
%43 = getelementptr inbounds double, double* %41, i64 %34
%44 = load double, double* %42
%45 = load double, double* %43
%46 = insertelement <2 x double> poison, double %44, i64 0
%47 = insertelement <2 x double> %46, double %45, i64 1
%48 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 %36
%49 = bitcast double* %48 to <2 x double>*
store <2 x double> %47, <2 x double>* %49
%50 = or i64 %36, 2
%51 = or i64 %36, 3
%52 = mul nuw nsw i64 %50, 1000
%53 = mul nuw nsw i64 %51, 1000
%54 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %52
%55 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %53
%56 = getelementptr inbounds double, double* %54, i64 %34
%57 = getelementptr inbounds double, double* %55, i64 %34
%58 = load double, double* %56
%59 = load double, double* %57
%60 = insertelement <2 x double> poison, double %58, i64 0
%61 = insertelement <2 x double> %60, double %59, i64 1
%62 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 %50
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %61, <2 x double>* %63
%64 = add nuw nsw i64 %36, 4
%65 = icmp eq i64 %64, 100
br i1 %65, label %66, label %35
66: ; preds = %35
%67 = add nuw nsw i64 %34, 1
%68 = load double, double* %32
%69 = insertelement <2 x double> poison, double %68, i64 1
br label %70
70: ; preds = %70, %66
%71 = phi i64 [ 0, %66 ], [ %94, %70 ]
%72 = phi <2 x double> [ %69, %66 ], [ %77, %70 ]
%73 = or i64 %71, 1
%74 = add i64 %71, 2
%75 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 %74
%76 = bitcast double* %75 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = shufflevector <2 x double> %72, <2 x double> %77, <2 x i32> <i32 1, i32 2>
%79 = fmul <2 x double> %78, <double 0x3FEEB851EB851EB8, double 0x3FEEB851EB851EB8>
%80 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %77, <2 x double> <double 0x3F947AE147AE147C, double 0x3F947AE147AE147C>, <2 x double> %79)
%81 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 %71
%82 = bitcast double* %81 to <2 x double>*
%83 = load <2 x double>, <2 x double>* %82
%84 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %83, <2 x double> <double 0x3F947AE147AE147C, double 0x3F947AE147AE147C>, <2 x double> %80)
%85 = mul nuw nsw i64 %73, 1000
%86 = mul i64 %71, 1000
%87 = add i64 %86, 2000
%88 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %85
%89 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %87
%90 = getelementptr inbounds double, double* %88, i64 %67
%91 = getelementptr inbounds double, double* %89, i64 %67
%92 = extractelement <2 x double> %84, i64 0
store double %92, double* %90
%93 = extractelement <2 x double> %84, i64 1
store double %93, double* %91
%94 = add nuw i64 %71, 2
%95 = icmp eq i64 %94, 98
br i1 %95, label %96, label %70
96: ; preds = %70
%97 = icmp eq i64 %67, 999
br i1 %97, label %98, label %33
98: ; preds = %96
%99 = tail call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %100
100: ; preds = %98, %114
%101 = phi i64 [ 0, %98 ], [ %116, %114 ]
%102 = getelementptr inbounds [100 x double], [100 x double]* %1, i64 0, i64 %101
%103 = load double, double* %102
%104 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %103)
%105 = mul nuw nsw i64 %101, 1000
%106 = getelementptr inbounds [100000 x double], [100000 x double]* %3, i64 0, i64 %105
br label %107
107: ; preds = %100, %107
%108 = phi i64 [ 0, %100 ], [ %112, %107 ]
%109 = getelementptr inbounds double, double* %106, i64 %108
%110 = load double, double* %109
%111 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %110)
%112 = add nuw nsw i64 %108, 1
%113 = icmp eq i64 %112, 1000
br i1 %113, label %114, label %107
114: ; preds = %107
%115 = tail call i32 @fputc(i32 10, i32* %99)
%116 = add nuw nsw i64 %101, 1
%117 = icmp eq i64 %116, 100
br i1 %117, label %118, label %100
118: ; preds = %114
%119 = tail call i32 @fclose(i32* %99)
ret i32 0
}