	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_PrevWeapon_f                ## -- Begin function CG_PrevWeapon_f
	.p2align	4, 0x90
_CG_PrevWeapon_f:                       ## @CG_PrevWeapon_f
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_cg@GOTPCREL(%rip), %r13
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	_PMF_FOLLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_8
## %bb.2:
	movl	(%r13), %r14d
	movl	4(%r13), %eax
	movl	%eax, 8(%r13)
	movl	$15, %r15d
	movq	_WP_GAUNTLET@GOTPCREL(%rip), %r12
	movl	$15, %ebx
	movl	%r14d, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	subl	$1, %edi
	cmovbl	%r15d, %edi
	movl	%edi, (%r13)
	cmpl	(%r12), %edi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_CG_WeaponSelectable
	testq	%rax, %rax
	jne	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	subl	$1, %ebx
	jb	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	jmp	LBB0_3
LBB0_7:
	movl	%r14d, (%r13)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,24,3                        ## @cg
	.comm	_PMF_FOLLOW,4,2                 ## @PMF_FOLLOW
	.comm	_WP_GAUNTLET,4,2                ## @WP_GAUNTLET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_PrevWeapon_f                ; -- Begin function CG_PrevWeapon_f
	.p2align	2
_CG_PrevWeapon_f:                       ; @CG_PrevWeapon_f
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _cg@GOTPAGE
Lloh1:
	ldr	x19, [x19, _cg@GOTPAGEOFF]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.1:
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _PMF_FOLLOW@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PMF_FOLLOW@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.2:
	ldp	w20, w8, [x19]
	str	w8, [x19, #8]
	mov	w21, #15
Lloh5:
	adrp	x22, _WP_GAUNTLET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _WP_GAUNTLET@GOTPAGEOFF]
	mov	w23, #15
	mov	x8, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w9, w8, #1
	cmp	w8, #0
	csel	w0, w21, w9, eq
	str	w0, [x19]
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_CG_WeaponSelectable
	cbnz	x0, LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	w23, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	sub	w23, w23, #1
	b	LBB0_3
LBB0_7:
	str	w20, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,24,3                        ; @cg
	.comm	_PMF_FOLLOW,4,2                 ; @PMF_FOLLOW
	.comm	_WP_GAUNTLET,4,2                ; @WP_GAUNTLET
.subsections_via_symbols
