#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 const expf(float const);
float filter_norm(float k, float r, float w) {
  const float a = 1.f / (2.f * 3.14159265358979323846264338327 * r * r);
  const float b = -1.f / (2.f * r * r);
  return a * expf(b * k * k);
}


x86 assembly (clang, -O0):
<filter_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed8(%rip),%xmm1
mulsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xeb7(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe9e(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe88(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <expf@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_norm>:
push   %rax
cvtss2sd %xmm1,%xmm2
movsd  0xee3(%rip),%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm3
movsd  0xedb(%rip),%xmm2
divsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
movss  %xmm2,0x4(%rsp)
movaps %xmm1,%xmm2
addss  %xmm1,%xmm2
mulss  %xmm1,%xmm2
movss  0xec2(%rip),%xmm1
divss  %xmm2,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
call   1030 <expf@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @filter_norm(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = fmul double 0x401921FB54442D18, %10
%12 = load float, float* %5
%13 = fpext float %12 to double
%14 = fmul double %11, %13
%15 = fdiv double 1.000000e+00, %14
%16 = fptrunc double %15 to float
store float %16, float* %7
%17 = load float, float* %5
%18 = fmul float 2.000000e+00, %17
%19 = load float, float* %5
%20 = fmul float %18, %19
%21 = fdiv float -1.000000e+00, %20
store float %21, float* %8
%22 = load float, float* %7
%23 = load float, float* %8
%24 = load float, float* %4
%25 = fmul float %23, %24
%26 = load float, float* %4
%27 = fmul float %25, %26
%28 = call float @expf(float %27)
%29 = fmul float %22, %28
ret float %29
}

LLVM IR (-O2):
define float @filter_norm(float %0, float %1, float %2) {
%4 = fpext float %1 to double
%5 = fmul double %4, 0x401921FB54442D18
%6 = fmul double %5, %4
%7 = fdiv double 1.000000e+00, %6
%8 = fptrunc double %7 to float
%9 = fmul float %1, 2.000000e+00
%10 = fmul float %9, %1
%11 = fdiv float -1.000000e+00, %10
%12 = fmul float %11, %0
%13 = fmul float %12, %0
%14 = tail call float @expf(float %13)
%15 = fmul float %14, %8
ret float %15
}