#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_SP_P(double *, double, double *, double, double *,
                                  double *);
void gint2_nai_P_SP(double *a, double a_a, double *b, double b_a, double *c,
                    double *out) {
  double tmp;
  gint2_nai_SP_P(b, b_a, a, a_a, c, out);
  tmp = out[1];
  out[1] = out[3];
  out[3] = out[9];
  out[9] = out[5];
  out[5] = out[4];
  out[4] = tmp;
  tmp = out[2];
  out[2] = out[6];
  out[6] = out[7];
  out[7] = out[10];
  out[10] = out[8];
  out[8] = tmp;
}


x86 assembly (clang, -O0):
<gint2_nai_P_SP>:
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    -0x18(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rsi
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1030 <gint2_nai_SP_P@plt>
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x30(%rbp),%rax
movsd  0x48(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x30(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x30(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x30(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x30(%rbp),%rax
movsd  0x50(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x30(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x40(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint2_nai_P_SP>:
push   %rbx
mov    %rcx,%rbx
movaps %xmm0,%xmm2
mov    %rdi,%rax
mov    %rsi,%rdi
movaps %xmm1,%xmm0
mov    %rax,%rsi
movaps %xmm2,%xmm1
call   1030 <gint2_nai_SP_P@plt>
movsd  0x18(%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
movsd  0x10(%rbx),%xmm2
movsd  %xmm0,0x8(%rbx)
movsd  0x48(%rbx),%xmm0
movsd  %xmm0,0x18(%rbx)
movsd  0x28(%rbx),%xmm0
movsd  %xmm0,0x48(%rbx)
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x28(%rbx)
movsd  %xmm1,0x20(%rbx)
movsd  0x30(%rbx),%xmm0
movsd  %xmm0,0x10(%rbx)
movsd  0x38(%rbx),%xmm0
movsd  %xmm0,0x30(%rbx)
movsd  0x50(%rbx),%xmm0
movsd  %xmm0,0x38(%rbx)
movsd  0x40(%rbx),%xmm0
movsd  %xmm0,0x50(%rbx)
movsd  %xmm2,0x40(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @gint2_nai_P_SP(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
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
%14 = load double*, double** %9
%15 = load double, double* %10
%16 = load double*, double** %7
%17 = load double, double* %8
%18 = load double*, double** %11
%19 = load double*, double** %12
%20 = call i32 @gint2_nai_SP_P(double* %14, double %15, double* %16, double %17, double* %18, double* %19)
%21 = load double*, double** %12
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
store double %23, double* %13
%24 = load double*, double** %12
%25 = getelementptr inbounds double, double* %24, i64 3
%26 = load double, double* %25
%27 = load double*, double** %12
%28 = getelementptr inbounds double, double* %27, i64 1
store double %26, double* %28
%29 = load double*, double** %12
%30 = getelementptr inbounds double, double* %29, i64 9
%31 = load double, double* %30
%32 = load double*, double** %12
%33 = getelementptr inbounds double, double* %32, i64 3
store double %31, double* %33
%34 = load double*, double** %12
%35 = getelementptr inbounds double, double* %34, i64 5
%36 = load double, double* %35
%37 = load double*, double** %12
%38 = getelementptr inbounds double, double* %37, i64 9
store double %36, double* %38
%39 = load double*, double** %12
%40 = getelementptr inbounds double, double* %39, i64 4
%41 = load double, double* %40
%42 = load double*, double** %12
%43 = getelementptr inbounds double, double* %42, i64 5
store double %41, double* %43
%44 = load double, double* %13
%45 = load double*, double** %12
%46 = getelementptr inbounds double, double* %45, i64 4
store double %44, double* %46
%47 = load double*, double** %12
%48 = getelementptr inbounds double, double* %47, i64 2
%49 = load double, double* %48
store double %49, double* %13
%50 = load double*, double** %12
%51 = getelementptr inbounds double, double* %50, i64 6
%52 = load double, double* %51
%53 = load double*, double** %12
%54 = getelementptr inbounds double, double* %53, i64 2
store double %52, double* %54
%55 = load double*, double** %12
%56 = getelementptr inbounds double, double* %55, i64 7
%57 = load double, double* %56
%58 = load double*, double** %12
%59 = getelementptr inbounds double, double* %58, i64 6
store double %57, double* %59
%60 = load double*, double** %12
%61 = getelementptr inbounds double, double* %60, i64 10
%62 = load double, double* %61
%63 = load double*, double** %12
%64 = getelementptr inbounds double, double* %63, i64 7
store double %62, double* %64
%65 = load double*, double** %12
%66 = getelementptr inbounds double, double* %65, i64 8
%67 = load double, double* %66
%68 = load double*, double** %12
%69 = getelementptr inbounds double, double* %68, i64 10
store double %67, double* %69
%70 = load double, double* %13
%71 = load double*, double** %12
%72 = getelementptr inbounds double, double* %71, i64 8
store double %70, double* %72
ret void
}

LLVM IR (-O2):
define void @gint2_nai_P_SP(double* %0, double %1, double* %2, double %3, double* %4, double* %5) {
%7 = tail call i32 @gint2_nai_SP_P(double* %2, double %3, double* %0, double %1, double* %4, double* %5)
%8 = getelementptr inbounds double, double* %5, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %5, i64 3
%11 = load double, double* %10
store double %11, double* %8
%12 = getelementptr inbounds double, double* %5, i64 9
%13 = load double, double* %12
store double %13, double* %10
%14 = getelementptr inbounds double, double* %5, i64 5
%15 = load double, double* %14
store double %15, double* %12
%16 = getelementptr inbounds double, double* %5, i64 4
%17 = load double, double* %16
store double %17, double* %14
store double %9, double* %16
%18 = getelementptr inbounds double, double* %5, i64 2
%19 = load double, double* %18
%20 = getelementptr inbounds double, double* %5, i64 6
%21 = load double, double* %20
store double %21, double* %18
%22 = getelementptr inbounds double, double* %5, i64 7
%23 = load double, double* %22
store double %23, double* %20
%24 = getelementptr inbounds double, double* %5, i64 10
%25 = load double, double* %24
store double %25, double* %22
%26 = getelementptr inbounds double, double* %5, i64 8
%27 = load double, double* %26
store double %27, double* %24
store double %19, double* %26
ret void
}