#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 */
double exp(double);
double floor(double);
double get_del(double x, double rational) {
  double xsq = 0.0;
  double del = 0.0;
  double result = 0.0;
  xsq = floor(x * (16.0)) / (16.0);
  del = (x - xsq) * (x + xsq);
  del *= 0.5;
  result = exp(-0.5 * xsq * xsq) * exp(-1.0 * del) * rational;
  return result;
}


x86 assembly (clang, -O0):
<get_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xec6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movsd  0xeb4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe7e(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe64(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xe40(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_del>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  0xec5(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <floor@plt>
mulsd  0xebc(%rip),%xmm0
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm2
addsd  %xmm2,%xmm1
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
movapd %xmm0,%xmm1
mulsd  0xe9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xe82(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @get_del(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
%8 = load double, double* %3
%9 = fmul double %8, 1.600000e+01
%10 = call double @llvm.floor.f64(double %9)
%11 = fdiv double %10, 1.600000e+01
store double %11, double* %5
%12 = load double, double* %3
%13 = load double, double* %5
%14 = fsub double %12, %13
%15 = load double, double* %3
%16 = load double, double* %5
%17 = fadd double %15, %16
%18 = fmul double %14, %17
store double %18, double* %6
%19 = load double, double* %6
%20 = fmul double %19, 5.000000e-01
store double %20, double* %6
%21 = load double, double* %5
%22 = fmul double -5.000000e-01, %21
%23 = load double, double* %5
%24 = fmul double %22, %23
%25 = call double @exp(double %24)
%26 = load double, double* %6
%27 = fmul double -1.000000e+00, %26
%28 = call double @exp(double %27)
%29 = fmul double %25, %28
%30 = load double, double* %4
%31 = fmul double %29, %30
store double %31, double* %7
%32 = load double, double* %7
ret double %32
}

LLVM IR (-O2):
define double @get_del(double %0, double %1) {
%3 = fmul double %0, 1.600000e+01
%4 = tail call double @llvm.floor.f64(double %3)
%5 = fmul double %4, 6.250000e-02
%6 = fsub double %0, %5
%7 = fadd double %5, %0
%8 = fmul double %6, %7
%9 = fmul double %5, -5.000000e-01
%10 = fmul double %5, %9
%11 = tail call double @exp(double %10)
%12 = fmul double %8, -5.000000e-01
%13 = tail call double @exp(double %12)
%14 = fmul double %11, %13
%15 = fmul double %14, %1
ret double %15
}