#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_cD(double *a, double a_a, double *p, double *out) {
  double tmp2, tmp3, tmp4, tmp8, 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 = v_2 * v_2;
  tmp3 = v_1 * v_1;
  tmp4 = v_0 * v_0;
  tmp8 = pow(a_a, 1.75) * exp(-a_a * (tmp2 + tmp3 + tmp4));
  out[0] = 1.64592278064949 * tmp4 * tmp8;
  out[1] = 2.85082188141996 * tmp8 * v_0 * v_1;
  v_2 = tmp8 * v_2;
  out[2] = 2.85082188141996 * v_0 * v_2;
  out[3] = 1.64592278064949 * tmp3 * tmp8;
  out[4] = 2.85082188141996 * v_1 * v_2;
  out[5] = 1.64592278064949 * tmp2 * tmp8;
}


x86 assembly (clang, -O0):
<gint1_fn_cD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%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,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe5a(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x28(%rbp),%xmm1
addsd  -0x30(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xdf3(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xde1(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xdb2(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  0xd8f(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  0xd7c(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  0xd59(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x28(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint1_fn_cD>:
push   %rbx
sub    $0x70,%rsp
movsd  (%rsi),%xmm2
movsd  0x8(%rsi),%xmm1
subsd  (%rdi),%xmm2
movapd %xmm2,0x40(%rsp)
subsd  0x8(%rdi),%xmm1
movapd %xmm1,0x60(%rsp)
movsd  0x10(%rsi),%xmm3
subsd  0x10(%rdi),%xmm3
movapd %xmm3,0x50(%rsp)
mov    %rdx,%rbx
movaps %xmm0,0x10(%rsp)
mulsd  %xmm3,%xmm3
movsd  %xmm3,0x8(%rsp)
mulsd  %xmm1,%xmm1
movapd %xmm1,0x30(%rsp)
mulsd  %xmm2,%xmm2
movapd %xmm2,0x20(%rsp)
movsd  0xe7f(%rip),%xmm1
call   1040 <pow@plt>
movapd 0x10(%rsp),%xmm1
xorpd  0xe8c(%rip),%xmm1
movsd  %xmm0,0x10(%rsp)
movapd 0x30(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0xe45(%rip),%xmm1
movapd %xmm0,%xmm2
movsd  0x8(%rsp),%xmm4
mulsd  0xe3b(%rip),%xmm4
movapd 0x50(%rsp),%xmm6
mulsd  %xmm0,%xmm6
movapd %xmm0,%xmm3
mulsd  %xmm0,%xmm4
movapd %xmm4,%xmm5
mulsd  %xmm1,%xmm0
movapd 0x20(%rsp),%xmm7
unpcklpd %xmm0,%xmm7
movapd 0xe2f(%rip),%xmm0
movapd 0x40(%rsp),%xmm4
unpcklpd %xmm4,%xmm0
mulpd  %xmm7,%xmm0
movapd 0x60(%rsp),%xmm7
unpcklpd %xmm7,%xmm2
mulpd  %xmm0,%xmm2
movupd %xmm2,(%rbx)
mulsd  %xmm1,%xmm4
mulsd  %xmm6,%xmm4
movsd  %xmm4,0x10(%rbx)
movapd 0x30(%rsp),%xmm0
unpcklpd %xmm7,%xmm0
mulpd  0xe00(%rip),%xmm0
unpcklpd %xmm6,%xmm3
mulpd  %xmm0,%xmm3
movupd %xmm3,0x18(%rbx)
movsd  %xmm5,0x28(%rbx)
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @gint1_fn_cD(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
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double* %0, double** %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%16 = load double*, double** %7
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 0
%21 = load double, double* %20
%22 = fsub double %18, %21
store double %22, double* %13
%23 = load double*, double** %7
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = load double, double* %24
%26 = load double*, double** %5
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double, double* %27
%29 = fsub double %25, %28
store double %29, double* %14
%30 = load double*, double** %7
%31 = getelementptr inbounds double, double* %30, i64 2
%32 = load double, double* %31
%33 = load double*, double** %5
%34 = getelementptr inbounds double, double* %33, i64 2
%35 = load double, double* %34
%36 = fsub double %32, %35
store double %36, double* %15
%37 = load double, double* %15
%38 = load double, double* %15
%39 = fmul double %37, %38
store double %39, double* %9
%40 = load double, double* %14
%41 = load double, double* %14
%42 = fmul double %40, %41
store double %42, double* %10
%43 = load double, double* %13
%44 = load double, double* %13
%45 = fmul double %43, %44
store double %45, double* %11
%46 = load double, double* %6
%47 = call double @pow(double %46, double 1.750000e+00)
%48 = load double, double* %6
%49 = fneg double %48
%50 = load double, double* %9
%51 = load double, double* %10
%52 = fadd double %50, %51
%53 = load double, double* %11
%54 = fadd double %52, %53
%55 = fmul double %49, %54
%56 = call double @exp(double %55)
%57 = fmul double %47, %56
store double %57, double* %12
%58 = load double, double* %11
%59 = fmul double 0x3FFA55B3202A1856, %58
%60 = load double, double* %12
%61 = fmul double %59, %60
%62 = load double*, double** %8
%63 = getelementptr inbounds double, double* %62, i64 0
store double %61, double* %63
%64 = load double, double* %12
%65 = fmul double 0x4006CE7BB3DB5BFE, %64
%66 = load double, double* %13
%67 = fmul double %65, %66
%68 = load double, double* %14
%69 = fmul double %67, %68
%70 = load double*, double** %8
%71 = getelementptr inbounds double, double* %70, i64 1
store double %69, double* %71
%72 = load double, double* %12
%73 = load double, double* %15
%74 = fmul double %72, %73
store double %74, double* %15
%75 = load double, double* %13
%76 = fmul double 0x4006CE7BB3DB5BFE, %75
%77 = load double, double* %15
%78 = fmul double %76, %77
%79 = load double*, double** %8
%80 = getelementptr inbounds double, double* %79, i64 2
store double %78, double* %80
%81 = load double, double* %10
%82 = fmul double 0x3FFA55B3202A1856, %81
%83 = load double, double* %12
%84 = fmul double %82, %83
%85 = load double*, double** %8
%86 = getelementptr inbounds double, double* %85, i64 3
store double %84, double* %86
%87 = load double, double* %14
%88 = fmul double 0x4006CE7BB3DB5BFE, %87
%89 = load double, double* %15
%90 = fmul double %88, %89
%91 = load double*, double** %8
%92 = getelementptr inbounds double, double* %91, i64 4
store double %90, double* %92
%93 = load double, double* %9
%94 = fmul double 0x3FFA55B3202A1856, %93
%95 = load double, double* %12
%96 = fmul double %94, %95
%97 = load double*, double** %8
%98 = getelementptr inbounds double, double* %97, i64 5
store double %96, double* %98
ret void
}

LLVM IR (-O2):
define void @gint1_fn_cD(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 = fmul double %17, %17
%19 = fmul double %12, %12
%20 = fmul double %7, %7
%21 = tail call double @pow(double %1, double 1.750000e+00)
%22 = fneg double %1
%23 = fadd double %19, %18
%24 = fadd double %20, %23
%25 = fmul double %24, %22
%26 = tail call double @exp(double %25)
%27 = fmul double %21, %26
%28 = fmul double %27, 0x4006CE7BB3DB5BFE
%29 = insertelement <2 x double> poison, double %20, i64 0
%30 = insertelement <2 x double> %29, double %28, i64 1
%31 = insertelement <2 x double> <double 0x3FFA55B3202A1856, double poison>, double %7, i64 1
%32 = fmul <2 x double> %30, %31
%33 = insertelement <2 x double> poison, double %27, i64 0
%34 = insertelement <2 x double> %33, double %12, i64 1
%35 = fmul <2 x double> %32, %34
%36 = bitcast double* %3 to <2 x double>*
store <2 x double> %35, <2 x double>* %36
%37 = fmul double %17, %27
%38 = fmul double %7, 0x4006CE7BB3DB5BFE
%39 = fmul double %38, %37
%40 = getelementptr inbounds double, double* %3, i64 2
store double %39, double* %40
%41 = getelementptr inbounds double, double* %3, i64 3
%42 = insertelement <2 x double> poison, double %19, i64 0
%43 = insertelement <2 x double> %42, double %12, i64 1
%44 = fmul <2 x double> %43, <double 0x3FFA55B3202A1856, double 0x4006CE7BB3DB5BFE>
%45 = insertelement <2 x double> %33, double %37, i64 1
%46 = fmul <2 x double> %44, %45
%47 = bitcast double* %41 to <2 x double>*
store <2 x double> %46, <2 x double>* %47
%48 = fmul double %18, 0x3FFA55B3202A1856
%49 = fmul double %48, %27
%50 = getelementptr inbounds double, double* %3, i64 5
store double %49, double* %50
ret void
}