#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 pow(double, double);
void gint1_fn_S(double *a, double a_a, double *p, double *out) {
  double v_0, v_1, v_2;
  v_0 = p[0] - a[0];
  v_1 = p[1] - a[1];
  v_2 = p[2] - a[2];
  out[0] = 0.71270547035499 * pow(a_a, 0.75) *
           exp(-a_a * (v_0 * v_0 + v_1 * v_1 + v_2 * v_2));
}


x86 assembly (clang, -O0):
<gint1_fn_S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe7f(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe67(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x38(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint1_fn_S>:
push   %rbx
sub    $0x30,%rsp
movsd  (%rsi),%xmm1
movsd  0x8(%rsi),%xmm2
subsd  (%rdi),%xmm1
movsd  %xmm1,0x10(%rsp)
subsd  0x8(%rdi),%xmm2
movsd  %xmm2,(%rsp)
mov    %rdx,%rbx
movapd %xmm0,0x20(%rsp)
movsd  0x10(%rsi),%xmm1
subsd  0x10(%rdi),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xe9d(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0xe98(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movapd 0x20(%rsp),%xmm2
xorpd  0xe8c(%rip),%xmm2
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @gint1_fn_S(double* %0, double %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double* %0, double** %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%12 = load double*, double** %7
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 0
%17 = load double, double* %16
%18 = fsub double %14, %17
store double %18, double* %9
%19 = load double*, double** %7
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = load double*, double** %5
%23 = getelementptr inbounds double, double* %22, i64 1
%24 = load double, double* %23
%25 = fsub double %21, %24
store double %25, double* %10
%26 = load double*, double** %7
%27 = getelementptr inbounds double, double* %26, i64 2
%28 = load double, double* %27
%29 = load double*, double** %5
%30 = getelementptr inbounds double, double* %29, i64 2
%31 = load double, double* %30
%32 = fsub double %28, %31
store double %32, double* %11
%33 = load double, double* %6
%34 = call double @pow(double %33, double 7.500000e-01)
%35 = fmul double 0x3FE6CE7BB3DB5BFE, %34
%36 = load double, double* %6
%37 = fneg double %36
%38 = load double, double* %9
%39 = load double, double* %9
%40 = load double, double* %10
%41 = load double, double* %10
%42 = fmul double %40, %41
%43 = call double @llvm.fmuladd.f64(double %38, double %39, double %42)
%44 = load double, double* %11
%45 = load double, double* %11
%46 = call double @llvm.fmuladd.f64(double %44, double %45, double %43)
%47 = fmul double %37, %46
%48 = call double @exp(double %47)
%49 = fmul double %35, %48
%50 = load double*, double** %8
%51 = getelementptr inbounds double, double* %50, i64 0
store double %49, double* %51
ret void
}

LLVM IR (-O2):
define void @gint1_fn_S(double* nocapture %0, double %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = load double, double* %2
%6 = load double, double* %0
%7 = fsub double %5, %6
%8 = getelementptr inbounds double, double* %2, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %0, i64 1
%11 = load double, double* %10
%12 = fsub double %9, %11
%13 = getelementptr inbounds double, double* %2, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %0, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = tail call double @pow(double %1, double 7.500000e-01)
%19 = fmul double %18, 0x3FE6CE7BB3DB5BFE
%20 = fneg double %1
%21 = fmul double %12, %12
%22 = tail call double @llvm.fmuladd.f64(double %7, double %7, double %21)
%23 = tail call double @llvm.fmuladd.f64(double %17, double %17, double %22)
%24 = fmul double %23, %20
%25 = tail call double @exp(double %24)
%26 = fmul double %19, %25
store double %26, double* %3
ret void
}