#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 gaux(double, int /*<<< orphan*/);
double pow(double, double);
void gint2_nai_S_S(double *a, double a_a, double *b, double b_a, double *c,
                   double *out) {
  double ab_a, d_0, d_1, d_2, u_0, u_1, u_2;
  ab_a = a_a + b_a;
  d_0 = a[0] - b[0];
  d_1 = a[1] - b[1];
  d_2 = a[2] - b[2];
  u_0 = -c[0] + (a[0] * a_a + b[0] * b_a) / ab_a;
  u_1 = -c[1] + (a[1] * a_a + b[1] * b_a) / ab_a;
  u_2 = -c[2] + (a[2] * a_a + b[2] * b_a) / ab_a;
  out[0] = 3.19153824321146 * pow(a_a, 0.75) * pow(b_a, 0.75) *
           exp(-a_a * b_a * (d_0 * d_0 + d_1 * d_1 + d_2 * d_2) / ab_a) *
           gaux(ab_a * (u_0 * u_0 + u_1 * u_1 + u_2 * u_2), 0) / ab_a;
}


x86 assembly (clang, -O0):
<gint2_nai_S_S>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x10(%rbp),%xmm3
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  -0x20(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x10(%rbp),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
mulsd  -0x20(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x10(%rbp),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  -0x20(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xd59(%rip),%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd51(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd33(%rip),%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x50(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x38(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
movsd  -0x60(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x68(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
xor    %edi,%edi
call   1030 <gaux@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint2_nai_S_S>:
push   %rbx
sub    $0x60,%rsp
mov    %rcx,%rbx
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,%xmm8
movsd  (%rdi),%xmm4
movsd  0x8(%rdi),%xmm6
movsd  (%rsi),%xmm3
movsd  0x8(%rsi),%xmm7
movapd %xmm4,%xmm2
subsd  %xmm3,%xmm2
movsd  %xmm2,0x40(%rsp)
movapd %xmm6,%xmm2
subsd  %xmm7,%xmm2
movsd  %xmm2,0x30(%rsp)
movsd  0x10(%rdi),%xmm9
movsd  0x10(%rsi),%xmm2
movapd %xmm9,%xmm5
subsd  %xmm2,%xmm5
movsd  %xmm5,0x38(%rsp)
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movapd %xmm8,0x10(%rsp)
divsd  %xmm8,%xmm4
subsd  (%rdx),%xmm4
movsd  %xmm4,0x48(%rsp)
movsd  %xmm1,(%rsp)
mulsd  %xmm1,%xmm7
mulsd  %xmm0,%xmm6
addsd  %xmm7,%xmm6
divsd  %xmm8,%xmm6
subsd  0x8(%rdx),%xmm6
movsd  %xmm6,0x28(%rsp)
mulsd  %xmm1,%xmm2
movapd %xmm0,0x50(%rsp)
mulsd  %xmm0,%xmm9
addsd  %xmm2,%xmm9
divsd  %xmm8,%xmm9
subsd  0x10(%rdx),%xmm9
movsd  %xmm9,0x20(%rsp)
movsd  0xe02(%rip),%xmm1
call   1050 <pow@plt>
mulsd  0xdfd(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
movsd  0xde2(%rip),%xmm1
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x50(%rsp),%xmm0
xorpd  0xdd3(%rip),%xmm0
mulsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm2
mulsd  %xmm2,%xmm2
movsd  0x40(%rsp),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0x38(%rsp),%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
divsd  0x10(%rsp),%xmm2
movapd %xmm2,%xmm0
call   1040 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x28(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  0x48(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
xor    %edi,%edi
call   1030 <gaux@plt>
mulsd  (%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @gint2_nai_S_S(double* %0, double %1, double* %2, double %3, double* %4, double* %5) {
%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
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double* %0, double** %7
store double %1, double* %8
store double* %2, double** %9
store double %3, double* %10
store double* %4, double** %11
store double* %5, double** %12
%20 = load double, double* %8
%21 = load double, double* %10
%22 = fadd double %20, %21
store double %22, double* %13
%23 = load double*, double** %7
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
%26 = load double*, double** %9
%27 = getelementptr inbounds double, double* %26, i64 0
%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 1
%32 = load double, double* %31
%33 = load double*, double** %9
%34 = getelementptr inbounds double, double* %33, i64 1
%35 = load double, double* %34
%36 = fsub double %32, %35
store double %36, double* %15
%37 = load double*, double** %7
%38 = getelementptr inbounds double, double* %37, i64 2
%39 = load double, double* %38
%40 = load double*, double** %9
%41 = getelementptr inbounds double, double* %40, i64 2
%42 = load double, double* %41
%43 = fsub double %39, %42
store double %43, double* %16
%44 = load double*, double** %11
%45 = getelementptr inbounds double, double* %44, i64 0
%46 = load double, double* %45
%47 = fneg double %46
%48 = load double*, double** %7
%49 = getelementptr inbounds double, double* %48, i64 0
%50 = load double, double* %49
%51 = load double, double* %8
%52 = load double*, double** %9
%53 = getelementptr inbounds double, double* %52, i64 0
%54 = load double, double* %53
%55 = load double, double* %10
%56 = fmul double %54, %55
%57 = call double @llvm.fmuladd.f64(double %50, double %51, double %56)
%58 = load double, double* %13
%59 = fdiv double %57, %58
%60 = fadd double %47, %59
store double %60, double* %17
%61 = load double*, double** %11
%62 = getelementptr inbounds double, double* %61, i64 1
%63 = load double, double* %62
%64 = fneg double %63
%65 = load double*, double** %7
%66 = getelementptr inbounds double, double* %65, i64 1
%67 = load double, double* %66
%68 = load double, double* %8
%69 = load double*, double** %9
%70 = getelementptr inbounds double, double* %69, i64 1
%71 = load double, double* %70
%72 = load double, double* %10
%73 = fmul double %71, %72
%74 = call double @llvm.fmuladd.f64(double %67, double %68, double %73)
%75 = load double, double* %13
%76 = fdiv double %74, %75
%77 = fadd double %64, %76
store double %77, double* %18
%78 = load double*, double** %11
%79 = getelementptr inbounds double, double* %78, i64 2
%80 = load double, double* %79
%81 = fneg double %80
%82 = load double*, double** %7
%83 = getelementptr inbounds double, double* %82, i64 2
%84 = load double, double* %83
%85 = load double, double* %8
%86 = load double*, double** %9
%87 = getelementptr inbounds double, double* %86, i64 2
%88 = load double, double* %87
%89 = load double, double* %10
%90 = fmul double %88, %89
%91 = call double @llvm.fmuladd.f64(double %84, double %85, double %90)
%92 = load double, double* %13
%93 = fdiv double %91, %92
%94 = fadd double %81, %93
store double %94, double* %19
%95 = load double, double* %8
%96 = call double @pow(double %95, double 7.500000e-01)
%97 = fmul double 0x4009884533D4364D, %96
%98 = load double, double* %10
%99 = call double @pow(double %98, double 7.500000e-01)
%100 = fmul double %97, %99
%101 = load double, double* %8
%102 = fneg double %101
%103 = load double, double* %10
%104 = fmul double %102, %103
%105 = load double, double* %14
%106 = load double, double* %14
%107 = load double, double* %15
%108 = load double, double* %15
%109 = fmul double %107, %108
%110 = call double @llvm.fmuladd.f64(double %105, double %106, double %109)
%111 = load double, double* %16
%112 = load double, double* %16
%113 = call double @llvm.fmuladd.f64(double %111, double %112, double %110)
%114 = fmul double %104, %113
%115 = load double, double* %13
%116 = fdiv double %114, %115
%117 = call double @exp(double %116)
%118 = fmul double %100, %117
%119 = load double, double* %13
%120 = load double, double* %17
%121 = load double, double* %17
%122 = load double, double* %18
%123 = load double, double* %18
%124 = fmul double %122, %123
%125 = call double @llvm.fmuladd.f64(double %120, double %121, double %124)
%126 = load double, double* %19
%127 = load double, double* %19
%128 = call double @llvm.fmuladd.f64(double %126, double %127, double %125)
%129 = fmul double %119, %128
%130 = call double @gaux(double %129, i32 0)
%131 = fmul double %118, %130
%132 = load double, double* %13
%133 = fdiv double %131, %132
%134 = load double*, double** %12
%135 = getelementptr inbounds double, double* %134, i64 0
store double %133, double* %135
ret void
}

LLVM IR (-O2):
define void @gint2_nai_S_S(double* nocapture %0, double %1, double* nocapture %2, double %3, double* nocapture %4, double* nocapture writeonly %5) {
%7 = fadd double %1, %3
%8 = load double, double* %0
%9 = load double, double* %2
%10 = fsub double %8, %9
%11 = getelementptr inbounds double, double* %0, i64 1
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %2, i64 1
%14 = load double, double* %13
%15 = fsub double %12, %14
%16 = getelementptr inbounds double, double* %0, i64 2
%17 = load double, double* %16
%18 = getelementptr inbounds double, double* %2, i64 2
%19 = load double, double* %18
%20 = fsub double %17, %19
%21 = load double, double* %4
%22 = fmul double %9, %3
%23 = tail call double @llvm.fmuladd.f64(double %8, double %1, double %22)
%24 = fdiv double %23, %7
%25 = fsub double %24, %21
%26 = getelementptr inbounds double, double* %4, i64 1
%27 = load double, double* %26
%28 = fmul double %14, %3
%29 = tail call double @llvm.fmuladd.f64(double %12, double %1, double %28)
%30 = fdiv double %29, %7
%31 = fsub double %30, %27
%32 = getelementptr inbounds double, double* %4, i64 2
%33 = load double, double* %32
%34 = fmul double %19, %3
%35 = tail call double @llvm.fmuladd.f64(double %17, double %1, double %34)
%36 = fdiv double %35, %7
%37 = fsub double %36, %33
%38 = tail call double @pow(double %1, double 7.500000e-01)
%39 = fmul double %38, 0x4009884533D4364D
%40 = tail call double @pow(double %3, double 7.500000e-01)
%41 = fmul double %39, %40
%42 = fneg double %1
%43 = fmul double %42, %3
%44 = fmul double %15, %15
%45 = tail call double @llvm.fmuladd.f64(double %10, double %10, double %44)
%46 = tail call double @llvm.fmuladd.f64(double %20, double %20, double %45)
%47 = fmul double %43, %46
%48 = fdiv double %47, %7
%49 = tail call double @exp(double %48)
%50 = fmul double %41, %49
%51 = fmul double %31, %31
%52 = tail call double @llvm.fmuladd.f64(double %25, double %25, double %51)
%53 = tail call double @llvm.fmuladd.f64(double %37, double %37, double %52)
%54 = fmul double %7, %53
%55 = tail call double @gaux(double %54, i32 0)
%56 = fmul double %50, %55
%57 = fdiv double %56, %7
store double %57, double* %5
ret void
}