#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(int);
double bp_sw_EVDDensity(float x, float mu, float lambda) {
  return (lambda * exp(-1. * lambda * (x - mu) - exp(-1. * lambda * (x - mu))));
}


x86 assembly (clang, -O0):
<bp_sw_EVDDensity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xebe(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  -0x20(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
cvtss2sd %xmm1,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bp_sw_EVDDensity>:
sub    $0x18,%rsp
movss  %xmm2,0xc(%rsp)
cvtss2sd %xmm2,%xmm3
xorps  0xedb(%rip),%xmm3
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x10(%rsp)
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
cvtss2sd %xmm0,%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <exp@plt>
mulss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @bp_sw_EVDDensity(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 float, float* %6
%9 = fpext float %8 to double
%10 = fmul double -1.000000e+00, %9
%11 = load float, float* %4
%12 = load float, float* %5
%13 = fsub float %11, %12
%14 = fpext float %13 to double
%15 = load float, float* %6
%16 = fpext float %15 to double
%17 = fmul double -1.000000e+00, %16
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fsub float %18, %19
%21 = fpext float %20 to double
%22 = fmul double %17, %21
%23 = fptosi double %22 to i32
%24 = call float @exp(i32 %23)
%25 = fpext float %24 to double
%26 = fneg double %25
%27 = call double @llvm.fmuladd.f64(double %10, double %14, double %26)
%28 = fptosi double %27 to i32
%29 = call float @exp(i32 %28)
%30 = fmul float %7, %29
%31 = fpext float %30 to double
ret double %31
}

LLVM IR (-O2):
define double @bp_sw_EVDDensity(float %0, float %1, float %2) {
%4 = fpext float %2 to double
%5 = fneg double %4
%6 = fsub float %0, %1
%7 = fpext float %6 to double
%8 = fmul double %5, %7
%9 = fptosi double %8 to i32
%10 = tail call float @exp(i32 %9)
%11 = fpext float %10 to double
%12 = fneg double %11
%13 = tail call double @llvm.fmuladd.f64(double %5, double %7, double %12)
%14 = fptosi double %13 to i32
%15 = tail call float @exp(i32 %14)
%16 = fmul float %15, %2
%17 = fpext float %16 to double
ret double %17
}