#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 */
float M_PI;
float i0f(float);
scalar_t__ powf(double, double);
float sqrtf(scalar_t__);
float kaiser(float n, float N, float a) {
  return i0f(M_PI * a * sqrtf(1.0 - powf((2.0 * n) / (N - 1.0) - 1.0, 2.0))) /
         i0f(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
movss  (%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe9b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe7e(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0xe6e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe6a(%rip),%xmm1
call   1030 <powf@plt>
cvtsi2sd %rax,%xmm1
movsd  0xe50(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %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    0x2e0d(%rip),%rax
movss  (%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
movss  %xmm2,0xc(%rsp)
mov    0x2ea6(%rip),%rbx
movss  (%rbx),%xmm3
mulss  %xmm2,%xmm3
movss  %xmm3,0x8(%rsp)
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movsd  0xe9c(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  0xe90(%rip),%xmm1
call   1030 <powf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xe83(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
call   1040 <sqrtf@plt>
mulss  0x8(%rsp),%xmm0
call   1050 <i0f@plt>
movss  %xmm0,0x8(%rsp)
movss  0xc(%rsp),%xmm0
mulss  (%rbx),%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 float 0.000000e+00
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 float, float* @M_PI
%8 = load float, float* %6
%9 = fmul float %7, %8
%10 = load float, float* %4
%11 = fpext float %10 to double
%12 = fmul double 2.000000e+00, %11
%13 = load float, float* %5
%14 = fpext float %13 to double
%15 = fsub double %14, 1.000000e+00
%16 = fdiv double %12, %15
%17 = fsub double %16, 1.000000e+00
%18 = call i64 @powf(double %17, double 2.000000e+00)
%19 = sitofp i64 %18 to double
%20 = fsub double 1.000000e+00, %19
%21 = fptosi double %20 to i64
%22 = call float @sqrtf(i64 %21)
%23 = fmul float %9, %22
%24 = call float @i0f(float %23)
%25 = load float, float* @M_PI
%26 = load float, float* %6
%27 = fmul float %25, %26
%28 = call float @i0f(float %27)
%29 = fdiv float %24, %28
ret float %29
}

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