	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_Weapon_f                    ## -- Begin function CG_Weapon_f
	.p2align	4, 0x90
_CG_Weapon_f:                           ## @CG_Weapon_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_cg@GOTPCREL(%rip), %rbx
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_PMF_FOLLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movl	$1, %edi
	callq	_CG_Argv
	movl	%eax, %edi
	callq	_atoi
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:
	movq	_MAX_WEAPONS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_6
## %bb.4:
	movl	16(%rbx), %ecx
	movl	%ecx, 20(%rbx)
	movq	8(%rbx), %rcx
	movq	8(%rcx), %rcx
	movq	_STAT_WEAPONS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %ecx
	btl	%eax, %ecx
	jae	LBB0_6
## %bb.5:
	movl	%eax, (%rbx)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,24,3                        ## @cg
	.comm	_PMF_FOLLOW,4,2                 ## @PMF_FOLLOW
	.comm	_MAX_WEAPONS,4,2                ## @MAX_WEAPONS
	.comm	_STAT_WEAPONS,8,3               ## @STAT_WEAPONS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_Weapon_f                    ; -- Begin function CG_Weapon_f
	.p2align	2
_CG_Weapon_f:                           ; @CG_Weapon_f
	.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]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %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.eq	LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	w0, #1
	bl	_CG_Argv
	bl	_atoi
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.4:
Lloh5:
	adrp	x8, _MAX_WEAPONS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_WEAPONS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.5:
	ldr	w8, [x19, #16]
	str	w8, [x19, #20]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
Lloh8:
	adrp	x9, _STAT_WEAPONS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _STAT_WEAPONS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	lsr	w8, w8, w0
	tbz	w8, #0, LBB0_2
; %bb.6:
	str	w0, [x19]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,24,3                        ; @cg
	.comm	_PMF_FOLLOW,4,2                 ; @PMF_FOLLOW
	.comm	_MAX_WEAPONS,4,2                ; @MAX_WEAPONS
	.comm	_STAT_WEAPONS,8,3               ; @STAT_WEAPONS
.subsections_via_symbols
