	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function CG_CalcViewValues
LCPI0_0:
	.quad	0x405fc00000000000              ## double 127
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_CalcViewValues:                     ## @CG_CalcViewValues
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_cg@GOTPCREL(%rip), %rbx
	leaq	28(%rbx), %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	xorl	%eax, %eax
	callq	_CG_CalcVrect
	movq	80(%rbx), %rax
	movq	_PM_INTERMISSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	36(%rbx), %esi
	movl	108(%rbx), %edi
	callq	_VectorCopy
	movl	48(%rbx), %esi
	movl	104(%rbx), %edi
	callq	_VectorCopy
	movl	32(%rbx), %esi
	movl	48(%rbx), %edi
	callq	_AnglesToAxis
	jmp	LBB0_12
LBB0_2:
	movl	88(%rbx), %eax
	movl	%eax, %ecx
	shrl	$7, %ecx
	andl	$127, %eax
	cvtsi2sd	%eax, %xmm0
	divsd	LCPI0_0(%rip), %xmm0
	andl	$1, %ecx
	movq	_M_PI@GOTPCREL(%rip), %rax
	cvtsi2sdl	(%rax), %xmm1
	movl	%ecx, (%rbx)
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %edi
	callq	_sin
	movl	%eax, %edi
	callq	_fabs
	movl	%eax, 72(%rbx)
	movq	96(%rbx), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %edi
	imull	%ecx, %ecx
	imull	%edi, %edi
	addl	%ecx, %edi
	callq	_sqrt
	movl	%eax, 68(%rbx)
	movl	36(%rbx), %esi
	movl	108(%rbx), %edi
	callq	_VectorCopy
	movl	48(%rbx), %esi
	movl	104(%rbx), %edi
	callq	_VectorCopy
	movq	_cg_cameraOrbit@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.3:
	movq	8(%rbx), %rcx
	cmpq	16(%rbx), %rcx
	jle	LBB0_5
## %bb.4:
	movq	_cg_cameraOrbitDelay@GOTPCREL(%rip), %rdx
	addq	(%rdx), %rcx
	movq	%rcx, 16(%rbx)
	movl	(%rax), %eax
	movq	_cg_thirdPersonAngle@GOTPCREL(%rip), %rcx
	addl	%eax, (%rcx)
LBB0_5:
	movq	_cg_errorDecay@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.6:
	movl	$0, 24(%rbx)
LBB0_7:
	cmpq	$0, 56(%rbx)
	je	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_CG_OffsetThirdPersonView
	jmp	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	callq	_CG_OffsetFirstPersonView
LBB0_10:
	movl	32(%rbx), %esi
	movl	48(%rbx), %edi
	callq	_AnglesToAxis
	cmpq	$0, 40(%rbx)
	je	LBB0_12
## %bb.11:
	movq	_RDF_NOWORLDMODEL@GOTPCREL(%rip), %rax
	movq	_RDF_HYPERSPACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, 28(%rbx)
LBB0_12:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_CG_CalcFov                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,112,3                       ## @cg
	.comm	_PM_INTERMISSION,8,3            ## @PM_INTERMISSION
	.comm	_M_PI,4,2                       ## @M_PI
	.comm	_cg_cameraOrbit,16,3            ## @cg_cameraOrbit
	.comm	_cg_cameraOrbitDelay,8,3        ## @cg_cameraOrbitDelay
	.comm	_cg_thirdPersonAngle,4,2        ## @cg_thirdPersonAngle
	.comm	_cg_errorDecay,4,2              ## @cg_errorDecay
	.comm	_RDF_NOWORLDMODEL,4,2           ## @RDF_NOWORLDMODEL
	.comm	_RDF_HYPERSPACE,4,2             ## @RDF_HYPERSPACE
	.no_dead_strip	_CG_CalcViewValues
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_CalcViewValues
_CG_CalcViewValues:                     ; @CG_CalcViewValues
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _cg@GOTPAGE
Lloh1:
	ldr	x19, [x19, _cg@GOTPAGEOFF]
	add	x0, x19, #28
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	bl	_CG_CalcVrect
	ldr	x8, [x19, #80]
Lloh2:
	adrp	x9, _PM_INTERMISSION@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PM_INTERMISSION@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #108]
	ldr	w1, [x19, #36]
	bl	_VectorCopy
	ldr	w0, [x19, #104]
	ldr	w1, [x19, #48]
	bl	_VectorCopy
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #32]
	bl	_AnglesToAxis
	b	LBB0_12
LBB0_2:
	ldr	w8, [x19, #88]
	ubfx	w9, w8, #7, #1
	and	w8, w8, #0x7f
	scvtf	d0, w8
	str	w9, [x19]
	mov	x8, #211106232532992
	movk	x8, #16479, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
Lloh5:
	adrp	x8, _M_PI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _M_PI@GOTPAGEOFF]
Lloh7:
	ldr	s1, [x8]
	sshll.2d	v1, v1, #0
	scvtf	d1, d1
	fmul	d0, d0, d1
	fcvtzs	w0, d0
	bl	_sin
	bl	_fabs
	str	w0, [x19, #72]
	ldr	x8, [x19, #96]
	ldp	w9, w8, [x8]
	mul	w9, w9, w9
	madd	w0, w8, w8, w9
	bl	_sqrt
	str	w0, [x19, #68]
	ldr	w0, [x19, #108]
	ldr	w1, [x19, #36]
	bl	_VectorCopy
	ldr	w0, [x19, #104]
	ldr	w1, [x19, #48]
	bl	_VectorCopy
Lloh8:
	adrp	x8, _cg_cameraOrbit@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cg_cameraOrbit@GOTPAGEOFF]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.3:
	ldp	x9, x10, [x19, #8]
	cmp	x9, x10
	b.le	LBB0_5
; %bb.4:
Lloh10:
	adrp	x10, _cg_cameraOrbitDelay@GOTPAGE
Lloh11:
	ldr	x10, [x10, _cg_cameraOrbitDelay@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	add	x9, x10, x9
	str	x9, [x19, #16]
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _cg_thirdPersonAngle@GOTPAGE
Lloh14:
	ldr	x9, [x9, _cg_thirdPersonAngle@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
LBB0_5:
Lloh15:
	adrp	x8, _cg_errorDecay@GOTPAGE
Lloh16:
	ldr	x8, [x8, _cg_errorDecay@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.6:
	str	wzr, [x19, #24]
LBB0_7:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_9
; %bb.8:
	bl	_CG_OffsetThirdPersonView
	b	LBB0_10
LBB0_9:
	bl	_CG_OffsetFirstPersonView
LBB0_10:
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #32]
	bl	_AnglesToAxis
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_12
; %bb.11:
Lloh18:
	adrp	x8, _RDF_NOWORLDMODEL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RDF_NOWORLDMODEL@GOTPAGEOFF]
Lloh20:
	adrp	x9, _RDF_HYPERSPACE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _RDF_HYPERSPACE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #28]
	orr	w8, w8, w9
	str	w8, [x19, #28]
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CG_CalcFov
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,112,3                       ; @cg
	.comm	_PM_INTERMISSION,8,3            ; @PM_INTERMISSION
	.comm	_M_PI,4,2                       ; @M_PI
	.comm	_cg_cameraOrbit,16,3            ; @cg_cameraOrbit
	.comm	_cg_cameraOrbitDelay,8,3        ; @cg_cameraOrbitDelay
	.comm	_cg_thirdPersonAngle,4,2        ; @cg_thirdPersonAngle
	.comm	_cg_errorDecay,4,2              ; @cg_errorDecay
	.comm	_RDF_NOWORLDMODEL,4,2           ; @RDF_NOWORLDMODEL
	.comm	_RDF_HYPERSPACE,4,2             ; @RDF_HYPERSPACE
	.no_dead_strip	_CG_CalcViewValues
.subsections_via_symbols
