#include "vec3.cuh"
#include <math.h>


CUDA_GEN_BOTH vec3 vec3::operator+(const vec3& b) {
	vec3 ret(*this);
	ret += b;
	return ret;
}

CUDA_GEN_BOTH vec3 vec3::operator-(const vec3& b) {
	vec3 ret(*this);
	ret -= b;
	return ret;
}

CUDA_GEN_BOTH vec3 vec3::operator*(const vec3& b) {
	vec3 ret(*this);
	ret *= b;
	return ret;
}

CUDA_GEN_BOTH vec3 vec3::operator+(float b) {
	vec3 ret(*this);
	ret += b;
	return ret;
}

CUDA_GEN_BOTH vec3 vec3::operator-(float b) {
	vec3 ret(*this);
	ret -= b;
	return ret;
}

CUDA_GEN_BOTH vec3 vec3::operator*(float b) {
	vec3 ret(*this);
	ret *= b;
	return ret;
}

CUDA_GEN_BOTH vec3 vec3::operator/(float b) {
	vec3 ret(*this);
	ret /= b;
	return ret;
}

CUDA_GEN_BOTH vec3& vec3::operator+=(const vec3& b) {
	this->x += b.x;
	this->y += b.y;
	this->z += b.z;
	return *this;
}

CUDA_GEN_BOTH vec3& vec3::operator-=(const vec3& b) {
	this->x -= b.x;
	this->y -= b.y;
	this->z -= b.z;
	return *this;
}

CUDA_GEN_BOTH vec3& vec3::operator*=(const vec3& b) {
	this->x *= b.x;
	this->y *= b.y;
	this->z *= b.z;
	return *this;
}

CUDA_GEN_BOTH vec3& vec3::operator+=(float b) {
	this->x += b;
	this->y += b;
	this->z += b;
	return *this;
}

CUDA_GEN_BOTH vec3& vec3::operator-=(float b) {
	this->x -= b;
	this->y -= b;
	this->z -= b;
	return *this;
}

CUDA_GEN_BOTH vec3& vec3::operator*=(float b) {
	this->x *= b;
	this->y *= b;
	this->z *= b;
	return *this;
}

CUDA_GEN_BOTH vec3& vec3::operator/=(float b) {
	this->x /= b;
	this->y /= b;
	this->z /= b;
	return *this;
}

CUDA_GEN_BOTH float vec3::dot(const vec3& b) {
	return x * b.x + y * b.y + z * b.z;
}

CUDA_GEN_BOTH vec3 vec3::cross(const vec3& b) {
	return { y*b.z - z*b.y, z*b.x - x*b.z, x*b.y - y*b.x };
}

CUDA_GEN_BOTH float vec3::mag() {
	return sqrtf(x*x + y*y + z*z);
}

CUDA_GEN_BOTH float vec3::magSq() {
	return x*x + y*y + z*z;
}

CUDA_GEN_BOTH vec3& vec3::flipSign() {
	x = -x;
	y = -y;
	z = -z;
	return *this;
}

CUDA_GEN_BOTH bool vec3::isZero(float epsilon) {
	return magSq() <= epsilon*epsilon;
}

CUDA_GEN_BOTH bool vec3::isEqual(const vec3& b, float epsilon) {
	return (*this - b).magSq() <= epsilon*epsilon;
}

CUDA_GEN_BOTH vec3& vec3::clampMag(float mag) {
	if (this->magSq() > mag*mag)
		this->operator*(mag / this->mag());
	return *this;
}

CUDA_GEN_BOTH vec3 operator+(float a, const vec3& b) {
	return {a + b.x, a + b.y, a+ b.z};
}

CUDA_GEN_BOTH vec3 operator-(float a, const vec3& b) {
	return { a - b.x, a - b.y, a - b.z };
}

CUDA_GEN_BOTH vec3 operator*(float a, const vec3& b) {
	return { a*b.x, a*b.y, a*b.z };
}
	.file	"tmpxft_002fb435_00000000-6_vec3.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2037:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2037:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.globl	_ZN4vec3pLERKS_
	.type	_ZN4vec3pLERKS_, @function
_ZN4vec3pLERKS_:
.LFB2017:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm0
	addss	(%rsi), %xmm0
	movq	%rdi, %rax
	movss	%xmm0, (%rdi)
	movss	4(%rdi), %xmm0
	addss	4(%rsi), %xmm0
	movss	%xmm0, 4(%rdi)
	movss	8(%rdi), %xmm0
	addss	8(%rsi), %xmm0
	movss	%xmm0, 8(%rdi)
	ret
	.cfi_endproc
.LFE2017:
	.size	_ZN4vec3pLERKS_, .-_ZN4vec3pLERKS_
	.align 2
	.globl	_ZN4vec3plERKS_
	.type	_ZN4vec3plERKS_, @function
_ZN4vec3plERKS_:
.LFB2010:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movq	(%rdi), %rax
	movq	%rax, 16(%rsp)
	movl	8(%rdi), %eax
	leaq	16(%rsp), %rdi
	movl	%eax, 24(%rsp)
	call	_ZN4vec3pLERKS_
	movl	24(%rsp), %eax
	movq	16(%rsp), %xmm0
	movl	%eax, 36(%rsp)
	movss	36(%rsp), %xmm1
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2010:
	.size	_ZN4vec3plERKS_, .-_ZN4vec3plERKS_
	.align 2
	.globl	_ZN4vec3mIERKS_
	.type	_ZN4vec3mIERKS_, @function
_ZN4vec3mIERKS_:
.LFB2018:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm0
	subss	(%rsi), %xmm0
	movq	%rdi, %rax
	movss	%xmm0, (%rdi)
	movss	4(%rdi), %xmm0
	subss	4(%rsi), %xmm0
	movss	%xmm0, 4(%rdi)
	movss	8(%rdi), %xmm0
	subss	8(%rsi), %xmm0
	movss	%xmm0, 8(%rdi)
	ret
	.cfi_endproc
.LFE2018:
	.size	_ZN4vec3mIERKS_, .-_ZN4vec3mIERKS_
	.align 2
	.globl	_ZN4vec3miERKS_
	.type	_ZN4vec3miERKS_, @function
_ZN4vec3miERKS_:
.LFB2011:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movq	(%rdi), %rax
	movq	%rax, 16(%rsp)
	movl	8(%rdi), %eax
	leaq	16(%rsp), %rdi
	movl	%eax, 24(%rsp)
	call	_ZN4vec3mIERKS_
	movl	24(%rsp), %eax
	movq	16(%rsp), %xmm0
	movl	%eax, 36(%rsp)
	movss	36(%rsp), %xmm1
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2011:
	.size	_ZN4vec3miERKS_, .-_ZN4vec3miERKS_
	.align 2
	.globl	_ZN4vec3mLERKS_
	.type	_ZN4vec3mLERKS_, @function
_ZN4vec3mLERKS_:
.LFB2019:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm0
	mulss	(%rsi), %xmm0
	movq	%rdi, %rax
	movss	%xmm0, (%rdi)
	movss	4(%rdi), %xmm0
	mulss	4(%rsi), %xmm0
	movss	%xmm0, 4(%rdi)
	movss	8(%rdi), %xmm0
	mulss	8(%rsi), %xmm0
	movss	%xmm0, 8(%rdi)
	ret
	.cfi_endproc
.LFE2019:
	.size	_ZN4vec3mLERKS_, .-_ZN4vec3mLERKS_
	.align 2
	.globl	_ZN4vec3mlERKS_
	.type	_ZN4vec3mlERKS_, @function
_ZN4vec3mlERKS_:
.LFB2012:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movq	(%rdi), %rax
	movq	%rax, 16(%rsp)
	movl	8(%rdi), %eax
	leaq	16(%rsp), %rdi
	movl	%eax, 24(%rsp)
	call	_ZN4vec3mLERKS_
	movl	24(%rsp), %eax
	movq	16(%rsp), %xmm0
	movl	%eax, 36(%rsp)
	movss	36(%rsp), %xmm1
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2012:
	.size	_ZN4vec3mlERKS_, .-_ZN4vec3mlERKS_
	.align 2
	.globl	_ZN4vec3pLEf
	.type	_ZN4vec3pLEf, @function
_ZN4vec3pLEf:
.LFB2020:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm1
	movq	%rdi, %rax
	addss	%xmm0, %xmm1
	movss	%xmm1, (%rdi)
	movss	4(%rdi), %xmm1
	addss	%xmm0, %xmm1
	addss	8(%rdi), %xmm0
	movss	%xmm1, 4(%rdi)
	movss	%xmm0, 8(%rdi)
	ret
	.cfi_endproc
.LFE2020:
	.size	_ZN4vec3pLEf, .-_ZN4vec3pLEf
	.align 2
	.globl	_ZN4vec3plEf
	.type	_ZN4vec3plEf, @function
_ZN4vec3plEf:
.LFB2013:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movq	(%rdi), %rax
	movq	%rax, 16(%rsp)
	movl	8(%rdi), %eax
	leaq	16(%rsp), %rdi
	movl	%eax, 24(%rsp)
	call	_ZN4vec3pLEf
	movl	24(%rsp), %eax
	movq	16(%rsp), %xmm0
	movl	%eax, 36(%rsp)
	movss	36(%rsp), %xmm1
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2013:
	.size	_ZN4vec3plEf, .-_ZN4vec3plEf
	.align 2
	.globl	_ZN4vec3mIEf
	.type	_ZN4vec3mIEf, @function
_ZN4vec3mIEf:
.LFB2021:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm1
	movq	%rdi, %rax
	subss	%xmm0, %xmm1
	movss	%xmm1, (%rdi)
	movss	4(%rdi), %xmm1
	subss	%xmm0, %xmm1
	movss	%xmm1, 4(%rdi)
	movss	8(%rdi), %xmm1
	subss	%xmm0, %xmm1
	movss	%xmm1, 8(%rdi)
	ret
	.cfi_endproc
.LFE2021:
	.size	_ZN4vec3mIEf, .-_ZN4vec3mIEf
	.align 2
	.globl	_ZN4vec3miEf
	.type	_ZN4vec3miEf, @function
_ZN4vec3miEf:
.LFB2014:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movq	(%rdi), %rax
	movq	%rax, 16(%rsp)
	movl	8(%rdi), %eax
	leaq	16(%rsp), %rdi
	movl	%eax, 24(%rsp)
	call	_ZN4vec3mIEf
	movl	24(%rsp), %eax
	movq	16(%rsp), %xmm0
	movl	%eax, 36(%rsp)
	movss	36(%rsp), %xmm1
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2014:
	.size	_ZN4vec3miEf, .-_ZN4vec3miEf
	.align 2
	.globl	_ZN4vec3mLEf
	.type	_ZN4vec3mLEf, @function
_ZN4vec3mLEf:
.LFB2022:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm1
	movq	%rdi, %rax
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%rdi)
	movss	4(%rdi), %xmm1
	mulss	%xmm0, %xmm1
	mulss	8(%rdi), %xmm0
	movss	%xmm1, 4(%rdi)
	movss	%xmm0, 8(%rdi)
	ret
	.cfi_endproc
.LFE2022:
	.size	_ZN4vec3mLEf, .-_ZN4vec3mLEf
	.align 2
	.globl	_ZN4vec3mlEf
	.type	_ZN4vec3mlEf, @function
_ZN4vec3mlEf:
.LFB2015:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movq	(%rdi), %rax
	movq	%rax, 16(%rsp)
	movl	8(%rdi), %eax
	leaq	16(%rsp), %rdi
	movl	%eax, 24(%rsp)
	call	_ZN4vec3mLEf
	movl	24(%rsp), %eax
	movq	16(%rsp), %xmm0
	movl	%eax, 36(%rsp)
	movss	36(%rsp), %xmm1
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2015:
	.size	_ZN4vec3mlEf, .-_ZN4vec3mlEf
	.align 2
	.globl	_ZN4vec3dVEf
	.type	_ZN4vec3dVEf, @function
_ZN4vec3dVEf:
.LFB2023:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm1
	movq	%rdi, %rax
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rdi)
	movss	4(%rdi), %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, 4(%rdi)
	movss	8(%rdi), %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, 8(%rdi)
	ret
	.cfi_endproc
.LFE2023:
	.size	_ZN4vec3dVEf, .-_ZN4vec3dVEf
	.align 2
	.globl	_ZN4vec3dvEf
	.type	_ZN4vec3dvEf, @function
_ZN4vec3dvEf:
.LFB2016:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movq	(%rdi), %rax
	movq	%rax, 16(%rsp)
	movl	8(%rdi), %eax
	leaq	16(%rsp), %rdi
	movl	%eax, 24(%rsp)
	call	_ZN4vec3dVEf
	movl	24(%rsp), %eax
	movq	16(%rsp), %xmm0
	movl	%eax, 36(%rsp)
	movss	36(%rsp), %xmm1
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2016:
	.size	_ZN4vec3dvEf, .-_ZN4vec3dvEf
	.align 2
	.globl	_ZN4vec33dotERKS_
	.type	_ZN4vec33dotERKS_, @function
_ZN4vec33dotERKS_:
.LFB2024:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm0
	movss	4(%rdi), %xmm1
	mulss	(%rsi), %xmm0
	mulss	4(%rsi), %xmm1
	addss	%xmm1, %xmm0
	movss	8(%rdi), %xmm1
	mulss	8(%rsi), %xmm1
	addss	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE2024:
	.size	_ZN4vec33dotERKS_, .-_ZN4vec33dotERKS_
	.align 2
	.globl	_ZN4vec35crossERKS_
	.type	_ZN4vec35crossERKS_, @function
_ZN4vec35crossERKS_:
.LFB2025:
	.cfi_startproc
	endbr64
	movss	4(%rdi), %xmm2
	movss	8(%rdi), %xmm0
	movss	8(%rsi), %xmm3
	movss	4(%rsi), %xmm1
	movaps	%xmm2, %xmm4
	movaps	%xmm0, %xmm5
	mulss	%xmm1, %xmm5
	mulss	%xmm3, %xmm4
	subss	%xmm5, %xmm4
	movss	(%rdi), %xmm5
	mulss	%xmm5, %xmm3
	movss	%xmm4, -20(%rsp)
	movss	(%rsi), %xmm4
	mulss	%xmm5, %xmm1
	mulss	%xmm4, %xmm0
	mulss	%xmm4, %xmm2
	subss	%xmm3, %xmm0
	subss	%xmm2, %xmm1
	movss	%xmm0, -16(%rsp)
	movq	-20(%rsp), %xmm0
	ret
	.cfi_endproc
.LFE2025:
	.size	_ZN4vec35crossERKS_, .-_ZN4vec35crossERKS_
	.align 2
	.globl	_ZN4vec33magEv
	.type	_ZN4vec33magEv, @function
_ZN4vec33magEv:
.LFB2026:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm0
	movss	4(%rdi), %xmm2
	movss	8(%rdi), %xmm1
	mulss	%xmm0, %xmm0
	mulss	%xmm2, %xmm2
	mulss	%xmm1, %xmm1
	addss	%xmm2, %xmm0
	addss	%xmm1, %xmm0
	jmp	sqrtf@PLT
	.cfi_endproc
.LFE2026:
	.size	_ZN4vec33magEv, .-_ZN4vec33magEv
	.align 2
	.globl	_ZN4vec35magSqEv
	.type	_ZN4vec35magSqEv, @function
_ZN4vec35magSqEv:
.LFB2027:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm0
	movss	4(%rdi), %xmm2
	movss	8(%rdi), %xmm1
	mulss	%xmm2, %xmm2
	mulss	%xmm0, %xmm0
	mulss	%xmm1, %xmm1
	addss	%xmm2, %xmm0
	addss	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE2027:
	.size	_ZN4vec35magSqEv, .-_ZN4vec35magSqEv
	.align 2
	.globl	_ZN4vec38flipSignEv
	.type	_ZN4vec38flipSignEv, @function
_ZN4vec38flipSignEv:
.LFB2028:
	.cfi_startproc
	endbr64
	movss	(%rdi), %xmm0
	movss	.LC0(%rip), %xmm1
	movq	%rdi, %rax
	xorps	%xmm1, %xmm0
	movss	%xmm0, (%rdi)
	movss	4(%rdi), %xmm0
	xorps	%xmm1, %xmm0
	movss	%xmm0, 4(%rdi)
	movss	8(%rdi), %xmm0
	xorps	%xmm1, %xmm0
	movss	%xmm0, 8(%rdi)
	ret
	.cfi_endproc
.LFE2028:
	.size	_ZN4vec38flipSignEv, .-_ZN4vec38flipSignEv
	.align 2
	.globl	_ZN4vec36isZeroEf
	.type	_ZN4vec36isZeroEf, @function
_ZN4vec36isZeroEf:
.LFB2029:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm3
	call	_ZN4vec35magSqEv
	mulss	%xmm3, %xmm3
	comiss	%xmm0, %xmm3
	setnb	%al
	ret
	.cfi_endproc
.LFE2029:
	.size	_ZN4vec36isZeroEf, .-_ZN4vec36isZeroEf
	.align 2
	.globl	_ZN4vec37isEqualERKS_f
	.type	_ZN4vec37isEqualERKS_f, @function
_ZN4vec37isEqualERKS_f:
.LFB2030:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	_ZN4vec3miERKS_
	leaq	28(%rsp), %rdi
	movq	%xmm0, 28(%rsp)
	movss	%xmm1, 36(%rsp)
	call	_ZN4vec35magSqEv
	movss	12(%rsp), %xmm2
	mulss	%xmm2, %xmm2
	comiss	%xmm0, %xmm2
	setnb	%al
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	addq	$56, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	_ZN4vec37isEqualERKS_f, .-_ZN4vec37isEqualERKS_f
	.align 2
	.globl	_ZN4vec38clampMagEf
	.type	_ZN4vec38clampMagEf, @function
_ZN4vec38clampMagEf:
.LFB2031:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm3
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	mulss	%xmm3, %xmm3
	call	_ZN4vec35magSqEv
	comiss	%xmm3, %xmm0
	jbe	.L41
	call	_ZN4vec33magEv
.L41:
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2031:
	.size	_ZN4vec38clampMagEf, .-_ZN4vec38clampMagEf
	.globl	_ZplfRK4vec3
	.type	_ZplfRK4vec3, @function
_ZplfRK4vec3:
.LFB2032:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm1
	movss	(%rdi), %xmm0
	addss	%xmm1, %xmm0
	movss	%xmm0, -20(%rsp)
	movss	4(%rdi), %xmm0
	addss	%xmm1, %xmm0
	addss	8(%rdi), %xmm1
	movss	%xmm0, -16(%rsp)
	movq	-20(%rsp), %xmm0
	ret
	.cfi_endproc
.LFE2032:
	.size	_ZplfRK4vec3, .-_ZplfRK4vec3
	.globl	_ZmifRK4vec3
	.type	_ZmifRK4vec3, @function
_ZmifRK4vec3:
.LFB2033:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm1
	subss	(%rdi), %xmm0
	movss	%xmm0, -20(%rsp)
	movaps	%xmm1, %xmm0
	subss	4(%rdi), %xmm0
	subss	8(%rdi), %xmm1
	movss	%xmm0, -16(%rsp)
	movq	-20(%rsp), %xmm0
	ret
	.cfi_endproc
.LFE2033:
	.size	_ZmifRK4vec3, .-_ZmifRK4vec3
	.globl	_ZmlfRK4vec3
	.type	_ZmlfRK4vec3, @function
_ZmlfRK4vec3:
.LFB2034:
	.cfi_startproc
	endbr64
	movaps	%xmm0, %xmm1
	movss	(%rdi), %xmm0
	mulss	%xmm1, %xmm0
	movss	%xmm0, -20(%rsp)
	movss	4(%rdi), %xmm0
	mulss	%xmm1, %xmm0
	mulss	8(%rdi), %xmm1
	movss	%xmm0, -16(%rsp)
	movq	-20(%rsp), %xmm0
	ret
	.cfi_endproc
.LFE2034:
	.size	_ZmlfRK4vec3, .-_ZmlfRK4vec3
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2060:
	.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
.LFE2060:
	.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
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.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:

#ifndef HOST_DEVICE_VEC3
#define HOST_DEVICE_VEC3
#include "hip/hip_runtime.h"

#define CUDA_GEN_BOTH __device__ __host__

class vec3 {
public:
	float x, y, z;

	CUDA_GEN_BOTH vec3 operator+(const vec3&);
	CUDA_GEN_BOTH vec3 operator-(const vec3&);
	CUDA_GEN_BOTH vec3 operator*(const vec3&);
	CUDA_GEN_BOTH vec3 operator+(float);
	CUDA_GEN_BOTH vec3 operator-(float);
	CUDA_GEN_BOTH vec3 operator*(float);
	CUDA_GEN_BOTH vec3 operator/(float);

	CUDA_GEN_BOTH vec3& operator+=(const vec3&);
	CUDA_GEN_BOTH vec3& operator-=(const vec3&);
	CUDA_GEN_BOTH vec3& operator*=(const vec3&);
	CUDA_GEN_BOTH vec3& operator+=(float);
	CUDA_GEN_BOTH vec3& operator-=(float);
	CUDA_GEN_BOTH vec3& operator*=(float);
	CUDA_GEN_BOTH vec3& operator/=(float);

	CUDA_GEN_BOTH float dot(const vec3&);
	CUDA_GEN_BOTH vec3 cross(const vec3&);
	CUDA_GEN_BOTH float mag();
	CUDA_GEN_BOTH float magSq();
	CUDA_GEN_BOTH float magnitude() { return mag(); };
	CUDA_GEN_BOTH float magnitudeSquared() { return magSq(); };
	CUDA_GEN_BOTH vec3& flipSign();
	CUDA_GEN_BOTH bool isZero(float epsilon = 0.0f);
	CUDA_GEN_BOTH bool isEqual(const vec3&, float epsilon = 0.0f);
	CUDA_GEN_BOTH vec3& clampMag(float mag);
};


CUDA_GEN_BOTH vec3 operator+(float, const vec3&);
CUDA_GEN_BOTH vec3 operator-(float, const vec3&);
CUDA_GEN_BOTH vec3 operator*(float, const vec3&);

#endif
	.text
	.file	"vec3.hip"
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.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_

	.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
