	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function CG_CalcFov
LCPI0_0:
	.long	0x42b40000                      ## float 90
LCPI0_1:
	.long	0x3f800000                      ## float 1
LCPI0_2:
	.long	0x43200000                      ## float 160
LCPI0_3:
	.long	0x43b40000                      ## float 360
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_4:
	.quad	0x408f400000000000              ## double 1000
LCPI0_5:
	.quad	0x4052c00000000000              ## double 75
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_CalcFov:                            ## @CG_CalcFov
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_cg@GOTPCREL(%rip), %r14
	movq	48(%r14), %rax
	movq	_PM_INTERMISSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movss	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	jmp	LBB0_16
LBB0_2:
	movq	_cgs@GOTPCREL(%rip), %rax
	movq	_DF_FIXED_FOV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.3:
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	jmp	LBB0_7
LBB0_4:
	movq	_cg_fov@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	ja	LBB0_7
## %bb.5:
	ucomiss	LCPI0_2(%rip), %xmm1
	movaps	%xmm1, %xmm0
	jbe	LBB0_7
## %bb.6:
	movss	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
LBB0_7:
	movq	_cg_zoomFov@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm3
	ja	LBB0_10
## %bb.8:
	ucomiss	LCPI0_2(%rip), %xmm1
	movaps	%xmm1, %xmm3
	jbe	LBB0_10
## %bb.9:
	movss	LCPI0_2(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
LBB0_10:
	cmpq	$0, 40(%r14)
	movsd	(%r14), %xmm1                   ## xmm1 = mem[0],zero
	movss	8(%r14), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	cvtss2sd	%xmm2, %xmm2
	subsd	%xmm2, %xmm1
	movq	_ZOOM_TIME@GOTPCREL(%rip), %rax
	xorps	%xmm2, %xmm2
	cvtsi2ssq	(%rax), %xmm2
	cvtss2sd	%xmm2, %xmm2
	divsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	je	LBB0_13
## %bb.11:
	ucomiss	LCPI0_1(%rip), %xmm1
	ja	LBB0_16
## %bb.12:
	subss	%xmm0, %xmm3
	mulss	%xmm3, %xmm1
	addss	%xmm0, %xmm1
	movaps	%xmm1, %xmm3
	jmp	LBB0_16
LBB0_13:
	ucomiss	LCPI0_1(%rip), %xmm1
	jbe	LBB0_15
## %bb.14:
	movaps	%xmm0, %xmm3
	jmp	LBB0_16
LBB0_15:
	subss	%xmm3, %xmm0
	mulss	%xmm0, %xmm1
	addss	%xmm1, %xmm3
LBB0_16:
	movss	%xmm3, -24(%rbp)                ## 4-byte Spill
	movss	16(%r14), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -20(%rbp)                ## 4-byte Spill
	movaps	%xmm3, %xmm0
	divss	LCPI0_3(%rip), %xmm0
	movq	_M_PI@GOTPCREL(%rip), %rbx
	mulss	(%rbx), %xmm0
	callq	_tan
	movss	-20(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	movl	32(%r14), %edi
	movaps	%xmm1, %xmm0
	callq	_atan2
	mulss	LCPI0_3(%rip), %xmm0
	divss	(%rbx), %xmm0
	movss	%xmm0, -20(%rbp)                ## 4-byte Spill
	movl	28(%r14), %edi
	movl	$-1, %esi
	callq	_CG_PointContents
	movq	_CONTENTS_WATER@GOTPCREL(%rip), %rcx
	movq	_CONTENTS_SLIME@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_CONTENTS_LAVA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_17
## %bb.18:
	movsd	(%r14), %xmm0                   ## xmm0 = mem[0],zero
	divsd	LCPI0_4(%rip), %xmm0
	movq	_WAVE_FREQUENCY@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	movss	(%rbx), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm1
	addsd	%xmm1, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movq	_WAVE_AMPLITUDE@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -28(%rbp)                ## 4-byte Spill
	callq	_sin
	mulss	-28(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	-24(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	-20(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm2
	movq	_qtrue@GOTPCREL(%rip), %rax
	movaps	%xmm1, %xmm0
	movaps	%xmm2, %xmm1
	jmp	LBB0_19
LBB0_17:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movss	-24(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	-20(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
LBB0_19:
	movl	(%rax), %eax
	movss	%xmm0, 20(%r14)
	movss	%xmm1, 24(%r14)
	cmpq	$0, 40(%r14)
	je	LBB0_20
## %bb.21:
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	divsd	LCPI0_5(%rip), %xmm0
	cvttsd2si	%xmm0, %ecx
	jmp	LBB0_22
LBB0_20:
	movl	$1, %ecx
LBB0_22:
	movl	%ecx, 12(%r14)
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,56,3                        ## @cg
	.comm	_PM_INTERMISSION,8,3            ## @PM_INTERMISSION
	.comm	_cgs,4,2                        ## @cgs
	.comm	_DF_FIXED_FOV,4,2               ## @DF_FIXED_FOV
	.comm	_cg_fov,4,2                     ## @cg_fov
	.comm	_cg_zoomFov,4,2                 ## @cg_zoomFov
	.comm	_ZOOM_TIME,8,3                  ## @ZOOM_TIME
	.comm	_M_PI,4,2                       ## @M_PI
	.comm	_CONTENTS_WATER,4,2             ## @CONTENTS_WATER
	.comm	_CONTENTS_SLIME,4,2             ## @CONTENTS_SLIME
	.comm	_CONTENTS_LAVA,4,2              ## @CONTENTS_LAVA
	.comm	_WAVE_FREQUENCY,8,3             ## @WAVE_FREQUENCY
	.comm	_WAVE_AMPLITUDE,4,2             ## @WAVE_AMPLITUDE
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_qfalse,4,2                     ## @qfalse
	.no_dead_strip	_CG_CalcFov
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_CalcFov
_CG_CalcFov:                            ; @CG_CalcFov
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	.cfi_offset b10, -56
	.cfi_offset b11, -64
Lloh0:
	adrp	x19, _cg@GOTPAGE
Lloh1:
	ldr	x19, [x19, _cg@GOTPAGEOFF]
	ldr	x8, [x19, #48]
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:
	mov	w8, #1119092736
	fmov	s8, w8
	b	LBB0_17
LBB0_2:
Lloh5:
	adrp	x8, _cgs@GOTPAGE
Lloh6:
	ldr	x8, [x8, _cgs@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _DF_FIXED_FOV@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DF_FIXED_FOV@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.3:
	mov	w8, #1119092736
LBB0_4:
	fmov	s0, w8
LBB0_5:
Lloh11:
	adrp	x8, _cg_zoomFov@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cg_zoomFov@GOTPAGEOFF]
Lloh13:
	ldr	s1, [x8]
	fmov	s8, #1.00000000
	fcmp	s1, s8
	b.mi	LBB0_8
; %bb.6:
	mov	w8, #1126170624
	fmov	s2, w8
	fcmp	s1, s2
	fmov	s8, s1
	b.le	LBB0_8
; %bb.7:
	mov	w8, #1126170624
	fmov	s8, w8
LBB0_8:
	ldr	x8, [x19, #40]
	ldr	d1, [x19]
	ldr	s2, [x19, #8]
	fcvt	d2, s2
	fsub	d1, d1, d2
Lloh14:
	adrp	x9, _ZOOM_TIME@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ZOOM_TIME@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	scvtf	s2, x9
	fcvt	d2, s2
	fdiv	d1, d1, d2
	fcvt	s1, d1
	fmov	s2, #1.00000000
	fcmp	s1, s2
	cbz	x8, LBB0_14
; %bb.9:
	b.gt	LBB0_17
; %bb.10:
	fsub	s2, s8, s0
	fmadd	s8, s1, s2, s0
	b	LBB0_17
LBB0_11:
Lloh17:
	adrp	x8, _cg_fov@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cg_fov@GOTPAGEOFF]
Lloh19:
	ldr	s1, [x8]
	fmov	s0, #1.00000000
	fcmp	s1, s0
	b.mi	LBB0_5
; %bb.12:
	mov	w8, #1126170624
	fmov	s0, w8
	fcmp	s1, s0
	fmov	s0, s1
	b.le	LBB0_5
; %bb.13:
	mov	w8, #1126170624
	b	LBB0_4
LBB0_14:
	b.le	LBB0_16
; %bb.15:
	fmov	s8, s0
	b	LBB0_17
LBB0_16:
	fsub	s0, s0, s8
	fmadd	s8, s1, s0, s8
LBB0_17:
	ldr	s9, [x19, #16]
	mov	w8, #1135869952
	fmov	s10, w8
	fdiv	s0, s8, s10
Lloh20:
	adrp	x20, _M_PI@GOTPAGE
Lloh21:
	ldr	x20, [x20, _M_PI@GOTPAGEOFF]
	ldr	s1, [x20]
	fmul	s0, s0, s1
	bl	_tan
	ldr	w0, [x19, #32]
	fdiv	s0, s9, s0
	bl	_atan2
	fmul	s0, s0, s10
	ldr	s1, [x20]
	ldr	w0, [x19, #28]
	fdiv	s9, s0, s1
	mov	w1, #-1
	bl	_CG_PointContents
Lloh22:
	adrp	x8, _CONTENTS_WATER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CONTENTS_WATER@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _CONTENTS_SLIME@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CONTENTS_SLIME@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh28:
	adrp	x9, _CONTENTS_LAVA@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CONTENTS_LAVA@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w0
	b.eq	LBB0_19
; %bb.18:
	ldr	d0, [x19]
	mov	x8, #70368744177664
	movk	x8, #16527, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
Lloh31:
	adrp	x8, _WAVE_FREQUENCY@GOTPAGE
Lloh32:
	ldr	x8, [x8, _WAVE_FREQUENCY@GOTPAGEOFF]
Lloh33:
	ldr	d1, [x8]
	fmul	d0, d0, d1
	ldr	s1, [x20]
	fcvt	d1, s1
	fmul	d0, d0, d1
	fadd	d0, d0, d0
	fcvt	s0, d0
Lloh34:
	adrp	x8, _WAVE_AMPLITUDE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _WAVE_AMPLITUDE@GOTPAGEOFF]
Lloh36:
	ldr	s10, [x8]
	bl	_sin
	fmul	s0, s10, s0
	fadd	s8, s8, s0
	fsub	s9, s9, s0
Lloh37:
	adrp	x8, _qtrue@GOTPAGE
Lloh38:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh39:
	adrp	x8, _qfalse@GOTPAGE
Lloh40:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
LBB0_20:
	ldr	w0, [x8]
	stp	s8, s9, [x19, #20]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_22
; %bb.21:
	fcvt	d0, s9
	mov	x8, #211106232532992
	movk	x8, #16466, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
	fcvtzs	w8, d0
	b	LBB0_23
LBB0_22:
	mov	w8, #1
LBB0_23:
	str	w8, [x19, #12]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,56,3                        ; @cg
	.comm	_PM_INTERMISSION,8,3            ; @PM_INTERMISSION
	.comm	_cgs,4,2                        ; @cgs
	.comm	_DF_FIXED_FOV,4,2               ; @DF_FIXED_FOV
	.comm	_cg_fov,4,2                     ; @cg_fov
	.comm	_cg_zoomFov,4,2                 ; @cg_zoomFov
	.comm	_ZOOM_TIME,8,3                  ; @ZOOM_TIME
	.comm	_M_PI,4,2                       ; @M_PI
	.comm	_CONTENTS_WATER,4,2             ; @CONTENTS_WATER
	.comm	_CONTENTS_SLIME,4,2             ; @CONTENTS_SLIME
	.comm	_CONTENTS_LAVA,4,2              ; @CONTENTS_LAVA
	.comm	_WAVE_FREQUENCY,8,3             ; @WAVE_FREQUENCY
	.comm	_WAVE_AMPLITUDE,4,2             ; @WAVE_AMPLITUDE
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_qfalse,4,2                     ; @qfalse
	.no_dead_strip	_CG_CalcFov
.subsections_via_symbols
