#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 i0f(float);
scalar_t__ powf(float, float);
float sqrtf(scalar_t__);
float kaiser(float n, float N, float a) {
  return i0f((float)M_PI * a *
             sqrtf(1.0f - powf((2.0f * n) / (N - 1.0f) - 1.0f, 2.0f))) /
         i0f((float)M_PI * a);
}


x86 assembly (clang, -O0):
<kaiser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
cvtsi2ssq (%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe9f(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xe89(%rip),%xmm2
subss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  0xe79(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe71(%rip),%xmm1
call   1030 <powf@plt>
cvtsi2ss %rax,%xmm1
movss  0xe5b(%rip),%xmm0
subss  %xmm1,%xmm0
cvttss2si %xmm0,%rdi
call   1040 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1050 <i0f@plt>
movss  %xmm0,-0x10(%rbp)
mov    0x2e18(%rip),%rax
cvtsi2ssq (%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
call   1050 <i0f@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kaiser>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eac(%rip),%rbx
cvtsi2ssq (%rbx),%xmm3
movss  %xmm2,0xc(%rsp)
mulss  %xmm2,%xmm3
movss  %xmm3,0x8(%rsp)
addss  %xmm0,%xmm0
movss  0xea3(%rip),%xmm2
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
addss  %xmm2,%xmm0
movss  0xe93(%rip),%xmm1
call   1030 <powf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  0xe82(%rip),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%rdi
call   1040 <sqrtf@plt>
mulss  0x8(%rsp),%xmm0
call   1050 <i0f@plt>
movss  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssq (%rbx),%xmm0
mulss  0xc(%rsp),%xmm0
call   1050 <i0f@plt>
movss  0x8(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global i64 0
define float @kaiser(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 i64, i64* @M_PI
%8 = sitofp i64 %7 to float
%9 = load float, float* %6
%10 = fmul float %8, %9
%11 = load float, float* %4
%12 = fmul float 2.000000e+00, %11
%13 = load float, float* %5
%14 = fsub float %13, 1.000000e+00
%15 = fdiv float %12, %14
%16 = fsub float %15, 1.000000e+00
%17 = call i64 @powf(float %16, float 2.000000e+00)
%18 = sitofp i64 %17 to float
%19 = fsub float 1.000000e+00, %18
%20 = fptosi float %19 to i64
%21 = call float @sqrtf(i64 %20)
%22 = fmul float %10, %21
%23 = call float @i0f(float %22)
%24 = load i64, i64* @M_PI
%25 = sitofp i64 %24 to float
%26 = load float, float* %6
%27 = fmul float %25, %26
%28 = call float @i0f(float %27)
%29 = fdiv float %23, %28
ret float %29
}

LLVM IR (-O2):
@M_PI = global i64 0
define float @kaiser(float %0, float %1, float %2) {
%4 = load i64, i64* @M_PI
%5 = sitofp i64 %4 to float
%6 = fmul float %5, %2
%7 = fmul float %0, 2.000000e+00
%8 = fadd float %1, -1.000000e+00
%9 = fdiv float %7, %8
%10 = fadd float %9, -1.000000e+00
%11 = tail call i64 @powf(float %10, float 2.000000e+00)
%12 = sitofp i64 %11 to float
%13 = fsub float 1.000000e+00, %12
%14 = fptosi float %13 to i64
%15 = tail call float @sqrtf(i64 %14)
%16 = fmul float %6, %15
%17 = tail call float @i0f(float %16)
%18 = load i64, i64* @M_PI
%19 = sitofp i64 %18 to float
%20 = fmul float %19, %2
%21 = tail call float @i0f(float %20)
%22 = fdiv float %17, %21
ret float %22
}