#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int nsl_int_rectangle(double *, double *, int, int);
size_t nsl_int_simpson(double *, double *, int, int /*<<< orphan*/);
size_t nsl_int_simpson_3_8(double *, double *, int, int /*<<< orphan*/);
int nsl_int_trapezoid(double *, double *, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int main() {
  double xdata[] = {1, 2, 3, 5, 7};
  double ydata[] = {2, 2, 2, -2, -2};
  int n = 5;
  printf("data:\n");
  size_t i;
  for (i = 0; i < n; i++)
    printf("%g %g\n", xdata[i], ydata[i]);
  puts("");
  printf("integral (rectangle, 1-point):\n");
  int status = nsl_int_rectangle(xdata, ydata, n, 0);
  for (i = 0; i < n; i++)
    printf("%g %g\n", xdata[i], ydata[i]);
  printf("sum = %g\n", ydata[n - 1]);
  puts("");
  printf("area (rectangle, 1-point):\n");
  double ydata4[] = {2, 2, 2, 2, 2};
  status = nsl_int_rectangle(xdata, ydata4, n, 1);
  for (i = 0; i < n; i++)
    printf("%g %g\n", xdata[i], ydata4[i]);
  printf("sum = %g\n", ydata4[n - 1]);
  puts("");
  printf("integral (trapezoid, 2-point):\n");
  double ydata2[] = {1, 2, 3, -1, -3};
  status = nsl_int_trapezoid(xdata, ydata2, n, 0);
  for (i = 0; i < n; i++)
    printf("%g %g\n", xdata[i], ydata2[i]);
  printf("sum = %g\n", ydata2[n - 1]);
  puts("");
  printf("area (trapezoid, 2-point):\n");
  double ydata3[] = {1, 2, 3, -1, -3};
  status = nsl_int_trapezoid(xdata, ydata3, n, 1);
  for (i = 0; i < n; i++)
    printf("%g %g\n", xdata[i], ydata3[i]);
  printf("sum = %g\n", ydata3[n - 1]);
  puts("");
  printf("integral (Simpson's 1/3, 3-point):\n");
  double ydata5[] = {1, 2, 3, -1, -3};
  size_t np = nsl_int_simpson(xdata, ydata5, n, 0);
  for (i = 0; i < np; i++)
    printf("%g %g\n", xdata[i], ydata5[i]);
  printf("sum = %g (n = %zu)\n", ydata5[np - 1], np);
  puts("");
  printf("integral (Simpson's 3/8, 4-point):\n");
  double xdata2[] = {1, 2, 3, 5, 7, 8, 9};
  double ydata6[] = {2, 2, 2, 2, 2, 2, 2};
  n = 7;
  np = nsl_int_simpson_3_8(xdata2, ydata6, n, 0);
  for (i = 0; i < np; i++)
    printf("%g %g\n", xdata2[i], ydata6[i]);
  printf("sum = %g (n = %zu)\n", ydata6[np - 1], np);
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movsd  0xe7e(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe5c(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe47(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe32(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movsd  0xe0d(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe00(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xdf3(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xdde(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xdd1(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x5,-0x64(%rbp)
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x64(%rbp),%rcx
cmp    %rcx,%rax
jae    1295 <main+0x115>
mov    -0x70(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
mov    -0x70(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm1
lea    0xdca(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    1251 <main+0xd1>
lea    0xe6b(%rip),%rdi
call   1030 <puts@plt>
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    -0x64(%rbp),%edx
xor    %ecx,%ecx
call   1090 <nsl_int_rectangle@plt>
mov    %eax,-0x74(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x64(%rbp),%rcx
cmp    %rcx,%rax
jae    1310 <main+0x190>
mov    -0x70(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
mov    -0x70(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm1
lea    0xd4f(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    12cc <main+0x14c>
mov    -0x64(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x60(%rbp,%rax,8),%xmm0
lea    0xd49(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xdd4(%rip),%rdi
call   1030 <puts@plt>
lea    0xd39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movsd  0xca7(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xc97(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xc87(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xc77(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xc67(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    -0x64(%rbp),%edx
mov    $0x1,%ecx
call   1090 <nsl_int_rectangle@plt>
mov    %eax,-0x74(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x64(%rbp),%rcx
cmp    %rcx,%rax
jae    1410 <main+0x290>
mov    -0x70(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
mov    -0x70(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm1
ff ff
lea    0xc4f(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    13c9 <main+0x249>
mov    -0x64(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
lea    0xc46(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xcd1(%rip),%rdi
call   1030 <puts@plt>
lea    0xc52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movsd  0xbc4(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xb94(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xb9c(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xba4(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xb8c(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
lea    -0x30(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
mov    -0x64(%rbp),%edx
xor    %ecx,%ecx
call   10a0 <nsl_int_trapezoid@plt>
mov    %eax,-0x74(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x64(%rbp),%rcx
cmp    %rcx,%rax
jae    1513 <main+0x393>
mov    -0x70(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
mov    -0x70(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
lea    0xb4c(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    14cc <main+0x34c>
mov    -0x64(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
lea    0xb43(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xbce(%rip),%rdi
call   1030 <puts@plt>
lea    0xb6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movsd  0xac1(%rip),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0xa91(%rip),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  0xa99(%rip),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xaa1(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xa89(%rip),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
lea    -0x30(%rbp),%rdi
lea    -0x100(%rbp),%rsi
mov    -0x64(%rbp),%edx
mov    $0x1,%ecx
call   10a0 <nsl_int_trapezoid@plt>
mov    %eax,-0x74(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x64(%rbp),%rcx
cmp    %rcx,%rax
jae    1619 <main+0x499>
mov    -0x70(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
mov    -0x70(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm1
ff ff
lea    0xa46(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    15d2 <main+0x452>
mov    -0x64(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
lea    0xa3d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xac8(%rip),%rdi
call   1030 <puts@plt>
lea    0xa85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
movsd  0x9bb(%rip),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  0x98b(%rip),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  0x993(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  0x99b(%rip),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0x983(%rip),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
lea    -0x30(%rbp),%rdi
lea    -0x130(%rbp),%rsi
mov    -0x64(%rbp),%edx
xor    %ecx,%ecx
call   1070 <nsl_int_simpson@plt>
mov    %rax,-0x138(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
cmp    -0x138(%rbp),%rax
jae    1720 <main+0x5a0>
mov    -0x70(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
mov    -0x70(%rbp),%rax
movsd  -0x130(%rbp,%rax,8),%xmm1
ff ff
lea    0x93f(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    16d9 <main+0x559>
mov    -0x138(%rbp),%rax
sub    $0x1,%rax
movsd  -0x130(%rbp,%rax,8),%xmm0
ff ff
mov    -0x138(%rbp),%rsi
lea    0x9b2(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0x9b7(%rip),%rdi
call   1030 <puts@plt>
lea    0x9ac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x170(%rbp),%rdi
lea    0x9bf(%rip),%rsi
mov    $0x38,%edx
call   1060 <memcpy@plt>
lea    -0x1b0(%rbp),%rdi
lea    0x9e7(%rip),%rsi
mov    $0x38,%edx
call   1060 <memcpy@plt>
movl   $0x7,-0x64(%rbp)
lea    -0x170(%rbp),%rdi
lea    -0x1b0(%rbp),%rsi
mov    -0x64(%rbp),%edx
xor    %ecx,%ecx
call   1080 <nsl_int_simpson_3_8@plt>
mov    %rax,-0x138(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
cmp    -0x138(%rbp),%rax
jae    180b <main+0x68b>
mov    -0x70(%rbp),%rax
movsd  -0x170(%rbp,%rax,8),%xmm0
ff ff
mov    -0x70(%rbp),%rax
movsd  -0x1b0(%rbp,%rax,8),%xmm1
ff ff
lea    0x854(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    17c1 <main+0x641>
mov    -0x138(%rbp),%rax
sub    $0x1,%rax
movsd  -0x1b0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x138(%rbp),%rsi
lea    0x8c7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0x8cc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x198,%rsp
movaps 0xe7b(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xe80(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x401c000000000000,%rax
mov    %rax,0x20(%rsp)
movaps 0xe75(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xe76(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movabs $0xc000000000000000,%rax
mov    %rax,0xe0(%rsp)
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
lea    0xe99(%rip),%rbx
movsd  0xe61(%rip),%xmm0
movsd  0xe61(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
movsd  0xe4c(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe42(%rip),%xmm0
mov    %rbx,%rdi
movsd  0xe2f(%rip),%xmm1
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe30(%rip),%xmm0
movsd  0xe30(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe26(%rip),%xmm0
mov    %rbx,%rdi
movsd  0xe13(%rip),%xmm1
mov    $0x2,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe36(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%r14
lea    0xc0(%rsp),%rsi
mov    %r14,%rdi
mov    $0x5,%edx
xor    %ecx,%ecx
call   1080 <nsl_int_rectangle@plt>
movsd  (%rsp),%xmm0
movsd  0xc0(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0xc8(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0xd0(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0xd8(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0xe0(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xe0(%rsp),%xmm0
lea    0xd67(%rip),%r15
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd8f(%rip),%rdi
call   1040 <puts@plt>
movaps 0xcd9(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movabs $0x4000000000000000,%rax
mov    %rax,0xb0(%rsp)
lea    0x90(%rsp),%rsi
mov    %r14,%rdi
mov    $0x5,%edx
mov    $0x1,%ecx
call   1080 <nsl_int_rectangle@plt>
movsd  (%rsp),%xmm0
movsd  0x90(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x98(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0xa0(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0xa8(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0xb0(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0xb0(%rsp),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcc2(%rip),%rdi
call   1040 <puts@plt>
movaps 0xbd1(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xc05(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movabs $0xc008000000000000,%r12
mov    %r12,0x80(%rsp)
lea    0x60(%rsp),%rsi
mov    %r14,%rdi
mov    $0x5,%edx
xor    %ecx,%ecx
call   1090 <nsl_int_trapezoid@plt>
movsd  (%rsp),%xmm0
movsd  0x60(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x68(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x70(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x78(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x80(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x80(%rsp),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xc0a(%rip),%rdi
call   1040 <puts@plt>
movaps 0xafa(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xb2e(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    %r12,0x50(%rsp)
lea    0x30(%rsp),%rsi
mov    %r14,%rdi
mov    $0x5,%edx
mov    $0x1,%ecx
call   1090 <nsl_int_trapezoid@plt>
movsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x50(%rsp),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xb5e(%rip),%rdi
call   1040 <puts@plt>
movaps 0xa33(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xa64(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
mov    %r12,0x110(%rsp)
lea    0xf0(%rsp),%rsi
mov    %r14,%rdi
mov    $0x5,%edx
xor    %ecx,%ecx
call   1060 <nsl_int_simpson@plt>
mov    %rax,%r15
test   %rax,%rax
je     1641 <main+0x4d1>
xor    %ebx,%ebx
lea    0xa6c(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rsp,%rbx,8),%xmm0
movsd  0xf0(%rsp,%rbx,8),%xmm1
mov    %r14,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1620 <main+0x4b0>
movsd  0xe8(%rsp,%r15,8),%xmm0
lea    0xa3f(%rip),%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xad5(%rip),%rdi
call   1040 <puts@plt>
mov    0xb27(%rip),%rax
mov    %rax,0x190(%rsp)
movaps 0xb08(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0xae9(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xaca(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
mov    0xb2b(%rip),%rax
mov    %rax,0x150(%rsp)
movaps 0xb0c(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xaed(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xace(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
lea    0x160(%rsp),%rdi
lea    0x120(%rsp),%rsi
mov    $0x7,%edx
xor    %ecx,%ecx
call   1070 <nsl_int_simpson_3_8@plt>
mov    %rax,%r15
test   %rax,%rax
je     1745 <main+0x5d5>
xor    %ebx,%ebx
lea    0x969(%rip),%r14
nopw   0x0(%rax,%rax,1)
movsd  0x160(%rsp,%rbx,8),%xmm0
movsd  0x120(%rsp,%rbx,8),%xmm1
mov    %r14,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1720 <main+0x5b0>
movsd  0x118(%rsp,%r15,8),%xmm0
lea    0x93b(%rip),%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"data:\0A\00"
@.str.1 = [7 x i8] c"%g %g\0A\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [32 x i8] c"integral (rectangle, 1-point):\0A\00"
@.str.4 = [10 x i8] c"sum = %g\0A\00"
@.str.5 = [28 x i8] c"area (rectangle, 1-point):\0A\00"
@.str.6 = [32 x i8] c"integral (trapezoid, 2-point):\0A\00"
@.str.7 = [28 x i8] c"area (trapezoid, 2-point):\0A\00"
@.str.8 = [36 x i8] c"integral (Simpson's 1/3, 3-point):\0A\00"
@.str.9 = [20 x i8] c"sum = %g (n = %zu)\0A\00"
@.str.10 = [36 x i8] c"integral (Simpson's 3/8, 4-point):\0A\00"
@__const.main.xdata2 = [7 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 5.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00]
@__const.main.ydata6 = [7 x double] [double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x double]
%3 = alloca [5 x double]
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca [5 x double]
%8 = alloca [5 x double]
%9 = alloca [5 x double]
%10 = alloca [5 x double]
%11 = alloca i64
%12 = alloca [7 x double]
%13 = alloca [7 x double]
store i32 0, i32* %1
%14 = bitcast [5 x double]* %2 to i8*
%15 = bitcast i8* %14 to [5 x double]*
%16 = getelementptr inbounds [5 x double], [5 x double]* %15, i32 0, i32 0
store double 1.000000e+00, double* %16
%17 = getelementptr inbounds [5 x double], [5 x double]* %15, i32 0, i32 1
store double 2.000000e+00, double* %17
%18 = getelementptr inbounds [5 x double], [5 x double]* %15, i32 0, i32 2
store double 3.000000e+00, double* %18
%19 = getelementptr inbounds [5 x double], [5 x double]* %15, i32 0, i32 3
store double 5.000000e+00, double* %19
%20 = getelementptr inbounds [5 x double], [5 x double]* %15, i32 0, i32 4
store double 7.000000e+00, double* %20
%21 = bitcast [5 x double]* %3 to i8*
%22 = bitcast i8* %21 to [5 x double]*
%23 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 0
store double 2.000000e+00, double* %23
%24 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 1
store double 2.000000e+00, double* %24
%25 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 2
store double 2.000000e+00, double* %25
%26 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 3
store double -2.000000e+00, double* %26
%27 = getelementptr inbounds [5 x double], [5 x double]* %22, i32 0, i32 4
store double -2.000000e+00, double* %27
store i32 5, i32* %4
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %5
br label %29
29: ; preds = %42, %0
%30 = load i64, i64* %5
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = icmp ult i64 %30, %32
br i1 %33, label %34, label %45
34: ; preds = %29
%35 = load i64, i64* %5
%36 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 %35
%37 = load double, double* %36
%38 = load i64, i64* %5
%39 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 %38
%40 = load double, double* %39
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %37, double %40)
br label %42
42: ; preds = %34
%43 = load i64, i64* %5
%44 = add i64 %43, 1
store i64 %44, i64* %5
br label %29
45: ; preds = %29
%46 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%48 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 0
%49 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 0
%50 = load i32, i32* %4
%51 = call i32 @nsl_int_rectangle(double* %48, double* %49, i32 %50, i32 0)
store i32 %51, i32* %6
store i64 0, i64* %5
br label %52
52: ; preds = %65, %45
%53 = load i64, i64* %5
%54 = load i32, i32* %4
%55 = sext i32 %54 to i64
%56 = icmp ult i64 %53, %55
br i1 %56, label %57, label %68
57: ; preds = %52
%58 = load i64, i64* %5
%59 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 %58
%60 = load double, double* %59
%61 = load i64, i64* %5
%62 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 %61
%63 = load double, double* %62
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %60, double %63)
br label %65
65: ; preds = %57
%66 = load i64, i64* %5
%67 = add i64 %66, 1
store i64 %67, i64* %5
br label %52
68: ; preds = %52
%69 = load i32, i32* %4
%70 = sub nsw i32 %69, 1
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 %71
%73 = load double, double* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %73)
%75 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%77 = bitcast [5 x double]* %7 to i8*
%78 = bitcast i8* %77 to [5 x double]*
%79 = getelementptr inbounds [5 x double], [5 x double]* %78, i32 0, i32 0
store double 2.000000e+00, double* %79
%80 = getelementptr inbounds [5 x double], [5 x double]* %78, i32 0, i32 1
store double 2.000000e+00, double* %80
%81 = getelementptr inbounds [5 x double], [5 x double]* %78, i32 0, i32 2
store double 2.000000e+00, double* %81
%82 = getelementptr inbounds [5 x double], [5 x double]* %78, i32 0, i32 3
store double 2.000000e+00, double* %82
%83 = getelementptr inbounds [5 x double], [5 x double]* %78, i32 0, i32 4
store double 2.000000e+00, double* %83
%84 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 0
%85 = getelementptr inbounds [5 x double], [5 x double]* %7, i64 0, i64 0
%86 = load i32, i32* %4
%87 = call i32 @nsl_int_rectangle(double* %84, double* %85, i32 %86, i32 1)
store i32 %87, i32* %6
store i64 0, i64* %5
br label %88
88: ; preds = %101, %68
%89 = load i64, i64* %5
%90 = load i32, i32* %4
%91 = sext i32 %90 to i64
%92 = icmp ult i64 %89, %91
br i1 %92, label %93, label %104
93: ; preds = %88
%94 = load i64, i64* %5
%95 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 %94
%96 = load double, double* %95
%97 = load i64, i64* %5
%98 = getelementptr inbounds [5 x double], [5 x double]* %7, i64 0, i64 %97
%99 = load double, double* %98
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %96, double %99)
br label %101
101: ; preds = %93
%102 = load i64, i64* %5
%103 = add i64 %102, 1
store i64 %103, i64* %5
br label %88
104: ; preds = %88
%105 = load i32, i32* %4
%106 = sub nsw i32 %105, 1
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [5 x double], [5 x double]* %7, i64 0, i64 %107
%109 = load double, double* %108
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %109)
%111 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%113 = bitcast [5 x double]* %8 to i8*
%114 = bitcast i8* %113 to [5 x double]*
%115 = getelementptr inbounds [5 x double], [5 x double]* %114, i32 0, i32 0
store double 1.000000e+00, double* %115
%116 = getelementptr inbounds [5 x double], [5 x double]* %114, i32 0, i32 1
store double 2.000000e+00, double* %116
%117 = getelementptr inbounds [5 x double], [5 x double]* %114, i32 0, i32 2
store double 3.000000e+00, double* %117
%118 = getelementptr inbounds [5 x double], [5 x double]* %114, i32 0, i32 3
store double -1.000000e+00, double* %118
%119 = getelementptr inbounds [5 x double], [5 x double]* %114, i32 0, i32 4
store double -3.000000e+00, double* %119
%120 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 0
%121 = getelementptr inbounds [5 x double], [5 x double]* %8, i64 0, i64 0
%122 = load i32, i32* %4
%123 = call i32 @nsl_int_trapezoid(double* %120, double* %121, i32 %122, i32 0)
store i32 %123, i32* %6
store i64 0, i64* %5
br label %124
124: ; preds = %137, %104
%125 = load i64, i64* %5
%126 = load i32, i32* %4
%127 = sext i32 %126 to i64
%128 = icmp ult i64 %125, %127
br i1 %128, label %129, label %140
129: ; preds = %124
%130 = load i64, i64* %5
%131 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 %130
%132 = load double, double* %131
%133 = load i64, i64* %5
%134 = getelementptr inbounds [5 x double], [5 x double]* %8, i64 0, i64 %133
%135 = load double, double* %134
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %132, double %135)
br label %137
137: ; preds = %129
%138 = load i64, i64* %5
%139 = add i64 %138, 1
store i64 %139, i64* %5
br label %124
140: ; preds = %124
%141 = load i32, i32* %4
%142 = sub nsw i32 %141, 1
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [5 x double], [5 x double]* %8, i64 0, i64 %143
%145 = load double, double* %144
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %145)
%147 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%149 = bitcast [5 x double]* %9 to i8*
%150 = bitcast i8* %149 to [5 x double]*
%151 = getelementptr inbounds [5 x double], [5 x double]* %150, i32 0, i32 0
store double 1.000000e+00, double* %151
%152 = getelementptr inbounds [5 x double], [5 x double]* %150, i32 0, i32 1
store double 2.000000e+00, double* %152
%153 = getelementptr inbounds [5 x double], [5 x double]* %150, i32 0, i32 2
store double 3.000000e+00, double* %153
%154 = getelementptr inbounds [5 x double], [5 x double]* %150, i32 0, i32 3
store double -1.000000e+00, double* %154
%155 = getelementptr inbounds [5 x double], [5 x double]* %150, i32 0, i32 4
store double -3.000000e+00, double* %155
%156 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 0
%157 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 0
%158 = load i32, i32* %4
%159 = call i32 @nsl_int_trapezoid(double* %156, double* %157, i32 %158, i32 1)
store i32 %159, i32* %6
store i64 0, i64* %5
br label %160
160: ; preds = %173, %140
%161 = load i64, i64* %5
%162 = load i32, i32* %4
%163 = sext i32 %162 to i64
%164 = icmp ult i64 %161, %163
br i1 %164, label %165, label %176
165: ; preds = %160
%166 = load i64, i64* %5
%167 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 %166
%168 = load double, double* %167
%169 = load i64, i64* %5
%170 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %169
%171 = load double, double* %170
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %168, double %171)
br label %173
173: ; preds = %165
%174 = load i64, i64* %5
%175 = add i64 %174, 1
store i64 %175, i64* %5
br label %160
176: ; preds = %160
%177 = load i32, i32* %4
%178 = sub nsw i32 %177, 1
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds [5 x double], [5 x double]* %9, i64 0, i64 %179
%181 = load double, double* %180
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %181)
%183 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%185 = bitcast [5 x double]* %10 to i8*
%186 = bitcast i8* %185 to [5 x double]*
%187 = getelementptr inbounds [5 x double], [5 x double]* %186, i32 0, i32 0
store double 1.000000e+00, double* %187
%188 = getelementptr inbounds [5 x double], [5 x double]* %186, i32 0, i32 1
store double 2.000000e+00, double* %188
%189 = getelementptr inbounds [5 x double], [5 x double]* %186, i32 0, i32 2
store double 3.000000e+00, double* %189
%190 = getelementptr inbounds [5 x double], [5 x double]* %186, i32 0, i32 3
store double -1.000000e+00, double* %190
%191 = getelementptr inbounds [5 x double], [5 x double]* %186, i32 0, i32 4
store double -3.000000e+00, double* %191
%192 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 0
%193 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 0
%194 = load i32, i32* %4
%195 = call i64 @nsl_int_simpson(double* %192, double* %193, i32 %194, i32 0)
store i64 %195, i64* %11
store i64 0, i64* %5
br label %196
196: ; preds = %208, %176
%197 = load i64, i64* %5
%198 = load i64, i64* %11
%199 = icmp ult i64 %197, %198
br i1 %199, label %200, label %211
200: ; preds = %196
%201 = load i64, i64* %5
%202 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 %201
%203 = load double, double* %202
%204 = load i64, i64* %5
%205 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 %204
%206 = load double, double* %205
%207 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %203, double %206)
br label %208
208: ; preds = %200
%209 = load i64, i64* %5
%210 = add i64 %209, 1
store i64 %210, i64* %5
br label %196
211: ; preds = %196
%212 = load i64, i64* %11
%213 = sub i64 %212, 1
%214 = getelementptr inbounds [5 x double], [5 x double]* %10, i64 0, i64 %213
%215 = load double, double* %214
%216 = load i64, i64* %11
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double %215, i64 %216)
%218 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%219 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%220 = bitcast [7 x double]* %12 to i8*
%221 = bitcast [7 x double]* %13 to i8*
store i32 7, i32* %4
%222 = getelementptr inbounds [7 x double], [7 x double]* %12, i64 0, i64 0
%223 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 0
%224 = load i32, i32* %4
%225 = call i64 @nsl_int_simpson_3_8(double* %222, double* %223, i32 %224, i32 0)
store i64 %225, i64* %11
store i64 0, i64* %5
br label %226
226: ; preds = %238, %211
%227 = load i64, i64* %5
%228 = load i64, i64* %11
%229 = icmp ult i64 %227, %228
br i1 %229, label %230, label %241
230: ; preds = %226
%231 = load i64, i64* %5
%232 = getelementptr inbounds [7 x double], [7 x double]* %12, i64 0, i64 %231
%233 = load double, double* %232
%234 = load i64, i64* %5
%235 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 %234
%236 = load double, double* %235
%237 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %233, double %236)
br label %238
238: ; preds = %230
%239 = load i64, i64* %5
%240 = add i64 %239, 1
store i64 %240, i64* %5
br label %226
241: ; preds = %226
%242 = load i64, i64* %11
%243 = sub i64 %242, 1
%244 = getelementptr inbounds [7 x double], [7 x double]* %13, i64 0, i64 %243
%245 = load double, double* %244
%246 = load i64, i64* %11
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double %245, i64 %246)
%248 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%g %g\0A\00"
@.str.4 = [10 x i8] c"sum = %g\0A\00"
@.str.9 = [20 x i8] c"sum = %g (n = %zu)\0A\00"
@__const.main.xdata2 = [7 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 5.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00]
@__const.main.ydata6 = [7 x double] [double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00]
@str = [6 x i8] c"data:\00"
@str.11 = [31 x i8] c"integral (rectangle, 1-point):\00"
@str.12 = [27 x i8] c"area (rectangle, 1-point):\00"
@str.13 = [31 x i8] c"integral (trapezoid, 2-point):\00"
@str.14 = [27 x i8] c"area (trapezoid, 2-point):\00"
@str.15 = [35 x i8] c"integral (Simpson's 1/3, 3-point):\00"
@str.16 = [35 x i8] c"integral (Simpson's 3/8, 4-point):\00"
define i32 @main() {
%1 = alloca [5 x double]
%2 = alloca [5 x double]
%3 = alloca [5 x double]
%4 = alloca [5 x double]
%5 = alloca [5 x double]
%6 = alloca [5 x double]
%7 = alloca [7 x double]
%8 = alloca [7 x double]
%9 = bitcast [5 x double]* %1 to i8*
%10 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 0
%11 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 1
%12 = bitcast [5 x double]* %1 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 2.000000e+00>, <2 x double>* %12
%13 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 2
%14 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 3
%15 = bitcast double* %13 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 5.000000e+00>, <2 x double>* %15
%16 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 4
store double 7.000000e+00, double* %16
%17 = bitcast [5 x double]* %2 to i8*
%18 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 0
%19 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 1
%20 = bitcast [5 x double]* %2 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %20
%21 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 2
%22 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 3
%23 = bitcast double* %21 to <2 x double>*
store <2 x double> <double 2.000000e+00, double -2.000000e+00>, <2 x double>* %23
%24 = getelementptr inbounds [5 x double], [5 x double]* %2, i64 0, i64 4
store double -2.000000e+00, double* %24
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+00, double 2.000000e+00)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 3.000000e+00, double 2.000000e+00)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 5.000000e+00, double -2.000000e+00)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 7.000000e+00, double -2.000000e+00)
%31 = tail call i32 @putchar(i32 10)
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.11, i64 0, i64 0))
%33 = call i32 @nsl_int_rectangle(double* %10, double* %18, i32 5, i32 0)
%34 = load double, double* %10
%35 = load double, double* %18
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %34, double %35)
%37 = load double, double* %11
%38 = load double, double* %19
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %37, double %38)
%40 = load double, double* %13
%41 = load double, double* %21
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %40, double %41)
%43 = load double, double* %14
%44 = load double, double* %22
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %43, double %44)
%46 = load double, double* %16
%47 = load double, double* %24
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %46, double %47)
%49 = load double, double* %24
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %49)
%51 = call i32 @putchar(i32 10)
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.12, i64 0, i64 0))
%53 = bitcast [5 x double]* %3 to i8*
%54 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 0
%55 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 1
%56 = bitcast [5 x double]* %3 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %56
%57 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 2
%58 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 3
%59 = bitcast double* %57 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %59
%60 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 4
store double 2.000000e+00, double* %60
%61 = call i32 @nsl_int_rectangle(double* %10, double* %54, i32 5, i32 1)
%62 = load double, double* %10
%63 = load double, double* %54
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %62, double %63)
%65 = load double, double* %11
%66 = load double, double* %55
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %65, double %66)
%68 = load double, double* %13
%69 = load double, double* %57
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %68, double %69)
%71 = load double, double* %14
%72 = load double, double* %58
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %71, double %72)
%74 = load double, double* %16
%75 = load double, double* %60
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %74, double %75)
%77 = load double, double* %60
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %77)
%79 = call i32 @putchar(i32 10)
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.13, i64 0, i64 0))
%81 = bitcast [5 x double]* %4 to i8*
%82 = getelementptr inbounds [5 x double], [5 x double]* %4, i64 0, i64 0
%83 = getelementptr inbounds [5 x double], [5 x double]* %4, i64 0, i64 1
%84 = bitcast [5 x double]* %4 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 2.000000e+00>, <2 x double>* %84
%85 = getelementptr inbounds [5 x double], [5 x double]* %4, i64 0, i64 2
%86 = getelementptr inbounds [5 x double], [5 x double]* %4, i64 0, i64 3
%87 = bitcast double* %85 to <2 x double>*
store <2 x double> <double 3.000000e+00, double -1.000000e+00>, <2 x double>* %87
%88 = getelementptr inbounds [5 x double], [5 x double]* %4, i64 0, i64 4
store double -3.000000e+00, double* %88
%89 = call i32 @nsl_int_trapezoid(double* %10, double* %82, i32 5, i32 0)
%90 = load double, double* %10
%91 = load double, double* %82
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %90, double %91)
%93 = load double, double* %11
%94 = load double, double* %83
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %93, double %94)
%96 = load double, double* %13
%97 = load double, double* %85
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %96, double %97)
%99 = load double, double* %14
%100 = load double, double* %86
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %99, double %100)
%102 = load double, double* %16
%103 = load double, double* %88
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %102, double %103)
%105 = load double, double* %88
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %105)
%107 = call i32 @putchar(i32 10)
%108 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.14, i64 0, i64 0))
%109 = bitcast [5 x double]* %5 to i8*
%110 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 0
%111 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 1
%112 = bitcast [5 x double]* %5 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 2.000000e+00>, <2 x double>* %112
%113 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 2
%114 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 3
%115 = bitcast double* %113 to <2 x double>*
store <2 x double> <double 3.000000e+00, double -1.000000e+00>, <2 x double>* %115
%116 = getelementptr inbounds [5 x double], [5 x double]* %5, i64 0, i64 4
store double -3.000000e+00, double* %116
%117 = call i32 @nsl_int_trapezoid(double* %10, double* %110, i32 5, i32 1)
%118 = load double, double* %10
%119 = load double, double* %110
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %118, double %119)
%121 = load double, double* %11
%122 = load double, double* %111
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %121, double %122)
%124 = load double, double* %13
%125 = load double, double* %113
%126 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %124, double %125)
%127 = load double, double* %14
%128 = load double, double* %114
%129 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %127, double %128)
%130 = load double, double* %16
%131 = load double, double* %116
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %130, double %131)
%133 = load double, double* %116
%134 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double %133)
%135 = call i32 @putchar(i32 10)
%136 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.15, i64 0, i64 0))
%137 = bitcast [5 x double]* %6 to i8*
%138 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 0
%139 = bitcast [5 x double]* %6 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 2.000000e+00>, <2 x double>* %139
%140 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 2
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> <double 3.000000e+00, double -1.000000e+00>, <2 x double>* %141
%142 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 4
store double -3.000000e+00, double* %142
%143 = call i64 @nsl_int_simpson(double* %10, double* %138, i32 5, i32 0)
%144 = icmp eq i64 %143, 0
br i1 %144, label %154, label %145
145: ; preds = %0, %145
%146 = phi i64 [ %152, %145 ], [ 0, %0 ]
%147 = getelementptr inbounds [5 x double], [5 x double]* %1, i64 0, i64 %146
%148 = load double, double* %147
%149 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 %146
%150 = load double, double* %149
%151 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %148, double %150)
%152 = add nuw i64 %146, 1
%153 = icmp eq i64 %152, %143
br i1 %153, label %154, label %145
154: ; preds = %145, %0
%155 = add i64 %143, -1
%156 = getelementptr inbounds [5 x double], [5 x double]* %6, i64 0, i64 %155
%157 = load double, double* %156
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double %157, i64 %143)
%159 = call i32 @putchar(i32 10)
%160 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.16, i64 0, i64 0))
%161 = bitcast [7 x double]* %7 to i8*
%162 = bitcast [7 x double]* %8 to i8*
%163 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 0
%164 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 0
%165 = call i64 @nsl_int_simpson_3_8(double* %163, double* %164, i32 7, i32 0)
%166 = icmp eq i64 %165, 0
br i1 %166, label %176, label %167
167: ; preds = %154, %167
%168 = phi i64 [ %174, %167 ], [ 0, %154 ]
%169 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 %168
%170 = load double, double* %169
%171 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 %168
%172 = load double, double* %171
%173 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %170, double %172)
%174 = add nuw i64 %168, 1
%175 = icmp eq i64 %174, %165
br i1 %175, label %176, label %167
176: ; preds = %167, %154
%177 = add i64 %165, -1
%178 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 %177
%179 = load double, double* %178
%180 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double %179, i64 %165)
%181 = call i32 @putchar(i32 10)
ret i32 0
}