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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ EOF;
double ellf(double, float);
double exp(scalar_t__);
int /*<<< orphan*/ free_vector(float *, int, int);
float func(float, float);
scalar_t__ gammln(double);
int /*<<< orphan*/ gaujac(float *, float *, int, float, float);
double pow(double, float);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
float *vector(int, int);
int main(void) {
  int i, n;
  float ak, alf = (-0.5), bet = (-0.5), checkw, checkx, xx, *x, *w;
  x = vector(1, 64);
  w = vector(1, 64);
  for (;;) {
    printf("Enter N\n");
    if (scanf("%d", &n) == EOF)
      break;
    gaujac(x, w, n, alf, bet);
    printf("%3s %10s %14s\n", "#", "x(i)", "w(i)");
    for (i = 1; i <= n; i++)
      printf("%3d %14.6e %14.6e\n", i, x[i], w[i]);
    checkx = checkw = 0.0;
    for (i = 1; i <= n; i++) {
      checkx += x[i];
      checkw += w[i];
    }
    printf("\nCheck value: %15.7e  should be: %15.7e\n", checkx,
           n * (bet - alf) / (alf + bet + 2 * n));
    printf(
        "\nCheck value: %15.7e  should be: %15.7e\n", checkw,
        exp(gammln(1.0 + alf) + gammln(1.0 + bet) - gammln(2.0 + alf + bet)) *
            pow(2.0, alf + bet + 1.0));
    ak = 0.5;
    for (xx = 0.0, i = 1; i <= n; i++)
      xx += w[i] * func(ak, x[i]);
    printf("\nIntegral from gaujac: %12.6f\n", xx);
    printf("Actual value:         %12.6f\n", 2.0 * ellf(1.5707963, ak));
  }
  free_vector(w, 1, 64);
  free_vector(x, 1, 64);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xe49(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe3c(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    $0x1,%edi
mov    $0x40,%esi
call   1070 <vector@plt>
mov    %rax,-0x30(%rbp)
mov    $0x1,%edi
mov    $0x40,%esi
call   1070 <vector@plt>
mov    %rax,-0x38(%rbp)
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe25(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   10a0 <scanf@plt>
mov    0x2dd4(%rip),%rcx
cmp    (%rcx),%rax
jne    1222 <main+0x82>
jmp    14f6 <main+0x356>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0xc(%rbp),%edx
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
call   1030 <gaujac@plt>
lea    0xde9(%rip),%rdi
lea    0xdf1(%rip),%rsi
lea    0xdec(%rip),%rdx
lea    0xdea(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     12b3 <main+0x113>
mov    -0x8(%rbp),%esi
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xda9(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1266 <main+0xc6>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1312 <main+0x172>
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12ca <main+0x12a>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
subss  -0x14(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  -0x14(%rbp),%xmm2
addss  -0x18(%rbp),%xmm2
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm3
addss  %xmm3,%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd05(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc95(%rip),%xmm0
addsd  %xmm1,%xmm0
call   10c0 <gammln@plt>
mov    %rax,-0x58(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc77(%rip),%xmm0
addsd  %xmm1,%xmm0
call   10c0 <gammln@plt>
mov    %rax,%rcx
mov    -0x58(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc47(%rip),%xmm0
addsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
call   10c0 <gammln@plt>
mov    -0x50(%rbp),%rdi
sub    %rax,%rdi
call   1090 <exp@plt>
movsd  %xmm0,-0x48(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc12(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movsd  0xbfa(%rip),%xmm0
call   10b0 <pow@plt>
movsd  -0x48(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm2,%xmm1
lea    0xc2f(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xbca(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     14ab <main+0x30b>
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x10(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
call   1080 <func@plt>
movaps %xmm0,%xmm2
movss  -0x5c(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    144e <main+0x2ae>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbc8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x10(%rbp),%xmm1
movsd  0xb49(%rip),%xmm0
call   1060 <ellf@plt>
movaps %xmm0,%xmm1
movsd  0xb29(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xbb8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    11ef <main+0x4f>
mov    -0x38(%rbp),%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1050 <free_vector@plt>
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1050 <free_vector@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x1,%edi
mov    $0x40,%esi
call   1080 <vector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x40,%esi
call   1080 <vector@plt>
mov    %rax,%rbx
lea    0xede(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3b(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0x2de2(%rip),%rcx
cmp    (%rcx),%rax
jne    1240 <main+0x90>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1060 <free_vector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1060 <free_vector@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe1a(%rip),%r15
lea    0xe00(%rip),%r13
jmp    12b9 <main+0x109>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe2c(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xdbb(%rip),%xmm0
movss  0xd93(%rip),%xmm1
call   1070 <ellf@plt>
addsd  %xmm0,%xmm0
lea    0xe24(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe34(%rip),%rdi
call   1040 <puts@plt>
lea    0xd91(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0x2d38(%rip),%rcx
cmp    (%rcx),%rax
je     120b <main+0x5b>
mov    0x4(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
movss  0xd35(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <gaujac@plt>
lea    0xd59(%rip),%rdi
lea    0xd61(%rip),%rsi
lea    0xd5c(%rip),%rdx
lea    0xd5a(%rip),%rcx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rsp),%eax
xorps  %xmm3,%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
test   %eax,%eax
jle    1413 <main+0x263>
mov    $0x1,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  (%r14,%r12,4),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rbx,%r12,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r13,%rdi
mov    %r12d,%esi
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x1(%r12),%rcx
movslq 0x4(%rsp),%rax
cmp    %rax,%r12
mov    %rcx,%r12
jl     1320 <main+0x170>
test   %eax,%eax
jle    1380 <main+0x1d0>
mov    %eax,%esi
lea    -0x1(%rsi),%rdx
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    138e <main+0x1de>
xorps  %xmm1,%xmm1
mov    $0x1,%edx
xorps  %xmm0,%xmm0
jmp    13e1 <main+0x231>
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
jmp    1413 <main+0x263>
and    $0xfffffffc,%esi
xorps  %xmm1,%xmm1
xorps  %xmm0,%xmm0
xor    %edx,%edx
nopl   0x0(%rax)
addss  0x4(%r14,%rdx,4),%xmm0
addss  0x4(%rbx,%rdx,4),%xmm1
addss  0x8(%r14,%rdx,4),%xmm0
addss  0x8(%rbx,%rdx,4),%xmm1
addss  0xc(%r14,%rdx,4),%xmm0
addss  0xc(%rbx,%rdx,4),%xmm1
addss  0x10(%r14,%rdx,4),%xmm0
addss  0x10(%rbx,%rdx,4),%xmm1
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    13a0 <main+0x1f0>
add    $0x1,%rdx
xorps  %xmm3,%xmm3
test   %rcx,%rcx
je     1413 <main+0x263>
lea    (%rbx,%rdx,4),%rsi
lea    (%r14,%rdx,4),%rdx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addss  (%rdx,%rdi,4),%xmm0
addss  (%rsi,%rdi,4),%xmm1
add    $0x1,%rdi
cmp    %rdi,%rcx
jne    1400 <main+0x250>
movss  %xmm1,0x8(%rsp)
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
add    %eax,%eax
cvtsi2ss %eax,%xmm2
mulss  %xmm3,%xmm1
addss  0xbce(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r15,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xbb0(%rip),%xmm0
call   10d0 <gammln@plt>
mov    %rax,%rbp
movsd  0xba0(%rip),%xmm0
call   10d0 <gammln@plt>
add    %rax,%rbp
movsd  0xb98(%rip),%xmm0
call   10d0 <gammln@plt>
sub    %rax,%rbp
mov    %rbp,%rdi
call   10a0 <exp@plt>
movsd  %xmm0,0x10(%rsp)
xorps  %xmm1,%xmm1
movsd  0xb7f(%rip),%xmm0
call   10c0 <pow@plt>
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mov    %r15,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
xorpd  %xmm1,%xmm1
cmpl   $0x0,0x4(%rsp)
jle    1250 <main+0xa0>
xorpd  %xmm1,%xmm1
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movss  %xmm1,0x8(%rsp)
movss  0x4(%rbx,%rbp,4),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x4(%r14,%rbp,4),%xmm1
movss  0xb07(%rip),%xmm0
call   1090 <func@plt>
movss  0x8(%rsp),%xmm1
mulss  0x10(%rsp),%xmm0
addss  %xmm0,%xmm1
movslq 0x4(%rsp),%rax
add    $0x1,%rbp
cmp    %rax,%rbp
jl     14e0 <main+0x330>
jmp    1250 <main+0xa0>

LLVM IR (-O0):
@.str = [9 x i8] c"Enter N\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.2 = [15 x i8] c"%3s %10s %14s\0A\00"
@.str.3 = [2 x i8] c"#\00"
@.str.4 = [5 x i8] c"x(i)\00"
@.str.5 = [5 x i8] c"w(i)\00"
@.str.6 = [19 x i8] c"%3d %14.6e %14.6e\0A\00"
@.str.7 = [41 x i8] c"\0ACheck value: %15.7e should be: %15.7e\0A\00"
@.str.8 = [31 x i8] c"\0AIntegral from gaujac: %12.6f\0A\00"
@.str.9 = [30 x i8] c"Actual value: %12.6f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float*
%11 = alloca float*
store i32 0, i32* %1
store float -5.000000e-01, float* %5
store float -5.000000e-01, float* %6
%12 = call float* @vector(i32 1, i32 64)
store float* %12, float** %10
%13 = call float* @vector(i32 1, i32 64)
store float* %13, float** %11
br label %14
14: ; preds = %143, %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%16 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%17 = load i64, i64* @EOF
%18 = icmp eq i64 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %14
br label %151
20: ; preds = %14
%21 = load float*, float** %10
%22 = load float*, float** %11
%23 = load i32, i32* %3
%24 = load float, float* %5
%25 = load float, float* %6
%26 = call i32 @gaujac(float* %21, float* %22, i32 %23, float %24, float %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %2
br label %28
28: ; preds = %47, %20
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = icmp sle i32 %29, %30
br i1 %31, label %32, label %50
32: ; preds = %28
%33 = load i32, i32* %2
%34 = load float*, float** %10
%35 = load i32, i32* %2
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds float, float* %34, i64 %36
%38 = load float, float* %37
%39 = fpext float %38 to double
%40 = load float*, float** %11
%41 = load i32, i32* %2
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds float, float* %40, i64 %42
%44 = load float, float* %43
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %33, double %39, double %45)
br label %47
47: ; preds = %32
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
br label %28
50: ; preds = %28
store float 0.000000e+00, float* %7
store float 0.000000e+00, float* %8
store i32 1, i32* %2
br label %51
51: ; preds = %70, %50
%52 = load i32, i32* %2
%53 = load i32, i32* %3
%54 = icmp sle i32 %52, %53
br i1 %54, label %55, label %73
55: ; preds = %51
%56 = load float*, float** %10
%57 = load i32, i32* %2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds float, float* %56, i64 %58
%60 = load float, float* %59
%61 = load float, float* %8
%62 = fadd float %61, %60
store float %62, float* %8
%63 = load float*, float** %11
%64 = load i32, i32* %2
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds float, float* %63, i64 %65
%67 = load float, float* %66
%68 = load float, float* %7
%69 = fadd float %68, %67
store float %69, float* %7
br label %70
70: ; preds = %55
%71 = load i32, i32* %2
%72 = add nsw i32 %71, 1
store i32 %72, i32* %2
br label %51
73: ; preds = %51
%74 = load float, float* %8
%75 = fpext float %74 to double
%76 = load i32, i32* %3
%77 = sitofp i32 %76 to float
%78 = load float, float* %6
%79 = load float, float* %5
%80 = fsub float %78, %79
%81 = fmul float %77, %80
%82 = load float, float* %5
%83 = load float, float* %6
%84 = fadd float %82, %83
%85 = load i32, i32* %3
%86 = mul nsw i32 2, %85
%87 = sitofp i32 %86 to float
%88 = fadd float %84, %87
%89 = fdiv float %81, %88
%90 = fpext float %89 to double
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %75, double %90)
%92 = load float, float* %7
%93 = fpext float %92 to double
%94 = load float, float* %5
%95 = fpext float %94 to double
%96 = fadd double 1.000000e+00, %95
%97 = call i64 @gammln(double %96)
%98 = load float, float* %6
%99 = fpext float %98 to double
%100 = fadd double 1.000000e+00, %99
%101 = call i64 @gammln(double %100)
%102 = add nsw i64 %97, %101
%103 = load float, float* %5
%104 = fpext float %103 to double
%105 = fadd double 2.000000e+00, %104
%106 = load float, float* %6
%107 = fpext float %106 to double
%108 = fadd double %105, %107
%109 = call i64 @gammln(double %108)
%110 = sub nsw i64 %102, %109
%111 = call double @exp(i64 %110)
%112 = load float, float* %5
%113 = load float, float* %6
%114 = fadd float %112, %113
%115 = fpext float %114 to double
%116 = fadd double %115, 1.000000e+00
%117 = fptrunc double %116 to float
%118 = call double @pow(double 2.000000e+00, float %117)
%119 = fmul double %111, %118
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %93, double %119)
store float 5.000000e-01, float* %4
store float 0.000000e+00, float* %9
store i32 1, i32* %2
br label %121
121: ; preds = %140, %73
%122 = load i32, i32* %2
%123 = load i32, i32* %3
%124 = icmp sle i32 %122, %123
br i1 %124, label %125, label %143
125: ; preds = %121
%126 = load float*, float** %11
%127 = load i32, i32* %2
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds float, float* %126, i64 %128
%130 = load float, float* %129
%131 = load float, float* %4
%132 = load float*, float** %10
%133 = load i32, i32* %2
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds float, float* %132, i64 %134
%136 = load float, float* %135
%137 = call float @func(float %131, float %136)
%138 = load float, float* %9
%139 = call float @llvm.fmuladd.f32(float %130, float %137, float %138)
store float %139, float* %9
br label %140
140: ; preds = %125
%141 = load i32, i32* %2
%142 = add nsw i32 %141, 1
store i32 %142, i32* %2
br label %121
143: ; preds = %121
%144 = load float, float* %9
%145 = fpext float %144 to double
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %145)
%147 = load float, float* %4
%148 = call double @ellf(double 0x3FF921FB4D12D84A, float %147)
%149 = fmul double 2.000000e+00, %148
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double %149)
br label %14
151: ; preds = %19
%152 = load float*, float** %11
%153 = call i32 @free_vector(float* %152, i32 1, i32 64)
%154 = load float*, float** %10
%155 = call i32 @free_vector(float* %154, i32 1, i32 64)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.2 = [15 x i8] c"%3s %10s %14s\0A\00"
@.str.3 = [2 x i8] c"#\00"
@.str.4 = [5 x i8] c"x(i)\00"
@.str.5 = [5 x i8] c"w(i)\00"
@.str.6 = [19 x i8] c"%3d %14.6e %14.6e\0A\00"
@.str.7 = [41 x i8] c"\0ACheck value: %15.7e should be: %15.7e\0A\00"
@.str.8 = [31 x i8] c"\0AIntegral from gaujac: %12.6f\0A\00"
@.str.9 = [30 x i8] c"Actual value: %12.6f\0A\00"
@str = [8 x i8] c"Enter N\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call float* @vector(i32 1, i32 64)
%4 = tail call float* @vector(i32 1, i32 64)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %145, label %9
9: ; preds = %0, %134
%10 = load i32, i32* %1
%11 = call i32 @gaujac(float* %3, float* %4, i32 %10, float -5.000000e-01, float -5.000000e-01)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 1
br i1 %14, label %96, label %26
15: ; preds = %26
%16 = icmp slt i32 %37, 1
br i1 %16, label %96, label %17
17: ; preds = %15
%18 = add nuw i32 %37, 1
%19 = zext i32 %18 to i64
%20 = add nsw i64 %19, -1
%21 = add nsw i64 %19, -2
%22 = and i64 %20, 3
%23 = icmp ult i64 %21, 3
br i1 %23, label %75, label %24
24: ; preds = %17
%25 = and i64 %20, -4
br label %40
26: ; preds = %9, %26
%27 = phi i64 [ %36, %26 ], [ 1, %9 ]
%28 = getelementptr inbounds float, float* %3, i64 %27
%29 = load float, float* %28
%30 = fpext float %29 to double
%31 = getelementptr inbounds float, float* %4, i64 %27
%32 = load float, float* %31
%33 = fpext float %32 to double
%34 = trunc i64 %27 to i32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %34, double %30, double %33)
%36 = add nuw nsw i64 %27, 1
%37 = load i32, i32* %1
%38 = sext i32 %37 to i64
%39 = icmp slt i64 %27, %38
br i1 %39, label %26, label %15
40: ; preds = %40, %24
%41 = phi i64 [ 1, %24 ], [ %72, %40 ]
%42 = phi float [ 0.000000e+00, %24 ], [ %71, %40 ]
%43 = phi float [ 0.000000e+00, %24 ], [ %68, %40 ]
%44 = phi i64 [ 0, %24 ], [ %73, %40 ]
%45 = getelementptr inbounds float, float* %3, i64 %41
%46 = load float, float* %45
%47 = fadd float %43, %46
%48 = getelementptr inbounds float, float* %4, i64 %41
%49 = load float, float* %48
%50 = fadd float %42, %49
%51 = add nuw nsw i64 %41, 1
%52 = getelementptr inbounds float, float* %3, i64 %51
%53 = load float, float* %52
%54 = fadd float %47, %53
%55 = getelementptr inbounds float, float* %4, i64 %51
%56 = load float, float* %55
%57 = fadd float %50, %56
%58 = add nuw nsw i64 %41, 2
%59 = getelementptr inbounds float, float* %3, i64 %58
%60 = load float, float* %59
%61 = fadd float %54, %60
%62 = getelementptr inbounds float, float* %4, i64 %58
%63 = load float, float* %62
%64 = fadd float %57, %63
%65 = add nuw nsw i64 %41, 3
%66 = getelementptr inbounds float, float* %3, i64 %65
%67 = load float, float* %66
%68 = fadd float %61, %67
%69 = getelementptr inbounds float, float* %4, i64 %65
%70 = load float, float* %69
%71 = fadd float %64, %70
%72 = add nuw nsw i64 %41, 4
%73 = add nuw nsw i64 %44, 4
%74 = icmp eq i64 %73, %25
br i1 %74, label %75, label %40
75: ; preds = %40, %17
%76 = phi float [ undef, %17 ], [ %68, %40 ]
%77 = phi float [ undef, %17 ], [ %71, %40 ]
%78 = phi i64 [ 1, %17 ], [ %72, %40 ]
%79 = phi float [ 0.000000e+00, %17 ], [ %71, %40 ]
%80 = phi float [ 0.000000e+00, %17 ], [ %68, %40 ]
%81 = icmp eq i64 %22, 0
br i1 %81, label %96, label %82
82: ; preds = %75, %82
%83 = phi i64 [ %93, %82 ], [ %78, %75 ]
%84 = phi float [ %92, %82 ], [ %79, %75 ]
%85 = phi float [ %89, %82 ], [ %80, %75 ]
%86 = phi i64 [ %94, %82 ], [ 0, %75 ]
%87 = getelementptr inbounds float, float* %3, i64 %83
%88 = load float, float* %87
%89 = fadd float %85, %88
%90 = getelementptr inbounds float, float* %4, i64 %83
%91 = load float, float* %90
%92 = fadd float %84, %91
%93 = add nuw nsw i64 %83, 1
%94 = add i64 %86, 1
%95 = icmp eq i64 %94, %22
br i1 %95, label %96, label %82
96: ; preds = %75, %82, %9, %15
%97 = phi i32 [ %37, %15 ], [ %13, %9 ], [ %37, %82 ], [ %37, %75 ]
%98 = phi float [ 0.000000e+00, %15 ], [ 0.000000e+00, %9 ], [ %76, %75 ], [ %89, %82 ]
%99 = phi float [ 0.000000e+00, %15 ], [ 0.000000e+00, %9 ], [ %77, %75 ], [ %92, %82 ]
%100 = fpext float %98 to double
%101 = sitofp i32 %97 to float
%102 = fmul float %101, 0.000000e+00
%103 = shl nsw i32 %97, 1
%104 = sitofp i32 %103 to float
%105 = fadd float %104, -1.000000e+00
%106 = fdiv float %102, %105
%107 = fpext float %106 to double
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %100, double %107)
%109 = fpext float %99 to double
%110 = call i64 @gammln(double 5.000000e-01)
%111 = call i64 @gammln(double 5.000000e-01)
%112 = add nsw i64 %111, %110
%113 = call i64 @gammln(double 1.000000e+00)
%114 = sub i64 %112, %113
%115 = call double @exp(i64 %114)
%116 = call double @pow(double 2.000000e+00, float 0.000000e+00)
%117 = fmul double %115, %116
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %109, double %117)
%119 = load i32, i32* %1
%120 = icmp slt i32 %119, 1
br i1 %120, label %134, label %121
121: ; preds = %96, %121
%122 = phi i64 [ %130, %121 ], [ 1, %96 ]
%123 = phi float [ %129, %121 ], [ 0.000000e+00, %96 ]
%124 = getelementptr inbounds float, float* %4, i64 %122
%125 = load float, float* %124
%126 = getelementptr inbounds float, float* %3, i64 %122
%127 = load float, float* %126
%128 = call float @func(float 5.000000e-01, float %127)
%129 = call float @llvm.fmuladd.f32(float %125, float %128, float %123)
%130 = add nuw nsw i64 %122, 1
%131 = load i32, i32* %1
%132 = sext i32 %131 to i64
%133 = icmp slt i64 %122, %132
br i1 %133, label %121, label %134
134: ; preds = %121, %96
%135 = phi float [ 0.000000e+00, %96 ], [ %129, %121 ]
%136 = fpext float %135 to double
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %136)
%138 = call double @ellf(double 0x3FF921FB4D12D84A, float 5.000000e-01)
%139 = fmul double %138, 2.000000e+00
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double %139)
%141 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%142 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%143 = load i64, i64* @EOF
%144 = icmp eq i64 %142, %143
br i1 %144, label %145, label %9
145: ; preds = %134, %0
%146 = call i32 @free_vector(float* %4, i32 1, i32 64)
%147 = call i32 @free_vector(float* %3, i32 1, i32 64)
ret i32 0
}