#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 */
scalar_t__ fabs(double);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
double sqrtf(double);
int main() {
  double tol = 1E-4;
  double err = 0.0;
  double diff;
  int max_iter = 20000;
  int iter = 0;
  double *u_old;
  double *u_new;
  const double bound_cond = 1.0;
  int i;
  printf("Allocating %d bytes for vectors. \n", sizeof(double) * 100 * 2);
  u_old = (double *)malloc(100 * sizeof(double));
  u_new = (double *)malloc(100 * sizeof(double));
  for (i = 0; i < 100; i++) {
    u_old[i] = 0.0;
    u_new[i] = 0.0;
  }
  u_old[0] = bound_cond;
  u_old[100 - 1] = bound_cond;
  printf("Starting Jacobi iterations...\n");
  do {
#pragma omp parallel for
    for (i = 1; i < 100 - 1; i++) {
      u_new[i] = 0.5 * (u_old[i - 1] + u_old[i + 1]);
    }
    err = 0.0;
#pragma omp parallel for reduction(+ : err)
    for (i = 1; i < 100 - 1; i++) {
      diff = u_new[i] - u_old[i];
      err += fabs(diff * diff);
    }
    err = sqrtf(err);
#pragma omp parallel for
    for (i = 1; i < 100 - 1; i++) {
      u_old[i] = u_new[i];
    }
    iter++;
    if (iter % 200 == 0)
      printf("Iteration %5d, Error = %12.6e\n", iter, err);
  } while ((err > tol) && (iter < max_iter));
  if (iter >= max_iter)
    printf("WARNING: Maximum iterations reached\n");
  printf("Solution reached after %6d iterations with error: %12.6e \n", iter,
         err);
  free(u_new);
  free(u_old);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x4e20,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movsd  0xe76(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    0xe82(%rip),%rdi
mov    $0x640,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x320,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    $0x320,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x64,-0x44(%rbp)
jge    11fd <main+0xad>
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11c5 <main+0x75>
mov    -0x30(%rbp),%rax
movsd  0xdf7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0xde7(%rip),%xmm0
movsd  %xmm0,0x318(%rax)
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x44(%rbp)
cmpl   $0x63,-0x44(%rbp)
jge    128b <main+0x13b>
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xda4(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1236 <main+0xe6>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x1,-0x44(%rbp)
cmpl   $0x63,-0x44(%rbp)
jge    12ef <main+0x19f>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1050 <fabs@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    129a <main+0x14a>
movsd  -0x18(%rbp),%xmm0
call   1070 <sqrtf@plt>
movsd  %xmm0,-0x18(%rbp)
movl   $0x1,-0x44(%rbp)
cmpl   $0x63,-0x44(%rbp)
jge    1337 <main+0x1e7>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1305 <main+0x1b5>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    $0xc8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    136a <main+0x21a>
mov    -0x28(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0xcf7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    136f <main+0x21f>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x45(%rbp)
jbe    1390 <main+0x240>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
setl   %al
mov    %al,-0x45(%rbp)
mov    -0x45(%rbp),%al
test   $0x1,%al
jne    122f <main+0xdf>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jl     13b5 <main+0x265>
lea    0xccb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0xcda(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeb3(%rip),%rdi
mov    $0x640,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x320,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x320,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
lea    0x320(%rbx),%r15
add    $0x320,%rax
cmp    %rax,%rbx
jae    1224 <main+0xc4>
cmp    %r15,%r14
jae    1224 <main+0xc4>
mov    $0x4,%eax
nopw   0x0(%rax,%rax,1)
movq   $0x0,-0x20(%rbx,%rax,8)
movq   $0x0,-0x20(%r14,%rax,8)
movq   $0x0,-0x18(%rbx,%rax,8)
movq   $0x0,-0x18(%r14,%rax,8)
movq   $0x0,-0x10(%rbx,%rax,8)
movq   $0x0,-0x10(%r14,%rax,8)
movq   $0x0,-0x8(%rbx,%rax,8)
movq   $0x0,-0x8(%r14,%rax,8)
movq   $0x0,(%rbx,%rax,8)
movq   $0x0,(%r14,%rax,8)
add    $0x5,%rax
cmp    $0x68,%rax
jne    11c0 <main+0x60>
jmp    1279 <main+0x119>
mov    $0x8,%eax
xorpd  %xmm0,%xmm0
nopl   (%rax)
movupd %xmm0,-0x40(%rbx,%rax,8)
movupd %xmm0,-0x40(%r14,%rax,8)
movupd %xmm0,-0x30(%rbx,%rax,8)
movupd %xmm0,-0x30(%r14,%rax,8)
movupd %xmm0,-0x20(%rbx,%rax,8)
movupd %xmm0,-0x20(%r14,%rax,8)
movupd %xmm0,-0x10(%rbx,%rax,8)
movupd %xmm0,-0x10(%r14,%rax,8)
movupd %xmm0,(%rbx,%rax,8)
movupd %xmm0,(%r14,%rax,8)
add    $0xa,%rax
cmp    $0x6c,%rax
jne    1230 <main+0xd0>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rbx)
lea    0x318(%rbx),%rbp
mov    %rax,0x318(%rbx)
lea    0xe0a(%rip),%rdi
call   1040 <puts@plt>
lea    0x8(%rbx),%rsi
lea    0x8(%r14),%rcx
mov    %r14,%rdx
add    $0x318,%rdx
cmp    %r15,%rcx
setb   %dil
cmp    %rdx,%rbx
setb   %al
and    %dil,%al
mov    %al,0xf(%rsp)
cmp    %rdx,%rsi
setb   %al
cmp    %rbp,%rcx
setb   %r13b
and    %al,%r13b
xor    %r12d,%r12d
movsd  0xd2f(%rip),%xmm1
movapd 0xd17(%rip),%xmm2
nopl   0x0(%rax)
mov    %r12d,%r15d
cmpb   $0x0,0xf(%rsp)
je     13b0 <main+0x250>
xor    %eax,%eax
movsd  (%rbx,%rax,8),%xmm0
addsd  0x10(%rbx,%rax,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
addsd  0x18(%rbx,%rax,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
add    $0x2,%rax
cmp    $0x62,%rax
jne    1300 <main+0x1a0>
xorpd  %xmm0,%xmm0
mov    $0x2,%ebp
movsd  %xmm0,0x10(%rsp)
movsd  -0x8(%r14,%rbp,8),%xmm0
subsd  -0x8(%rbx,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
call   1060 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r14,%rbp,8),%xmm0
subsd  (%rbx,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
call   1060 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x2,%rbp
cmp    $0x64,%rbp
jne    1340 <main+0x1e0>
ucomisd 0xc7c(%rip),%xmm0
jb     1410 <main+0x2b0>
sqrtsd %xmm0,%xmm0
jmp    1415 <main+0x2b5>
nopl   0x0(%rax)
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd (%rbx,%rax,8),%xmm0
movupd 0x10(%rbx,%rax,8),%xmm1
addpd  %xmm0,%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm1,0x8(%r14,%rax,8)
cmp    $0x60,%rax
je     1337 <main+0x1d7>
movupd 0x10(%rbx,%rax,8),%xmm0
movupd 0x20(%rbx,%rax,8),%xmm1
addpd  %xmm0,%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm1,0x18(%r14,%rax,8)
add    $0x4,%rax
jmp    13c0 <main+0x260>
cs nopw 0x0(%rax,%rax,1)
nop
call   1080 <sqrtf@plt>
test   %r13b,%r13b
movsd  0xbf0(%rip),%xmm1
movapd 0xbd8(%rip),%xmm2
je     14c0 <main+0x360>
mov    $0x2,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  -0x8(%r14,%rax,8),%xmm3
movsd  %xmm3,-0x8(%rbx,%rax,8)
movsd  (%r14,%rax,8),%xmm3
movsd  %xmm3,(%rbx,%rax,8)
add    $0x2,%rax
cmp    $0x64,%rax
jne    1440 <main+0x2e0>
lea    0x1(%r15),%r12d
imul   $0xc28f5c29,%r12d,%eax
ror    $0x3,%eax
cmp    $0x147ae14,%eax
ja     14a4 <main+0x344>
lea    0xbcd(%rip),%rdi
mov    %r12d,%esi
mov    $0x1,%al
movsd  %xmm0,0x10(%rsp)
call   1050 <printf@plt>
movsd  0x10(%rsp),%xmm0
movapd 0xb64(%rip),%xmm2
movsd  0xb6c(%rip),%xmm1
ucomisd 0xb6c(%rip),%xmm0
jbe    1506 <main+0x3a6>
cmp    $0x4e1f,%r15d
jb     12f0 <main+0x190>
jmp    1506 <main+0x3a6>
nopl   (%rax)
mov    $0x7,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movups -0x30(%r14,%rax,8),%xmm3
movups %xmm3,-0x30(%rbx,%rax,8)
cmp    $0x67,%rax
je     1462 <main+0x302>
movups -0x20(%r14,%rax,8),%xmm3
movups %xmm3,-0x20(%rbx,%rax,8)
movups -0x10(%r14,%rax,8),%xmm3
movups %xmm3,-0x10(%rbx,%rax,8)
movups (%r14,%rax,8),%xmm3
movups %xmm3,(%rbx,%rax,8)
add    $0x8,%rax
jmp    14d0 <main+0x370>
cmp    $0x4e1f,%r15d
jb     1527 <main+0x3c7>
lea    0xbad(%rip),%rdi
movsd  %xmm0,0x10(%rsp)
call   1040 <puts@plt>
movsd  0x10(%rsp),%xmm0
lea    0xb3c(%rip),%rdi
mov    %r12d,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Allocating %d bytes for vectors. \0A\00"
@.str.1 = [31 x i8] c"Starting Jacobi iterations...\0A\00"
@.str.2 = [31 x i8] c"Iteration %5d, Error = %12.6e\0A\00"
@.str.3 = [37 x i8] c"WARNING: Maximum iterations reached\0A\00"
@.str.4 = [59 x i8] c"Solution reached after %6d iterations with error: %12.6e \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca i32
store i32 0, i32* %1
store double 1.000000e-04, double* %2
store double 0.000000e+00, double* %3
store i32 20000, i32* %5
store i32 0, i32* %6
store double 1.000000e+00, double* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 1600)
%12 = call i64 @malloc(i32 800)
%13 = inttoptr i64 %12 to double*
store double* %13, double** %7
%14 = call i64 @malloc(i32 800)
%15 = inttoptr i64 %14 to double*
store double* %15, double** %8
store i32 0, i32* %10
br label %16
16: ; preds = %28, %0
%17 = load i32, i32* %10
%18 = icmp slt i32 %17, 100
br i1 %18, label %19, label %31
19: ; preds = %16
%20 = load double*, double** %7
%21 = load i32, i32* %10
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
store double 0.000000e+00, double* %23
%24 = load double*, double** %8
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
store double 0.000000e+00, double* %27
br label %28
28: ; preds = %19
%29 = load i32, i32* %10
%30 = add nsw i32 %29, 1
store i32 %30, i32* %10
br label %16
31: ; preds = %16
%32 = load double*, double** %7
%33 = getelementptr inbounds double, double* %32, i64 0
store double 1.000000e+00, double* %33
%34 = load double*, double** %7
%35 = getelementptr inbounds double, double* %34, i64 99
store double 1.000000e+00, double* %35
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %37
37: ; preds = %127, %31
store i32 1, i32* %10
br label %38
38: ; preds = %60, %37
%39 = load i32, i32* %10
%40 = icmp slt i32 %39, 99
br i1 %40, label %41, label %63
41: ; preds = %38
%42 = load double*, double** %7
%43 = load i32, i32* %10
%44 = sub nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %42, i64 %45
%47 = load double, double* %46
%48 = load double*, double** %7
%49 = load i32, i32* %10
%50 = add nsw i32 %49, 1
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %48, i64 %51
%53 = load double, double* %52
%54 = fadd double %47, %53
%55 = fmul double 5.000000e-01, %54
%56 = load double*, double** %8
%57 = load i32, i32* %10
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double, double* %56, i64 %58
store double %55, double* %59
br label %60
60: ; preds = %41
%61 = load i32, i32* %10
%62 = add nsw i32 %61, 1
store i32 %62, i32* %10
br label %38
63: ; preds = %38
store double 0.000000e+00, double* %3
store i32 1, i32* %10
br label %64
64: ; preds = %86, %63
%65 = load i32, i32* %10
%66 = icmp slt i32 %65, 99
br i1 %66, label %67, label %89
67: ; preds = %64
%68 = load double*, double** %8
%69 = load i32, i32* %10
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
%72 = load double, double* %71
%73 = load double*, double** %7
%74 = load i32, i32* %10
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %73, i64 %75
%77 = load double, double* %76
%78 = fsub double %72, %77
store double %78, double* %4
%79 = load double, double* %4
%80 = load double, double* %4
%81 = fmul double %79, %80
%82 = call i64 @fabs(double %81)
%83 = sitofp i64 %82 to double
%84 = load double, double* %3
%85 = fadd double %84, %83
store double %85, double* %3
br label %86
86: ; preds = %67
%87 = load i32, i32* %10
%88 = add nsw i32 %87, 1
store i32 %88, i32* %10
br label %64
89: ; preds = %64
%90 = load double, double* %3
%91 = call double @sqrtf(double %90)
store double %91, double* %3
store i32 1, i32* %10
br label %92
92: ; preds = %105, %89
%93 = load i32, i32* %10
%94 = icmp slt i32 %93, 99
br i1 %94, label %95, label %108
95: ; preds = %92
%96 = load double*, double** %8
%97 = load i32, i32* %10
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %96, i64 %98
%100 = load double, double* %99
%101 = load double*, double** %7
%102 = load i32, i32* %10
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
store double %100, double* %104
br label %105
105: ; preds = %95
%106 = load i32, i32* %10
%107 = add nsw i32 %106, 1
store i32 %107, i32* %10
br label %92
108: ; preds = %92
%109 = load i32, i32* %6
%110 = add nsw i32 %109, 1
store i32 %110, i32* %6
%111 = load i32, i32* %6
%112 = srem i32 %111, 200
%113 = icmp eq i32 %112, 0
br i1 %113, label %114, label %118
114: ; preds = %108
%115 = load i32, i32* %6
%116 = load double, double* %3
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %115, double %116)
br label %118
118: ; preds = %114, %108
br label %119
119: ; preds = %118
%120 = load double, double* %3
%121 = load double, double* %2
%122 = fcmp ogt double %120, %121
br i1 %122, label %123, label %127
123: ; preds = %119
%124 = load i32, i32* %6
%125 = load i32, i32* %5
%126 = icmp slt i32 %124, %125
br label %127
127: ; preds = %123, %119
%128 = phi i1 [ false, %119 ], [ %126, %123 ]
br i1 %128, label %37, label %129
129: ; preds = %127
%130 = load i32, i32* %6
%131 = load i32, i32* %5
%132 = icmp sge i32 %130, %131
br i1 %132, label %133, label %135
133: ; preds = %129
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %135
135: ; preds = %133, %129
%136 = load i32, i32* %6
%137 = load double, double* %3
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0), i32 %136, double %137)
%139 = load double*, double** %8
%140 = call i32 @free(double* %139)
%141 = load double*, double** %7
%142 = call i32 @free(double* %141)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Allocating %d bytes for vectors. \0A\00"
@.str.2 = [31 x i8] c"Iteration %5d, Error = %12.6e\0A\00"
@.str.4 = [59 x i8] c"Solution reached after %6d iterations with error: %12.6e \0A\00"
@str = [30 x i8] c"Starting Jacobi iterations...\00"
@str.5 = [36 x i8] c"WARNING: Maximum iterations reached\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 1600)
%2 = tail call i64 @malloc(i32 800)
%3 = inttoptr i64 %2 to double*
%4 = inttoptr i64 %2 to i8*
%5 = tail call i64 @malloc(i32 800)
%6 = inttoptr i64 %5 to double*
%7 = inttoptr i64 %5 to i8*
%8 = getelementptr double, double* %3, i64 100
%9 = bitcast double* %8 to i8*
%10 = getelementptr double, double* %6, i64 100
%11 = bitcast double* %10 to i8*
%12 = icmp ult i8* %4, %11
%13 = icmp ult i8* %7, %9
%14 = and i1 %12, %13
br i1 %14, label %43, label %15
15: ; preds = %0, %15
%16 = phi i64 [ %41, %15 ], [ 0, %0 ]
%17 = getelementptr inbounds double, double* %3, i64 %16
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %18
%19 = getelementptr inbounds double, double* %6, i64 %16
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %20
%21 = add nuw nsw i64 %16, 2
%22 = getelementptr inbounds double, double* %3, i64 %21
%23 = bitcast double* %22 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %23
%24 = getelementptr inbounds double, double* %6, i64 %21
%25 = bitcast double* %24 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %25
%26 = add nuw nsw i64 %16, 4
%27 = getelementptr inbounds double, double* %3, i64 %26
%28 = bitcast double* %27 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %28
%29 = getelementptr inbounds double, double* %6, i64 %26
%30 = bitcast double* %29 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %30
%31 = add nuw nsw i64 %16, 6
%32 = getelementptr inbounds double, double* %3, i64 %31
%33 = bitcast double* %32 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %33
%34 = getelementptr inbounds double, double* %6, i64 %31
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %35
%36 = add nuw nsw i64 %16, 8
%37 = getelementptr inbounds double, double* %3, i64 %36
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %38
%39 = getelementptr inbounds double, double* %6, i64 %36
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %40
%41 = add nuw nsw i64 %16, 10
%42 = icmp eq i64 %41, 100
br i1 %42, label %61, label %15
43: ; preds = %0, %43
%44 = phi i64 [ %59, %43 ], [ 0, %0 ]
%45 = getelementptr inbounds double, double* %3, i64 %44
store double 0.000000e+00, double* %45
%46 = getelementptr inbounds double, double* %6, i64 %44
store double 0.000000e+00, double* %46
%47 = add nuw nsw i64 %44, 1
%48 = getelementptr inbounds double, double* %3, i64 %47
store double 0.000000e+00, double* %48
%49 = getelementptr inbounds double, double* %6, i64 %47
store double 0.000000e+00, double* %49
%50 = add nuw nsw i64 %44, 2
%51 = getelementptr inbounds double, double* %3, i64 %50
store double 0.000000e+00, double* %51
%52 = getelementptr inbounds double, double* %6, i64 %50
store double 0.000000e+00, double* %52
%53 = add nuw nsw i64 %44, 3
%54 = getelementptr inbounds double, double* %3, i64 %53
store double 0.000000e+00, double* %54
%55 = getelementptr inbounds double, double* %6, i64 %53
store double 0.000000e+00, double* %55
%56 = add nuw nsw i64 %44, 4
%57 = getelementptr inbounds double, double* %3, i64 %56
store double 0.000000e+00, double* %57
%58 = getelementptr inbounds double, double* %6, i64 %56
store double 0.000000e+00, double* %58
%59 = add nuw nsw i64 %44, 5
%60 = icmp eq i64 %59, 100
br i1 %60, label %61, label %43
61: ; preds = %15, %43
store double 1.000000e+00, double* %3
%62 = getelementptr inbounds double, double* %3, i64 99
store double 1.000000e+00, double* %62
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%64 = getelementptr double, double* %3, i64 1
%65 = getelementptr double, double* %3, i64 99
%66 = getelementptr double, double* %6, i64 1
%67 = getelementptr double, double* %6, i64 99
%68 = getelementptr double, double* %6, i64 1
%69 = getelementptr double, double* %6, i64 99
%70 = bitcast double* %69 to i8*
%71 = getelementptr double, double* %3, i64 100
%72 = icmp ult double* %68, %71
%73 = icmp ult i8* %4, %70
%74 = and i1 %72, %73
%75 = icmp ult double* %64, %67
%76 = icmp ult double* %66, %65
%77 = and i1 %75, %76
br label %78
78: ; preds = %61, %203
%79 = phi i32 [ 0, %61 ], [ %198, %203 ]
br i1 %74, label %110, label %80
80: ; preds = %78, %96
%81 = phi i64 [ %109, %96 ], [ 0, %78 ]
%82 = or i64 %81, 1
%83 = getelementptr inbounds double, double* %3, i64 %81
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = or i64 %81, 2
%87 = getelementptr inbounds double, double* %3, i64 %86
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = fadd <2 x double> %85, %89
%91 = fmul <2 x double> %90, <double 5.000000e-01, double 5.000000e-01>
%92 = getelementptr inbounds double, double* %6, i64 %82
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> %91, <2 x double>* %93
%94 = or i64 %81, 2
%95 = icmp eq i64 %94, 98
br i1 %95, label %130, label %96
96: ; preds = %80
%97 = or i64 %81, 3
%98 = getelementptr inbounds double, double* %3, i64 %94
%99 = bitcast double* %98 to <2 x double>*
%100 = load <2 x double>, <2 x double>* %99
%101 = add nuw nsw i64 %81, 4
%102 = getelementptr inbounds double, double* %3, i64 %101
%103 = bitcast double* %102 to <2 x double>*
%104 = load <2 x double>, <2 x double>* %103
%105 = fadd <2 x double> %100, %104
%106 = fmul <2 x double> %105, <double 5.000000e-01, double 5.000000e-01>
%107 = getelementptr inbounds double, double* %6, i64 %97
%108 = bitcast double* %107 to <2 x double>*
store <2 x double> %106, <2 x double>* %108
%109 = add nuw nsw i64 %81, 4
br label %80
110: ; preds = %78, %110
%111 = phi i64 [ %123, %110 ], [ 1, %78 ]
%112 = add nsw i64 %111, -1
%113 = getelementptr inbounds double, double* %3, i64 %112
%114 = load double, double* %113
%115 = add nuw nsw i64 %111, 1
%116 = getelementptr inbounds double, double* %3, i64 %115
%117 = load double, double* %116
%118 = fadd double %114, %117
%119 = fmul double %118, 5.000000e-01
%120 = getelementptr inbounds double, double* %6, i64 %111
store double %119, double* %120
%121 = getelementptr inbounds double, double* %3, i64 %111
%122 = load double, double* %121
%123 = add nuw nsw i64 %111, 2
%124 = getelementptr inbounds double, double* %3, i64 %123
%125 = load double, double* %124
%126 = fadd double %122, %125
%127 = fmul double %126, 5.000000e-01
%128 = getelementptr inbounds double, double* %6, i64 %115
store double %127, double* %128
%129 = icmp eq i64 %123, 99
br i1 %129, label %130, label %110
130: ; preds = %80, %110
br label %131
131: ; preds = %131, %130
%132 = phi i64 [ 1, %130 ], [ %153, %131 ]
%133 = phi double [ 0.000000e+00, %130 ], [ %152, %131 ]
%134 = getelementptr inbounds double, double* %6, i64 %132
%135 = load double, double* %134
%136 = getelementptr inbounds double, double* %3, i64 %132
%137 = load double, double* %136
%138 = fsub double %135, %137
%139 = fmul double %138, %138
%140 = tail call i64 @fabs(double %139)
%141 = sitofp i64 %140 to double
%142 = fadd double %133, %141
%143 = add nuw nsw i64 %132, 1
%144 = getelementptr inbounds double, double* %6, i64 %143
%145 = load double, double* %144
%146 = getelementptr inbounds double, double* %3, i64 %143
%147 = load double, double* %146
%148 = fsub double %145, %147
%149 = fmul double %148, %148
%150 = tail call i64 @fabs(double %149)
%151 = sitofp i64 %150 to double
%152 = fadd double %142, %151
%153 = add nuw nsw i64 %132, 2
%154 = icmp eq i64 %153, 99
br i1 %154, label %155, label %131
155: ; preds = %131
%156 = tail call double @sqrtf(double %152)
br i1 %77, label %186, label %157
157: ; preds = %155, %166
%158 = phi i64 [ %185, %166 ], [ 0, %155 ]
%159 = or i64 %158, 1
%160 = getelementptr inbounds double, double* %6, i64 %159
%161 = bitcast double* %160 to <2 x double>*
%162 = load <2 x double>, <2 x double>* %161
%163 = getelementptr inbounds double, double* %3, i64 %159
%164 = bitcast double* %163 to <2 x double>*
store <2 x double> %162, <2 x double>* %164
%165 = icmp eq i64 %158, 96
br i1 %165, label %197, label %166
166: ; preds = %157
%167 = or i64 %158, 3
%168 = getelementptr inbounds double, double* %6, i64 %167
%169 = bitcast double* %168 to <2 x double>*
%170 = load <2 x double>, <2 x double>* %169
%171 = getelementptr inbounds double, double* %3, i64 %167
%172 = bitcast double* %171 to <2 x double>*
store <2 x double> %170, <2 x double>* %172
%173 = or i64 %158, 5
%174 = getelementptr inbounds double, double* %6, i64 %173
%175 = bitcast double* %174 to <2 x double>*
%176 = load <2 x double>, <2 x double>* %175
%177 = getelementptr inbounds double, double* %3, i64 %173
%178 = bitcast double* %177 to <2 x double>*
store <2 x double> %176, <2 x double>* %178
%179 = or i64 %158, 7
%180 = getelementptr inbounds double, double* %6, i64 %179
%181 = bitcast double* %180 to <2 x double>*
%182 = load <2 x double>, <2 x double>* %181
%183 = getelementptr inbounds double, double* %3, i64 %179
%184 = bitcast double* %183 to <2 x double>*
store <2 x double> %182, <2 x double>* %184
%185 = add nuw nsw i64 %158, 8
br label %157
186: ; preds = %155, %186
%187 = phi i64 [ %195, %186 ], [ 1, %155 ]
%188 = getelementptr inbounds double, double* %6, i64 %187
%189 = load double, double* %188
%190 = getelementptr inbounds double, double* %3, i64 %187
store double %189, double* %190
%191 = add nuw nsw i64 %187, 1
%192 = getelementptr inbounds double, double* %6, i64 %191
%193 = load double, double* %192
%194 = getelementptr inbounds double, double* %3, i64 %191
store double %193, double* %194
%195 = add nuw nsw i64 %187, 2
%196 = icmp eq i64 %195, 99
br i1 %196, label %197, label %186
197: ; preds = %157, %186
%198 = add nuw nsw i32 %79, 1
%199 = urem i32 %198, 200
%200 = icmp eq i32 %199, 0
br i1 %200, label %201, label %203
201: ; preds = %197
%202 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %198, double %156)
br label %203
203: ; preds = %197, %201
%204 = fcmp ogt double %156, 1.000000e-04
%205 = icmp ult i32 %79, 19999
%206 = select i1 %204, i1 %205, i1 false
br i1 %206, label %78, label %207
207: ; preds = %203
%208 = icmp ugt i32 %79, 19998
br i1 %208, label %209, label %211
209: ; preds = %207
%210 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.5, i64 0, i64 0))
br label %211
211: ; preds = %209, %207
%212 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.4, i64 0, i64 0), i32 %198, double %156)
%213 = tail call i32 @free(double* %6)
%214 = tail call i32 @free(double* %3)
ret i32 0
}