#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 cos(int);
int fabs(double);
int /*<<< orphan*/ fftshift(double *, double *, int);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ ifft(int, int, double *, double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ meyeraux(int, double *);
double sin(int);
void meyer_phi(double *x, int sigInLength, double lb, double ub, double *phir,
               double *phii, int sigOutLength, double ys) {
  int count;
  double con, delta, omega, xhat;
  double *xhat_r, *xhat_i;
  xhat_r = (double *)malloc(sigInLength * sizeof(double));
  xhat_i = (double *)malloc(sigInLength * sizeof(double));
  delta = (ub - lb) / sigInLength;
  for (count = 0; count < sigInLength; count++) {
    xhat_r[count] = 0;
    xhat_i[count] = 0;
    xhat = 0;
    if (fabs(x[count]) < (2 * 3.1415926535897931159980 / 3))
      xhat = 1;
    if (fabs(x[count]) >= (2 * 3.1415926535897931159980 / 3) &&
        fabs(x[count]) < (4 * 3.1415926535897931159980 / 3)) {
      meyeraux(3 / 2 / 3.1415926535897931159980 * fabs(x[count]) - 1, &con);
      xhat = cos(3.1415926535897931159980 / 2 * con);
    }
    omega = (-sigInLength + 2 * count) / (2 * sigInLength * delta);
    xhat_r[count] =
        xhat * cos(2 * 3.1415926535897931159980 * omega * lb) / delta;
    xhat_i[count] =
        xhat * sin(2 * 3.1415926535897931159980 * omega * lb) / delta;
  }
  fftshift(xhat_r, phir, sigInLength);
  fftshift(xhat_i, phii, sigInLength);
  ifft(sigInLength, sigInLength, phir, phii);
  for (count = 0; count < sigInLength; count++) {
    phir[count] = phir[count] * ys;
    phii[count] = phii[count] * ys;
  }
  free(xhat_r);
  free(xhat_i);
  return;
}


x86 assembly (clang, -O0):
<meyer_phi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8d,-0x34(%rbp)
movsd  %xmm2,-0x40(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13c4 <meyer_phi+0x244>
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xdbc(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    125b <meyer_phi+0xdb>
movsd  0xdb2(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xd87(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1301 <meyer_phi+0x181>
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xd6f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1301 <meyer_phi+0x181>
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xd57(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd53(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
lea    -0x50(%rbp),%rsi
call   1050 <meyeraux@plt>
movsd  0xd2a(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <cos@plt>
movsd  %xmm0,-0x68(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xcf1(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
divsd  -0x58(%rbp),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xcab(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x58(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11f2 <meyer_phi+0x72>
mov    -0x70(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1070 <fftshift@plt>
mov    -0x78(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1070 <fftshift@plt>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1040 <ifft@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1456 <meyer_phi+0x2d6>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    13fe <meyer_phi+0x27e>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<meyer_phi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movapd %xmm2,0x50(%rsp)
mov    %rcx,%r14
mov    %rdx,%r15
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %esi,%ebx
mov    %rdi,%rbp
lea    0x0(,%rbx,8),%r12d
mov    %r12d,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    %r12d,%edi
mov    %rbx,%r12
call   1090 <malloc@plt>
mov    %rax,%rbx
test   %r12d,%r12d
jle    146d <meyer_phi+0x2ed>
mov    %r15,0x28(%rsp)
mov    %r14,0x30(%rsp)
movsd  0x8(%rsp),%xmm1
subsd  (%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
divsd  %xmm0,%xmm1
mov    %r12d,%eax
mov    %rax,0x18(%rsp)
lea    (%r12,%r12,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x38(%rsp)
mov    %r12,0x20(%rsp)
mov    %r12d,%r14d
neg    %r14d
xor    %r15d,%r15d
mov    %r13,0x40(%rsp)
mov    %rbx,%r12
movsd  %xmm1,0x8(%rsp)
jmp    12aa <meyer_phi+0x12a>
movsd  (%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
divsd  0x38(%rsp),%xmm0
mulsd  0xdd5(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%r13d
mov    %r13d,%edi
call   10a0 <cos@plt>
mulsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
mov    0x40(%rsp),%rbx
movsd  %xmm0,(%rbx,%r15,8)
mov    %r13d,%edi
mov    %rbx,%r13
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm0
divsd  %xmm1,%xmm0
mov    %r12,%rbx
movsd  %xmm0,(%r12,%r15,8)
add    $0x1,%r15
add    $0x2,%r14d
cmp    %r15,0x18(%rsp)
je     1364 <meyer_phi+0x1e4>
movq   $0x0,0x0(%r13,%r15,8)
movq   $0x0,(%rbx,%r15,8)
movsd  0x0(%rbp,%r15,8),%xmm0
call   1060 <fabs@plt>
movsd  0xd31(%rip),%xmm0
cmp    $0x3,%eax
jl     12d7 <meyer_phi+0x157>
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x0(%rbp,%r15,8),%xmm0
call   1060 <fabs@plt>
cmp    $0x3,%eax
jl     1230 <meyer_phi+0xb0>
movsd  0x0(%rbp,%r15,8),%xmm0
call   1060 <fabs@plt>
cmp    $0x4,%eax
movsd  (%rsp),%xmm1
jg     1235 <meyer_phi+0xb5>
movsd  0x0(%rbp,%r15,8),%xmm0
call   1060 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xce1(%rip),%xmm0
addsd  0xce1(%rip),%xmm0
cvttsd2si %xmm0,%edi
lea    0x48(%rsp),%rsi
call   1050 <meyeraux@plt>
movsd  0x48(%rsp),%xmm0
mulsd  0xccd(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <cos@plt>
movsd  (%rsp),%xmm1
movsd  %xmm0,0x10(%rsp)
jmp    1235 <meyer_phi+0xb5>
mov    %r13,%rdi
mov    0x28(%rsp),%r14
mov    %r14,%rsi
mov    0x20(%rsp),%r15
mov    %r15d,%edx
call   1070 <fftshift@plt>
mov    %rbx,%rdi
mov    0x30(%rsp),%rbp
mov    %rbp,%rsi
mov    %r15d,%edx
call   1070 <fftshift@plt>
mov    %r15d,%edi
mov    %r15d,%esi
mov    %r14,%rdx
mov    %rbp,%rcx
call   1040 <ifft@plt>
test   %r15d,%r15d
movapd 0x50(%rsp),%xmm3
mov    0x18(%rsp),%rdi
jle    149a <meyer_phi+0x31a>
cmp    $0x4,%edi
jb     13da <meyer_phi+0x25a>
lea    0x0(,%rdi,8),%rax
add    %rbp,%rax
cmp    %r14,%rax
jbe    14b9 <meyer_phi+0x339>
lea    (%r14,%rdi,8),%rax
cmp    %rbp,%rax
jbe    14b9 <meyer_phi+0x339>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
test   $0x1,%dil
je     140c <meyer_phi+0x28c>
movsd  (%r14,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x0(%rbp,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
or     $0x1,%rax
add    %rdi,%rcx
je     149a <meyer_phi+0x31a>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%r14,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x0(%rbp,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
movsd  0x8(%r14,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x8(%rbp,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%rbp,%rax,8)
add    $0x2,%rax
cmp    %rax,%rdi
jne    1420 <meyer_phi+0x2a0>
jmp    149a <meyer_phi+0x31a>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r12d,%edx
call   1070 <fftshift@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
call   1070 <fftshift@plt>
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <ifft@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %edi,%eax
and    $0xfffffffc,%eax
movapd %xmm3,%xmm0
unpcklpd %xmm3,%xmm0
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     15d9 <meyer_phi+0x459>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movupd (%r14,%rcx,8),%xmm1
movupd 0x10(%r14,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r14,%rcx,8)
movupd %xmm2,0x10(%r14,%rcx,8)
movupd 0x0(%rbp,%rcx,8),%xmm1
movupd 0x10(%rbp,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,0x0(%rbp,%rcx,8)
movupd %xmm2,0x10(%rbp,%rcx,8)
movupd 0x20(%r14,%rcx,8),%xmm1
movupd 0x30(%r14,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,0x20(%r14,%rcx,8)
movupd %xmm2,0x30(%r14,%rcx,8)
movupd 0x20(%rbp,%rcx,8),%xmm1
movupd 0x30(%rbp,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,0x20(%rbp,%rcx,8)
movupd %xmm2,0x30(%rbp,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    14f0 <meyer_phi+0x370>
test   $0x1,%dl
je     15cb <meyer_phi+0x44b>
movupd (%r14,%rcx,8),%xmm1
movupd 0x10(%r14,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r14,%rcx,8)
movupd %xmm2,0x10(%r14,%rcx,8)
movupd 0x0(%rbp,%rcx,8),%xmm1
movupd 0x10(%rbp,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,0x0(%rbp,%rcx,8)
movupd %xmm2,0x10(%rbp,%rcx,8)
cmp    %rdi,%rax
je     149a <meyer_phi+0x31a>
jmp    13dc <meyer_phi+0x25c>
xor    %ecx,%ecx
test   $0x1,%dl
jne    1589 <meyer_phi+0x409>
jmp    15cb <meyer_phi+0x44b>

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

LLVM IR (-O2):
define void @meyer_phi(double* nocapture %0, i32 %1, double %2, double %3, double* %4, double* %5, i32 %6, double %7) {
%9 = alloca double
%10 = bitcast double* %9 to i8*
%11 = shl i32 %1, 3
%12 = tail call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to double*
%14 = tail call i64 @malloc(i32 %11)
%15 = inttoptr i64 %14 to double*
%16 = fsub double %3, %2
%17 = sitofp i32 %1 to double
%18 = fdiv double %16, %17
%19 = icmp sgt i32 %1, 0
br i1 %19, label %20, label %203
20: ; preds = %8
%21 = shl nuw nsw i32 %1, 1
%22 = sitofp i32 %21 to double
%23 = fmul double %18, %22
%24 = zext i32 %1 to i64
br label %25
25: ; preds = %20, %52
%26 = phi i64 [ 0, %20 ], [ %68, %52 ]
%27 = getelementptr inbounds double, double* %13, i64 %26
store double 0.000000e+00, double* %27
%28 = getelementptr inbounds double, double* %15, i64 %26
store double 0.000000e+00, double* %28
%29 = getelementptr inbounds double, double* %0, i64 %26
%30 = load double, double* %29
%31 = call i32 @fabs(double %30)
%32 = icmp slt i32 %31, 3
%33 = select i1 %32, double 1.000000e+00, double 0.000000e+00
%34 = load double, double* %29
%35 = call i32 @fabs(double %34)
%36 = icmp sgt i32 %35, 2
br i1 %36, label %37, label %52
37: ; preds = %25
%38 = load double, double* %29
%39 = call i32 @fabs(double %38)
%40 = icmp slt i32 %39, 5
br i1 %40, label %41, label %52
41: ; preds = %37
%42 = load double, double* %29
%43 = call i32 @fabs(double %42)
%44 = sitofp i32 %43 to double
%45 = call double @llvm.fmuladd.f64(double %44, double 0x3FD45F306DC9C883, double -1.000000e+00)
%46 = fptosi double %45 to i32
%47 = call i32 @meyeraux(i32 %46, double* %9)
%48 = load double, double* %9
%49 = fmul double %48, 0x3FF921FB54442D18
%50 = fptosi double %49 to i32
%51 = call double @cos(i32 %50)
br label %52
52: ; preds = %41, %37, %25
%53 = phi double [ %51, %41 ], [ %33, %37 ], [ %33, %25 ]
%54 = trunc i64 %26 to i32
%55 = shl i32 %54, 1
%56 = sub i32 %55, %1
%57 = sitofp i32 %56 to double
%58 = fdiv double %57, %23
%59 = fmul double %58, 0x401921FB54442D18
%60 = fmul double %59, %2
%61 = fptosi double %60 to i32
%62 = call double @cos(i32 %61)
%63 = fmul double %53, %62
%64 = fdiv double %63, %18
store double %64, double* %27
%65 = call double @sin(i32 %61)
%66 = fmul double %53, %65
%67 = fdiv double %66, %18
store double %67, double* %28
%68 = add nuw nsw i64 %26, 1
%69 = icmp eq i64 %68, %24
br i1 %69, label %70, label %25
70: ; preds = %52
%71 = call i32 @fftshift(double* %13, double* %4, i32 %1)
%72 = call i32 @fftshift(double* %15, double* %5, i32 %1)
%73 = call i32 @ifft(i32 %1, i32 %1, double* %4, double* %5)
br i1 %19, label %74, label %207
74: ; preds = %70
%75 = zext i32 %1 to i64
%76 = icmp ult i32 %1, 4
br i1 %76, label %169, label %77
77: ; preds = %74
%78 = getelementptr double, double* %4, i64 %24
%79 = getelementptr double, double* %5, i64 %24
%80 = icmp ugt double* %79, %4
%81 = icmp ugt double* %78, %5
%82 = and i1 %80, %81
br i1 %82, label %169, label %83
83: ; preds = %77
%84 = and i64 %24, 4294967292
%85 = insertelement <2 x double> poison, double %7, i64 0
%86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
%87 = insertelement <2 x double> poison, double %7, i64 0
%88 = shufflevector <2 x double> %87, <2 x double> poison, <2 x i32> zeroinitializer
%89 = add nsw i64 %84, -4
%90 = lshr exact i64 %89, 2
%91 = add nuw nsw i64 %90, 1
%92 = and i64 %91, 1
%93 = icmp eq i64 %89, 0
br i1 %93, label %143, label %94
94: ; preds = %83
%95 = and i64 %91, 9223372036854775806
br label %96
96: ; preds = %96, %94
%97 = phi i64 [ 0, %94 ], [ %140, %96 ]
%98 = phi i64 [ 0, %94 ], [ %141, %96 ]
%99 = getelementptr inbounds double, double* %4, i64 %97
%100 = bitcast double* %99 to <2 x double>*
%101 = load <2 x double>, <2 x double>* %100
%102 = getelementptr inbounds double, double* %99, i64 2
%103 = bitcast double* %102 to <2 x double>*
%104 = load <2 x double>, <2 x double>* %103
%105 = fmul <2 x double> %101, %86
%106 = fmul <2 x double> %104, %88
%107 = bitcast double* %99 to <2 x double>*
store <2 x double> %105, <2 x double>* %107
%108 = bitcast double* %102 to <2 x double>*
store <2 x double> %106, <2 x double>* %108
%109 = getelementptr inbounds double, double* %5, i64 %97
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = getelementptr inbounds double, double* %109, i64 2
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = fmul <2 x double> %111, %86
%116 = fmul <2 x double> %114, %88
%117 = bitcast double* %109 to <2 x double>*
store <2 x double> %115, <2 x double>* %117
%118 = bitcast double* %112 to <2 x double>*
store <2 x double> %116, <2 x double>* %118
%119 = or i64 %97, 4
%120 = getelementptr inbounds double, double* %4, i64 %119
%121 = bitcast double* %120 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = getelementptr inbounds double, double* %120, i64 2
%124 = bitcast double* %123 to <2 x double>*
%125 = load <2 x double>, <2 x double>* %124
%126 = fmul <2 x double> %122, %86
%127 = fmul <2 x double> %125, %88
%128 = bitcast double* %120 to <2 x double>*
store <2 x double> %126, <2 x double>* %128
%129 = bitcast double* %123 to <2 x double>*
store <2 x double> %127, <2 x double>* %129
%130 = getelementptr inbounds double, double* %5, i64 %119
%131 = bitcast double* %130 to <2 x double>*
%132 = load <2 x double>, <2 x double>* %131
%133 = getelementptr inbounds double, double* %130, i64 2
%134 = bitcast double* %133 to <2 x double>*
%135 = load <2 x double>, <2 x double>* %134
%136 = fmul <2 x double> %132, %86
%137 = fmul <2 x double> %135, %88
%138 = bitcast double* %130 to <2 x double>*
store <2 x double> %136, <2 x double>* %138
%139 = bitcast double* %133 to <2 x double>*
store <2 x double> %137, <2 x double>* %139
%140 = add nuw i64 %97, 8
%141 = add i64 %98, 2
%142 = icmp eq i64 %141, %95
br i1 %142, label %143, label %96
143: ; preds = %96, %83
%144 = phi i64 [ 0, %83 ], [ %140, %96 ]
%145 = icmp eq i64 %92, 0
br i1 %145, label %167, label %146
146: ; preds = %143
%147 = getelementptr inbounds double, double* %4, i64 %144
%148 = bitcast double* %147 to <2 x double>*
%149 = load <2 x double>, <2 x double>* %148
%150 = getelementptr inbounds double, double* %147, i64 2
%151 = bitcast double* %150 to <2 x double>*
%152 = load <2 x double>, <2 x double>* %151
%153 = fmul <2 x double> %149, %86
%154 = fmul <2 x double> %152, %88
%155 = bitcast double* %147 to <2 x double>*
store <2 x double> %153, <2 x double>* %155
%156 = bitcast double* %150 to <2 x double>*
store <2 x double> %154, <2 x double>* %156
%157 = getelementptr inbounds double, double* %5, i64 %144
%158 = bitcast double* %157 to <2 x double>*
%159 = load <2 x double>, <2 x double>* %158
%160 = getelementptr inbounds double, double* %157, i64 2
%161 = bitcast double* %160 to <2 x double>*
%162 = load <2 x double>, <2 x double>* %161
%163 = fmul <2 x double> %159, %86
%164 = fmul <2 x double> %162, %88
%165 = bitcast double* %157 to <2 x double>*
store <2 x double> %163, <2 x double>* %165
%166 = bitcast double* %160 to <2 x double>*
store <2 x double> %164, <2 x double>* %166
br label %167
167: ; preds = %143, %146
%168 = icmp eq i64 %84, %24
br i1 %168, label %207, label %169
169: ; preds = %77, %74, %167
%170 = phi i64 [ 0, %77 ], [ 0, %74 ], [ %84, %167 ]
%171 = xor i64 %170, -1
%172 = and i64 %24, 1
%173 = icmp eq i64 %172, 0
br i1 %173, label %182, label %174
174: ; preds = %169
%175 = getelementptr inbounds double, double* %4, i64 %170
%176 = load double, double* %175
%177 = fmul double %176, %7
store double %177, double* %175
%178 = getelementptr inbounds double, double* %5, i64 %170
%179 = load double, double* %178
%180 = fmul double %179, %7
store double %180, double* %178
%181 = or i64 %170, 1
br label %182
182: ; preds = %174, %169
%183 = phi i64 [ %170, %169 ], [ %181, %174 ]
%184 = sub nsw i64 0, %24
%185 = icmp eq i64 %171, %184
br i1 %185, label %207, label %186
186: ; preds = %182, %186
%187 = phi i64 [ %201, %186 ], [ %183, %182 ]
%188 = getelementptr inbounds double, double* %4, i64 %187
%189 = load double, double* %188
%190 = fmul double %189, %7
store double %190, double* %188
%191 = getelementptr inbounds double, double* %5, i64 %187
%192 = load double, double* %191
%193 = fmul double %192, %7
store double %193, double* %191
%194 = add nuw nsw i64 %187, 1
%195 = getelementptr inbounds double, double* %4, i64 %194
%196 = load double, double* %195
%197 = fmul double %196, %7
store double %197, double* %195
%198 = getelementptr inbounds double, double* %5, i64 %194
%199 = load double, double* %198
%200 = fmul double %199, %7
store double %200, double* %198
%201 = add nuw nsw i64 %187, 2
%202 = icmp eq i64 %201, %75
br i1 %202, label %207, label %186
203: ; preds = %8
%204 = call i32 @fftshift(double* %13, double* %4, i32 %1)
%205 = call i32 @fftshift(double* %15, double* %5, i32 %1)
%206 = call i32 @ifft(i32 %1, i32 %1, double* %4, double* %5)
br label %207
207: ; preds = %182, %186, %167, %203, %70
%208 = call i32 @free(double* %13)
%209 = call i32 @free(double* %15)
ret void
}