#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 */
int /*<<< orphan*/ gint2_nai_P_cD(double *, double, double *, double, double *,
                                  double *);
void gint2_nai_P_pD(double *a, double a_a, double *b, double b_a, double *c,
                    double *out) {
  double tmp0, tmp1;
  gint2_nai_P_cD(a, a_a, b, b_a, c, out);
  tmp0 = out[2];
  out[2] = out[4];
  tmp1 = out[5] - 0.5 * out[0] - 0.5 * out[3];
  out[3] = 0.866025403784439 * out[0] - 0.866025403784439 * out[3];
  out[0] = tmp1;
  out[4] = out[1];
  out[1] = tmp0;
  out[5] = out[11] - 0.5 * out[6] - 0.5 * out[9];
  tmp1 = out[8];
  out[8] = 0.866025403784439 * out[6] - 0.866025403784439 * out[9];
  out[6] = tmp1;
  out[9] = out[7];
  out[7] = out[10];
  out[10] = out[17] - 0.5 * out[12] - 0.5 * out[15];
  out[11] = out[14];
  tmp0 = 0.866025403784439 * out[12] - 0.866025403784439 * out[15];
  out[12] = out[16];
  out[14] = out[13];
  out[13] = tmp0;
}


x86 assembly (clang, -O0):
<gint2_nai_P_pD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rsi
movsd  -0x20(%rbp),%xmm1
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1030 <gint2_nai_P_cD@plt>
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x30(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0xe7e(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x30(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  0xe65(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0xe3c(%rip),%xmm1
mulsd  0x18(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe18(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x30(%rbp),%rax
movsd  0x58(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x30(%rax),%xmm1
movsd  0xdc8(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x30(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  0xdaf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x30(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0xd73(%rip),%xmm1
mulsd  0x48(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xd4f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x30(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x30(%rbp),%rax
movsd  0x50(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x30(%rbp),%rax
movsd  0x88(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x60(%rax),%xmm1
movsd  0xcf7(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x30(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  0xcde(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x30(%rbp),%rax
movsd  0x70(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x30(%rbp),%rax
movsd  0x60(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0xc9e(%rip),%xmm1
mulsd  0x78(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xc7a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x80(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x60(%rax)
mov    -0x30(%rbp),%rax
movsd  0x68(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x70(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x68(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint2_nai_P_pD>:
push   %rbx
mov    %rcx,%rbx
call   1030 <gint2_nai_P_cD@plt>
movsd  0x10(%rbx),%xmm3
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x10(%rbx)
movsd  (%rbx),%xmm4
movsd  0x8(%rbx),%xmm5
movsd  0xec7(%rip),%xmm0
movapd %xmm4,%xmm1
mulsd  %xmm0,%xmm1
addsd  0x28(%rbx),%xmm1
movsd  0x18(%rbx),%xmm6
movapd %xmm6,%xmm7
mulsd  %xmm0,%xmm7
addsd  %xmm1,%xmm7
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm6
movsd  0xea5(%rip),%xmm2
mulsd  %xmm2,%xmm4
addsd  %xmm6,%xmm4
movsd  %xmm4,0x18(%rbx)
movsd  %xmm7,(%rbx)
movsd  %xmm5,0x20(%rbx)
movsd  %xmm3,0x8(%rbx)
movsd  0x30(%rbx),%xmm3
movapd %xmm3,%xmm4
mulsd  %xmm0,%xmm4
addsd  0x58(%rbx),%xmm4
movsd  0x48(%rbx),%xmm5
movapd %xmm5,%xmm6
mulsd  %xmm0,%xmm6
addsd  %xmm4,%xmm6
movsd  %xmm6,0x28(%rbx)
movsd  0x40(%rbx),%xmm4
mulsd  %xmm1,%xmm5
mulsd  %xmm2,%xmm3
addsd  %xmm5,%xmm3
movsd  %xmm3,0x40(%rbx)
movsd  %xmm4,0x30(%rbx)
movsd  0x38(%rbx),%xmm3
movsd  %xmm3,0x48(%rbx)
movsd  0x50(%rbx),%xmm3
movsd  %xmm3,0x38(%rbx)
movsd  0x60(%rbx),%xmm3
movsd  0x78(%rbx),%xmm4
movapd %xmm3,%xmm5
mulsd  %xmm0,%xmm5
addsd  0x88(%rbx),%xmm5
mulsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
movsd  %xmm0,0x50(%rbx)
movsd  0x70(%rbx),%xmm0
movsd  %xmm0,0x58(%rbx)
mulsd  %xmm1,%xmm4
mulsd  %xmm2,%xmm3
addsd  %xmm4,%xmm3
movsd  0x80(%rbx),%xmm0
movsd  %xmm0,0x60(%rbx)
movsd  0x68(%rbx),%xmm0
movsd  %xmm0,0x70(%rbx)
movsd  %xmm3,0x68(%rbx)
pop    %rbx
ret

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

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