	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_CheckAmmo                    ## -- Begin function P_CheckAmmo
	.p2align	4, 0x90
_P_CheckAmmo:                           ## @P_CheckAmmo
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_weaponinfo@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	(%rdi), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movq	(%r9,%rdx), %r10
	movq	_am_noammo@GOTPCREL(%rip), %rsi
	movl	$1, %eax
	cmpq	(%rsi), %r10
	je	LBB0_26
## %bb.1:
	movq	_wp_bfg@GOTPCREL(%rip), %rsi
	movq	(%rsi), %r11
	movq	_wp_supershotgun@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	xorl	%ebx, %ebx
	cmpq	%rsi, %rcx
	sete	%r8b
	cmpq	%r11, %rcx
	jne	LBB0_2
## %bb.3:
	movq	_BFGCELLS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	jmp	LBB0_4
LBB0_2:
	movb	%r8b, %bl
	incl	%ebx
LBB0_4:
	movq	8(%rdi), %rcx
	cmpl	%ebx, (%rcx,%r10,4)
	jge	LBB0_26
## %bb.5:
	movq	%r11, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	_wp_plasma@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	_wp_nochange@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_am_cell@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	movq	_gamemode@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_shareware@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_am_shell@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_commercial@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	_wp_chaingun@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_am_clip@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_wp_shotgun@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	_wp_pistol@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	_wp_chainsaw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	_wp_missile@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_am_misl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_wp_fist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r12
	jmp	LBB0_6
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, (%rcx,%r8,4)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	je	LBB0_17
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, 16(%rdi)
	cmpq	%rdx, %rax
	jne	LBB0_25
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r12,%r10,8)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, (%rcx,%r11,4)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r10, %rax
	cmpq	%r14, %r13
	jne	LBB0_24
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, (%r12,%rsi,8)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$3, (%rcx,%r15,4)
	jl	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rsi, %rax
	cmpq	-112(%rbp), %r13                ## 8-byte Folded Reload
	je	LBB0_24
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, (%r12,%rbx,8)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, (%rcx,%r8,4)
	movq	%rbx, %rax
	jne	LBB0_24
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, (%r12,%r9,8)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, (%rcx,%r15,4)
	movq	%r9, %rax
	jne	LBB0_24
	jmp	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%r12,%rax,8)
	jne	LBB0_24
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%r12,%rax,8)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rcx,%rax,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jne	LBB0_24
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%r12,%rax,8)
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$41, (%rcx,%r11,4)
	jl	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%r14, %r13
	jne	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_25:
	movq	_ps_weapon@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rax,%rcx), %edx
	callq	_P_SetPsprite
	xorl	%eax, %eax
LBB0_26:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_weaponinfo,8,3                 ## @weaponinfo
	.comm	_wp_bfg,8,3                     ## @wp_bfg
	.comm	_BFGCELLS,4,2                   ## @BFGCELLS
	.comm	_wp_supershotgun,8,3            ## @wp_supershotgun
	.comm	_am_noammo,8,3                  ## @am_noammo
	.comm	_wp_plasma,8,3                  ## @wp_plasma
	.comm	_am_cell,8,3                    ## @am_cell
	.comm	_gamemode,8,3                   ## @gamemode
	.comm	_shareware,8,3                  ## @shareware
	.comm	_am_shell,8,3                   ## @am_shell
	.comm	_commercial,8,3                 ## @commercial
	.comm	_wp_chaingun,8,3                ## @wp_chaingun
	.comm	_am_clip,8,3                    ## @am_clip
	.comm	_wp_shotgun,8,3                 ## @wp_shotgun
	.comm	_wp_pistol,8,3                  ## @wp_pistol
	.comm	_wp_chainsaw,8,3                ## @wp_chainsaw
	.comm	_wp_missile,8,3                 ## @wp_missile
	.comm	_am_misl,8,3                    ## @am_misl
	.comm	_wp_fist,8,3                    ## @wp_fist
	.comm	_wp_nochange,8,3                ## @wp_nochange
	.comm	_ps_weapon,4,2                  ## @ps_weapon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_CheckAmmo                    ; -- Begin function P_CheckAmmo
	.p2align	2
_P_CheckAmmo:                           ; @P_CheckAmmo
	.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	x8, _weaponinfo@GOTPAGE
Lloh1:
	ldr	x8, [x8, _weaponinfo@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x10, [x0]
	lsl	x8, x10, #4
	ldr	x14, [x9, x8]
Lloh3:
	adrp	x8, _am_noammo@GOTPAGE
Lloh4:
	ldr	x8, [x8, _am_noammo@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x8]
	mov	w8, #1
	cmp	x14, x11
	b.eq	LBB0_21
; %bb.1:
Lloh6:
	adrp	x11, _wp_bfg@GOTPAGE
Lloh7:
	ldr	x11, [x11, _wp_bfg@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
Lloh9:
	adrp	x12, _wp_supershotgun@GOTPAGE
Lloh10:
	ldr	x12, [x12, _wp_supershotgun@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
Lloh12:
	adrp	x13, _BFGCELLS@GOTPAGE
Lloh13:
	ldr	x13, [x13, _BFGCELLS@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	cmp	x10, x12
	cinc	w15, w8, eq
	cmp	x10, x11
	csel	w15, w13, w15, eq
	ldr	x13, [x0, #8]
	ldr	w14, [x13, x14, lsl #2]
	cmp	w14, w15
	b.ge	LBB0_21
; %bb.2:
	ldr	x8, [x0, #24]
Lloh15:
	adrp	x14, _wp_plasma@GOTPAGE
Lloh16:
	ldr	x14, [x14, _wp_plasma@GOTPAGEOFF]
Lloh17:
	ldr	x14, [x14]
Lloh18:
	adrp	x15, _wp_nochange@GOTPAGE
Lloh19:
	ldr	x15, [x15, _wp_nochange@GOTPAGEOFF]
Lloh20:
	ldr	x15, [x15]
Lloh21:
	adrp	x16, _am_cell@GOTPAGE
Lloh22:
	ldr	x16, [x16, _am_cell@GOTPAGEOFF]
Lloh23:
	ldr	x16, [x16]
Lloh24:
	adrp	x17, _gamemode@GOTPAGE
Lloh25:
	ldr	x17, [x17, _gamemode@GOTPAGEOFF]
Lloh26:
	ldr	x17, [x17]
Lloh27:
	adrp	x1, _shareware@GOTPAGE
Lloh28:
	ldr	x1, [x1, _shareware@GOTPAGEOFF]
Lloh29:
	ldr	x1, [x1]
Lloh30:
	adrp	x2, _am_shell@GOTPAGE
Lloh31:
	ldr	x2, [x2, _am_shell@GOTPAGEOFF]
Lloh32:
	ldr	x2, [x2]
Lloh33:
	adrp	x3, _commercial@GOTPAGE
Lloh34:
	ldr	x3, [x3, _commercial@GOTPAGEOFF]
Lloh35:
	ldr	x3, [x3]
Lloh36:
	adrp	x4, _wp_chaingun@GOTPAGE
Lloh37:
	ldr	x4, [x4, _wp_chaingun@GOTPAGEOFF]
Lloh38:
	ldr	x4, [x4]
Lloh39:
	adrp	x5, _am_clip@GOTPAGE
Lloh40:
	ldr	x5, [x5, _am_clip@GOTPAGEOFF]
Lloh41:
	ldr	x5, [x5]
Lloh42:
	adrp	x6, _wp_shotgun@GOTPAGE
Lloh43:
	ldr	x6, [x6, _wp_shotgun@GOTPAGEOFF]
Lloh44:
	ldr	x6, [x6]
Lloh45:
	adrp	x7, _wp_pistol@GOTPAGE
Lloh46:
	ldr	x7, [x7, _wp_pistol@GOTPAGEOFF]
Lloh47:
	ldr	x7, [x7]
Lloh48:
	adrp	x19, _wp_chainsaw@GOTPAGE
Lloh49:
	ldr	x19, [x19, _wp_chainsaw@GOTPAGEOFF]
Lloh50:
	ldr	x19, [x19]
Lloh51:
	adrp	x20, _wp_missile@GOTPAGE
Lloh52:
	ldr	x20, [x20, _wp_missile@GOTPAGEOFF]
Lloh53:
	ldr	x20, [x20]
Lloh54:
	adrp	x21, _am_misl@GOTPAGE
Lloh55:
	ldr	x21, [x21, _am_misl@GOTPAGEOFF]
Lloh56:
	ldr	x21, [x21]
Lloh57:
	adrp	x22, _wp_fist@GOTPAGE
Lloh58:
	ldr	x22, [x22, _wp_fist@GOTPAGEOFF]
Lloh59:
	ldr	x22, [x22]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w24, [x13, x5, lsl #2]
	mov	x23, x7
	cbz	w24, LBB0_13
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	x23, [x0, #16]
	cmp	x23, x15
	b.ne	LBB0_20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x8, x14, lsl #3]
	cbz	x23, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w23, [x13, x16, lsl #2]
	cmp	w23, #0
	ccmp	x17, x1, #4, ne
	mov	x23, x14
	b.ne	LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x23, [x8, x12, lsl #3]
	cbz	x23, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w23, [x13, x2, lsl #2]
	cmp	w23, #3
	ccmp	x17, x3, #0, ge
	mov	x23, x12
	b.eq	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x23, [x8, x4, lsl #3]
	cbz	x23, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w24, [x13, x5, lsl #2]
	mov	x23, x4
	cbnz	w24, LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x23, [x8, x6, lsl #3]
	cbz	x23, LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w24, [x13, x2, lsl #2]
	mov	x23, x6
	cbnz	w24, LBB0_4
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x24, [x8, x19, lsl #3]
	mov	x23, x19
	cbnz	x24, LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x23, [x8, x20, lsl #3]
	cbz	x23, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w24, [x13, x21, lsl #2]
	mov	x23, x20
	cbnz	w24, LBB0_4
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x23, [x8, x11, lsl #3]
	cbz	x23, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w23, [x13, x16, lsl #2]
	cmp	w23, #41
	b.lt	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x11
	cmp	x17, x1
	b.ne	LBB0_4
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x22
	b	LBB0_4
LBB0_20:
Lloh60:
	adrp	x8, _ps_weapon@GOTPAGE
Lloh61:
	ldr	x8, [x8, _ps_weapon@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	add	x8, x9, x10, lsl #4
	ldr	w2, [x8, #8]
	bl	_P_SetPsprite
	mov	w8, #0
LBB0_21:
	mov	x0, x8
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.comm	_weaponinfo,8,3                 ; @weaponinfo
	.comm	_wp_bfg,8,3                     ; @wp_bfg
	.comm	_BFGCELLS,4,2                   ; @BFGCELLS
	.comm	_wp_supershotgun,8,3            ; @wp_supershotgun
	.comm	_am_noammo,8,3                  ; @am_noammo
	.comm	_wp_plasma,8,3                  ; @wp_plasma
	.comm	_am_cell,8,3                    ; @am_cell
	.comm	_gamemode,8,3                   ; @gamemode
	.comm	_shareware,8,3                  ; @shareware
	.comm	_am_shell,8,3                   ; @am_shell
	.comm	_commercial,8,3                 ; @commercial
	.comm	_wp_chaingun,8,3                ; @wp_chaingun
	.comm	_am_clip,8,3                    ; @am_clip
	.comm	_wp_shotgun,8,3                 ; @wp_shotgun
	.comm	_wp_pistol,8,3                  ; @wp_pistol
	.comm	_wp_chainsaw,8,3                ; @wp_chainsaw
	.comm	_wp_missile,8,3                 ; @wp_missile
	.comm	_am_misl,8,3                    ; @am_misl
	.comm	_wp_fist,8,3                    ; @wp_fist
	.comm	_wp_nochange,8,3                ; @wp_nochange
	.comm	_ps_weapon,4,2                  ; @ps_weapon
.subsections_via_symbols
