#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__ M_PI;
float cosf(float);
float exact_blackman(float n, float N, float a) {
  (void)a;
  return 7938.0f / 18608.0f -
         9240.0f / 18608.0f * cosf(2.0f * (float)M_PI * n / (N - 1.0f)) +
         1430.0f / 18608.0f * cosf(4.0f * (float)M_PI * n / (N - 1.0f));
}


x86 assembly (clang, -O0):
<exact_blackman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    0x2eba(%rip),%rax
cvtsi2ssq (%rax),%xmm1
movss  0xed9(%rip),%xmm0
mulss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xeb3(%rip),%xmm2
subss  %xmm2,%xmm1
divss  %xmm1,%xmm0
call   1030 <cosf@plt>
movss  0xea6(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe9e(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    0x2e66(%rip),%rax
cvtsi2ssq (%rax),%xmm1
movss  0xe79(%rip),%xmm0
mulss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xe5f(%rip),%xmm2
subss  %xmm2,%xmm1
divss  %xmm1,%xmm0
call   1030 <cosf@plt>
movss  -0x10(%rbp),%xmm1
movss  0xe41(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_blackman>:
push   %rbx
sub    $0x10,%rsp
movaps %xmm0,%xmm2
movss  %xmm0,0xc(%rsp)
mov    0x2ec3(%rip),%rbx
xorps  %xmm0,%xmm0
cvtsi2ssq (%rbx),%xmm0
addss  %xmm0,%xmm0
mulss  %xmm2,%xmm0
addss  0xec3(%rip),%xmm1
movss  %xmm1,0x8(%rsp)
divss  %xmm1,%xmm0
call   1030 <cosf@plt>
mulss  0xeb0(%rip),%xmm0
addss  0xeac(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssq (%rbx),%xmm0
mulss  0xe9a(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
divss  0x8(%rsp),%xmm0
call   1030 <cosf@plt>
mulss  0xe85(%rip),%xmm0
addss  0x4(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global i64 0
define float @exact_blackman(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load i64, i64* @M_PI
%9 = sitofp i64 %8 to float
%10 = fmul float 2.000000e+00, %9
%11 = load float, float* %4
%12 = fmul float %10, %11
%13 = load float, float* %5
%14 = fsub float %13, 1.000000e+00
%15 = fdiv float %12, %14
%16 = call float @cosf(float %15)
%17 = call float @llvm.fmuladd.f32(float 0xBFDFC7A640000000, float %16, float 0x3FDB4D4320000000)
%18 = load i64, i64* @M_PI
%19 = sitofp i64 %18 to float
%20 = fmul float 4.000000e+00, %19
%21 = load float, float* %4
%22 = fmul float %20, %21
%23 = load float, float* %5
%24 = fsub float %23, 1.000000e+00
%25 = fdiv float %22, %24
%26 = call float @cosf(float %25)
%27 = call float @llvm.fmuladd.f32(float 0x3FB3AC5AC0000000, float %26, float %17)
ret float %27
}

LLVM IR (-O2):
@M_PI = global i64 0
define float @exact_blackman(float %0, float %1, float %2) {
%4 = load i64, i64* @M_PI
%5 = sitofp i64 %4 to float
%6 = fmul float %5, 2.000000e+00
%7 = fmul float %6, %0
%8 = fadd float %1, -1.000000e+00
%9 = fdiv float %7, %8
%10 = tail call float @cosf(float %9)
%11 = tail call float @llvm.fmuladd.f32(float %10, float 0xBFDFC7A640000000, float 0x3FDB4D4320000000)
%12 = load i64, i64* @M_PI
%13 = sitofp i64 %12 to float
%14 = fmul float %13, 4.000000e+00
%15 = fmul float %14, %0
%16 = fdiv float %15, %8
%17 = tail call float @cosf(float %16)
%18 = tail call float @llvm.fmuladd.f32(float %17, float 0x3FB3AC5AC0000000, float %11)
ret float %18
}