	.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_MachinegunSpinAngle
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_MachinegunSpinAngle:                ## @CG_MachinegunSpinAngle
	.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	%rdi, %rbx
	movq	_cg@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	subl	24(%rdi), %edx
	movl	28(%rdi), %ecx
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	movq	_SPIN_SPEED@GOTPCREL(%rip), %rsi
	imull	(%rsi), %edx
	addl	32(%rbx), %edx
	cvtsi2ss	%edx, %xmm0
	jmp	LBB0_3
LBB0_2:
	movq	_COAST_TIME@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	cmpl	%esi, %edx
	cmovgel	%esi, %edx
	movq	_SPIN_SPEED@GOTPCREL(%rip), %rdi
	cvtsi2ssl	(%rdi), %xmm0
	cvtsi2ss	%esi, %xmm1
	subl	%edx, %esi
	cvtsi2ss	%esi, %xmm2
	divss	%xmm1, %xmm2
	xorps	%xmm1, %xmm1
	cvtsi2ssl	32(%rbx), %xmm1
	addss	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%edx, %xmm0
	mulss	LCPI0_0(%rip), %xmm2
	mulss	%xmm2, %xmm0
	addss	%xmm1, %xmm0
LBB0_3:
	movq	_EF_FIRING@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	xorl	%esi, %esi
	testl	%edx, (%rbx)
	sete	%sil
	cmpl	%esi, %ecx
	jne	LBB0_5
## %bb.4:
	movl	%eax, 24(%rbx)
	movss	%xmm0, -20(%rbp)                ## 4-byte Spill
	movss	-20(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_AngleMod
	movss	-20(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movl	%eax, 32(%rbx)
	movl	(%r14), %eax
	xorl	%ecx, %ecx
	andl	(%rbx), %eax
	setne	%cl
	movl	%ecx, 28(%rbx)
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,4,2                         ## @cg
	.comm	_SPIN_SPEED,4,2                 ## @SPIN_SPEED
	.comm	_COAST_TIME,4,2                 ## @COAST_TIME
	.comm	_EF_FIRING,4,2                  ## @EF_FIRING
	.comm	_CHAN_WEAPON,4,2                ## @CHAN_WEAPON
	.comm	_WP_CHAINGUN,8,3                ## @WP_CHAINGUN
	.comm	_qfalse,4,2                     ## @qfalse
	.no_dead_strip	_CG_MachinegunSpinAngle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_MachinegunSpinAngle
_CG_MachinegunSpinAngle:                ; @CG_MachinegunSpinAngle
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-48]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _cg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w10, w9, [x0, #24]
	sub	w10, w8, w10
	cbz	w9, LBB0_2
; %bb.1:
	ldr	w11, [x19, #32]
Lloh3:
	adrp	x12, _SPIN_SPEED@GOTPAGE
Lloh4:
	ldr	x12, [x12, _SPIN_SPEED@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	madd	w10, w12, w10, w11
	scvtf	s8, w10
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x11, _COAST_TIME@GOTPAGE
Lloh7:
	ldr	x11, [x11, _COAST_TIME@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	cmp	w10, w11
	csel	w10, w10, w11, lt
Lloh9:
	adrp	x12, _SPIN_SPEED@GOTPAGE
Lloh10:
	ldr	x12, [x12, _SPIN_SPEED@GOTPAGEOFF]
Lloh11:
	ldr	s0, [x12]
	sub	w12, w11, w10
	scvtf	s1, w12
	scvtf	s0, s0
	scvtf	s2, w11
	fdiv	s1, s1, s2
	fadd	s0, s1, s0
	fmov	s1, #0.50000000
	fmul	s0, s0, s1
	ldr	s1, [x19, #32]
	scvtf	s1, s1
	scvtf	s2, w10
	fmadd	s8, s2, s0, s1
LBB0_3:
	ldr	w10, [x19]
Lloh12:
	adrp	x20, _EF_FIRING@GOTPAGE
Lloh13:
	ldr	x20, [x20, _EF_FIRING@GOTPAGEOFF]
	ldr	w11, [x20]
	tst	w11, w10
	cset	w10, eq
	cmp	w9, w10
	b.ne	LBB0_5
; %bb.4:
	str	w8, [x19, #24]
	fmov	s0, s8
	bl	_AngleMod
	ldr	w8, [x19]
	ldr	w9, [x20]
	tst	w9, w8
	cset	w8, ne
	stp	w8, w0, [x19, #28]
LBB0_5:
	fmov	s0, s8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,4,2                         ; @cg
	.comm	_SPIN_SPEED,4,2                 ; @SPIN_SPEED
	.comm	_COAST_TIME,4,2                 ; @COAST_TIME
	.comm	_EF_FIRING,4,2                  ; @EF_FIRING
	.comm	_CHAN_WEAPON,4,2                ; @CHAN_WEAPON
	.comm	_WP_CHAINGUN,8,3                ; @WP_CHAINGUN
	.comm	_qfalse,4,2                     ; @qfalse
	.no_dead_strip	_CG_MachinegunSpinAngle
.subsections_via_symbols
