	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Pickup_Weapon                  ## -- Begin function Pickup_Weapon
	.p2align	4, 0x90
_Pickup_Weapon:                         ## @Pickup_Weapon
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edx
	testl	%edx, %edx
	js	LBB0_1
## %bb.2:
	jne	LBB0_4
## %bb.3:
	movq	8(%rbx), %rax
	movl	(%rax), %edx
LBB0_4:
	movq	_FL_DROPPED_ITEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_7
## %bb.5:
	movq	_g_gametype@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_GT_TEAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	16(%r14), %rax
	movq	(%rax), %rax
	movq	8(%rbx), %rcx
	movq	8(%rcx), %rcx
	subl	(%rax,%rcx,4), %edx
	movl	$1, %eax
	cmovlel	%eax, %edx
	jmp	LBB0_7
LBB0_1:
	xorl	%edx, %edx
LBB0_7:
	movq	8(%rbx), %rax
	movq	8(%rax), %rcx
	movl	$1, %eax
	shll	%cl, %eax
	movq	16(%r14), %rsi
	movq	8(%rsi), %rsi
	movq	_STAT_WEAPONS@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	orl	%eax, (%rsi,%rdi,4)
	movq	%r14, %rdi
	movl	%ecx, %esi
	callq	_Add_Ammo
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	movq	_WP_GRAPPLING_HOOK@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_9
## %bb.8:
	movq	16(%r14), %rcx
	movq	(%rcx), %rcx
	movl	$-1, (%rcx,%rax,4)
LBB0_9:
	movq	_g_gametype@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_GT_TEAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.11:
	movq	_g_weaponTeamRespawn@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_g_weaponRespawn@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FL_DROPPED_ITEM,4,2            ## @FL_DROPPED_ITEM
	.comm	_g_gametype,8,3                 ## @g_gametype
	.comm	_GT_TEAM,8,3                    ## @GT_TEAM
	.comm	_STAT_WEAPONS,8,3               ## @STAT_WEAPONS
	.comm	_WP_GRAPPLING_HOOK,4,2          ## @WP_GRAPPLING_HOOK
	.comm	_g_weaponTeamRespawn,4,2        ## @g_weaponTeamRespawn
	.comm	_g_weaponRespawn,4,2            ## @g_weaponRespawn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Pickup_Weapon                  ; -- Begin function Pickup_Weapon
	.p2align	2
_Pickup_Weapon:                         ; @Pickup_Weapon
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	ldr	w2, [x0]
Lloh0:
	adrp	x21, _g_gametype@GOTPAGE
Lloh1:
	ldr	x21, [x21, _g_gametype@GOTPAGEOFF]
Lloh2:
	adrp	x22, _GT_TEAM@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GT_TEAM@GOTPAGEOFF]
	tbnz	w2, #31, LBB0_6
; %bb.1:
	cbnz	w2, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	w2, [x8]
LBB0_3:
	ldr	w8, [x20, #4]
Lloh4:
	adrp	x9, _FL_DROPPED_ITEM@GOTPAGE
Lloh5:
	ldr	x9, [x9, _FL_DROPPED_ITEM@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.5:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	ldr	x9, [x9, #8]
	ldr	w8, [x8, x9, lsl #2]
	subs	w8, w2, w8
	csinc	w2, w8, wzr, gt
	b	LBB0_7
LBB0_6:
	mov	w2, #0
LBB0_7:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #8]
	mov	w8, #1
	lsl	w8, w8, w1
	ldr	x9, [x19, #16]
	ldr	x9, [x9, #8]
Lloh7:
	adrp	x10, _STAT_WEAPONS@GOTPAGE
Lloh8:
	ldr	x10, [x10, _STAT_WEAPONS@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	orr	w8, w11, w8
	str	w8, [x9, x10]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_Add_Ammo
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
Lloh10:
	adrp	x9, _WP_GRAPPLING_HOOK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WP_GRAPPLING_HOOK@GOTPAGEOFF]
Lloh12:
	ldrsw	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	mov	w10, #-1
	str	w10, [x9, x8, lsl #2]
LBB0_9:
	ldr	x8, [x21]
	ldr	x9, [x22]
Lloh13:
	adrp	x10, _g_weaponTeamRespawn@GOTPAGE
Lloh14:
	ldr	x10, [x10, _g_weaponTeamRespawn@GOTPAGEOFF]
Lloh15:
	adrp	x11, _g_weaponRespawn@GOTPAGE
Lloh16:
	ldr	x11, [x11, _g_weaponRespawn@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_FL_DROPPED_ITEM,4,2            ; @FL_DROPPED_ITEM
	.comm	_g_gametype,8,3                 ; @g_gametype
	.comm	_GT_TEAM,8,3                    ; @GT_TEAM
	.comm	_STAT_WEAPONS,8,3               ; @STAT_WEAPONS
	.comm	_WP_GRAPPLING_HOOK,4,2          ; @WP_GRAPPLING_HOOK
	.comm	_g_weaponTeamRespawn,4,2        ; @g_weaponTeamRespawn
	.comm	_g_weaponRespawn,4,2            ; @g_weaponRespawn
.subsections_via_symbols
