#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 exp(float);
float sqrt(double);
float gauss1freq(float f, float freq) {
  float value;
  value = f * f / (2.0 * freq * freq);
  value = sqrt(2.0 * exp(1)) * f * exp(-value) / (sqrt(2.0) * freq);
  return value;
}


x86 assembly (clang, -O0):
<gauss1freq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xeaf(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe91(%rip),%xmm0
call   1030 <exp@plt>
cvtss2sd %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movsd  0xe35(%rip),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss1freq>:
sub    $0x28,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
movaps %xmm0,%xmm2
mulss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
cvtss2sd %xmm1,%xmm3
movaps %xmm3,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm2
divsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0xe9e(%rip),%xmm0
call   1040 <sqrt@plt>
mulss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movaps 0x10(%rsp),%xmm0
xorps  0xe91(%rip),%xmm0
call   1030 <exp@plt>
mulss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movsd  0xe70(%rip),%xmm0
call   1040 <sqrt@plt>
mulss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define float @gauss1freq(float %0, float %1) {
%3 = fmul float %0, %0
%4 = fpext float %3 to double
%5 = fpext float %1 to double
%6 = fmul double %5, 2.000000e+00
%7 = fmul double %6, %5
%8 = fdiv double %4, %7
%9 = fptrunc double %8 to float
%10 = tail call float @sqrt(double 0x4015BF0A80000000)
%11 = fmul float %10, %0
%12 = fneg float %9
%13 = tail call float @exp(float %12)
%14 = fmul float %11, %13
%15 = tail call float @sqrt(double 2.000000e+00)
%16 = fmul float %15, %1
%17 = fdiv float %14, %16
ret float %17
}