#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 */
double fabs(double);
double intCompSimp(double *, double, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ system(char *);
int main() {
  int i, j;
  int n[5] = {10, 20, 40, 80, 160};
  double h[5];
  double a = 1;
  double b = 6;
  double **X;
  double s = 8.18347920766278;
  double error[5];
  double ediv[5];
  double integral[5];
  X = (double **)malloc(5 * sizeof(double *));
  for (i = 0; i < 5; i++)
    X[i] = (double *)malloc((n[i] + 1) * sizeof(double));
  for (i = 0; i < 5; i++)
    h[i] = (b - a) / n[i];
  for (i = 0; i < 5; i++) {
    for (j = 0; j < n[i] + 1; j++)
      X[i][j] = a + h[i] * j;
  }
  for (i = 0; i < 5; i++)
    integral[i] = intCompSimp(X[i], h[i], n[i]);
  for (i = 0; i < 5; i++)
    error[i] = fabs(s - integral[i]);
  ediv[0] = 0;
  for (i = 1; i < 5; i++)
    ediv[i] = error[i] / error[i - 1];
  printf("n\terror\t\tediv\n");
  for (i = 0; i < 5; i++)
    printf("%d\t%.10lf\t%.10lf\n", n[i], error[i], ediv[i]);
  system("PAUSE");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed2(%rip),%eax
mov    %eax,-0x10(%rbp)
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    $0x28,%edi
call   1060 <malloc@plt>
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    11ec <main+0xac>
movslq -0x8(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,%rdx
mov    -0x68(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ad <main+0x6d>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    122d <main+0xed>
movsd  -0x60(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movslq -0x8(%rbp),%rax
cvtsi2sdl -0x20(%rbp,%rax,4),%xmm1
divsd  %xmm1,%xmm0
movslq -0x8(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f3 <main+0xb3>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    12ad <main+0x16d>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
movslq -0x8(%rbp),%rcx
mov    -0x20(%rbp,%rcx,4),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    129a <main+0x15a>
movsd  -0x58(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1245 <main+0x105>
jmp    129f <main+0x15f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1234 <main+0xf4>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    12fc <main+0x1bc>
mov    -0x68(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x8(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
movslq -0x8(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
call   1030 <intCompSimp@plt>
movslq -0x8(%rbp),%rax
movsd  %xmm0,-0x100(%rbp,%rax,8)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12b4 <main+0x174>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1345 <main+0x205>
movsd  -0x70(%rbp),%xmm0
movslq -0x8(%rbp),%rax
subsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
movaps 0xcfa(%rip),%xmm1
pand   %xmm1,%xmm0
movslq -0x8(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1303 <main+0x1c3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    139a <main+0x25a>
movslq -0x8(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
divsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x8(%rbp),%rax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1357 <main+0x217>
lea    0xca3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    13f7 <main+0x2b7>
movslq -0x8(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
movslq -0x8(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x8(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
lea    0xc71(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13af <main+0x26f>
lea    0xc67(%rip),%rdi
call   1040 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x90,%rsp
mov    $0x28,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x58,%edi
call   1070 <malloc@plt>
mov    %rax,(%rbx)
mov    $0xa8,%edi
call   1070 <malloc@plt>
mov    %rax,0x8(%rbx)
mov    $0x148,%edi
call   1070 <malloc@plt>
mov    %rax,0x10(%rbx)
mov    $0x288,%edi
call   1070 <malloc@plt>
mov    %rax,0x18(%rbx)
mov    $0x508,%edi
call   1070 <malloc@plt>
mov    %rax,0x20(%rbx)
mov    (%rbx),%rdx
movaps 0xe4c(%rip),%xmm0
movups %xmm0,(%rdx)
movaps 0xe52(%rip),%xmm0
movups %xmm0,0x10(%rdx)
movaps 0xe57(%rip),%xmm0
movups %xmm0,0x20(%rdx)
movaps 0xe5c(%rip),%xmm0
movups %xmm0,0x30(%rdx)
movaps 0xe61(%rip),%xmm0
movups %xmm0,0x40(%rdx)
movabs $0x4018000000000000,%rcx
mov    %rcx,0x50(%rdx)
mov    0x8(%rbx),%rdx
movaps 0xe54(%rip),%xmm0
movups %xmm0,(%rdx)
movaps 0xe5a(%rip),%xmm0
movups %xmm0,0x10(%rdx)
movaps 0xe5f(%rip),%xmm0
movups %xmm0,0x20(%rdx)
movaps 0xe64(%rip),%xmm0
movups %xmm0,0x30(%rdx)
movaps 0xe69(%rip),%xmm0
movups %xmm0,0x40(%rdx)
movaps 0xe6e(%rip),%xmm0
movups %xmm0,0x50(%rdx)
movaps 0xe73(%rip),%xmm0
movups %xmm0,0x60(%rdx)
movaps 0xe78(%rip),%xmm0
movups %xmm0,0x70(%rdx)
movaps 0xe7d(%rip),%xmm0
movups %xmm0,0x80(%rdx)
movaps 0xe7f(%rip),%xmm0
movups %xmm0,0x90(%rdx)
mov    %rcx,0xa0(%rdx)
mov    0x10(%rbx),%rdx
movaps 0xe76(%rip),%xmm0
movups %xmm0,(%rdx)
movaps 0xe7c(%rip),%xmm0
movups %xmm0,0x10(%rdx)
movaps 0xe81(%rip),%xmm0
movups %xmm0,0x20(%rdx)
movaps 0xe86(%rip),%xmm0
movups %xmm0,0x30(%rdx)
movaps 0xe8b(%rip),%xmm0
movups %xmm0,0x40(%rdx)
movaps 0xe90(%rip),%xmm0
movups %xmm0,0x50(%rdx)
movaps 0xe95(%rip),%xmm0
movups %xmm0,0x60(%rdx)
movaps 0xe9a(%rip),%xmm0
movups %xmm0,0x70(%rdx)
movaps 0xe9f(%rip),%xmm0
movups %xmm0,0x80(%rdx)
movaps 0xea1(%rip),%xmm0
movups %xmm0,0x90(%rdx)
movaps 0xea3(%rip),%xmm0
movups %xmm0,0xa0(%rdx)
movaps 0xea5(%rip),%xmm0
movups %xmm0,0xb0(%rdx)
movaps 0xea7(%rip),%xmm0
movups %xmm0,0xc0(%rdx)
movaps 0xea9(%rip),%xmm0
movups %xmm0,0xd0(%rdx)
movaps 0xeab(%rip),%xmm0
movups %xmm0,0xe0(%rdx)
movaps 0xead(%rip),%xmm0
movups %xmm0,0xf0(%rdx)
movaps 0xeaf(%rip),%xmm0
movups %xmm0,0x100(%rdx)
movaps 0xeb1(%rip),%xmm0
movups %xmm0,0x110(%rdx)
movaps 0xeb3(%rip),%xmm0
movups %xmm0,0x120(%rdx)
movaps 0xeb5(%rip),%xmm0
movups %xmm0,0x130(%rdx)
mov    %rcx,0x140(%rdx)
mov    0x18(%rbx),%rdx
movdqa 0xeab(%rip),%xmm5
mov    $0x6,%esi
movapd 0xeae(%rip),%xmm6
movapd 0xeb6(%rip),%xmm0
movdqa 0xebd(%rip),%xmm8
movdqa 0xec5(%rip),%xmm2
movdqa 0xecd(%rip),%xmm3
movdqa 0xed5(%rip),%xmm4
nopl   0x0(%rax,%rax,1)
cvtdq2pd %xmm5,%xmm7
mulpd  %xmm6,%xmm7
addpd  %xmm0,%xmm7
movupd %xmm7,-0x30(%rdx,%rsi,8)
movdqa %xmm5,%xmm7
paddd  %xmm8,%xmm7
cvtdq2pd %xmm7,%xmm7
mulpd  %xmm6,%xmm7
addpd  %xmm0,%xmm7
movupd %xmm7,-0x20(%rdx,%rsi,8)
movdqa %xmm5,%xmm7
paddd  %xmm2,%xmm7
cvtdq2pd %xmm7,%xmm7
mulpd  %xmm6,%xmm7
addpd  %xmm0,%xmm7
movupd %xmm7,-0x10(%rdx,%rsi,8)
movdqa %xmm5,%xmm7
paddd  %xmm3,%xmm7
cvtdq2pd %xmm7,%xmm7
mulpd  %xmm6,%xmm7
addpd  %xmm0,%xmm7
movupd %xmm7,(%rdx,%rsi,8)
paddd  %xmm4,%xmm5
add    $0x8,%rsi
cmp    $0x56,%rsi
jne    13c0 <main+0x270>
mov    %rcx,0x280(%rdx)
movdqa 0xdf3(%rip),%xmm5
mov    $0x6,%edx
movapd 0xe56(%rip),%xmm6
nopw   0x0(%rax,%rax,1)
movdqa %xmm5,%xmm7
cvtdq2pd %xmm5,%xmm1
paddd  %xmm8,%xmm7
cvtdq2pd %xmm7,%xmm7
mulpd  %xmm6,%xmm1
addpd  %xmm0,%xmm1
mulpd  %xmm6,%xmm7
addpd  %xmm0,%xmm7
movupd %xmm1,-0x30(%rax,%rdx,8)
movupd %xmm7,-0x20(%rax,%rdx,8)
movdqa %xmm5,%xmm1
paddd  %xmm2,%xmm1
movdqa %xmm5,%xmm7
cvtdq2pd %xmm1,%xmm1
paddd  %xmm3,%xmm7
cvtdq2pd %xmm7,%xmm7
mulpd  %xmm6,%xmm1
addpd  %xmm0,%xmm1
mulpd  %xmm6,%xmm7
addpd  %xmm0,%xmm7
movupd %xmm1,-0x10(%rax,%rdx,8)
movupd %xmm7,(%rax,%rdx,8)
paddd  %xmm4,%xmm5
add    $0x8,%rdx
cmp    $0xa6,%rdx
jne    1450 <main+0x300>
mov    %rcx,0x500(%rax)
mov    (%rbx),%rdi
movsd  0xdfd(%rip),%xmm0
mov    $0xa,%esi
call   1030 <intCompSimp@plt>
movaps %xmm0,0x30(%rsp)
mov    0x8(%rbx),%rdi
movsd  0xdea(%rip),%xmm0
mov    $0x14,%esi
call   1030 <intCompSimp@plt>
movaps %xmm0,0x20(%rsp)
mov    0x10(%rbx),%rdi
movsd  0xdd7(%rip),%xmm0
mov    $0x28,%esi
call   1030 <intCompSimp@plt>
movaps %xmm0,0x10(%rsp)
mov    0x18(%rbx),%rdi
movsd  0xdc4(%rip),%xmm0
mov    $0x50,%esi
call   1030 <intCompSimp@plt>
movaps %xmm0,(%rsp)
mov    0x20(%rbx),%rdi
movsd  0xdb2(%rip),%xmm0
mov    $0xa0,%esi
call   1030 <intCompSimp@plt>
movapd 0x20(%rsp),%xmm1
unpcklpd 0x30(%rsp),%xmm1
movapd 0xd54(%rip),%xmm2
movapd %xmm2,%xmm4
subpd  %xmm1,%xmm4
movapd 0xd54(%rip),%xmm1
andpd  %xmm1,%xmm4
movapd %xmm4,0x50(%rsp)
movapd (%rsp),%xmm3
unpcklpd 0x10(%rsp),%xmm3
subpd  %xmm3,%xmm2
andpd  %xmm1,%xmm2
movapd %xmm2,(%rsp)
movsd  0xd62(%rip),%xmm3
subsd  %xmm0,%xmm3
andpd  %xmm1,%xmm3
movapd %xmm3,0x20(%rsp)
pshufd $0xee,%xmm4,%xmm5
movdqa %xmm5,0x40(%rsp)
pshufd $0xee,%xmm2,%xmm1
movdqa %xmm1,0x80(%rsp)
movapd %xmm2,%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
divsd  %xmm4,%xmm1
movapd %xmm1,0x70(%rsp)
movapd %xmm4,%xmm0
divsd  %xmm5,%xmm0
movapd %xmm0,0x60(%rsp)
movapd %xmm3,%xmm0
divsd  %xmm2,%xmm0
movapd %xmm0,0x30(%rsp)
lea    0xd20(%rip),%rdi
call   1040 <puts@plt>
lea    0xcfc(%rip),%rbx
xorpd  %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0xa,%esi
movaps 0x40(%rsp),%xmm0
mov    $0x2,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
movaps 0x50(%rsp),%xmm0
movaps 0x60(%rsp),%xmm1
mov    $0x2,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
movaps 0x80(%rsp),%xmm0
movaps 0x70(%rsp),%xmm1
mov    $0x2,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
mov    $0x2,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    $0xa0,%esi
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
mov    $0x2,%al
call   1060 <printf@plt>
lea    0xc89(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.n = [5 x i32] [i32 10, i32 20, i32 40, i32 80, i32 160]
@.str = [15 x i8] c"n\09error\09\09ediv\0A\00"
@.str.1 = [18 x i8] c"%d\09%.10lf\09%.10lf\0A\00"
@.str.2 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [5 x i32]
%5 = alloca [5 x double]
%6 = alloca double
%7 = alloca double
%8 = alloca double**
%9 = alloca double
%10 = alloca [5 x double]
%11 = alloca [5 x double]
%12 = alloca [5 x double]
store i32 0, i32* %1
%13 = bitcast [5 x i32]* %4 to i8*
store double 1.000000e+00, double* %6
store double 6.000000e+00, double* %7
store double 0x40205DF0FC98D0B5, double* %9
%14 = call i64 @malloc(i32 40)
%15 = inttoptr i64 %14 to double**
store double** %15, double*** %8
store i32 0, i32* %2
br label %16
16: ; preds = %34, %0
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 5
br i1 %18, label %19, label %37
19: ; preds = %16
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = mul i64 %25, 8
%27 = trunc i64 %26 to i32
%28 = call i64 @malloc(i32 %27)
%29 = inttoptr i64 %28 to double*
%30 = load double**, double*** %8
%31 = load i32, i32* %2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double*, double** %30, i64 %32
store double* %29, double** %33
br label %34
34: ; preds = %19
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
store i32 %36, i32* %2
br label %16
37: ; preds = %16
store i32 0, i32* %2
br label %38
38: ; preds = %54, %37
%39 = load i32, i32* %2
%40 = icmp slt i32 %39, 5
br i1 %40, label %41, label %57
41: ; preds = %38
%42 = load double, double* %7
%43 = load double, double* %6
%44 = fsub double %42, %43
%45 = load i32, i32* %2
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = sitofp i32 %48 to double
%50 = fdiv double %44, %49
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 %52
store double %50, double* %53
br label %54
54: ; preds = %41
%55 = load i32, i32* %2
%56 = add nsw i32 %55, 1
store i32 %56, i32* %2
br label %38
57: ; preds = %38
store i32 0, i32* %2
br label %58
58: ; preds = %91, %57
%59 = load i32, i32* %2
%60 = icmp slt i32 %59, 5
br i1 %60, label %61, label %94
61: ; preds = %58
store i32 0, i32* %3
br label %62
62: ; preds = %87, %61
%63 = load i32, i32* %3
%64 = load i32, i32* %2
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = add nsw i32 %67, 1
%69 = icmp slt i32 %63, %68
br i1 %69, label %70, label %90
70: ; preds = %62
%71 = load double, double* %6
%72 = load i32, i32* %2
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 %73
%75 = load double, double* %74
%76 = load i32, i32* %3
%77 = sitofp i32 %76 to double
%78 = call double @llvm.fmuladd.f64(double %75, double %77, double %71)
%79 = load double**, double*** %8
%80 = load i32, i32* %2
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds double*, double** %79, i64 %81
%83 = load double*, double** %82
%84 = load i32, i32* %3
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %83, i64 %85
store double %78, double* %86
br label %87
87: ; preds = %70
%88 = load i32, i32* %3
%89 = add nsw i32 %88, 1
store i32 %89, i32* %3
br label %62
90: ; preds = %62
br label %91
91: ; preds = %90
%92 = load i32, i32* %2
%93 = add nsw i32 %92, 1
store i32 %93, i32* %2
br label %58
94: ; preds = %58
store i32 0, i32* %2
br label %95
95: ; preds = %116, %94
%96 = load i32, i32* %2
%97 = icmp slt i32 %96, 5
br i1 %97, label %98, label %119
98: ; preds = %95
%99 = load double**, double*** %8
%100 = load i32, i32* %2
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double*, double** %99, i64 %101
%103 = load double*, double** %102
%104 = load i32, i32* %2
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 %105
%107 = load double, double* %106
%108 = load i32, i32* %2
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = call double @intCompSimp(double* %103, double %107, i32 %111)
%113 = load i32, i32* %2
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [5 x double], [5 x double]* %12, i64 0, i64 %114
store double %112, double* %115
br label %116
116: ; preds = %98
%117 = load i32, i32* %2
%118 = add nsw i32 %117, 1
store i32 %118, i32* %2
br label %95
119: ; preds = %95
store i32 0, i32* %2
br label %120
120: ; preds = %134, %119
%121 = load i32, i32* %2
%122 = icmp slt i32 %121, 5
br i1 %122, label %123, label %137
123: ; preds = %120
%124 = load double, double* %9
%125 = load i32, i32* %2
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [5 x double], [5 x double]* %12, i64 0, i64 %126
%128 = load double, double* %127
%129 = fsub double %124, %128
%130 = call double @llvm.fabs.f64(double %129)
%131 = load i32, i32* %2
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 %132
store double %130, double* %133
br label %134
134: ; preds = %123
%135 = load i32, i32* %2
%136 = add nsw i32 %135, 1
store i32 %136, i32* %2
br label %120
137: ; preds = %120
%138 = getelementptr inbounds [5 x double], [5 x double]* %11, i64 0, i64 0
store double 0.000000e+00, double* %138
store i32 1, i32* %2
br label %139
139: ; preds = %156, %137
%140 = load i32, i32* %2
%141 = icmp slt i32 %140, 5
br i1 %141, label %142, label %159
142: ; preds = %139
%143 = load i32, i32* %2
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 %144
%146 = load double, double* %145
%147 = load i32, i32* %2
%148 = sub nsw i32 %147, 1
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 %149
%151 = load double, double* %150
%152 = fdiv double %146, %151
%153 = load i32, i32* %2
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [5 x double], [5 x double]* %11, i64 0, i64 %154
store double %152, double* %155
br label %156
156: ; preds = %142
%157 = load i32, i32* %2
%158 = add nsw i32 %157, 1
store i32 %158, i32* %2
br label %139
159: ; preds = %139
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %161
161: ; preds = %178, %159
%162 = load i32, i32* %2
%163 = icmp slt i32 %162, 5
br i1 %163, label %164, label %181
164: ; preds = %161
%165 = load i32, i32* %2
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %166
%168 = load i32, i32* %167
%169 = load i32, i32* %2
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 %170
%172 = load double, double* %171
%173 = load i32, i32* %2
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [5 x double], [5 x double]* %11, i64 0, i64 %174
%176 = load double, double* %175
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %168, double %172, double %176)
br label %178
178: ; preds = %164
%179 = load i32, i32* %2
%180 = add nsw i32 %179, 1
store i32 %180, i32* %2
br label %161
181: ; preds = %161
%182 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%183 = load i32, i32* %1
ret i32 %183
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"%d\09%.10lf\09%.10lf\0A\00"
@.str.2 = [6 x i8] c"PAUSE\00"
@str = [14 x i8] c"n\09error\09\09ediv\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 40)
%2 = inttoptr i64 %1 to double**
%3 = tail call i64 @malloc(i32 88)
%4 = inttoptr i64 %3 to double*
store double* %4, double** %2
%5 = tail call i64 @malloc(i32 168)
%6 = inttoptr i64 %5 to double*
%7 = getelementptr inbounds double*, double** %2, i64 1
store double* %6, double** %7
%8 = tail call i64 @malloc(i32 328)
%9 = inttoptr i64 %8 to double*
%10 = getelementptr inbounds double*, double** %2, i64 2
store double* %9, double** %10
%11 = tail call i64 @malloc(i32 648)
%12 = inttoptr i64 %11 to double*
%13 = getelementptr inbounds double*, double** %2, i64 3
store double* %12, double** %13
%14 = tail call i64 @malloc(i32 1288)
%15 = inttoptr i64 %14 to double*
%16 = getelementptr inbounds double*, double** %2, i64 4
store double* %15, double** %16
%17 = load double*, double** %2
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.500000e+00>, <2 x double>* %18
%19 = getelementptr inbounds double, double* %17, i64 2
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.500000e+00>, <2 x double>* %20
%21 = getelementptr inbounds double, double* %17, i64 4
%22 = bitcast double* %21 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.500000e+00>, <2 x double>* %22
%23 = getelementptr inbounds double, double* %17, i64 6
%24 = bitcast double* %23 to <2 x double>*
store <2 x double> <double 4.000000e+00, double 4.500000e+00>, <2 x double>* %24
%25 = getelementptr inbounds double, double* %17, i64 8
%26 = bitcast double* %25 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.500000e+00>, <2 x double>* %26
%27 = getelementptr inbounds double, double* %17, i64 10
store double 6.000000e+00, double* %27
%28 = load double*, double** %7
%29 = bitcast double* %28 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.250000e+00>, <2 x double>* %29
%30 = getelementptr inbounds double, double* %28, i64 2
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> <double 1.500000e+00, double 1.750000e+00>, <2 x double>* %31
%32 = getelementptr inbounds double, double* %28, i64 4
%33 = bitcast double* %32 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.250000e+00>, <2 x double>* %33
%34 = getelementptr inbounds double, double* %28, i64 6
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> <double 2.500000e+00, double 2.750000e+00>, <2 x double>* %35
%36 = getelementptr inbounds double, double* %28, i64 8
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.250000e+00>, <2 x double>* %37
%38 = getelementptr inbounds double, double* %28, i64 10
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> <double 3.500000e+00, double 3.750000e+00>, <2 x double>* %39
%40 = getelementptr inbounds double, double* %28, i64 12
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> <double 4.000000e+00, double 4.250000e+00>, <2 x double>* %41
%42 = getelementptr inbounds double, double* %28, i64 14
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> <double 4.500000e+00, double 4.750000e+00>, <2 x double>* %43
%44 = getelementptr inbounds double, double* %28, i64 16
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.250000e+00>, <2 x double>* %45
%46 = getelementptr inbounds double, double* %28, i64 18
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> <double 5.500000e+00, double 5.750000e+00>, <2 x double>* %47
%48 = getelementptr inbounds double, double* %28, i64 20
store double 6.000000e+00, double* %48
%49 = load double*, double** %10
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.125000e+00>, <2 x double>* %50
%51 = getelementptr inbounds double, double* %49, i64 2
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> <double 1.250000e+00, double 1.375000e+00>, <2 x double>* %52
%53 = getelementptr inbounds double, double* %49, i64 4
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> <double 1.500000e+00, double 1.625000e+00>, <2 x double>* %54
%55 = getelementptr inbounds double, double* %49, i64 6
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> <double 1.750000e+00, double 1.875000e+00>, <2 x double>* %56
%57 = getelementptr inbounds double, double* %49, i64 8
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.125000e+00>, <2 x double>* %58
%59 = getelementptr inbounds double, double* %49, i64 10
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> <double 2.250000e+00, double 2.375000e+00>, <2 x double>* %60
%61 = getelementptr inbounds double, double* %49, i64 12
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> <double 2.500000e+00, double 2.625000e+00>, <2 x double>* %62
%63 = getelementptr inbounds double, double* %49, i64 14
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> <double 2.750000e+00, double 2.875000e+00>, <2 x double>* %64
%65 = getelementptr inbounds double, double* %49, i64 16
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.125000e+00>, <2 x double>* %66
%67 = getelementptr inbounds double, double* %49, i64 18
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> <double 3.250000e+00, double 3.375000e+00>, <2 x double>* %68
%69 = getelementptr inbounds double, double* %49, i64 20
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> <double 3.500000e+00, double 3.625000e+00>, <2 x double>* %70
%71 = getelementptr inbounds double, double* %49, i64 22
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> <double 3.750000e+00, double 3.875000e+00>, <2 x double>* %72
%73 = getelementptr inbounds double, double* %49, i64 24
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> <double 4.000000e+00, double 4.125000e+00>, <2 x double>* %74
%75 = getelementptr inbounds double, double* %49, i64 26
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> <double 4.250000e+00, double 4.375000e+00>, <2 x double>* %76
%77 = getelementptr inbounds double, double* %49, i64 28
%78 = bitcast double* %77 to <2 x double>*
store <2 x double> <double 4.500000e+00, double 4.625000e+00>, <2 x double>* %78
%79 = getelementptr inbounds double, double* %49, i64 30
%80 = bitcast double* %79 to <2 x double>*
store <2 x double> <double 4.750000e+00, double 4.875000e+00>, <2 x double>* %80
%81 = getelementptr inbounds double, double* %49, i64 32
%82 = bitcast double* %81 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.125000e+00>, <2 x double>* %82
%83 = getelementptr inbounds double, double* %49, i64 34
%84 = bitcast double* %83 to <2 x double>*
store <2 x double> <double 5.250000e+00, double 5.375000e+00>, <2 x double>* %84
%85 = getelementptr inbounds double, double* %49, i64 36
%86 = bitcast double* %85 to <2 x double>*
store <2 x double> <double 5.500000e+00, double 5.625000e+00>, <2 x double>* %86
%87 = getelementptr inbounds double, double* %49, i64 38
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> <double 5.750000e+00, double 5.875000e+00>, <2 x double>* %88
%89 = getelementptr inbounds double, double* %49, i64 40
store double 6.000000e+00, double* %89
%90 = load double*, double** %13
br label %91
91: ; preds = %91, %0
%92 = phi i64 [ 0, %0 ], [ %116, %91 ]
%93 = phi <2 x i32> [ <i32 0, i32 1>, %0 ], [ %117, %91 ]
%94 = sitofp <2 x i32> %93 to <2 x double>
%95 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %94, <2 x double> <double 6.250000e-02, double 6.250000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%96 = getelementptr inbounds double, double* %90, i64 %92
%97 = bitcast double* %96 to <2 x double>*
store <2 x double> %95, <2 x double>* %97
%98 = or i64 %92, 2
%99 = add <2 x i32> %93, <i32 2, i32 2>
%100 = sitofp <2 x i32> %99 to <2 x double>
%101 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> <double 6.250000e-02, double 6.250000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%102 = getelementptr inbounds double, double* %90, i64 %98
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %101, <2 x double>* %103
%104 = or i64 %92, 4
%105 = add <2 x i32> %93, <i32 4, i32 4>
%106 = sitofp <2 x i32> %105 to <2 x double>
%107 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %106, <2 x double> <double 6.250000e-02, double 6.250000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%108 = getelementptr inbounds double, double* %90, i64 %104
%109 = bitcast double* %108 to <2 x double>*
store <2 x double> %107, <2 x double>* %109
%110 = or i64 %92, 6
%111 = add <2 x i32> %93, <i32 6, i32 6>
%112 = sitofp <2 x i32> %111 to <2 x double>
%113 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %112, <2 x double> <double 6.250000e-02, double 6.250000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%114 = getelementptr inbounds double, double* %90, i64 %110
%115 = bitcast double* %114 to <2 x double>*
store <2 x double> %113, <2 x double>* %115
%116 = add nuw nsw i64 %92, 8
%117 = add <2 x i32> %93, <i32 8, i32 8>
%118 = icmp eq i64 %116, 80
br i1 %118, label %119, label %91
119: ; preds = %91
%120 = getelementptr inbounds double, double* %90, i64 80
store double 6.000000e+00, double* %120
br label %121
121: ; preds = %121, %119
%122 = phi i64 [ 0, %119 ], [ %144, %121 ]
%123 = phi <2 x i32> [ <i32 0, i32 1>, %119 ], [ %145, %121 ]
%124 = add <2 x i32> %123, <i32 2, i32 2>
%125 = sitofp <2 x i32> %123 to <2 x double>
%126 = sitofp <2 x i32> %124 to <2 x double>
%127 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %125, <2 x double> <double 3.125000e-02, double 3.125000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%128 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %126, <2 x double> <double 3.125000e-02, double 3.125000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%129 = getelementptr inbounds double, double* %15, i64 %122
%130 = bitcast double* %129 to <2 x double>*
store <2 x double> %127, <2 x double>* %130
%131 = getelementptr inbounds double, double* %129, i64 2
%132 = bitcast double* %131 to <2 x double>*
store <2 x double> %128, <2 x double>* %132
%133 = or i64 %122, 4
%134 = add <2 x i32> %123, <i32 4, i32 4>
%135 = add <2 x i32> %123, <i32 6, i32 6>
%136 = sitofp <2 x i32> %134 to <2 x double>
%137 = sitofp <2 x i32> %135 to <2 x double>
%138 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> <double 3.125000e-02, double 3.125000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%139 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %137, <2 x double> <double 3.125000e-02, double 3.125000e-02>, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
%140 = getelementptr inbounds double, double* %15, i64 %133
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> %138, <2 x double>* %141
%142 = getelementptr inbounds double, double* %140, i64 2
%143 = bitcast double* %142 to <2 x double>*
store <2 x double> %139, <2 x double>* %143
%144 = add nuw nsw i64 %122, 8
%145 = add <2 x i32> %123, <i32 8, i32 8>
%146 = icmp eq i64 %144, 160
br i1 %146, label %147, label %121
147: ; preds = %121
%148 = getelementptr inbounds double, double* %15, i64 160
store double 6.000000e+00, double* %148
%149 = load double*, double** %2
%150 = tail call double @intCompSimp(double* %149, double 5.000000e-01, i32 10)
%151 = load double*, double** %7
%152 = tail call double @intCompSimp(double* %151, double 2.500000e-01, i32 20)
%153 = load double*, double** %10
%154 = tail call double @intCompSimp(double* %153, double 1.250000e-01, i32 40)
%155 = load double*, double** %13
%156 = tail call double @intCompSimp(double* %155, double 6.250000e-02, i32 80)
%157 = load double*, double** %16
%158 = tail call double @intCompSimp(double* %157, double 3.125000e-02, i32 160)
%159 = insertelement <2 x double> poison, double %152, i64 0
%160 = insertelement <2 x double> %159, double %150, i64 1
%161 = fsub <2 x double> <double 0x40205DF0FC98D0B5, double 0x40205DF0FC98D0B5>, %160
%162 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %161)
%163 = insertelement <2 x double> poison, double %156, i64 0
%164 = insertelement <2 x double> %163, double %154, i64 1
%165 = fsub <2 x double> <double 0x40205DF0FC98D0B5, double 0x40205DF0FC98D0B5>, %164
%166 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %165)
%167 = fsub double 0x40205DF0FC98D0B5, %158
%168 = tail call double @llvm.fabs.f64(double %167)
%169 = extractelement <2 x double> %162, i64 0
%170 = extractelement <2 x double> %162, i64 1
%171 = fdiv double %169, %170
%172 = extractelement <2 x double> %166, i64 1
%173 = fdiv double %172, %169
%174 = extractelement <2 x double> %166, i64 0
%175 = fdiv double %174, %172
%176 = fdiv double %168, %174
%177 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%178 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 10, double %170, double 0.000000e+00)
%179 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 20, double %169, double %171)
%180 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 40, double %172, double %173)
%181 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 80, double %174, double %175)
%182 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 160, double %168, double %176)
%183 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}