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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double arr_sum(double *, size_t);
double cos(double);
int /*<<< orphan*/ free(double *);
double *malloc(size_t);
double sin(double);
int /*<<< orphan*/ windowalpbet(double *, double *, double *, size_t, double,
                                double *, double *, double *, double *);
int /*<<< orphan*/ windowalpbetW(double *, double *, double *, double *, size_t,
                                 double, double, double *, double *, double *,
                                 double *);
void windowfunction(double time[], double freq[], double weight[], size_t N,
                    size_t M, double f0, double window[], int useweight) {
  double *datsin = malloc(N * sizeof(double));
  double *datcos = malloc(N * sizeof(double));
  double omega0 = f0 * 6.28318530717958647692528676655900576839433879875e-6;
  for (size_t k = 0; k < N; ++k) {
    datsin[k] = sin(omega0 * time[k]);
    datcos[k] = cos(omega0 * time[k]);
  }
  double alphasin = 0;
  double betasin = 0;
  double alphacos = 0;
  double betacos = 0;
  double ny = 0;
  size_t i;
  if (useweight == 0) {
#pragma omp parallel default(shared) private(alphasin, betasin, alphacos,      \
                                             betacos, ny)
    {
#pragma omp for schedule(static)
      for (i = 0; i < M; ++i) {
        ny = freq[i] * 6.28318530717958647692528676655900576839433879875e-6;
        windowalpbet(time, datsin, datcos, N, ny, &alphasin, &betasin,
                     &alphacos, &betacos);
        window[i] = 0.5 * ((alphasin * alphasin + betasin * betasin) +
                           (alphacos * alphacos + betacos * betacos));
      }
    }
  } else {
    double sumweights = arr_sum(weight, N);
#pragma omp parallel default(shared) private(alphasin, betasin, alphacos,      \
                                             betacos, ny)
    {
#pragma omp for schedule(static)
      for (i = 0; i < M; ++i) {
        ny = freq[i] * 6.28318530717958647692528676655900576839433879875e-6;
        windowalpbetW(time, weight, datsin, datcos, N, ny, sumweights,
                      &alphasin, &betasin, &alphacos, &betacos);
        window[i] = 0.5 * ((alphasin * alphasin + betasin * betasin) +
                           (alphacos * alphacos + betacos * betacos));
      }
    }
  }
  free(datsin);
  free(datcos);
}


x86 assembly (clang, -O0):
<windowfunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
movsd  0xe3b(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    123e <windowfunction+0xce>
movsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1060 <sin@plt>
mov    -0x40(%rbp),%rax
mov    -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1080 <cos@plt>
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    11d7 <windowfunction+0x67>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
cmpl   $0x0,0x10(%rbp)
jne    1350 <windowfunction+0x1e0>
movq   $0x0,-0x88(%rbp)
mov    -0x88(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    134b <windowfunction+0x1db>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%rcx
movsd  0xd61(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movsd  -0x80(%rbp),%xmm0
lea    -0x60(%rbp),%r8
lea    -0x68(%rbp),%r9
lea    -0x70(%rbp),%r10
lea    -0x78(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <windowalpbet@plt>
movsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm3
movsd  -0x78(%rbp),%xmm2
mulsd  -0x78(%rbp),%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  0xce8(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    127b <windowfunction+0x10b>
jmp    1456 <windowfunction+0x2e6>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <arr_sum@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movq   $0x0,-0x88(%rbp)
mov    -0x88(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1451 <windowfunction+0x2e1>
mov    -0x10(%rbp),%rax
mov    -0x88(%rbp),%rcx
movsd  0xc6c(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x20(%rbp),%r8
movsd  -0x80(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
lea    -0x60(%rbp),%r9
lea    -0x68(%rbp),%r11
lea    -0x70(%rbp),%r10
lea    -0x78(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <windowalpbetW@plt>
movsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm3
movsd  -0x78(%rbp),%xmm2
mulsd  -0x78(%rbp),%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  0xbe2(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    1370 <windowfunction+0x200>
jmp    1456 <windowfunction+0x2e6>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<windowfunction>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9,0x40(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %r8,0x18(%rsp)
mov    %rcx,%r13
mov    %rdx,0x48(%rsp)
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x0(,%rcx,8),%rbp
mov    %rbp,%rdi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1070 <malloc@plt>
mov    %rax,0x10(%rsp)
test   %r13,%r13
je     12bd <windowfunction+0x14d>
movsd  0x8(%rsp),%xmm0
mulsd  0xe2d(%rip),%xmm0
cmp    $0x1,%r13
mov    %r15,0x50(%rsp)
movsd  %xmm0,0x8(%rsp)
jne    11f3 <windowfunction+0x83>
mov    %r13,%r15
xor    %r12d,%r12d
movapd %xmm0,%xmm1
jmp    127e <windowfunction+0x10e>
mov    %r13,%r15
and    $0xfffffffffffffffe,%r13
xor    %r12d,%r12d
movapd %xmm0,%xmm1
mov    0x10(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%r12,8),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <sin@plt>
movsd  %xmm0,(%rbx,%r12,8)
movsd  (%r14,%r12,8),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x0(%rbp,%r12,8)
movsd  0x8(%r14,%r12,8),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0x8(%rbx,%r12,8)
movsd  0x8(%r14,%r12,8),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1080 <cos@plt>
movsd  0x8(%rsp),%xmm1
movsd  %xmm0,0x8(%rbp,%r12,8)
add    $0x2,%r12
cmp    %r12,%r13
jne    1210 <windowfunction+0xa0>
mov    %r15,%r13
test   $0x1,%r13b
mov    0x50(%rsp),%r15
je     12bd <windowfunction+0x14d>
movsd  (%r14,%r12,8),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <sin@plt>
movsd  %xmm0,(%rbx,%r12,8)
movsd  0x8(%rsp),%xmm0
mulsd  (%r14,%r12,8),%xmm0
call   1080 <cos@plt>
mov    0x10(%rsp),%rax
movsd  %xmm0,(%rax,%r12,8)
movq   $0x0,0x38(%rsp)
movq   $0x0,0x30(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x20(%rsp)
cmpl   $0x0,0x90(%rsp)
je     13c2 <windowfunction+0x252>
mov    0x48(%rsp),%rdi
mov    %r13,%rsi
call   1090 <arr_sum@plt>
cmpq   $0x0,0x18(%rsp)
mov    0x40(%rsp),%r12
je     146d <windowfunction+0x2fd>
mov    %r13,%rbp
mov    %r15,%r13
xor    %r15d,%r15d
movsd  %xmm0,0x8(%rsp)
nopl   0x0(%rax)
movsd  0x0(%r13,%r15,8),%xmm0
mulsd  0xcd1(%rip),%xmm0
sub    $0x8,%rsp
mov    %r14,%rdi
mov    0x50(%rsp),%rsi
mov    %rbx,%rdx
mov    0x18(%rsp),%rcx
mov    %rbp,%r8
movsd  0x10(%rsp),%xmm1
lea    0x40(%rsp),%r9
lea    0x28(%rsp),%rax
push   %rax
lea    0x38(%rsp),%rax
push   %rax
lea    0x48(%rsp),%rax
push   %rax
call   1040 <windowalpbetW@plt>
add    $0x20,%rsp
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xc60(%rip),%xmm1
movsd  %xmm1,(%r12,%r15,8)
add    $0x1,%r15
cmp    %r15,0x18(%rsp)
jne    1320 <windowfunction+0x1b0>
jmp    146d <windowfunction+0x2fd>
cmpq   $0x0,0x18(%rsp)
mov    %r15,%rax
mov    0x40(%rsp),%r15
je     146d <windowfunction+0x2fd>
mov    %r13,%r12
mov    %rax,%r13
xor    %ebp,%ebp
xchg   %ax,%ax
movsd  0x0(%r13,%rbp,8),%xmm0
mulsd  0xc11(%rip),%xmm0
mov    %r14,%rdi
mov    %rbx,%rsi
mov    0x10(%rsp),%rdx
mov    %r12,%rcx
lea    0x38(%rsp),%r8
lea    0x30(%rsp),%r9
lea    0x20(%rsp),%rax
push   %rax
lea    0x30(%rsp),%rax
push   %rax
call   1050 <windowalpbet@plt>
add    $0x10,%rsp
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xbb0(%rip),%xmm1
movsd  %xmm1,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,0x18(%rsp)
jne    13e0 <windowfunction+0x270>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @windowfunction(double* %0, double* %1, double* %2, i64 %3, i64 %4, double %5, double* %6, i32 %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca i64
%13 = alloca i64
%14 = alloca double
%15 = alloca double*
%16 = alloca i32
%17 = alloca double*
%18 = alloca double*
%19 = alloca double
%20 = alloca i64
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca i64
%27 = alloca double
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store double %5, double* %14
store double* %6, double** %15
store i32 %7, i32* %16
%28 = load i64, i64* %12
%29 = mul i64 %28, 8
%30 = call double* @malloc(i64 %29)
store double* %30, double** %17
%31 = load i64, i64* %12
%32 = mul i64 %31, 8
%33 = call double* @malloc(i64 %32)
store double* %33, double** %18
%34 = load double, double* %14
%35 = fmul double %34, 0x3EDA5A84D380747E
store double %35, double* %19
store i64 0, i64* %20
br label %36
36: ; preds = %61, %8
%37 = load i64, i64* %20
%38 = load i64, i64* %12
%39 = icmp ult i64 %37, %38
br i1 %39, label %40, label %64
40: ; preds = %36
%41 = load double, double* %19
%42 = load double*, double** %9
%43 = load i64, i64* %20
%44 = getelementptr inbounds double, double* %42, i64 %43
%45 = load double, double* %44
%46 = fmul double %41, %45
%47 = call double @sin(double %46)
%48 = load double*, double** %17
%49 = load i64, i64* %20
%50 = getelementptr inbounds double, double* %48, i64 %49
store double %47, double* %50
%51 = load double, double* %19
%52 = load double*, double** %9
%53 = load i64, i64* %20
%54 = getelementptr inbounds double, double* %52, i64 %53
%55 = load double, double* %54
%56 = fmul double %51, %55
%57 = call double @cos(double %56)
%58 = load double*, double** %18
%59 = load i64, i64* %20
%60 = getelementptr inbounds double, double* %58, i64 %59
store double %57, double* %60
br label %61
61: ; preds = %40
%62 = load i64, i64* %20
%63 = add i64 %62, 1
store i64 %63, i64* %20
br label %36
64: ; preds = %36
store double 0.000000e+00, double* %21
store double 0.000000e+00, double* %22
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %24
store double 0.000000e+00, double* %25
%65 = load i32, i32* %16
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %105
67: ; preds = %64
store i64 0, i64* %26
br label %68
68: ; preds = %101, %67
%69 = load i64, i64* %26
%70 = load i64, i64* %13
%71 = icmp ult i64 %69, %70
br i1 %71, label %72, label %104
72: ; preds = %68
%73 = load double*, double** %10
%74 = load i64, i64* %26
%75 = getelementptr inbounds double, double* %73, i64 %74
%76 = load double, double* %75
%77 = fmul double %76, 0x3EDA5A84D380747E
store double %77, double* %25
%78 = load double*, double** %9
%79 = load double*, double** %17
%80 = load double*, double** %18
%81 = load i64, i64* %12
%82 = load double, double* %25
%83 = call i32 @windowalpbet(double* %78, double* %79, double* %80, i64 %81, double %82, double* %21, double* %22, double* %23, double* %24)
%84 = load double, double* %21
%85 = load double, double* %21
%86 = load double, double* %22
%87 = load double, double* %22
%88 = fmul double %86, %87
%89 = call double @llvm.fmuladd.f64(double %84, double %85, double %88)
%90 = load double, double* %23
%91 = load double, double* %23
%92 = load double, double* %24
%93 = load double, double* %24
%94 = fmul double %92, %93
%95 = call double @llvm.fmuladd.f64(double %90, double %91, double %94)
%96 = fadd double %89, %95
%97 = fmul double 5.000000e-01, %96
%98 = load double*, double** %15
%99 = load i64, i64* %26
%100 = getelementptr inbounds double, double* %98, i64 %99
store double %97, double* %100
br label %101
101: ; preds = %72
%102 = load i64, i64* %26
%103 = add i64 %102, 1
store i64 %103, i64* %26
br label %68
104: ; preds = %68
br label %148
105: ; preds = %64
%106 = load double*, double** %11
%107 = load i64, i64* %12
%108 = call double @arr_sum(double* %106, i64 %107)
store double %108, double* %27
store i64 0, i64* %26
br label %109
109: ; preds = %144, %105
%110 = load i64, i64* %26
%111 = load i64, i64* %13
%112 = icmp ult i64 %110, %111
br i1 %112, label %113, label %147
113: ; preds = %109
%114 = load double*, double** %10
%115 = load i64, i64* %26
%116 = getelementptr inbounds double, double* %114, i64 %115
%117 = load double, double* %116
%118 = fmul double %117, 0x3EDA5A84D380747E
store double %118, double* %25
%119 = load double*, double** %9
%120 = load double*, double** %11
%121 = load double*, double** %17
%122 = load double*, double** %18
%123 = load i64, i64* %12
%124 = load double, double* %25
%125 = load double, double* %27
%126 = call i32 @windowalpbetW(double* %119, double* %120, double* %121, double* %122, i64 %123, double %124, double %125, double* %21, double* %22, double* %23, double* %24)
%127 = load double, double* %21
%128 = load double, double* %21
%129 = load double, double* %22
%130 = load double, double* %22
%131 = fmul double %129, %130
%132 = call double @llvm.fmuladd.f64(double %127, double %128, double %131)
%133 = load double, double* %23
%134 = load double, double* %23
%135 = load double, double* %24
%136 = load double, double* %24
%137 = fmul double %135, %136
%138 = call double @llvm.fmuladd.f64(double %133, double %134, double %137)
%139 = fadd double %132, %138
%140 = fmul double 5.000000e-01, %139
%141 = load double*, double** %15
%142 = load i64, i64* %26
%143 = getelementptr inbounds double, double* %141, i64 %142
store double %140, double* %143
br label %144
144: ; preds = %113
%145 = load i64, i64* %26
%146 = add i64 %145, 1
store i64 %146, i64* %26
br label %109
147: ; preds = %109
br label %148
148: ; preds = %147, %104
%149 = load double*, double** %17
%150 = call i32 @free(double* %149)
%151 = load double*, double** %18
%152 = call i32 @free(double* %151)
ret void
}

LLVM IR (-O2):
define void @windowfunction(double* %0, double* nocapture %1, double* %2, i64 %3, i64 %4, double %5, double* nocapture writeonly %6, i32 %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = shl i64 %3, 3
%14 = tail call double* @malloc(i64 %13)
%15 = tail call double* @malloc(i64 %13)
%16 = fmul double %5, 0x3EDA5A84D380747E
%17 = icmp eq i64 %3, 0
br i1 %17, label %36, label %18
18: ; preds = %8
%19 = and i64 %3, 1
%20 = icmp eq i64 %3, 1
br i1 %20, label %23, label %21
21: ; preds = %18
%22 = and i64 %3, -2
br label %44
23: ; preds = %44, %18
%24 = phi i64 [ 0, %18 ], [ %66, %44 ]
%25 = icmp eq i64 %19, 0
br i1 %25, label %36, label %26
26: ; preds = %23
%27 = getelementptr inbounds double, double* %0, i64 %24
%28 = load double, double* %27
%29 = fmul double %16, %28
%30 = tail call double @sin(double %29)
%31 = getelementptr inbounds double, double* %14, i64 %24
store double %30, double* %31
%32 = load double, double* %27
%33 = fmul double %16, %32
%34 = tail call double @cos(double %33)
%35 = getelementptr inbounds double, double* %15, i64 %24
store double %34, double* %35
br label %36
36: ; preds = %26, %23, %8
%37 = bitcast double* %9 to i8*
store double 0.000000e+00, double* %9
%38 = bitcast double* %10 to i8*
store double 0.000000e+00, double* %10
%39 = bitcast double* %11 to i8*
store double 0.000000e+00, double* %11
%40 = bitcast double* %12 to i8*
store double 0.000000e+00, double* %12
%41 = icmp eq i32 %7, 0
br i1 %41, label %42, label %88
42: ; preds = %36
%43 = icmp eq i64 %4, 0
br i1 %43, label %110, label %69
44: ; preds = %44, %21
%45 = phi i64 [ 0, %21 ], [ %66, %44 ]
%46 = phi i64 [ 0, %21 ], [ %67, %44 ]
%47 = getelementptr inbounds double, double* %0, i64 %45
%48 = load double, double* %47
%49 = fmul double %16, %48
%50 = tail call double @sin(double %49)
%51 = getelementptr inbounds double, double* %14, i64 %45
store double %50, double* %51
%52 = load double, double* %47
%53 = fmul double %16, %52
%54 = tail call double @cos(double %53)
%55 = getelementptr inbounds double, double* %15, i64 %45
store double %54, double* %55
%56 = or i64 %45, 1
%57 = getelementptr inbounds double, double* %0, i64 %56
%58 = load double, double* %57
%59 = fmul double %16, %58
%60 = tail call double @sin(double %59)
%61 = getelementptr inbounds double, double* %14, i64 %56
store double %60, double* %61
%62 = load double, double* %57
%63 = fmul double %16, %62
%64 = tail call double @cos(double %63)
%65 = getelementptr inbounds double, double* %15, i64 %56
store double %64, double* %65
%66 = add nuw i64 %45, 2
%67 = add i64 %46, 2
%68 = icmp eq i64 %67, %22
br i1 %68, label %23, label %44
69: ; preds = %42, %69
%70 = phi i64 [ %86, %69 ], [ 0, %42 ]
%71 = getelementptr inbounds double, double* %1, i64 %70
%72 = load double, double* %71
%73 = fmul double %72, 0x3EDA5A84D380747E
%74 = call i32 @windowalpbet(double* %0, double* %14, double* %15, i64 %3, double %73, double* %9, double* %10, double* %11, double* %12)
%75 = load double, double* %9
%76 = load double, double* %10
%77 = fmul double %76, %76
%78 = call double @llvm.fmuladd.f64(double %75, double %75, double %77)
%79 = load double, double* %11
%80 = load double, double* %12
%81 = fmul double %80, %80
%82 = call double @llvm.fmuladd.f64(double %79, double %79, double %81)
%83 = fadd double %78, %82
%84 = fmul double %83, 5.000000e-01
%85 = getelementptr inbounds double, double* %6, i64 %70
store double %84, double* %85
%86 = add nuw i64 %70, 1
%87 = icmp eq i64 %86, %4
br i1 %87, label %110, label %69
88: ; preds = %36
%89 = tail call double @arr_sum(double* %2, i64 %3)
%90 = icmp eq i64 %4, 0
br i1 %90, label %110, label %91
91: ; preds = %88, %91
%92 = phi i64 [ %108, %91 ], [ 0, %88 ]
%93 = getelementptr inbounds double, double* %1, i64 %92
%94 = load double, double* %93
%95 = fmul double %94, 0x3EDA5A84D380747E
%96 = call i32 @windowalpbetW(double* %0, double* %2, double* %14, double* %15, i64 %3, double %95, double %89, double* %9, double* %10, double* %11, double* %12)
%97 = load double, double* %9
%98 = load double, double* %10
%99 = fmul double %98, %98
%100 = call double @llvm.fmuladd.f64(double %97, double %97, double %99)
%101 = load double, double* %11
%102 = load double, double* %12
%103 = fmul double %102, %102
%104 = call double @llvm.fmuladd.f64(double %101, double %101, double %103)
%105 = fadd double %100, %104
%106 = fmul double %105, 5.000000e-01
%107 = getelementptr inbounds double, double* %6, i64 %92
store double %106, double* %107
%108 = add nuw i64 %92, 1
%109 = icmp eq i64 %108, %4
br i1 %109, label %110, label %91
110: ; preds = %91, %69, %88, %42
%111 = call i32 @free(double* %14)
%112 = call i32 @free(double* %15)
ret void
}