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


x86 assembly (clang, -O0):
<gint1_fn_SP>:
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
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>
movsd  %xmm0,-0x28(%rbp)
movsd  0xe3c(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe1d(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xde5(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xdbf(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  0xda4(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  0xd89(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint1_fn_SP>:
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%rbx
movapd %xmm0,0x20(%rsp)
movupd (%rsi),%xmm2
movupd (%rdi),%xmm1
subpd  %xmm1,%xmm2
movapd %xmm2,0x30(%rsp)
movsd  0x10(%rsi),%xmm1
subsd  0x10(%rdi),%xmm1
movapd %xmm1,%xmm3
movsd  %xmm1,0x18(%rsp)
movapd 0xea4(%rip),%xmm1
xorpd  %xmm0,%xmm1
movapd %xmm2,%xmm0
mulpd  %xmm2,%xmm0
unpckhpd %xmm0,%xmm0
mulsd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xe79(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xe6f(%rip),%xmm1
movapd 0x20(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0xe5a(%rip),%xmm1
movapd 0x20(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0xe49(%rip),%xmm0
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x30(%rsp),%xmm1
movupd %xmm1,0x8(%rbx)
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rbx)
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @gint1_fn_SP(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 = fneg double %34
%36 = load double, double* %10
%37 = load double, double* %10
%38 = load double, double* %11
%39 = load double, double* %11
%40 = fmul double %38, %39
%41 = call double @llvm.fmuladd.f64(double %36, double %37, double %40)
%42 = load double, double* %12
%43 = load double, double* %12
%44 = call double @llvm.fmuladd.f64(double %42, double %43, double %41)
%45 = fmul double %35, %44
%46 = call double @exp(double %45)
store double %46, double* %9
%47 = load double, double* %9
%48 = fmul double 0x3FE6CE7BB3DB5BFE, %47
%49 = load double, double* %6
%50 = call double @pow(double %49, double 7.500000e-01)
%51 = fmul double %48, %50
%52 = load double*, double** %8
%53 = getelementptr inbounds double, double* %52, i64 0
store double %51, double* %53
%54 = load double, double* %9
%55 = load double, double* %6
%56 = call double @pow(double %55, double 1.250000e+00)
%57 = fmul double %54, %56
store double %57, double* %9
%58 = load double, double* %9
%59 = fmul double 0x3FF6CE7BB3DB5BFE, %58
%60 = load double, double* %10
%61 = fmul double %59, %60
%62 = load double*, double** %8
%63 = getelementptr inbounds double, double* %62, i64 1
store double %61, double* %63
%64 = load double, double* %9
%65 = fmul double 0x3FF6CE7BB3DB5BFE, %64
%66 = load double, double* %11
%67 = fmul double %65, %66
%68 = load double*, double** %8
%69 = getelementptr inbounds double, double* %68, i64 2
store double %67, double* %69
%70 = load double, double* %9
%71 = fmul double 0x3FF6CE7BB3DB5BFE, %70
%72 = load double, double* %12
%73 = fmul double %71, %72
%74 = load double*, double** %8
%75 = getelementptr inbounds double, double* %74, i64 3
store double %73, double* %75
ret void
}

LLVM IR (-O2):
define void @gint1_fn_SP(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 = fneg double %1
%16 = fmul <2 x double> %9, %9
%17 = extractelement <2 x double> %16, i64 1
%18 = extractelement <2 x double> %9, i64 0
%19 = tail call double @llvm.fmuladd.f64(double %18, double %18, double %17)
%20 = tail call double @llvm.fmuladd.f64(double %14, double %14, double %19)
%21 = fmul double %20, %15
%22 = tail call double @exp(double %21)
%23 = fmul double %22, 0x3FE6CE7BB3DB5BFE
%24 = tail call double @pow(double %1, double 7.500000e-01)
%25 = fmul double %23, %24
store double %25, double* %3
%26 = tail call double @pow(double %1, double 1.250000e+00)
%27 = fmul double %22, %26
%28 = fmul double %27, 0x3FF6CE7BB3DB5BFE
%29 = getelementptr inbounds double, double* %3, i64 1
%30 = insertelement <2 x double> poison, double %28, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = fmul <2 x double> %9, %31
%33 = bitcast double* %29 to <2 x double>*
store <2 x double> %32, <2 x double>* %33
%34 = fmul double %14, %28
%35 = getelementptr inbounds double, double* %3, i64 3
store double %34, double* %35
ret void
}