#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 exp(int /*<<< orphan*/);
int /*<<< orphan*/ free_vector(float *, int, int);
float func(float);
int /*<<< orphan*/ gammln(double);
int /*<<< orphan*/ gaulag(float *, float *, int, float);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
double sqrt(double);
float *vector(int, int);
int main(void) {
  int i, n;
  float alf = 1.0, checkw, checkx, xx, *x, *w;
  x = vector(1, 64);
  w = vector(1, 64);
  for (;;) {
    printf("Enter N\n");
    if (scanf("%d", &n) == EOF)
      break;
    gaulag(x, w, n, alf);
    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 * (n + alf));
    printf("\nCheck value: %15.7e  should be: %15.7e\n", checkw,
           exp(gammln(1.0 + alf)));
    for (xx = 0.0, i = 1; i <= n; i++)
      xx += w[i] * func(x[i]);
    printf("\nIntegral from gaulag: %12.6f\n", xx);
    printf("Actual value:         %12.6f\n", 1.0 / (2.0 * sqrt(2.0)));
  }
  free_vector(w, 1, 64);
  free_vector(x, 1, 64);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xe59(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x40,%esi
call   1050 <vector@plt>
mov    %rax,-0x28(%rbp)
mov    $0x1,%edi
mov    $0x40,%esi
call   1050 <vector@plt>
mov    %rax,-0x30(%rbp)
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3a(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1090 <scanf@plt>
mov    0x2df1(%rip),%rcx
cmp    (%rcx),%rax
jne    1205 <main+0x75>
jmp    1419 <main+0x289>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0xc(%rbp),%edx
movss  -0x10(%rbp),%xmm0
call   1080 <gaulag@plt>
lea    0xe03(%rip),%rdi
lea    0xe0b(%rip),%rsi
lea    0xe06(%rip),%rdx
lea    0xe04(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1291 <main+0x101>
mov    -0x8(%rbp),%esi
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdc3(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1244 <main+0xb4>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     12f0 <main+0x160>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12a8 <main+0x118>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm2
addss  -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd3b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xccb(%rip),%xmm0
addsd  %xmm1,%xmm0
call   10b0 <gammln@plt>
mov    %eax,%edi
call   1070 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
lea    0xcf6(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     13ca <main+0x23a>
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1060 <func@plt>
movaps %xmm0,%xmm2
movss  -0x3c(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1372 <main+0x1e2>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xca1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xc27(%rip),%xmm0
call   10a0 <sqrt@plt>
movsd  0xc1a(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xc06(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0xc8d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11d2 <main+0x42>
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1040 <free_vector@plt>
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1040 <free_vector@plt>
xor    %eax,%eax
add    $0x40,%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   1060 <vector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x40,%esi
call   1060 <vector@plt>
mov    %rax,%rbx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xe43(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10a0 <scanf@plt>
mov    0x2e02(%rip),%rcx
cmp    (%rcx),%rax
jne    1220 <main+0x90>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1050 <free_vector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x40,%edx
call   1050 <free_vector@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe22(%rip),%r15
lea    0xe08(%rip),%r13
jmp    1285 <main+0xf5>
cvtss2sd %xmm0,%xmm0
lea    0xe37(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe48(%rip),%rdi
movsd  0xdbf(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe50(%rip),%rdi
call   1030 <puts@plt>
lea    0xdad(%rip),%rdi
lea    0x4(%rsp),%rsi
call   10a0 <scanf@plt>
mov    0x2d6c(%rip),%rcx
cmp    (%rcx),%rax
je     11eb <main+0x5b>
mov    0x4(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
movss  0xd69(%rip),%xmm0
call   1090 <gaulag@plt>
lea    0xd78(%rip),%rdi
lea    0xd80(%rip),%rsi
lea    0xd7b(%rip),%rdx
lea    0xd79(%rip),%rcx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
test   %eax,%eax
jle    13c3 <main+0x233>
mov    $0x1,%r12d
nopw   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   1040 <printf@plt>
lea    0x1(%r12),%rcx
movslq 0x4(%rsp),%rax
cmp    %rax,%r12
mov    %rcx,%r12
jl     12e0 <main+0x150>
test   %eax,%eax
jle    1340 <main+0x1b0>
mov    %eax,%esi
lea    -0x1(%rsi),%rdx
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    1348 <main+0x1b8>
xorps  %xmm1,%xmm1
mov    $0x1,%edx
xorps  %xmm0,%xmm0
test   %rcx,%rcx
jne    13a6 <main+0x216>
jmp    13c3 <main+0x233>
nopl   (%rax)
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
jmp    13c3 <main+0x233>
and    $0xfffffffc,%esi
xorps  %xmm1,%xmm1
xorps  %xmm0,%xmm0
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%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    1360 <main+0x1d0>
add    $0x1,%rdx
test   %rcx,%rcx
je     13c3 <main+0x233>
lea    (%rbx,%rdx,4),%rsi
lea    (%r14,%rdx,4),%rdx
xor    %edi,%edi
addss  (%rdx,%rdi,4),%xmm0
addss  (%rsi,%rdi,4),%xmm1
add    $0x1,%rdi
cmp    %rdi,%rcx
jne    13b0 <main+0x220>
movss  %xmm1,0x8(%rsp)
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
cvtss2sd %xmm0,%xmm0
movaps %xmm1,%xmm2
addss  0xc21(%rip),%xmm2
mulss  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
mov    %r15,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xbfc(%rip),%xmm0
call   10b0 <gammln@plt>
mov    %eax,%edi
call   1080 <exp@plt>
movaps %xmm0,%xmm1
mov    %r15,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
cmpl   $0x0,0x4(%rsp)
xorps  %xmm0,%xmm0
jle    1230 <main+0xa0>
xorps  %xmm0,%xmm0
xor    %ebp,%ebp
xchg   %ax,%ax
movss  %xmm0,0x8(%rsp)
movss  0x4(%rbx,%rbp,4),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0x4(%r14,%rbp,4),%xmm0
call   1070 <func@plt>
mulss  0x14(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
movss  0x8(%rsp),%xmm0
movslq 0x4(%rsp),%rax
add    $0x1,%rbp
cmp    %rax,%rbp
jl     1440 <main+0x2b0>
jmp    1230 <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 gaulag: %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*
store i32 0, i32* %1
store float 1.000000e+00, float* %4
%10 = call float* @vector(i32 1, i32 64)
store float* %10, float** %8
%11 = call float* @vector(i32 1, i32 64)
store float* %11, float** %9
br label %12
12: ; preds = %111, %0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%14 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%15 = load i64, i64* @EOF
%16 = icmp eq i64 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %12
br label %119
18: ; preds = %12
%19 = load float*, float** %8
%20 = load float*, float** %9
%21 = load i32, i32* %3
%22 = load float, float* %4
%23 = call i32 @gaulag(float* %19, float* %20, i32 %21, float %22)
%24 = 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 %25
25: ; preds = %44, %18
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = icmp sle i32 %26, %27
br i1 %28, label %29, label %47
29: ; preds = %25
%30 = load i32, i32* %2
%31 = load float*, float** %8
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds float, float* %31, i64 %33
%35 = load float, float* %34
%36 = fpext float %35 to double
%37 = load float*, float** %9
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float, float* %37, i64 %39
%41 = load float, float* %40
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %30, double %36, double %42)
br label %44
44: ; preds = %29
%45 = load i32, i32* %2
%46 = add nsw i32 %45, 1
store i32 %46, i32* %2
br label %25
47: ; preds = %25
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
store i32 1, i32* %2
br label %48
48: ; preds = %67, %47
%49 = load i32, i32* %2
%50 = load i32, i32* %3
%51 = icmp sle i32 %49, %50
br i1 %51, label %52, label %70
52: ; preds = %48
%53 = load float*, float** %8
%54 = load i32, i32* %2
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds float, float* %53, i64 %55
%57 = load float, float* %56
%58 = load float, float* %6
%59 = fadd float %58, %57
store float %59, float* %6
%60 = load float*, float** %9
%61 = load i32, i32* %2
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds float, float* %60, i64 %62
%64 = load float, float* %63
%65 = load float, float* %5
%66 = fadd float %65, %64
store float %66, float* %5
br label %67
67: ; preds = %52
%68 = load i32, i32* %2
%69 = add nsw i32 %68, 1
store i32 %69, i32* %2
br label %48
70: ; preds = %48
%71 = load float, float* %6
%72 = fpext float %71 to double
%73 = load i32, i32* %3
%74 = sitofp i32 %73 to float
%75 = load i32, i32* %3
%76 = sitofp i32 %75 to float
%77 = load float, float* %4
%78 = fadd float %76, %77
%79 = fmul float %74, %78
%80 = fpext float %79 to double
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %72, double %80)
%82 = load float, float* %5
%83 = fpext float %82 to double
%84 = load float, float* %4
%85 = fpext float %84 to double
%86 = fadd double 1.000000e+00, %85
%87 = call i32 @gammln(double %86)
%88 = call double @exp(i32 %87)
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %83, double %88)
store float 0.000000e+00, float* %7
store i32 1, i32* %2
br label %90
90: ; preds = %108, %70
%91 = load i32, i32* %2
%92 = load i32, i32* %3
%93 = icmp sle i32 %91, %92
br i1 %93, label %94, label %111
94: ; preds = %90
%95 = load float*, float** %9
%96 = load i32, i32* %2
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds float, float* %95, i64 %97
%99 = load float, float* %98
%100 = load float*, float** %8
%101 = load i32, i32* %2
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds float, float* %100, i64 %102
%104 = load float, float* %103
%105 = call float @func(float %104)
%106 = load float, float* %7
%107 = call float @llvm.fmuladd.f32(float %99, float %105, float %106)
store float %107, float* %7
br label %108
108: ; preds = %94
%109 = load i32, i32* %2
%110 = add nsw i32 %109, 1
store i32 %110, i32* %2
br label %90
111: ; preds = %90
%112 = load float, float* %7
%113 = fpext float %112 to double
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %113)
%115 = call double @sqrt(double 2.000000e+00)
%116 = fmul double 2.000000e+00, %115
%117 = fdiv double 1.000000e+00, %116
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double %117)
br label %12
119: ; preds = %17
%120 = load float*, float** %9
%121 = call i32 @free_vector(float* %120, i32 1, i32 64)
%122 = load float*, float** %8
%123 = call i32 @free_vector(float* %122, 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 gaulag: %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 %134, label %9
9: ; preds = %0, %125
%10 = load i32, i32* %1
%11 = call i32 @gaulag(float* %3, float* %4, i32 %10, float 1.000000e+00)
%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 = fadd float %101, 1.000000e+00
%103 = fmul float %102, %101
%104 = fpext float %103 to double
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %100, double %104)
%106 = fpext float %99 to double
%107 = call i32 @gammln(double 2.000000e+00)
%108 = call double @exp(i32 %107)
%109 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %106, double %108)
%110 = load i32, i32* %1
%111 = icmp slt i32 %110, 1
br i1 %111, label %125, label %112
112: ; preds = %96, %112
%113 = phi i64 [ %121, %112 ], [ 1, %96 ]
%114 = phi float [ %120, %112 ], [ 0.000000e+00, %96 ]
%115 = getelementptr inbounds float, float* %4, i64 %113
%116 = load float, float* %115
%117 = getelementptr inbounds float, float* %3, i64 %113
%118 = load float, float* %117
%119 = call float @func(float %118)
%120 = call float @llvm.fmuladd.f32(float %116, float %119, float %114)
%121 = add nuw nsw i64 %113, 1
%122 = load i32, i32* %1
%123 = sext i32 %122 to i64
%124 = icmp slt i64 %113, %123
br i1 %124, label %112, label %125
125: ; preds = %112, %96
%126 = phi float [ 0.000000e+00, %96 ], [ %120, %112 ]
%127 = fpext float %126 to double
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %127)
%129 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double 0x3FD6A09E667F3BCC)
%130 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%131 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%132 = load i64, i64* @EOF
%133 = icmp eq i64 %131, %132
br i1 %133, label %134, label %9
134: ; preds = %125, %0
%135 = call i32 @free_vector(float* %4, i32 1, i32 64)
%136 = call i32 @free_vector(float* %3, i32 1, i32 64)
ret i32 0
}