#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 M_PI;
scalar_t__ calloc(int, int);
double cos(double);
int /*<<< orphan*/ free(double *);
double sin(double);
double *trinomial_mult(int, double *, double *);
double *dcof_bwbp(int n, double f1f, double f2f) {
  int k;
  double theta;
  double cp;
  double st;
  double ct;
  double s2t;
  double c2t;
  double *rcof;
  double *tcof;
  double *dcof;
  double parg;
  double sparg;
  double cparg;
  double a;
  cp = cos(M_PI * (f2f + f1f) / 2.0);
  theta = M_PI * (f2f - f1f) / 2.0;
  st = sin(theta);
  ct = cos(theta);
  s2t = 2.0 * st * ct;
  c2t = 2.0 * ct * ct - 1.0;
  rcof = (double *)calloc(2 * n, sizeof(double));
  tcof = (double *)calloc(2 * n, sizeof(double));
  for (k = 0; k < n; ++k) {
    parg = M_PI * (double)(2 * k + 1) / (double)(2 * n);
    sparg = sin(parg);
    cparg = cos(parg);
    a = 1.0 + s2t * sparg;
    rcof[2 * k] = c2t / a;
    rcof[2 * k + 1] = s2t * cparg / a;
    tcof[2 * k] = -2.0 * cp * (ct + st * sparg) / a;
    tcof[2 * k + 1] = -2.0 * cp * st * cparg / a;
  }
  dcof = trinomial_mult(n, tcof, rcof);
  free(tcof);
  free(rcof);
  dcof[1] = dcof[0];
  dcof[0] = 1.0;
  for (k = 3; k <= 2 * n; ++k)
    dcof[k] = dcof[2 * k - 2];
  return (dcof);
}


x86 assembly (clang, -O0):
<dcof_bwbp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    0x2e79(%rip),%rax
movsd  (%rax),%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe7f(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x30(%rbp)
mov    0x2e4a(%rip),%rax
movsd  (%rax),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe50(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  0xe21(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe0a(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdec(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1391 <dcof_bwbp+0x241>
mov    0x2d89(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd55(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xd03(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x88(%rbp),%xmm0
ff
mov    -0x60(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xcc1(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
mov    -0x60(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    124c <dcof_bwbp+0xfc>
mov    -0x4(%rbp),%edi
mov    -0x60(%rbp),%rsi
mov    -0x58(%rbp),%rdx
call   1040 <trinomial_mult@plt>
mov    %rax,-0x68(%rbp)
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x68(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x68(%rbp),%rax
movsd  0xc3c(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x3,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jg     1420 <dcof_bwbp+0x2d0>
mov    -0x68(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13df <dcof_bwbp+0x28f>
mov    -0x68(%rbp),%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcof_bwbp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %edi,%r15d
mov    0x2e74(%rip),%r13
addsd  %xmm1,%xmm0
mulsd  0x0(%r13),%xmm0
mulsd  0xe7a(%rip),%xmm0
call   1070 <cos@plt>
movapd %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
mulsd  0x0(%r13),%xmm0
mulsd  0xe55(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1060 <sin@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,0x20(%rsp)
lea    (%r15,%r15,1),%ebx
mov    %ebx,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,%r12
mov    %ebx,0x4(%rsp)
mov    %ebx,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
test   %r15d,%r15d
jle    130c <dcof_bwbp+0x1bc>
movsd  0x28(%rsp),%xmm2
movapd %xmm2,%xmm1
addsd  %xmm2,%xmm1
movsd  0x20(%rsp),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x48(%rsp)
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdda(%rip),%xmm1
movapd %xmm1,0x50(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x4(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movapd 0x30(%rsp),%xmm1
mulsd  0xdbf(%rip),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mov    %r15d,%ebp
unpcklpd %xmm0,%xmm1
movapd %xmm1,0x30(%rsp)
add    %rbp,%rbp
xor    %r14d,%r14d
nopl   0x0(%rax)
lea    0x1(%r14),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x0(%r13),%xmm0
divsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1060 <sin@plt>
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
movsd  0x48(%rsp),%xmm2
movapd %xmm2,%xmm1
movapd 0x10(%rsp),%xmm4
mulsd  %xmm4,%xmm1
addsd  0xd59(%rip),%xmm1
mulsd  %xmm0,%xmm2
movapd 0x50(%rsp),%xmm3
unpcklpd %xmm2,%xmm3
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm3
movupd %xmm3,(%r12,%r14,8)
movapd %xmm4,%xmm2
mulsd  0x28(%rsp),%xmm2
addsd  0x20(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  0x30(%rsp),%xmm2
divpd  %xmm1,%xmm2
movupd %xmm2,(%rbx,%r14,8)
add    $0x2,%r14
cmp    %r14,%rbp
jne    1270 <dcof_bwbp+0x120>
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1040 <trinomial_mult@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
movsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x8(%rbp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x0(%rbp)
cmp    $0x2,%r15d
jl     1413 <dcof_bwbp+0x2c3>
mov    0x4(%rsp),%eax
cmp    $0x4,%eax
mov    $0x3,%esi
cmovge %eax,%esi
lea    -0x2(%rsi),%rcx
add    $0xfffffffffffffffd,%rsi
mov    %ecx,%eax
and    $0x3,%eax
mov    $0x3,%edx
cmp    $0x3,%rsi
jb     13d1 <dcof_bwbp+0x281>
lea    0x50(%rbp),%rsi
and    $0xfffffffffffffffc,%rcx
neg    %rcx
mov    $0x3,%edx
cs nopw 0x0(%rax,%rax,1)
movsd  -0x30(%rsi),%xmm0
movsd  %xmm0,0x0(%rbp,%rdx,8)
movsd  -0x20(%rsi),%xmm0
movsd  %xmm0,0x8(%rbp,%rdx,8)
movsd  -0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rbp,%rdx,8)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x18(%rbp,%rdx,8)
add    $0x40,%rsi
lea    (%rcx,%rdx,1),%rdi
add    $0x4,%rdi
add    $0x4,%rdx
cmp    $0x3,%rdi
jne    1390 <dcof_bwbp+0x240>
test   %rax,%rax
je     1413 <dcof_bwbp+0x2c3>
lea    0x0(,%rdx,8),%rcx
add    %rbp,%rcx
shl    $0x4,%rdx
add    %rbp,%rdx
add    $0xfffffffffffffff0,%rdx
shl    $0x3,%rax
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rdx,%rsi,2),%xmm0
movsd  %xmm0,(%rcx,%rsi,1)
add    $0x8,%rsi
cmp    %rsi,%rax
jne    1400 <dcof_bwbp+0x2b0>
mov    %rbp,%rax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double* @dcof_bwbp(i32 %0, double %1, double %2) {
%4 = load double, double* @M_PI
%5 = fadd double %1, %2
%6 = fmul double %5, %4
%7 = fmul double %6, 5.000000e-01
%8 = tail call double @cos(double %7)
%9 = load double, double* @M_PI
%10 = fsub double %2, %1
%11 = fmul double %10, %9
%12 = fmul double %11, 5.000000e-01
%13 = tail call double @sin(double %12)
%14 = tail call double @cos(double %12)
%15 = fmul double %13, 2.000000e+00
%16 = fmul double %15, %14
%17 = shl nsw i32 %0, 1
%18 = tail call i64 @calloc(i32 %17, i32 8)
%19 = inttoptr i64 %18 to double*
%20 = tail call i64 @calloc(i32 %17, i32 8)
%21 = inttoptr i64 %20 to double*
%22 = icmp sgt i32 %0, 0
br i1 %22, label %23, label %61
23: ; preds = %3
%24 = fmul double %14, 2.000000e+00
%25 = tail call double @llvm.fmuladd.f64(double %24, double %14, double -1.000000e+00)
%26 = sitofp i32 %17 to double
%27 = fmul double %8, -2.000000e+00
%28 = fmul double %27, %13
%29 = zext i32 %0 to i64
%30 = insertelement <2 x double> poison, double %25, i64 0
%31 = insertelement <2 x double> poison, double %27, i64 0
%32 = insertelement <2 x double> %31, double %28, i64 1
br label %33
33: ; preds = %23, %33
%34 = phi i64 [ 0, %23 ], [ %59, %33 ]
%35 = load double, double* @M_PI
%36 = shl nuw nsw i64 %34, 1
%37 = trunc i64 %36 to i32
%38 = or i32 %37, 1
%39 = sitofp i32 %38 to double
%40 = fmul double %35, %39
%41 = fdiv double %40, %26
%42 = tail call double @sin(double %41)
%43 = tail call double @cos(double %41)
%44 = tail call double @llvm.fmuladd.f64(double %16, double %42, double 1.000000e+00)
%45 = getelementptr inbounds double, double* %19, i64 %36
%46 = fmul double %16, %43
%47 = insertelement <2 x double> %30, double %46, i64 1
%48 = insertelement <2 x double> poison, double %44, i64 0
%49 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> zeroinitializer
%50 = fdiv <2 x double> %47, %49
%51 = bitcast double* %45 to <2 x double>*
store <2 x double> %50, <2 x double>* %51
%52 = tail call double @llvm.fmuladd.f64(double %13, double %42, double %14)
%53 = getelementptr inbounds double, double* %21, i64 %36
%54 = insertelement <2 x double> poison, double %52, i64 0
%55 = insertelement <2 x double> %54, double %43, i64 1
%56 = fmul <2 x double> %32, %55
%57 = fdiv <2 x double> %56, %49
%58 = bitcast double* %53 to <2 x double>*
store <2 x double> %57, <2 x double>* %58
%59 = add nuw nsw i64 %34, 1
%60 = icmp eq i64 %59, %29
br i1 %60, label %61, label %33
61: ; preds = %33, %3
%62 = tail call double* @trinomial_mult(i32 %0, double* %21, double* %19)
%63 = tail call i32 @free(double* %21)
%64 = tail call i32 @free(double* %19)
%65 = load double, double* %62
%66 = getelementptr inbounds double, double* %62, i64 1
store double %65, double* %66
store double 1.000000e+00, double* %62
%67 = icmp slt i32 %0, 2
br i1 %67, label %120, label %68
68: ; preds = %61
%69 = call i32 @llvm.smax.i32(i32 %17, i32 3)
%70 = zext i32 %69 to i64
%71 = add nsw i64 %70, -2
%72 = add nsw i64 %70, -3
%73 = and i64 %71, 3
%74 = icmp ult i64 %72, 3
br i1 %74, label %106, label %75
75: ; preds = %68
%76 = and i64 %71, -4
br label %77
77: ; preds = %77, %75
%78 = phi i64 [ 3, %75 ], [ %103, %77 ]
%79 = phi i64 [ 0, %75 ], [ %104, %77 ]
%80 = shl nuw nsw i64 %78, 1
%81 = add nsw i64 %80, -2
%82 = getelementptr inbounds double, double* %62, i64 %81
%83 = load double, double* %82
%84 = getelementptr inbounds double, double* %62, i64 %78
store double %83, double* %84
%85 = add nuw nsw i64 %78, 1
%86 = shl nuw nsw i64 %85, 1
%87 = add nsw i64 %86, -2
%88 = getelementptr inbounds double, double* %62, i64 %87
%89 = load double, double* %88
%90 = getelementptr inbounds double, double* %62, i64 %85
store double %89, double* %90
%91 = add nuw nsw i64 %78, 2
%92 = shl nuw nsw i64 %91, 1
%93 = add nsw i64 %92, -2
%94 = getelementptr inbounds double, double* %62, i64 %93
%95 = load double, double* %94
%96 = getelementptr inbounds double, double* %62, i64 %91
store double %95, double* %96
%97 = add nuw nsw i64 %78, 3
%98 = shl nuw nsw i64 %97, 1
%99 = add nsw i64 %98, -2
%100 = getelementptr inbounds double, double* %62, i64 %99
%101 = load double, double* %100
%102 = getelementptr inbounds double, double* %62, i64 %97
store double %101, double* %102
%103 = add nuw nsw i64 %78, 4
%104 = add i64 %79, 4
%105 = icmp eq i64 %104, %76
br i1 %105, label %106, label %77
106: ; preds = %77, %68
%107 = phi i64 [ 3, %68 ], [ %103, %77 ]
%108 = icmp eq i64 %73, 0
br i1 %108, label %120, label %109
109: ; preds = %106, %109
%110 = phi i64 [ %117, %109 ], [ %107, %106 ]
%111 = phi i64 [ %118, %109 ], [ 0, %106 ]
%112 = shl nuw nsw i64 %110, 1
%113 = add nsw i64 %112, -2
%114 = getelementptr inbounds double, double* %62, i64 %113
%115 = load double, double* %114
%116 = getelementptr inbounds double, double* %62, i64 %110
store double %115, double* %116
%117 = add nuw nsw i64 %110, 1
%118 = add i64 %111, 1
%119 = icmp eq i64 %118, %73
br i1 %119, label %120, label %109
120: ; preds = %106, %109, %61
ret double* %62
}