// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: RotatePointAroundVector
void RotatePointAroundVector( vec3_t dst, const vec3_t dir, const vec3_t point, float degrees )
{
	float	m[3][3];
	float	im[3][3];
	float	zrot[3][3];
	float	tmpmat[3][3];
	float	rot[3][3];
	int	i;
	vec3_t vr, vup, vf;

	vf[0] = dir[0];
	vf[1] = dir[1];
	vf[2] = dir[2];

	PerpendicularVector( vr, dir );
	CrossProduct( vr, vf, vup );

	m[0][0] = vr[0];
	m[1][0] = vr[1];
	m[2][0] = vr[2];

	m[0][1] = vup[0];
	m[1][1] = vup[1];
	m[2][1] = vup[2];

	m[0][2] = vf[0];
	m[1][2] = vf[1];
	m[2][2] = vf[2];

	memcpy( im, m, sizeof( im ) );

	im[0][1] = m[1][0];
	im[0][2] = m[2][0];
	im[1][0] = m[0][1];
	im[1][2] = m[2][1];
	im[2][0] = m[0][2];
	im[2][1] = m[1][2];

	memset( zrot, 0, sizeof( zrot ) );
	zrot[0][0] = zrot[1][1] = zrot[2][2] = 1.0F;

	zrot[0][0] = cos( DEG2RAD( degrees ) );
	zrot[0][1] = sin( DEG2RAD( degrees ) );
	zrot[1][0] = -sin( DEG2RAD( degrees ) );
	zrot[1][1] = cos( DEG2RAD( degrees ) );

	R_ConcatRotations( m, zrot, tmpmat );
	R_ConcatRotations( tmpmat, im, rot );

	for ( i = 0; i < 3; i++ )
	{
		dst[i] = rot[i][0] * point[0] + rot[i][1] * point[1] + rot[i][2] * point[2];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x128(%rbp)
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x124(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x120(%rbp)
leaq -0x110(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x18c70
leaq -0x110(%rbp), %rdi
leaq -0x128(%rbp), %rsi
leaq -0x11c(%rbp), %rdx
callq 0x18ca0
movss -0x110(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x10c(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x108(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x11c(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x118(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x114(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x128(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x124(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x120(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x24, %edx
callq 0x18dc0
movss -0x34(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movss -0x24(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x38(%rbp), %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x2c(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x24, %edx
callq 0x188f0
movss 0x41b6(%rip), %xmm0     # 0x6feec
movss %xmm0, -0x80(%rbp)
movss 0x41a9(%rip), %xmm0     # 0x6feec
movss %xmm0, -0x90(%rbp)
movss 0x4199(%rip), %xmm0     # 0x6feec
movss %xmm0, -0xa0(%rbp)
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xa3ac(%rip), %xmm1     # 0x76118
mulsd %xmm1, %xmm0
movsd 0xa3a8(%rip), %xmm1     # 0x76120
divsd %xmm1, %xmm0
callq 0x18a40
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xa0(%rbp)
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xa37a(%rip), %xmm1     # 0x76118
mulsd %xmm1, %xmm0
movsd 0xa376(%rip), %xmm1     # 0x76120
divsd %xmm1, %xmm0
callq 0x19770
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x9c(%rbp)
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xa348(%rip), %xmm1     # 0x76118
mulsd %xmm1, %xmm0
movsd 0xa344(%rip), %xmm1     # 0x76120
divsd %xmm1, %xmm0
callq 0x19770
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x94(%rbp)
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xa2ff(%rip), %xmm1     # 0x76118
mulsd %xmm1, %xmm0
movsd 0xa2fb(%rip), %xmm1     # 0x76120
divsd %xmm1, %xmm0
callq 0x18a40
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x90(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x196b0
leaq -0xd0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x196b0
movl $0x0, -0x104(%rbp)
cmpl $0x3, -0x104(%rbp)
jge 0x6bf1a
movslq -0x104(%rbp), %rcx
leaq -0x100(%rbp), %rax
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm1
movq -0x18(%rbp), %rax
movss (%rax), %xmm2
movslq -0x104(%rbp), %rcx
leaq -0x100(%rbp), %rax
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
movq -0x18(%rbp), %rax
mulss 0x4(%rax), %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movslq -0x104(%rbp), %rcx
leaq -0x100(%rbp), %rax
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x104(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x104(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x104(%rbp)
jmp 0x6be72
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)