#include "CVector.cuh"



namespace NBody
{

//ds ctor/dtor
//ds default constructor
CVector::CVector( const double& p_dElement0, const double& p_dElement1, const double& p_dElement2 ): m_dElement0( p_dElement0 ),
                                                                                                     m_dElement1( p_dElement1 ),
                                                                                                     m_dElement2( p_dElement2 )
{
    //ds nothing to do
}

//ds default constructor - we need to have this since operator overloading for pointers is not allowed..
CVector::CVector( ): m_dElement0( 0.0 ),
                     m_dElement1( 0.0 ),
                     m_dElement2( 0.0 )
{
    //ds nothing to do
}

//ds default destructor
CVector::~CVector( )
{
    //ds nothing to do
}

//ds operators
//ds r/w indexing - ( ) is used instead of [ ] to mark the difference that this is not a "real" array - CAREFUL this allows manipulation of the data
double& CVector::operator( )( const unsigned int& p_uIndex )
{
    //ds map the index operator to the element
    if     ( 0 == p_uIndex ){ return m_dElement0; }
    else if( 1 == p_uIndex ){ return m_dElement1; }
    else if( 2 == p_uIndex ){ return m_dElement2; }

    //ds if an index greater 2 is required throw an exception
    else
    {
        //ds TODO implement exceptions
        throw std::exception( );
    }
}

//ds readonly indexing - ( ) is used instead of [ ] to mark the difference that this is not a "real" array
double CVector::operator[ ]( const unsigned int& p_uIndex ) const
{
    //ds map the index operator to the element
    if     ( 0 == p_uIndex ){ return m_dElement0; }
    else if( 1 == p_uIndex ){ return m_dElement1; }
    else if( 2 == p_uIndex ){ return m_dElement2; }

    //ds if an index greater 2 is required throw an exception
    else
    {
        //ds TODO implement exceptions
        throw std::exception( );
    }
}

//ds setting
void CVector::operator=( const CVector& p_cRightHandSide )
{
    //ds get all the elements
    m_dElement0 = p_cRightHandSide.m_dElement0;
    m_dElement1 = p_cRightHandSide.m_dElement1;
    m_dElement2 = p_cRightHandSide.m_dElement2;
}

//ds adding and assign
CVector& CVector::operator+=( const CVector& p_cRightHandSide )
{
    //ds add all the elements
    m_dElement0 += p_cRightHandSide.m_dElement0;
    m_dElement1 += p_cRightHandSide.m_dElement1;
    m_dElement2 += p_cRightHandSide.m_dElement2;

    return *this;
}

//ds dividing and assign
CVector& CVector::operator/=( const double& p_dRightHandSide )
{
    //ds add all the elements
    m_dElement0 /= p_dRightHandSide;
    m_dElement1 /= p_dRightHandSide;
    m_dElement2 /= p_dRightHandSide;

    return *this;
}

//ds multiplication and assign
CVector& CVector::operator*=( const double& p_dRightHandSide )
{
    //ds add all the elements
    m_dElement0 *= p_dRightHandSide;
    m_dElement1 *= p_dRightHandSide;
    m_dElement2 *= p_dRightHandSide;

    return *this;
}

//ds dividing
CVector& CVector::operator/( const double& p_dRightHandSide )
{
    //ds add all the elements
    m_dElement0 /= p_dRightHandSide;
    m_dElement1 /= p_dRightHandSide;
    m_dElement2 /= p_dRightHandSide;

    return *this;
}

//ds simple addition
const CVector operator+( const CVector& p_cLeftHandSide, const CVector& p_cRightHandSide )
{
    return CVector( p_cLeftHandSide.m_dElement0 + p_cRightHandSide.m_dElement0,
                    p_cLeftHandSide.m_dElement1 + p_cRightHandSide.m_dElement1,
                    p_cLeftHandSide.m_dElement2 + p_cRightHandSide.m_dElement2 );
}

//ds simple subtraction (needed for distance calculations)
const CVector operator-( const CVector& p_cLeftHandSide, const CVector& p_cRightHandSide )
{
    return CVector( p_cLeftHandSide.m_dElement0 - p_cRightHandSide.m_dElement0,
                    p_cLeftHandSide.m_dElement1 - p_cRightHandSide.m_dElement1,
                    p_cLeftHandSide.m_dElement2 - p_cRightHandSide.m_dElement2 );
}

//ds simple multiplication
const CVector operator*( const double& p_dLeftHandSide, const CVector& p_cRightHandSide )
{
    //ds add all the elements
    return CVector( p_dLeftHandSide*p_cRightHandSide.m_dElement0,
                    p_dLeftHandSide*p_cRightHandSide.m_dElement1,
                    p_dLeftHandSide*p_cRightHandSide.m_dElement2 );
}

//ds printing
std::ostream& operator<<( std::ostream& p_cLeftHandSide, const CVector& p_cRightHandSide )
{
    //ds build the string
    p_cLeftHandSide << "0: " << p_cRightHandSide.m_dElement0 << "\n"
                    << "1: " << p_cRightHandSide.m_dElement1 << "\n"
                    << "2: " << p_cRightHandSide.m_dElement2;

    return p_cLeftHandSide;
}

//ds static functions
double CVector::absoluteValue( const CVector& p_cVector )
{
    return sqrt( pow( p_cVector.m_dElement0, 2 ) + pow( p_cVector.m_dElement1, 2 ) + pow( p_cVector.m_dElement2, 2 ) );
}

double CVector::absoluteValue( const double p_vecVector[3] )
{
    return sqrt( pow( p_vecVector[0], 2 ) + pow( p_vecVector[1], 2 ) + pow( p_vecVector[2], 2 ) );
}

const CVector CVector::crossProduct( const CVector& p_cVector1, const CVector& p_cVector2 )
{
    return CVector( p_cVector1.m_dElement1*p_cVector2.m_dElement2-p_cVector1.m_dElement2*p_cVector2.m_dElement1,
                    p_cVector1.m_dElement2*p_cVector2.m_dElement0-p_cVector1.m_dElement0*p_cVector2.m_dElement2,
                    p_cVector1.m_dElement0*p_cVector2.m_dElement1-p_cVector1.m_dElement1*p_cVector2.m_dElement0 );
}

const CVector CVector::crossProduct( const double p_vecVector1[3], const double p_vecVector2[3] )
{
    return CVector( p_vecVector1[1]*p_vecVector2[2]-p_vecVector1[2]*p_vecVector2[1],
                    p_vecVector1[2]*p_vecVector2[0]-p_vecVector1[0]*p_vecVector2[2],
                    p_vecVector1[0]*p_vecVector2[1]-p_vecVector1[1]*p_vecVector2[0] );
}

} //ds namespace NBody

	.file	"tmpxft_0032dea2_00000000-6_CVector.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3792:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3792:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.globl	_ZN5NBody7CVectorC2ERKdS2_S2_
	.type	_ZN5NBody7CVectorC2ERKdS2_S2_, @function
_ZN5NBody7CVectorC2ERKdS2_S2_:
.LFB3767:
	.cfi_startproc
	endbr64
	movsd	(%rsi), %xmm0
	movsd	%xmm0, (%rdi)
	movsd	(%rdx), %xmm0
	movsd	%xmm0, 8(%rdi)
	movsd	(%rcx), %xmm0
	movsd	%xmm0, 16(%rdi)
	ret
	.cfi_endproc
.LFE3767:
	.size	_ZN5NBody7CVectorC2ERKdS2_S2_, .-_ZN5NBody7CVectorC2ERKdS2_S2_
	.globl	_ZN5NBody7CVectorC1ERKdS2_S2_
	.set	_ZN5NBody7CVectorC1ERKdS2_S2_,_ZN5NBody7CVectorC2ERKdS2_S2_
	.align 2
	.globl	_ZN5NBody7CVectorC2Ev
	.type	_ZN5NBody7CVectorC2Ev, @function
_ZN5NBody7CVectorC2Ev:
.LFB3770:
	.cfi_startproc
	endbr64
	movq	$0x000000000, (%rdi)
	movq	$0x000000000, 8(%rdi)
	movq	$0x000000000, 16(%rdi)
	ret
	.cfi_endproc
.LFE3770:
	.size	_ZN5NBody7CVectorC2Ev, .-_ZN5NBody7CVectorC2Ev
	.globl	_ZN5NBody7CVectorC1Ev
	.set	_ZN5NBody7CVectorC1Ev,_ZN5NBody7CVectorC2Ev
	.align 2
	.globl	_ZN5NBody7CVectorD2Ev
	.type	_ZN5NBody7CVectorD2Ev, @function
_ZN5NBody7CVectorD2Ev:
.LFB3773:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE3773:
	.size	_ZN5NBody7CVectorD2Ev, .-_ZN5NBody7CVectorD2Ev
	.globl	_ZN5NBody7CVectorD1Ev
	.set	_ZN5NBody7CVectorD1Ev,_ZN5NBody7CVectorD2Ev
	.align 2
	.globl	_ZN5NBody7CVectorclERKj
	.type	_ZN5NBody7CVectorclERKj, @function
_ZN5NBody7CVectorclERKj:
.LFB3775:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movq	%rdi, %rax
	testl	%edx, %edx
	je	.L5
	cmpl	$1, %edx
	jne	.L8
	addq	$8, %rax
	ret
.L8:
	cmpl	$2, %edx
	jne	.L9
	addq	$16, %rax
	ret
.L9:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movl	$8, %edi
	call	__cxa_allocate_exception@PLT
	movq	_ZNSt9exceptionD1Ev@GOTPCREL(%rip), %rdx
	leaq	_ZTISt9exception(%rip), %rsi
	movq	%rax, %rdi
	leaq	16+_ZTVSt9exception(%rip), %rax
	movq	%rax, (%rdi)
	call	__cxa_throw@PLT
.L5:
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3775:
	.size	_ZN5NBody7CVectorclERKj, .-_ZN5NBody7CVectorclERKj
	.align 2
	.globl	_ZNK5NBody7CVectorixERKj
	.type	_ZNK5NBody7CVectorixERKj, @function
_ZNK5NBody7CVectorixERKj:
.LFB3776:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	testl	%eax, %eax
	jne	.L14
	movsd	(%rdi), %xmm0
	ret
.L14:
	cmpl	$1, %eax
	jne	.L16
	movsd	8(%rdi), %xmm0
	ret
.L16:
	cmpl	$2, %eax
	jne	.L17
	movsd	16(%rdi), %xmm0
	ret
.L17:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movl	$8, %edi
	call	__cxa_allocate_exception@PLT
	movq	_ZNSt9exceptionD1Ev@GOTPCREL(%rip), %rdx
	leaq	_ZTISt9exception(%rip), %rsi
	movq	%rax, %rdi
	leaq	16+_ZTVSt9exception(%rip), %rax
	movq	%rax, (%rdi)
	call	__cxa_throw@PLT
	.cfi_endproc
.LFE3776:
	.size	_ZNK5NBody7CVectorixERKj, .-_ZNK5NBody7CVectorixERKj
	.align 2
	.globl	_ZN5NBody7CVectoraSERKS0_
	.type	_ZN5NBody7CVectoraSERKS0_, @function
_ZN5NBody7CVectoraSERKS0_:
.LFB3777:
	.cfi_startproc
	endbr64
	movsd	(%rsi), %xmm0
	movsd	%xmm0, (%rdi)
	movsd	8(%rsi), %xmm0
	movsd	%xmm0, 8(%rdi)
	movsd	16(%rsi), %xmm0
	movsd	%xmm0, 16(%rdi)
	ret
	.cfi_endproc
.LFE3777:
	.size	_ZN5NBody7CVectoraSERKS0_, .-_ZN5NBody7CVectoraSERKS0_
	.align 2
	.globl	_ZN5NBody7CVectorpLERKS0_
	.type	_ZN5NBody7CVectorpLERKS0_, @function
_ZN5NBody7CVectorpLERKS0_:
.LFB3778:
	.cfi_startproc
	endbr64
	movsd	(%rdi), %xmm0
	addsd	(%rsi), %xmm0
	movq	%rdi, %rax
	movsd	%xmm0, (%rdi)
	movsd	8(%rdi), %xmm0
	addsd	8(%rsi), %xmm0
	movsd	%xmm0, 8(%rdi)
	movsd	16(%rdi), %xmm0
	addsd	16(%rsi), %xmm0
	movsd	%xmm0, 16(%rdi)
	ret
	.cfi_endproc
.LFE3778:
	.size	_ZN5NBody7CVectorpLERKS0_, .-_ZN5NBody7CVectorpLERKS0_
	.align 2
	.globl	_ZN5NBody7CVectordVERKd
	.type	_ZN5NBody7CVectordVERKd, @function
_ZN5NBody7CVectordVERKd:
.LFB3779:
	.cfi_startproc
	endbr64
	movsd	(%rdi), %xmm0
	movq	%rdi, %rax
	divsd	(%rsi), %xmm0
	movsd	%xmm0, (%rdi)
	movsd	8(%rdi), %xmm0
	divsd	(%rsi), %xmm0
	movsd	%xmm0, 8(%rdi)
	movsd	16(%rdi), %xmm0
	divsd	(%rsi), %xmm0
	movsd	%xmm0, 16(%rdi)
	ret
	.cfi_endproc
.LFE3779:
	.size	_ZN5NBody7CVectordVERKd, .-_ZN5NBody7CVectordVERKd
	.align 2
	.globl	_ZN5NBody7CVectormLERKd
	.type	_ZN5NBody7CVectormLERKd, @function
_ZN5NBody7CVectormLERKd:
.LFB3780:
	.cfi_startproc
	endbr64
	movsd	(%rdi), %xmm0
	mulsd	(%rsi), %xmm0
	movq	%rdi, %rax
	movsd	%xmm0, (%rdi)
	movsd	8(%rdi), %xmm0
	mulsd	(%rsi), %xmm0
	movsd	%xmm0, 8(%rdi)
	movsd	16(%rdi), %xmm0
	mulsd	(%rsi), %xmm0
	movsd	%xmm0, 16(%rdi)
	ret
	.cfi_endproc
.LFE3780:
	.size	_ZN5NBody7CVectormLERKd, .-_ZN5NBody7CVectormLERKd
	.align 2
	.globl	_ZN5NBody7CVectordvERKd
	.type	_ZN5NBody7CVectordvERKd, @function
_ZN5NBody7CVectordvERKd:
.LFB4458:
	.cfi_startproc
	endbr64
	jmp	_ZN5NBody7CVectordVERKd
	.cfi_endproc
.LFE4458:
	.size	_ZN5NBody7CVectordvERKd, .-_ZN5NBody7CVectordvERKd
	.globl	_ZN5NBodyplERKNS_7CVectorES2_
	.type	_ZN5NBodyplERKNS_7CVectorES2_, @function
_ZN5NBodyplERKNS_7CVectorES2_:
.LFB3782:
	.cfi_startproc
	endbr64
	movsd	16(%rsi), %xmm0
	movsd	8(%rsi), %xmm1
	movq	%rdi, %rax
	movsd	(%rsi), %xmm2
	addsd	16(%rdx), %xmm0
	addsd	8(%rdx), %xmm1
	addsd	(%rdx), %xmm2
	movsd	%xmm0, 16(%rdi)
	movsd	%xmm2, (%rdi)
	movsd	%xmm1, 8(%rdi)
	ret
	.cfi_endproc
.LFE3782:
	.size	_ZN5NBodyplERKNS_7CVectorES2_, .-_ZN5NBodyplERKNS_7CVectorES2_
	.globl	_ZN5NBodymiERKNS_7CVectorES2_
	.type	_ZN5NBodymiERKNS_7CVectorES2_, @function
_ZN5NBodymiERKNS_7CVectorES2_:
.LFB3783:
	.cfi_startproc
	endbr64
	movsd	16(%rsi), %xmm0
	movsd	8(%rsi), %xmm1
	movq	%rdi, %rax
	movsd	(%rsi), %xmm2
	subsd	16(%rdx), %xmm0
	subsd	8(%rdx), %xmm1
	subsd	(%rdx), %xmm2
	movsd	%xmm0, 16(%rdi)
	movsd	%xmm2, (%rdi)
	movsd	%xmm1, 8(%rdi)
	ret
	.cfi_endproc
.LFE3783:
	.size	_ZN5NBodymiERKNS_7CVectorES2_, .-_ZN5NBodymiERKNS_7CVectorES2_
	.globl	_ZN5NBodymlERKdRKNS_7CVectorE
	.type	_ZN5NBodymlERKdRKNS_7CVectorE, @function
_ZN5NBodymlERKdRKNS_7CVectorE:
.LFB3784:
	.cfi_startproc
	endbr64
	movsd	(%rsi), %xmm0
	movsd	16(%rdx), %xmm1
	movq	%rdi, %rax
	movsd	8(%rdx), %xmm2
	mulsd	%xmm0, %xmm1
	mulsd	%xmm0, %xmm2
	mulsd	(%rdx), %xmm0
	movsd	%xmm1, 16(%rdi)
	movsd	%xmm2, 8(%rdi)
	movsd	%xmm0, (%rdi)
	ret
	.cfi_endproc
.LFE3784:
	.size	_ZN5NBodymlERKdRKNS_7CVectorE, .-_ZN5NBodymlERKdRKNS_7CVectorE
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"0: "
.LC2:
	.string	"\n"
.LC3:
	.string	"1: "
.LC4:
	.string	"2: "
	.text
	.globl	_ZN5NBodylsERSoRKNS_7CVectorE
	.type	_ZN5NBodylsERSoRKNS_7CVectorE, @function
_ZN5NBodylsERSoRKNS_7CVectorE:
.LFB3785:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rsi, %rbx
	leaq	.LC1(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	(%rbx), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	8(%rbx), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%r12, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC4(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	16(%rbx), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rbp, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3785:
	.size	_ZN5NBodylsERSoRKNS_7CVectorE, .-_ZN5NBodylsERSoRKNS_7CVectorE
	.align 2
	.globl	_ZN5NBody7CVector13absoluteValueERKS0_
	.type	_ZN5NBody7CVector13absoluteValueERKS0_, @function
_ZN5NBody7CVector13absoluteValueERKS0_:
.LFB3786:
	.cfi_startproc
	endbr64
	movsd	(%rdi), %xmm0
	movsd	8(%rdi), %xmm2
	movsd	16(%rdi), %xmm1
	mulsd	%xmm0, %xmm0
	mulsd	%xmm2, %xmm2
	mulsd	%xmm1, %xmm1
	addsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	jmp	sqrt@PLT
	.cfi_endproc
.LFE3786:
	.size	_ZN5NBody7CVector13absoluteValueERKS0_, .-_ZN5NBody7CVector13absoluteValueERKS0_
	.align 2
	.globl	_ZN5NBody7CVector13absoluteValueEPKd
	.type	_ZN5NBody7CVector13absoluteValueEPKd, @function
_ZN5NBody7CVector13absoluteValueEPKd:
.LFB3787:
	.cfi_startproc
	endbr64
	movsd	(%rdi), %xmm0
	movsd	8(%rdi), %xmm2
	movsd	16(%rdi), %xmm1
	mulsd	%xmm0, %xmm0
	mulsd	%xmm2, %xmm2
	mulsd	%xmm1, %xmm1
	addsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	jmp	sqrt@PLT
	.cfi_endproc
.LFE3787:
	.size	_ZN5NBody7CVector13absoluteValueEPKd, .-_ZN5NBody7CVector13absoluteValueEPKd
	.align 2
	.globl	_ZN5NBody7CVector12crossProductERKS0_S2_
	.type	_ZN5NBody7CVector12crossProductERKS0_S2_, @function
_ZN5NBody7CVector12crossProductERKS0_S2_:
.LFB3788:
	.cfi_startproc
	endbr64
	movsd	8(%rdx), %xmm6
	movsd	8(%rsi), %xmm2
	movq	%rdi, %rax
	movsd	(%rsi), %xmm0
	movsd	(%rdx), %xmm5
	movsd	16(%rsi), %xmm1
	movsd	16(%rdx), %xmm3
	movaps	%xmm2, %xmm4
	movaps	%xmm6, %xmm7
	mulsd	%xmm5, %xmm2
	mulsd	%xmm1, %xmm7
	mulsd	%xmm3, %xmm4
	mulsd	%xmm5, %xmm1
	mulsd	%xmm0, %xmm3
	mulsd	%xmm6, %xmm0
	subsd	%xmm7, %xmm4
	subsd	%xmm3, %xmm1
	subsd	%xmm2, %xmm0
	movsd	%xmm4, (%rdi)
	movsd	%xmm1, 8(%rdi)
	movsd	%xmm0, 16(%rdi)
	ret
	.cfi_endproc
.LFE3788:
	.size	_ZN5NBody7CVector12crossProductERKS0_S2_, .-_ZN5NBody7CVector12crossProductERKS0_S2_
	.align 2
	.globl	_ZN5NBody7CVector12crossProductEPKdS2_
	.type	_ZN5NBody7CVector12crossProductEPKdS2_, @function
_ZN5NBody7CVector12crossProductEPKdS2_:
.LFB3789:
	.cfi_startproc
	endbr64
	movsd	8(%rdx), %xmm6
	movsd	8(%rsi), %xmm2
	movq	%rdi, %rax
	movsd	(%rsi), %xmm0
	movsd	(%rdx), %xmm5
	movsd	16(%rsi), %xmm1
	movsd	16(%rdx), %xmm3
	movaps	%xmm2, %xmm4
	movaps	%xmm6, %xmm7
	mulsd	%xmm5, %xmm2
	mulsd	%xmm1, %xmm7
	mulsd	%xmm3, %xmm4
	mulsd	%xmm5, %xmm1
	mulsd	%xmm0, %xmm3
	mulsd	%xmm6, %xmm0
	subsd	%xmm7, %xmm4
	subsd	%xmm3, %xmm1
	subsd	%xmm2, %xmm0
	movsd	%xmm4, (%rdi)
	movsd	%xmm1, 8(%rdi)
	movsd	%xmm0, 16(%rdi)
	ret
	.cfi_endproc
.LFE3789:
	.size	_ZN5NBody7CVector12crossProductEPKdS2_, .-_ZN5NBody7CVector12crossProductEPKdS2_
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3815:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3815:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include "CVector.cuh"



namespace NBody
{

//ds ctor/dtor
//ds default constructor
CVector::CVector( const double& p_dElement0, const double& p_dElement1, const double& p_dElement2 ): m_dElement0( p_dElement0 ),
                                                                                                     m_dElement1( p_dElement1 ),
                                                                                                     m_dElement2( p_dElement2 )
{
    //ds nothing to do
}

//ds default constructor - we need to have this since operator overloading for pointers is not allowed..
CVector::CVector( ): m_dElement0( 0.0 ),
                     m_dElement1( 0.0 ),
                     m_dElement2( 0.0 )
{
    //ds nothing to do
}

//ds default destructor
CVector::~CVector( )
{
    //ds nothing to do
}

//ds operators
//ds r/w indexing - ( ) is used instead of [ ] to mark the difference that this is not a "real" array - CAREFUL this allows manipulation of the data
double& CVector::operator( )( const unsigned int& p_uIndex )
{
    //ds map the index operator to the element
    if     ( 0 == p_uIndex ){ return m_dElement0; }
    else if( 1 == p_uIndex ){ return m_dElement1; }
    else if( 2 == p_uIndex ){ return m_dElement2; }

    //ds if an index greater 2 is required throw an exception
    else
    {
        //ds TODO implement exceptions
        throw std::exception( );
    }
}

//ds readonly indexing - ( ) is used instead of [ ] to mark the difference that this is not a "real" array
double CVector::operator[ ]( const unsigned int& p_uIndex ) const
{
    //ds map the index operator to the element
    if     ( 0 == p_uIndex ){ return m_dElement0; }
    else if( 1 == p_uIndex ){ return m_dElement1; }
    else if( 2 == p_uIndex ){ return m_dElement2; }

    //ds if an index greater 2 is required throw an exception
    else
    {
        //ds TODO implement exceptions
        throw std::exception( );
    }
}

//ds setting
void CVector::operator=( const CVector& p_cRightHandSide )
{
    //ds get all the elements
    m_dElement0 = p_cRightHandSide.m_dElement0;
    m_dElement1 = p_cRightHandSide.m_dElement1;
    m_dElement2 = p_cRightHandSide.m_dElement2;
}

//ds adding and assign
CVector& CVector::operator+=( const CVector& p_cRightHandSide )
{
    //ds add all the elements
    m_dElement0 += p_cRightHandSide.m_dElement0;
    m_dElement1 += p_cRightHandSide.m_dElement1;
    m_dElement2 += p_cRightHandSide.m_dElement2;

    return *this;
}

//ds dividing and assign
CVector& CVector::operator/=( const double& p_dRightHandSide )
{
    //ds add all the elements
    m_dElement0 /= p_dRightHandSide;
    m_dElement1 /= p_dRightHandSide;
    m_dElement2 /= p_dRightHandSide;

    return *this;
}

//ds multiplication and assign
CVector& CVector::operator*=( const double& p_dRightHandSide )
{
    //ds add all the elements
    m_dElement0 *= p_dRightHandSide;
    m_dElement1 *= p_dRightHandSide;
    m_dElement2 *= p_dRightHandSide;

    return *this;
}

//ds dividing
CVector& CVector::operator/( const double& p_dRightHandSide )
{
    //ds add all the elements
    m_dElement0 /= p_dRightHandSide;
    m_dElement1 /= p_dRightHandSide;
    m_dElement2 /= p_dRightHandSide;

    return *this;
}

//ds simple addition
const CVector operator+( const CVector& p_cLeftHandSide, const CVector& p_cRightHandSide )
{
    return CVector( p_cLeftHandSide.m_dElement0 + p_cRightHandSide.m_dElement0,
                    p_cLeftHandSide.m_dElement1 + p_cRightHandSide.m_dElement1,
                    p_cLeftHandSide.m_dElement2 + p_cRightHandSide.m_dElement2 );
}

//ds simple subtraction (needed for distance calculations)
const CVector operator-( const CVector& p_cLeftHandSide, const CVector& p_cRightHandSide )
{
    return CVector( p_cLeftHandSide.m_dElement0 - p_cRightHandSide.m_dElement0,
                    p_cLeftHandSide.m_dElement1 - p_cRightHandSide.m_dElement1,
                    p_cLeftHandSide.m_dElement2 - p_cRightHandSide.m_dElement2 );
}

//ds simple multiplication
const CVector operator*( const double& p_dLeftHandSide, const CVector& p_cRightHandSide )
{
    //ds add all the elements
    return CVector( p_dLeftHandSide*p_cRightHandSide.m_dElement0,
                    p_dLeftHandSide*p_cRightHandSide.m_dElement1,
                    p_dLeftHandSide*p_cRightHandSide.m_dElement2 );
}

//ds printing
std::ostream& operator<<( std::ostream& p_cLeftHandSide, const CVector& p_cRightHandSide )
{
    //ds build the string
    p_cLeftHandSide << "0: " << p_cRightHandSide.m_dElement0 << "\n"
                    << "1: " << p_cRightHandSide.m_dElement1 << "\n"
                    << "2: " << p_cRightHandSide.m_dElement2;

    return p_cLeftHandSide;
}

//ds static functions
double CVector::absoluteValue( const CVector& p_cVector )
{
    return sqrt( pow( p_cVector.m_dElement0, 2 ) + pow( p_cVector.m_dElement1, 2 ) + pow( p_cVector.m_dElement2, 2 ) );
}

double CVector::absoluteValue( const double p_vecVector[3] )
{
    return sqrt( pow( p_vecVector[0], 2 ) + pow( p_vecVector[1], 2 ) + pow( p_vecVector[2], 2 ) );
}

const CVector CVector::crossProduct( const CVector& p_cVector1, const CVector& p_cVector2 )
{
    return CVector( p_cVector1.m_dElement1*p_cVector2.m_dElement2-p_cVector1.m_dElement2*p_cVector2.m_dElement1,
                    p_cVector1.m_dElement2*p_cVector2.m_dElement0-p_cVector1.m_dElement0*p_cVector2.m_dElement2,
                    p_cVector1.m_dElement0*p_cVector2.m_dElement1-p_cVector1.m_dElement1*p_cVector2.m_dElement0 );
}

const CVector CVector::crossProduct( const double p_vecVector1[3], const double p_vecVector2[3] )
{
    return CVector( p_vecVector1[1]*p_vecVector2[2]-p_vecVector1[2]*p_vecVector2[1],
                    p_vecVector1[2]*p_vecVector2[0]-p_vecVector1[0]*p_vecVector2[2],
                    p_vecVector1[0]*p_vecVector2[1]-p_vecVector1[1]*p_vecVector2[0] );
}

} //ds namespace NBody

	.text
	.file	"CVector.hip"
	.globl	_ZN5NBody7CVectorC2ERKdS2_S2_   # -- Begin function _ZN5NBody7CVectorC2ERKdS2_S2_
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectorC2ERKdS2_S2_,@function
_ZN5NBody7CVectorC2ERKdS2_S2_:          # @_ZN5NBody7CVectorC2ERKdS2_S2_
	.cfi_startproc
# %bb.0:
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%rdi)
	movsd	(%rdx), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rdi)
	movsd	(%rcx), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, 16(%rdi)
	retq
.Lfunc_end0:
	.size	_ZN5NBody7CVectorC2ERKdS2_S2_, .Lfunc_end0-_ZN5NBody7CVectorC2ERKdS2_S2_
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectorC2Ev           # -- Begin function _ZN5NBody7CVectorC2Ev
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectorC2Ev,@function
_ZN5NBody7CVectorC2Ev:                  # @_ZN5NBody7CVectorC2Ev
	.cfi_startproc
# %bb.0:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	retq
.Lfunc_end1:
	.size	_ZN5NBody7CVectorC2Ev, .Lfunc_end1-_ZN5NBody7CVectorC2Ev
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectorD2Ev           # -- Begin function _ZN5NBody7CVectorD2Ev
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectorD2Ev,@function
_ZN5NBody7CVectorD2Ev:                  # @_ZN5NBody7CVectorD2Ev
	.cfi_startproc
# %bb.0:
	retq
.Lfunc_end2:
	.size	_ZN5NBody7CVectorD2Ev, .Lfunc_end2-_ZN5NBody7CVectorD2Ev
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectorclERKj         # -- Begin function _ZN5NBody7CVectorclERKj
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectorclERKj,@function
_ZN5NBody7CVectorclERKj:                # @_ZN5NBody7CVectorclERKj
	.cfi_startproc
# %bb.0:
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	.LBB3_6
# %bb.1:
	cmpl	$2, %eax
	je	.LBB3_5
# %bb.2:
	cmpl	$1, %eax
	jne	.LBB3_4
# %bb.3:
	addq	$8, %rdi
	jmp	.LBB3_6
.LBB3_5:
	addq	$16, %rdi
.LBB3_6:
	movq	%rdi, %rax
	retq
.LBB3_4:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movl	$8, %edi
	callq	__cxa_allocate_exception
	movq	$_ZTVSt9exception+16, (%rax)
	movl	$_ZTISt9exception, %esi
	movl	$_ZNSt9exceptionD1Ev, %edx
	movq	%rax, %rdi
	callq	__cxa_throw
.Lfunc_end3:
	.size	_ZN5NBody7CVectorclERKj, .Lfunc_end3-_ZN5NBody7CVectorclERKj
	.cfi_endproc
                                        # -- End function
	.globl	_ZNK5NBody7CVectorixERKj        # -- Begin function _ZNK5NBody7CVectorixERKj
	.p2align	1, 0x90
	.type	_ZNK5NBody7CVectorixERKj,@function
_ZNK5NBody7CVectorixERKj:               # @_ZNK5NBody7CVectorixERKj
	.cfi_startproc
# %bb.0:
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	.LBB4_6
# %bb.1:
	cmpl	$2, %eax
	je	.LBB4_5
# %bb.2:
	cmpl	$1, %eax
	jne	.LBB4_4
# %bb.3:
	addq	$8, %rdi
	jmp	.LBB4_6
.LBB4_5:
	addq	$16, %rdi
.LBB4_6:
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	retq
.LBB4_4:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movl	$8, %edi
	callq	__cxa_allocate_exception
	movq	$_ZTVSt9exception+16, (%rax)
	movl	$_ZTISt9exception, %esi
	movl	$_ZNSt9exceptionD1Ev, %edx
	movq	%rax, %rdi
	callq	__cxa_throw
.Lfunc_end4:
	.size	_ZNK5NBody7CVectorixERKj, .Lfunc_end4-_ZNK5NBody7CVectorixERKj
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectoraSERKS0_       # -- Begin function _ZN5NBody7CVectoraSERKS0_
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectoraSERKS0_,@function
_ZN5NBody7CVectoraSERKS0_:              # @_ZN5NBody7CVectoraSERKS0_
	.cfi_startproc
# %bb.0:
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%rdi)
	movsd	8(%rsi), %xmm0                  # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rdi)
	movsd	16(%rsi), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, 16(%rdi)
	retq
.Lfunc_end5:
	.size	_ZN5NBody7CVectoraSERKS0_, .Lfunc_end5-_ZN5NBody7CVectoraSERKS0_
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectorpLERKS0_       # -- Begin function _ZN5NBody7CVectorpLERKS0_
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectorpLERKS0_,@function
_ZN5NBody7CVectorpLERKS0_:              # @_ZN5NBody7CVectorpLERKS0_
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	addsd	(%rdi), %xmm0
	movsd	%xmm0, (%rdi)
	movsd	8(%rsi), %xmm0                  # xmm0 = mem[0],zero
	addsd	8(%rdi), %xmm0
	movsd	%xmm0, 8(%rdi)
	movsd	16(%rsi), %xmm0                 # xmm0 = mem[0],zero
	addsd	16(%rdi), %xmm0
	movsd	%xmm0, 16(%rdi)
	retq
.Lfunc_end6:
	.size	_ZN5NBody7CVectorpLERKS0_, .Lfunc_end6-_ZN5NBody7CVectorpLERKS0_
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectordVERKd         # -- Begin function _ZN5NBody7CVectordVERKd
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectordVERKd,@function
_ZN5NBody7CVectordVERKd:                # @_ZN5NBody7CVectordVERKd
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rdi), %xmm1                  # xmm1 = mem[0],zero
	divsd	(%rsi), %xmm0
	movsd	%xmm0, (%rdi)
	divsd	(%rsi), %xmm1
	movsd	%xmm1, 8(%rdi)
	movsd	16(%rdi), %xmm0                 # xmm0 = mem[0],zero
	divsd	(%rsi), %xmm0
	movsd	%xmm0, 16(%rdi)
	retq
.Lfunc_end7:
	.size	_ZN5NBody7CVectordVERKd, .Lfunc_end7-_ZN5NBody7CVectordVERKd
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectormLERKd         # -- Begin function _ZN5NBody7CVectormLERKd
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectormLERKd,@function
_ZN5NBody7CVectormLERKd:                # @_ZN5NBody7CVectormLERKd
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	mulsd	(%rdi), %xmm0
	movsd	%xmm0, (%rdi)
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	mulsd	8(%rdi), %xmm0
	movsd	%xmm0, 8(%rdi)
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	mulsd	16(%rdi), %xmm0
	movsd	%xmm0, 16(%rdi)
	retq
.Lfunc_end8:
	.size	_ZN5NBody7CVectormLERKd, .Lfunc_end8-_ZN5NBody7CVectormLERKd
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVectordvERKd         # -- Begin function _ZN5NBody7CVectordvERKd
	.p2align	1, 0x90
	.type	_ZN5NBody7CVectordvERKd,@function
_ZN5NBody7CVectordvERKd:                # @_ZN5NBody7CVectordvERKd
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rdi), %xmm1                  # xmm1 = mem[0],zero
	divsd	(%rsi), %xmm0
	movsd	%xmm0, (%rdi)
	divsd	(%rsi), %xmm1
	movsd	%xmm1, 8(%rdi)
	movsd	16(%rdi), %xmm0                 # xmm0 = mem[0],zero
	divsd	(%rsi), %xmm0
	movsd	%xmm0, 16(%rdi)
	retq
.Lfunc_end9:
	.size	_ZN5NBody7CVectordvERKd, .Lfunc_end9-_ZN5NBody7CVectordvERKd
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBodyplERKNS_7CVectorES2_   # -- Begin function _ZN5NBodyplERKNS_7CVectorES2_
	.type	_ZN5NBodyplERKNS_7CVectorES2_,@function
_ZN5NBodyplERKNS_7CVectorES2_:          # @_ZN5NBodyplERKNS_7CVectorES2_
	.cfi_startproc
# %bb.0:
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rsi), %xmm1                  # xmm1 = mem[0],zero
	addsd	(%rdx), %xmm0
	addsd	8(%rdx), %xmm1
	movq	%rdi, %rax
	movsd	16(%rsi), %xmm2                 # xmm2 = mem[0],zero
	addsd	16(%rdx), %xmm2
	movsd	%xmm0, (%rdi)
	movsd	%xmm1, 8(%rdi)
	movsd	%xmm2, 16(%rdi)
	retq
.Lfunc_end10:
	.size	_ZN5NBodyplERKNS_7CVectorES2_, .Lfunc_end10-_ZN5NBodyplERKNS_7CVectorES2_
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBodymiERKNS_7CVectorES2_   # -- Begin function _ZN5NBodymiERKNS_7CVectorES2_
	.type	_ZN5NBodymiERKNS_7CVectorES2_,@function
_ZN5NBodymiERKNS_7CVectorES2_:          # @_ZN5NBodymiERKNS_7CVectorES2_
	.cfi_startproc
# %bb.0:
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rsi), %xmm1                  # xmm1 = mem[0],zero
	subsd	(%rdx), %xmm0
	subsd	8(%rdx), %xmm1
	movq	%rdi, %rax
	movsd	16(%rsi), %xmm2                 # xmm2 = mem[0],zero
	subsd	16(%rdx), %xmm2
	movsd	%xmm0, (%rdi)
	movsd	%xmm1, 8(%rdi)
	movsd	%xmm2, 16(%rdi)
	retq
.Lfunc_end11:
	.size	_ZN5NBodymiERKNS_7CVectorES2_, .Lfunc_end11-_ZN5NBodymiERKNS_7CVectorES2_
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBodymlERKdRKNS_7CVectorE   # -- Begin function _ZN5NBodymlERKdRKNS_7CVectorE
	.type	_ZN5NBodymlERKdRKNS_7CVectorE,@function
_ZN5NBodymlERKdRKNS_7CVectorE:          # @_ZN5NBodymlERKdRKNS_7CVectorE
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	(%rdx), %xmm1                   # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	movsd	8(%rdx), %xmm2                  # xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	mulsd	16(%rdx), %xmm0
	movsd	%xmm1, (%rdi)
	movsd	%xmm2, 8(%rdi)
	movsd	%xmm0, 16(%rdi)
	retq
.Lfunc_end12:
	.size	_ZN5NBodymlERKdRKNS_7CVectorE, .Lfunc_end12-_ZN5NBodymlERKdRKNS_7CVectorE
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBodylsERSoRKNS_7CVectorE   # -- Begin function _ZN5NBodylsERSoRKNS_7CVectorE
	.type	_ZN5NBodylsERSoRKNS_7CVectorE,@function
_ZN5NBodylsERSoRKNS_7CVectorE:          # @_ZN5NBodylsERSoRKNS_7CVectorE
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	$.L.str, %esi
	movl	$3, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movsd	(%r14), %xmm0                   # xmm0 = mem[0],zero
	movq	%rbx, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r15
	movl	$.L.str.1, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$.L.str.2, %esi
	movl	$3, %edx
	movq	%r15, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movsd	8(%r14), %xmm0                  # xmm0 = mem[0],zero
	movq	%r15, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r15
	movl	$.L.str.1, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$.L.str.3, %esi
	movl	$3, %edx
	movq	%r15, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movsd	16(%r14), %xmm0                 # xmm0 = mem[0],zero
	movq	%r15, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end13:
	.size	_ZN5NBodylsERSoRKNS_7CVectorE, .Lfunc_end13-_ZN5NBodylsERSoRKNS_7CVectorE
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVector13absoluteValueERKS0_ # -- Begin function _ZN5NBody7CVector13absoluteValueERKS0_
	.p2align	1, 0x90
	.type	_ZN5NBody7CVector13absoluteValueERKS0_,@function
_ZN5NBody7CVector13absoluteValueERKS0_: # @_ZN5NBody7CVector13absoluteValueERKS0_
	.cfi_startproc
# %bb.0:
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rdi), %xmm1                  # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm0
	mulsd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	movsd	16(%rdi), %xmm0                 # xmm0 = mem[0],zero
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	sqrtsd	%xmm0, %xmm0
	retq
.Lfunc_end14:
	.size	_ZN5NBody7CVector13absoluteValueERKS0_, .Lfunc_end14-_ZN5NBody7CVector13absoluteValueERKS0_
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVector13absoluteValueEPKd # -- Begin function _ZN5NBody7CVector13absoluteValueEPKd
	.p2align	1, 0x90
	.type	_ZN5NBody7CVector13absoluteValueEPKd,@function
_ZN5NBody7CVector13absoluteValueEPKd:   # @_ZN5NBody7CVector13absoluteValueEPKd
	.cfi_startproc
# %bb.0:
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rdi), %xmm1                  # xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm0
	mulsd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	movsd	16(%rdi), %xmm0                 # xmm0 = mem[0],zero
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	sqrtsd	%xmm0, %xmm0
	retq
.Lfunc_end15:
	.size	_ZN5NBody7CVector13absoluteValueEPKd, .Lfunc_end15-_ZN5NBody7CVector13absoluteValueEPKd
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVector12crossProductERKS0_S2_ # -- Begin function _ZN5NBody7CVector12crossProductERKS0_S2_
	.p2align	1, 0x90
	.type	_ZN5NBody7CVector12crossProductERKS0_S2_,@function
_ZN5NBody7CVector12crossProductERKS0_S2_: # @_ZN5NBody7CVector12crossProductERKS0_S2_
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rsi), %xmm1                  # xmm1 = mem[0],zero
	movsd	16(%rdx), %xmm2                 # xmm2 = mem[0],zero
	movapd	%xmm1, %xmm3
	mulsd	%xmm2, %xmm3
	movsd	16(%rsi), %xmm4                 # xmm4 = mem[0],zero
	movsd	(%rdx), %xmm5                   # xmm5 = mem[0],zero
	movsd	8(%rdx), %xmm6                  # xmm6 = mem[0],zero
	movapd	%xmm4, %xmm7
	mulsd	%xmm6, %xmm7
	subsd	%xmm7, %xmm3
	mulsd	%xmm5, %xmm4
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm4
	mulsd	%xmm0, %xmm6
	mulsd	%xmm5, %xmm1
	subsd	%xmm1, %xmm6
	movsd	%xmm3, (%rdi)
	movsd	%xmm4, 8(%rdi)
	movsd	%xmm6, 16(%rdi)
	retq
.Lfunc_end16:
	.size	_ZN5NBody7CVector12crossProductERKS0_S2_, .Lfunc_end16-_ZN5NBody7CVector12crossProductERKS0_S2_
	.cfi_endproc
                                        # -- End function
	.globl	_ZN5NBody7CVector12crossProductEPKdS2_ # -- Begin function _ZN5NBody7CVector12crossProductEPKdS2_
	.p2align	1, 0x90
	.type	_ZN5NBody7CVector12crossProductEPKdS2_,@function
_ZN5NBody7CVector12crossProductEPKdS2_: # @_ZN5NBody7CVector12crossProductEPKdS2_
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	movsd	(%rsi), %xmm0                   # xmm0 = mem[0],zero
	movsd	8(%rsi), %xmm1                  # xmm1 = mem[0],zero
	movsd	16(%rdx), %xmm2                 # xmm2 = mem[0],zero
	movapd	%xmm1, %xmm3
	mulsd	%xmm2, %xmm3
	movsd	16(%rsi), %xmm4                 # xmm4 = mem[0],zero
	movsd	(%rdx), %xmm5                   # xmm5 = mem[0],zero
	movsd	8(%rdx), %xmm6                  # xmm6 = mem[0],zero
	movapd	%xmm4, %xmm7
	mulsd	%xmm6, %xmm7
	subsd	%xmm7, %xmm3
	mulsd	%xmm5, %xmm4
	mulsd	%xmm0, %xmm2
	subsd	%xmm2, %xmm4
	mulsd	%xmm0, %xmm6
	mulsd	%xmm5, %xmm1
	subsd	%xmm1, %xmm6
	movsd	%xmm3, (%rdi)
	movsd	%xmm4, 8(%rdi)
	movsd	%xmm6, 16(%rdi)
	retq
.Lfunc_end17:
	.size	_ZN5NBody7CVector12crossProductEPKdS2_, .Lfunc_end17-_ZN5NBody7CVector12crossProductEPKdS2_
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"0: "
	.size	.L.str, 4

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"\n"
	.size	.L.str.1, 2

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"1: "
	.size	.L.str.2, 4

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"2: "
	.size	.L.str.3, 4

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.globl	_ZN5NBody7CVectorC1ERKdS2_S2_
	.type	_ZN5NBody7CVectorC1ERKdS2_S2_,@function
.set _ZN5NBody7CVectorC1ERKdS2_S2_, _ZN5NBody7CVectorC2ERKdS2_S2_
	.globl	_ZN5NBody7CVectorC1Ev
	.type	_ZN5NBody7CVectorC1Ev,@function
.set _ZN5NBody7CVectorC1Ev, _ZN5NBody7CVectorC2Ev
	.globl	_ZN5NBody7CVectorD1Ev
	.type	_ZN5NBody7CVectorD1Ev,@function
.set _ZN5NBody7CVectorD1Ev, _ZN5NBody7CVectorD2Ev
	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _ZTISt9exception
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
