#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 sqrt(double);
double efp_get_pol_damp_tt_grad(double r, double pa, double pb) {
  double ab = sqrt(pa * pb);
  double r2 = r * r;
  return -2.0 * exp(-ab * r2) * (ab * ab * r2);
}


x86 assembly (clang, -O0):
<efp_get_pol_damp_tt_grad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe75(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efp_get_pol_damp_tt_grad>:
sub    $0x28,%rsp
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm2,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     113e <efp_get_pol_damp_tt_grad+0x1e>
sqrtsd %xmm1,%xmm1
jmp    114b <efp_get_pol_damp_tt_grad+0x2b>
movapd %xmm1,%xmm0
call   1040 <sqrt@plt>
movapd %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm2
mulsd  %xmm2,%xmm2
movsd  %xmm2,0x8(%rsp)
movapd 0xe97(%rip),%xmm0
xorpd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  0xe92(%rip),%xmm0
movapd 0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @efp_get_pol_damp_tt_grad(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = call double @sqrt(double %11)
store double %12, double* %7
%13 = load double, double* %4
%14 = load double, double* %4
%15 = fmul double %13, %14
store double %15, double* %8
%16 = load double, double* %7
%17 = fneg double %16
%18 = load double, double* %8
%19 = fmul double %17, %18
%20 = call double @exp(double %19)
%21 = fmul double -2.000000e+00, %20
%22 = load double, double* %7
%23 = load double, double* %7
%24 = fmul double %22, %23
%25 = load double, double* %8
%26 = fmul double %24, %25
%27 = fmul double %21, %26
ret double %27
}

LLVM IR (-O2):
define double @efp_get_pol_damp_tt_grad(double %0, double %1, double %2) {
%4 = fmul double %1, %2
%5 = tail call double @sqrt(double %4)
%6 = fmul double %0, %0
%7 = fneg double %5
%8 = fmul double %6, %7
%9 = tail call double @exp(double %8)
%10 = fmul double %9, -2.000000e+00
%11 = fmul double %5, %5
%12 = fmul double %6, %11
%13 = fmul double %10, %12
ret double %13
}