// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: AngleVectors
void AngleVectors (vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
{
	float		angle;
	static float		sr, sp, sy, cr, cp, cy;
	// static to help MS compiler fp bugs

	angle = angles[YAW] * (M_PI*2 / 360);
	sy = sin(angle);
	cy = cos(angle);
	angle = angles[PITCH] * (M_PI*2 / 360);
	sp = sin(angle);
	cp = cos(angle);
	angle = angles[ROLL] * (M_PI*2 / 360);
	sr = sin(angle);
	cr = cos(angle);

	if (forward)
	{
		forward[0] = cp*cy;
		forward[1] = cp*sy;
		forward[2] = -sp;
	}
	if (right)
	{
		right[0] = (-1*sr*sp*cy+-1*cr*-sy);
		right[1] = (-1*sr*sp*sy+-1*cr*cy);
		right[2] = -1*sr*cp;
	}
	if (up)
	{
		up[0] = (cr*sp*cy+-sr*-sy);
		up[1] = (cr*sp*sy+-sr*cy);
		up[2] = cr*cp;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb833(%rip), %xmm1     # 0x77c30
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x19770
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x46e60(%rip)    # 0xb3284
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x18a40
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x46e52(%rip)    # 0xb3290
movq -0x8(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb7de(%rip), %xmm1     # 0x77c30
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x19770
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x46e07(%rip)    # 0xb3280
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x18a40
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x46df9(%rip)    # 0xb328c
movq -0x8(%rbp), %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb788(%rip), %xmm1     # 0x77c30
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x19770
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x46dad(%rip)    # 0xb327c
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x18a40
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x46d9f(%rip)    # 0xb3288
cmpq $0x0, -0x10(%rbp)
je 0x6c53f
movss 0x46d94(%rip), %xmm0    # 0xb328c
mulss 0x46d90(%rip), %xmm0    # 0xb3290
movq -0x10(%rbp), %rax
movss %xmm0, (%rax)
movss 0x46d7c(%rip), %xmm0    # 0xb328c
mulss 0x46d6c(%rip), %xmm0    # 0xb3284
movq -0x10(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss 0x46d57(%rip), %xmm0    # 0xb3280
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x8(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x6c60d
movss 0x6636(%rip), %xmm0     # 0x72b88
mulss 0x46d22(%rip), %xmm0    # 0xb327c
mulss 0x46d1e(%rip), %xmm0    # 0xb3280
movss 0x46d26(%rip), %xmm2    # 0xb3290
movss 0x6616(%rip), %xmm1     # 0x72b88
mulss 0x46d0e(%rip), %xmm1    # 0xb3288
movss 0x46d02(%rip), %xmm3    # 0xb3284
movd %xmm3, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movss 0x65dd(%rip), %xmm0     # 0x72b88
mulss 0x46cc9(%rip), %xmm0    # 0xb327c
mulss 0x46cc5(%rip), %xmm0    # 0xb3280
movss 0x46cc1(%rip), %xmm2    # 0xb3284
movss 0x65bd(%rip), %xmm1     # 0x72b88
mulss 0x46cb5(%rip), %xmm1    # 0xb3288
mulss 0x46cb5(%rip), %xmm1    # 0xb3290
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss 0x6594(%rip), %xmm0     # 0x72b88
mulss 0x46c80(%rip), %xmm0    # 0xb327c
mulss 0x46c88(%rip), %xmm0    # 0xb328c
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x6c6cd
movss 0x46c68(%rip), %xmm0    # 0xb3288
mulss 0x46c58(%rip), %xmm0    # 0xb3280
movss 0x46c60(%rip), %xmm2    # 0xb3290
movss 0x46c44(%rip), %xmm1    # 0xb327c
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
movss 0x46c37(%rip), %xmm3    # 0xb3284
movd %xmm3, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, (%rax)
movss 0x46c12(%rip), %xmm0    # 0xb3288
mulss 0x46c02(%rip), %xmm0    # 0xb3280
movss 0x46bfe(%rip), %xmm2    # 0xb3284
movss 0x46bee(%rip), %xmm1    # 0xb327c
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss 0x46bed(%rip), %xmm1    # 0xb3290
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss 0x46bcc(%rip), %xmm0    # 0xb3288
mulss 0x46bc8(%rip), %xmm0    # 0xb328c
movq -0x20(%rbp), %rax
movss %xmm0, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)