#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 atan(float);
double expf(float);
float sqrtf(double);
float Source_Ricker(float t, float fc) {
  static float r, alpha, aux;
  static float pi;
  pi = 4.0f * atan(1.0f);
  alpha = sqrtf(.5) * pi * fc;
  aux = (t * alpha) * (t * alpha);
  r = (1.0 - 2.0 * aux) * expf(-aux);
  return r;
}


x86 assembly (clang, -O0):
<Source_Ricker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xeca(%rip),%xmm0
call   1040 <atan@plt>
movaps %xmm0,%xmm1
movss  0xeb6(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,0x2ee2(%rip)
movsd  0xe9a(%rip),%xmm0
call   1050 <sqrtf@plt>
mulss  0x2ecd(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,0x2eb8(%rip)
movss  -0x4(%rbp),%xmm0
mulss  0x2eab(%rip),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  0x2e9e(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,0x2e96(%rip)
movss  0x2e8e(%rip),%xmm0
cvtss2sd %xmm0,%xmm1
addsd  %xmm1,%xmm1
movsd  0xe3a(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  0x2e6d(%rip),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <expf@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2e3b(%rip)
movss  0x2e33(%rip),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Source_Ricker>:
sub    $0x18,%rsp
movss  %xmm1,0x14(%rsp)
movss  %xmm0,0x8(%rsp)
movss  0xeb8(%rip),%xmm0
call   1040 <atan@plt>
movl   $0x40490fdb,0x2ee5(%rip)
0f 49 40
movsd  0xea9(%rip),%xmm0
call   1050 <sqrtf@plt>
mulss  0x2ed0(%rip),%xmm0
mulss  0x14(%rsp),%xmm0
mulss  0x8(%rsp),%xmm0
mulss  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
addsd  %xmm1,%xmm1
movsd  0xe81(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
xorps  0xe80(%rip),%xmm0
call   1030 <expf@plt>
mulsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@Source_Ricker.r = internal global float 0.000000e+00
@Source_Ricker.alpha = internal global float 0.000000e+00
@Source_Ricker.aux = internal global float 0.000000e+00
@Source_Ricker.pi = internal global float 0.000000e+00
define float @Source_Ricker(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float @atan(float 1.000000e+00)
%6 = fmul float 4.000000e+00, %5
store float %6, float* @Source_Ricker.pi
%7 = call float @sqrtf(double 5.000000e-01)
%8 = load float, float* @Source_Ricker.pi
%9 = fmul float %7, %8
%10 = load float, float* %4
%11 = fmul float %9, %10
store float %11, float* @Source_Ricker.alpha
%12 = load float, float* %3
%13 = load float, float* @Source_Ricker.alpha
%14 = fmul float %12, %13
%15 = load float, float* %3
%16 = load float, float* @Source_Ricker.alpha
%17 = fmul float %15, %16
%18 = fmul float %14, %17
store float %18, float* @Source_Ricker.aux
%19 = load float, float* @Source_Ricker.aux
%20 = fpext float %19 to double
%21 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %20, double 1.000000e+00)
%22 = load float, float* @Source_Ricker.aux
%23 = fneg float %22
%24 = call double @expf(float %23)
%25 = fmul double %21, %24
%26 = fptrunc double %25 to float
store float %26, float* @Source_Ricker.r
%27 = load float, float* @Source_Ricker.r
ret float %27
}

LLVM IR (-O2):
@Source_Ricker.pi = internal unnamed_addr global float 0.000000e+00
define float @Source_Ricker(float %0, float %1) {
%3 = tail call float @atan(float 1.000000e+00)
store float 0x400921FB60000000, float* @Source_Ricker.pi
%4 = tail call float @sqrtf(double 5.000000e-01)
%5 = load float, float* @Source_Ricker.pi
%6 = fmul float %4, %5
%7 = fmul float %6, %1
%8 = fmul float %7, %0
%9 = fmul float %8, %8
%10 = fpext float %9 to double
%11 = tail call double @llvm.fmuladd.f64(double %10, double -2.000000e+00, double 1.000000e+00)
%12 = fneg float %9
%13 = tail call double @expf(float %12)
%14 = fmul double %13, %11
%15 = fptrunc double %14 to float
ret float %15
}