	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PM_BeginWeaponChange
_PM_BeginWeaponChange:                  ## @PM_BeginWeaponChange
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_WP_NONE@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jge	LBB0_4
## %bb.1:
	movq	_WP_NUM_WEAPONS@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_4
## %bb.2:
	movq	_pm@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movq	_STAT_WEAPONS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %ecx
	btl	%edi, %ecx
	jae	LBB0_4
## %bb.3:
	movq	8(%rax), %rax
	movq	_WEAPON_DROPPING@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_5
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_EV_CHANGE_WEAPON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PM_AddEvent
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx)
	addl	$200, 16(%rcx)
	movq	_TORSO_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PM_StartTorsoAnim              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WP_NONE,4,2                    ## @WP_NONE
	.comm	_WP_NUM_WEAPONS,4,2             ## @WP_NUM_WEAPONS
	.comm	_pm,8,3                         ## @pm
	.comm	_STAT_WEAPONS,8,3               ## @STAT_WEAPONS
	.comm	_WEAPON_DROPPING,8,3            ## @WEAPON_DROPPING
	.comm	_EV_CHANGE_WEAPON,4,2           ## @EV_CHANGE_WEAPON
	.comm	_TORSO_DROP,4,2                 ## @TORSO_DROP
	.no_dead_strip	_PM_BeginWeaponChange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PM_BeginWeaponChange
_PM_BeginWeaponChange:                  ; @PM_BeginWeaponChange
	.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	x8, _WP_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WP_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _WP_NUM_WEAPONS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WP_NUM_WEAPONS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w0
	ccmp	w9, w0, #4, lt
	b.le	LBB0_3
; %bb.1:
Lloh6:
	adrp	x19, _pm@GOTPAGE
Lloh7:
	ldr	x19, [x19, _pm@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x8]
Lloh8:
	adrp	x10, _STAT_WEAPONS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _STAT_WEAPONS@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	lsr	w9, w9, w0
	tbz	w9, #0, LBB0_3
; %bb.2:
	ldr	x8, [x8, #8]
Lloh11:
	adrp	x20, _WEAPON_DROPPING@GOTPAGE
Lloh12:
	ldr	x20, [x20, _WEAPON_DROPPING@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh13:
	adrp	x8, _EV_CHANGE_WEAPON@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EV_CHANGE_WEAPON@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_PM_AddEvent
	ldr	x8, [x20]
	ldr	x9, [x19]
	ldr	x9, [x9]
	str	x8, [x9, #8]
	ldr	w8, [x9, #16]
	add	w8, w8, #200
	str	w8, [x9, #16]
Lloh16:
	adrp	x8, _TORSO_DROP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TORSO_DROP@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PM_StartTorsoAnim
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_WP_NONE,4,2                    ; @WP_NONE
	.comm	_WP_NUM_WEAPONS,4,2             ; @WP_NUM_WEAPONS
	.comm	_pm,8,3                         ; @pm
	.comm	_STAT_WEAPONS,8,3               ; @STAT_WEAPONS
	.comm	_WEAPON_DROPPING,8,3            ; @WEAPON_DROPPING
	.comm	_EV_CHANGE_WEAPON,4,2           ; @EV_CHANGE_WEAPON
	.comm	_TORSO_DROP,4,2                 ; @TORSO_DROP
	.no_dead_strip	_PM_BeginWeaponChange
.subsections_via_symbols
