#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 double time_t;

/* Variables and functions */
double clock();
double midp(double, double);
int /*<<< orphan*/ printf(char *, ...);
double simp(double, double);
double trap(double, double);
int main() {
  double x_start = 0;
  double x_end = 1.000000;
  int N[7] = {11, 101, 1001, 10001, 100001, 1000001, 10000001};
  int M = 0;
  double midp_i = 0, trap_i = 0, simp_i = 0;
  double midp_err, trap_err, simp_err;
  double h;
  int i, j;
  double xi;
  time_t start, stop;
  double midp_time, trap_time, simp_time;
  printf("M - midp_result  -  trap_result  -  simp_result  -  midp_err  -  "
         "trap_err  -  simp_err  -  midp_time  -  trap_time  -  simp_time\n");
  for (i = 0; i < 7; i++) {
    M = N[i];
    h = (x_end - x_start) / (M - 1.000000000000);
    midp_i = 0, midp_err = 0;
    trap_i = 0, trap_err = 0;
    simp_i = 0, simp_err = 0;
    start = clock();
    for (j = 0; j < M - 1; j++) {
      xi = x_start + h * j;
      midp_i = midp_i + h * midp(xi, h);
    }
    stop = clock();
    midp_time = stop - start;
    start = clock();
    for (j = 0; j < M - 1; j++) {
      xi = x_start + h * j;
      trap_i = trap_i + (h / 2.0) * trap(xi, h);
    }
    stop = clock();
    trap_time = stop - start;
    start = clock();
    for (j = 1; j < M - 1; j++) {
      xi = x_start + h * j;
      simp_i = simp_i + (h / 6) * simp(xi, h);
    }
    stop = clock();
    simp_time = stop - start;
    midp_err = midp_i - 0.125000000000;
    trap_err = trap_i - 0.125000000000;
    simp_err = simp_i - 0.125000000000;
    printf("%d, %.12lf, %.12lf,  %.12lf, %.12lf, %.12lf, %.12lf, %.6lf, %.6lf, "
           "%.6lf\n",
           M, midp_i, trap_i, simp_i, midp_err, trap_err, simp_err, midp_time,
           trap_time, simp_time);
  }
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    0xea2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe9a(%rip),%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x84(%rbp)
cmpl   $0x7,-0x84(%rbp)
jge    1585 <main+0x435>
movslq -0x84(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
mov    %eax,-0x44(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x44(%rbp),%xmm1
movsd  0xdf6(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12f6 <main+0x1a6>
movsd  -0x10(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
cvtsi2sdl -0x88(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
call   1030 <midp@plt>
movsd  -0xc8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1260 <main+0x110>
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13d8 <main+0x288>
movsd  -0x10(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
cvtsi2sdl -0x88(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xc92(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
call   1070 <trap@plt>
movsd  -0xd8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1336 <main+0x1e6>
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14ba <main+0x36a>
movsd  -0x10(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
cvtsi2sdl -0x88(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xba8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
call   1060 <simp@plt>
movsd  -0xe8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1418 <main+0x2c8>
mov    $0x0,%al
call   1040 <clock@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  0xb1a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xb04(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xaee(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x44(%rbp),%esi
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
movsd  -0x70(%rbp),%xmm4
movsd  -0x78(%rbp),%xmm5
movsd  -0xa8(%rbp),%xmm6
ff
movsd  -0xb0(%rbp),%xmm7
ff
movsd  -0xb8(%rbp),%xmm8
ff ff
lea    0xb5a(%rip),%rdi
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1050 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    11d8 <main+0x88>
mov    $0xffffffff,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xf21(%rip),%rdi
call   1040 <puts@plt>
movsd  0xe86(%rip),%xmm1
lea    0xec3(%rip),%r14
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
lea    0xe99(%rip),%rax
mov    (%rax,%rbp,4),%r13d
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
addsd  0xe55(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
xor    %eax,%eax
call   1050 <clock@plt>
movsd  %xmm0,0x10(%rsp)
lea    -0x1(%r13),%ebx
cmp    $0x2,%ebx
mov    $0x1,%r12d
cmovge %ebx,%r12d
mov    %r12d,%r15d
xorpd  %xmm0,%xmm0
xorpd  %xmm2,%xmm2
xchg   %ax,%ax
movsd  %xmm2,0x18(%rsp)
movsd  %xmm0,0x28(%rsp)
movsd  0x20(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe26(%rip),%xmm0
call   1030 <midp@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x18(%rsp),%xmm2
movsd  0x28(%rsp),%xmm0
addsd  0xdd7(%rip),%xmm2
add    $0xffffffff,%r15d
jne    11e0 <main+0x80>
xor    %eax,%eax
call   1050 <clock@plt>
subsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
xor    %eax,%eax
call   1050 <clock@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
mulsd  0xdab(%rip),%xmm0
movsd  %xmm0,0x38(%rsp)
xorpd  %xmm0,%xmm0
xorpd  %xmm2,%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd86(%rip),%xmm0
call   1080 <trap@plt>
movsd  0x10(%rsp),%xmm2
mulsd  0x38(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  0xd37(%rip),%xmm2
add    $0xffffffff,%r12d
jne    1280 <main+0x120>
xor    %eax,%eax
call   1050 <clock@plt>
subsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
xor    %eax,%eax
call   1050 <clock@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  0xd13(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
cmp    $0x3,%ebx
mov    $0x2,%eax
cmovl  %eax,%ebx
add    $0xffffffff,%ebx
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xcdd(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movsd  %xmm2,0x38(%rsp)
movsd  0x20(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  0xcdc(%rip),%xmm0
call   1070 <simp@plt>
movsd  0x38(%rsp),%xmm2
mulsd  0x30(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
addsd  0xc93(%rip),%xmm2
add    $0xffffffff,%ebx
jne    1330 <main+0x1d0>
xor    %eax,%eax
call   1050 <clock@plt>
subsd  0x40(%rsp),%xmm0
movsd  0x28(%rsp),%xmm7
movapd %xmm7,%xmm3
movsd  0xc87(%rip),%xmm6
addsd  %xmm6,%xmm3
movsd  0x18(%rsp),%xmm1
movapd %xmm1,%xmm4
addsd  %xmm6,%xmm4
movsd  0x10(%rsp),%xmm2
movapd %xmm2,%xmm5
addsd  %xmm6,%xmm5
movsd  %xmm0,(%rsp)
mov    %r14,%rdi
mov    %r13d,%esi
movapd %xmm7,%xmm0
movsd  0x50(%rsp),%xmm6
movsd  0x48(%rsp),%xmm7
mov    $0x8,%al
call   1060 <printf@plt>
add    $0x1,%rbp
cmp    $0x7,%rbp
movsd  0xc1d(%rip),%xmm1
jne    1190 <main+0x30>
mov    $0xffffffff,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.N = [7 x i32] [i32 11, i32 101, i32 1001, i32 10001, i32 100001, i32 1000001, i32 10000001]
@.str = [130 x i8] c"M - midp_result - trap_result - simp_result - midp_err - trap_err - simp_err - midp_time - trap_time - simp_time\0A\00"
@.str.1 = [74 x i8] c"%d, %.12lf, %.12lf, %.12lf, %.12lf, %.12lf, %.12lf, %.6lf, %.6lf, %.6lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca [7 x i32]
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double 1.000000e+00, double* %3
%21 = bitcast [7 x i32]* %4 to i8*
store i32 0, i32* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %13
br label %23
23: ; preds = %135, %0
%24 = load i32, i32* %13
%25 = icmp slt i32 %24, 7
br i1 %25, label %26, label %138
26: ; preds = %23
%27 = load i32, i32* %13
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [7 x i32], [7 x i32]* %4, i64 0, i64 %28
%30 = load i32, i32* %29
store i32 %30, i32* %5
%31 = load double, double* %3
%32 = load double, double* %2
%33 = fsub double %31, %32
%34 = load i32, i32* %5
%35 = sitofp i32 %34 to double
%36 = fsub double %35, 1.000000e+00
%37 = fdiv double %33, %36
store double %37, double* %12
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %11
%38 = call double (...) @clock()
store double %38, double* %16
store i32 0, i32* %14
br label %39
39: ; preds = %56, %26
%40 = load i32, i32* %14
%41 = load i32, i32* %5
%42 = sub nsw i32 %41, 1
%43 = icmp slt i32 %40, %42
br i1 %43, label %44, label %59
44: ; preds = %39
%45 = load double, double* %2
%46 = load double, double* %12
%47 = load i32, i32* %14
%48 = sitofp i32 %47 to double
%49 = call double @llvm.fmuladd.f64(double %46, double %48, double %45)
store double %49, double* %15
%50 = load double, double* %6
%51 = load double, double* %12
%52 = load double, double* %15
%53 = load double, double* %12
%54 = call double @midp(double %52, double %53)
%55 = call double @llvm.fmuladd.f64(double %51, double %54, double %50)
store double %55, double* %6
br label %56
56: ; preds = %44
%57 = load i32, i32* %14
%58 = add nsw i32 %57, 1
store i32 %58, i32* %14
br label %39
59: ; preds = %39
%60 = call double (...) @clock()
store double %60, double* %17
%61 = load double, double* %17
%62 = load double, double* %16
%63 = fsub double %61, %62
store double %63, double* %18
%64 = call double (...) @clock()
store double %64, double* %16
store i32 0, i32* %14
br label %65
65: ; preds = %83, %59
%66 = load i32, i32* %14
%67 = load i32, i32* %5
%68 = sub nsw i32 %67, 1
%69 = icmp slt i32 %66, %68
br i1 %69, label %70, label %86
70: ; preds = %65
%71 = load double, double* %2
%72 = load double, double* %12
%73 = load i32, i32* %14
%74 = sitofp i32 %73 to double
%75 = call double @llvm.fmuladd.f64(double %72, double %74, double %71)
store double %75, double* %15
%76 = load double, double* %7
%77 = load double, double* %12
%78 = fdiv double %77, 2.000000e+00
%79 = load double, double* %15
%80 = load double, double* %12
%81 = call double @trap(double %79, double %80)
%82 = call double @llvm.fmuladd.f64(double %78, double %81, double %76)
store double %82, double* %7
br label %83
83: ; preds = %70
%84 = load i32, i32* %14
%85 = add nsw i32 %84, 1
store i32 %85, i32* %14
br label %65
86: ; preds = %65
%87 = call double (...) @clock()
store double %87, double* %17
%88 = load double, double* %17
%89 = load double, double* %16
%90 = fsub double %88, %89
store double %90, double* %19
%91 = call double (...) @clock()
store double %91, double* %16
store i32 1, i32* %14
br label %92
92: ; preds = %110, %86
%93 = load i32, i32* %14
%94 = load i32, i32* %5
%95 = sub nsw i32 %94, 1
%96 = icmp slt i32 %93, %95
br i1 %96, label %97, label %113
97: ; preds = %92
%98 = load double, double* %2
%99 = load double, double* %12
%100 = load i32, i32* %14
%101 = sitofp i32 %100 to double
%102 = call double @llvm.fmuladd.f64(double %99, double %101, double %98)
store double %102, double* %15
%103 = load double, double* %8
%104 = load double, double* %12
%105 = fdiv double %104, 6.000000e+00
%106 = load double, double* %15
%107 = load double, double* %12
%108 = call double @simp(double %106, double %107)
%109 = call double @llvm.fmuladd.f64(double %105, double %108, double %103)
store double %109, double* %8
br label %110
110: ; preds = %97
%111 = load i32, i32* %14
%112 = add nsw i32 %111, 1
store i32 %112, i32* %14
br label %92
113: ; preds = %92
%114 = call double (...) @clock()
store double %114, double* %17
%115 = load double, double* %17
%116 = load double, double* %16
%117 = fsub double %115, %116
store double %117, double* %20
%118 = load double, double* %6
%119 = fsub double %118, 1.250000e-01
store double %119, double* %9
%120 = load double, double* %7
%121 = fsub double %120, 1.250000e-01
store double %121, double* %10
%122 = load double, double* %8
%123 = fsub double %122, 1.250000e-01
store double %123, double* %11
%124 = load i32, i32* %5
%125 = load double, double* %6
%126 = load double, double* %7
%127 = load double, double* %8
%128 = load double, double* %9
%129 = load double, double* %10
%130 = load double, double* %11
%131 = load double, double* %18
%132 = load double, double* %19
%133 = load double, double* %20
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i32 %124, double %125, double %126, double %127, double %128, double %129, double %130, double %131, double %132, double %133)
br label %135
135: ; preds = %113
%136 = load i32, i32* %13
%137 = add nsw i32 %136, 1
store i32 %137, i32* %13
br label %23
138: ; preds = %23
ret i32 -1
}

LLVM IR (-O2):
@__const.main.N = [7 x i32] [i32 11, i32 101, i32 1001, i32 10001, i32 100001, i32 1000001, i32 10000001]
@.str.1 = [74 x i8] c"%d, %.12lf, %.12lf, %.12lf, %.12lf, %.12lf, %.12lf, %.6lf, %.6lf, %.6lf\0A\00"
@str = [129 x i8] c"M - midp_result - trap_result - simp_result - midp_err - trap_err - simp_err - midp_time - trap_time - simp_time\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([129 x i8], [129 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %51, %0
%3 = phi i64 [ 0, %0 ], [ %58, %51 ]
%4 = getelementptr inbounds [7 x i32], [7 x i32]* @__const.main.N, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = fadd double %6, -1.000000e+00
%8 = fdiv double 1.000000e+00, %7
%9 = tail call double (...) @clock()
%10 = add i32 %5, -1
%11 = call i32 @llvm.smax.i32(i32 %10, i32 1)
br label %12
12: ; preds = %2, %12
%13 = phi double [ %18, %12 ], [ 0.000000e+00, %2 ]
%14 = phi i32 [ %19, %12 ], [ 0, %2 ]
%15 = sitofp i32 %14 to double
%16 = tail call double @llvm.fmuladd.f64(double %8, double %15, double 0.000000e+00)
%17 = tail call double @midp(double %16, double %8)
%18 = tail call double @llvm.fmuladd.f64(double %8, double %17, double %13)
%19 = add nuw nsw i32 %14, 1
%20 = icmp eq i32 %19, %11
br i1 %20, label %21, label %12
21: ; preds = %12
%22 = tail call double (...) @clock()
%23 = fsub double %22, %9
%24 = tail call double (...) @clock()
%25 = fmul double %8, 5.000000e-01
%26 = call i32 @llvm.smax.i32(i32 %10, i32 1)
br label %27
27: ; preds = %21, %27
%28 = phi double [ 0.000000e+00, %21 ], [ %33, %27 ]
%29 = phi i32 [ 0, %21 ], [ %34, %27 ]
%30 = sitofp i32 %29 to double
%31 = tail call double @llvm.fmuladd.f64(double %8, double %30, double 0.000000e+00)
%32 = tail call double @trap(double %31, double %8)
%33 = tail call double @llvm.fmuladd.f64(double %25, double %32, double %28)
%34 = add nuw nsw i32 %29, 1
%35 = icmp eq i32 %34, %26
br i1 %35, label %36, label %27
36: ; preds = %27
%37 = tail call double (...) @clock()
%38 = fsub double %37, %24
%39 = tail call double (...) @clock()
%40 = fdiv double %8, 6.000000e+00
%41 = call i32 @llvm.smax.i32(i32 %10, i32 2)
br label %42
42: ; preds = %36, %42
%43 = phi i32 [ 1, %36 ], [ %49, %42 ]
%44 = phi double [ 0.000000e+00, %36 ], [ %48, %42 ]
%45 = sitofp i32 %43 to double
%46 = tail call double @llvm.fmuladd.f64(double %8, double %45, double 0.000000e+00)
%47 = tail call double @simp(double %46, double %8)
%48 = tail call double @llvm.fmuladd.f64(double %40, double %47, double %44)
%49 = add nuw nsw i32 %43, 1
%50 = icmp eq i32 %49, %41
br i1 %50, label %51, label %42
51: ; preds = %42
%52 = tail call double (...) @clock()
%53 = fsub double %52, %39
%54 = fadd double %18, -1.250000e-01
%55 = fadd double %33, -1.250000e-01
%56 = fadd double %48, -1.250000e-01
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i32 %5, double %18, double %33, double %48, double %54, double %55, double %56, double %23, double %38, double %53)
%58 = add nuw nsw i64 %3, 1
%59 = icmp eq i64 %58, 7
br i1 %59, label %60, label %2
60: ; preds = %51
ret i32 -1
}