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


x86 assembly (clang, -O0):
<gint1_fn_P>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe7f(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe01(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xde7(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  0xdcc(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint1_fn_P>:
push   %rbx
sub    $0x30,%rsp
mov    %rdx,%rbx
movaps %xmm0,0x10(%rsp)
movupd (%rsi),%xmm2
movupd (%rdi),%xmm1
subpd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
movsd  0x10(%rsi),%xmm1
subsd  0x10(%rdi),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xea9(%rip),%xmm1
call   1040 <pow@plt>
movapd 0x10(%rsp),%xmm2
xorpd  0xea6(%rip),%xmm2
movsd  %xmm0,0x10(%rsp)
movapd 0x20(%rsp),%xmm1
movapd %xmm1,%xmm0
mulpd  %xmm1,%xmm0
unpckhpd %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0xe59(%rip),%xmm0
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x20(%rsp),%xmm1
movupd %xmm1,(%rbx)
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rbx)
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @gint1_fn_P(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
%12 = alloca double
store double* %0, double** %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%13 = load double*, double** %7
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = fsub double %15, %18
store double %19, double* %10
%20 = load double*, double** %7
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = load double*, double** %5
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = load double, double* %24
%26 = fsub double %22, %25
store double %26, double* %11
%27 = load double*, double** %7
%28 = getelementptr inbounds double, double* %27, i64 2
%29 = load double, double* %28
%30 = load double*, double** %5
%31 = getelementptr inbounds double, double* %30, i64 2
%32 = load double, double* %31
%33 = fsub double %29, %32
store double %33, double* %12
%34 = load double, double* %6
%35 = call double @pow(double %34, double 1.250000e+00)
%36 = load double, double* %6
%37 = fneg double %36
%38 = load double, double* %10
%39 = load double, double* %10
%40 = load double, double* %11
%41 = load double, double* %11
%42 = fmul double %40, %41
%43 = call double @llvm.fmuladd.f64(double %38, double %39, double %42)
%44 = load double, double* %12
%45 = load double, double* %12
%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
store double %49, double* %9
%50 = load double, double* %9
%51 = fmul double 0x3FF6CE7BB3DB5BFE, %50
%52 = load double, double* %10
%53 = fmul double %51, %52
%54 = load double*, double** %8
%55 = getelementptr inbounds double, double* %54, i64 0
store double %53, double* %55
%56 = load double, double* %9
%57 = fmul double 0x3FF6CE7BB3DB5BFE, %56
%58 = load double, double* %11
%59 = fmul double %57, %58
%60 = load double*, double** %8
%61 = getelementptr inbounds double, double* %60, i64 1
store double %59, double* %61
%62 = load double, double* %9
%63 = fmul double 0x3FF6CE7BB3DB5BFE, %62
%64 = load double, double* %12
%65 = fmul double %63, %64
%66 = load double*, double** %8
%67 = getelementptr inbounds double, double* %66, i64 2
store double %65, double* %67
ret void
}

LLVM IR (-O2):
define void @gint1_fn_P(double* nocapture %0, double %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = bitcast double* %2 to <2 x double>*
%6 = load <2 x double>, <2 x double>* %5
%7 = bitcast double* %0 to <2 x double>*
%8 = load <2 x double>, <2 x double>* %7
%9 = fsub <2 x double> %6, %8
%10 = getelementptr inbounds double, double* %2, i64 2
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %0, i64 2
%13 = load double, double* %12
%14 = fsub double %11, %13
%15 = tail call double @pow(double %1, double 1.250000e+00)
%16 = fneg double %1
%17 = fmul <2 x double> %9, %9
%18 = extractelement <2 x double> %17, i64 1
%19 = extractelement <2 x double> %9, i64 0
%20 = tail call double @llvm.fmuladd.f64(double %19, double %19, double %18)
%21 = tail call double @llvm.fmuladd.f64(double %14, double %14, double %20)
%22 = fmul double %21, %16
%23 = tail call double @exp(double %22)
%24 = fmul double %15, %23
%25 = fmul double %24, 0x3FF6CE7BB3DB5BFE
%26 = insertelement <2 x double> poison, double %25, i64 0
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
%28 = fmul <2 x double> %9, %27
%29 = bitcast double* %3 to <2 x double>*
store <2 x double> %28, <2 x double>* %29
%30 = fmul double %14, %25
%31 = getelementptr inbounds double, double* %3, i64 2
store double %30, double* %31
ret void
}