	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RespawnItem                    ## -- Begin function RespawnItem
	.p2align	4, 0x90
_RespawnItem:                           ## @RespawnItem
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.1:
	movq	%rdi, %r15
	cmpq	$0, 64(%rdi)
	je	LBB0_13
## %bb.2:
	movq	56(%r15), %r14
	testq	%r14, %r14
	jne	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_G_Error
	movq	56(%r15), %r14
	testq	%r14, %r14
	je	LBB0_4
LBB0_5:
	xorl	%ebx, %ebx
	movq	%r14, %rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%rax), %rax
	incl	%ebx
	testq	%rax, %rax
	jne	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	callq	_rand
	cltd
	idivl	%ebx
	testq	%r14, %r14
	je	LBB0_12
## %bb.8:
	testl	%edx, %edx
	jle	LBB0_12
## %bb.9:
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r14), %r14
	testq	%r14, %r14
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	leal	1(%rax), %ecx
	cmpl	%edx, %eax
	movl	%ecx, %eax
	jl	LBB0_10
LBB0_12:
	movq	%r14, %r15
	testq	%r14, %r14
	je	LBB0_25
LBB0_13:
	movq	_CONTENTS_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	_EF_NODRAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 28(%r15)
	movq	_SVF_NOCLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%r15)
	movq	%r15, %rdi
	callq	_trap_LinkEntity
	movq	40(%r15), %rax
	movq	(%rax), %rcx
	movq	_IT_POWERUP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_18
## %bb.14:
	cmpq	$0, 32(%r15)
	movl	24(%r15), %edi
	jne	LBB0_15
## %bb.16:
	movq	_EV_GLOBAL_SOUND@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_EV_GENERAL_SOUND@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %esi
	callq	_G_TempEntity
	movq	%rax, %r14
	leaq	L_.str.1(%rip), %rdi
	callq	_G_SoundIndex
	movq	%rax, 16(%r14)
	movq	_SVF_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
	movq	40(%r15), %rax
	movq	(%rax), %rcx
LBB0_18:
	movq	_IT_HOLDABLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_24
## %bb.19:
	movq	8(%rax), %rax
	movq	_HI_KAMIKAZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.20:
	cmpq	$0, 32(%r15)
	movl	24(%r15), %edi
	jne	LBB0_21
## %bb.22:
	movq	_EV_GLOBAL_SOUND@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_4:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_21:
	movq	_EV_GENERAL_SOUND@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %esi
	callq	_G_TempEntity
	movq	%rax, %r14
	leaq	L_.str.2(%rip), %rdi
	callq	_G_SoundIndex
	movq	%rax, 16(%r14)
	movq	_SVF_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_24:
	movq	_EV_ITEM_RESPAWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_G_AddEvent
	movq	$0, (%r15)
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RespawnItem: bad teammaster"

	.comm	_CONTENTS_TRIGGER,4,2           ## @CONTENTS_TRIGGER
	.comm	_EF_NODRAW,4,2                  ## @EF_NODRAW
	.comm	_SVF_NOCLIENT,4,2               ## @SVF_NOCLIENT
	.comm	_IT_POWERUP,8,3                 ## @IT_POWERUP
	.comm	_EV_GENERAL_SOUND,4,2           ## @EV_GENERAL_SOUND
	.comm	_EV_GLOBAL_SOUND,4,2            ## @EV_GLOBAL_SOUND
L_.str.1:                               ## @.str.1
	.asciz	"sound/items/poweruprespawn.wav"

	.comm	_SVF_BROADCAST,4,2              ## @SVF_BROADCAST
	.comm	_IT_HOLDABLE,8,3                ## @IT_HOLDABLE
	.comm	_HI_KAMIKAZE,8,3                ## @HI_KAMIKAZE
L_.str.2:                               ## @.str.2
	.asciz	"sound/items/kamikazerespawn.wav"

	.comm	_EV_ITEM_RESPAWN,4,2            ## @EV_ITEM_RESPAWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RespawnItem                    ; -- Begin function RespawnItem
	.p2align	2
_RespawnItem:                           ; @RespawnItem
	.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
	cbz	x0, LBB0_17
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #64]
	cbz	x8, LBB0_11
; %bb.2:
	ldr	x20, [x19, #56]
	cbnz	x20, LBB0_4
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_G_Error
	ldr	x20, [x19, #56]
	cbz	x20, LBB0_18
LBB0_4:
	mov	w19, #0
	mov	x8, x20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #48]
	add	w19, w19, #1
	cbnz	x8, LBB0_5
; %bb.6:
	bl	_rand
	cbz	x20, LBB0_10
LBB0_7:
	sdiv	w8, w0, w19
	msub	w8, w8, w19, w0
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w9, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x20, #48]
	cmp	x20, #0
	ccmp	w9, w8, #0, ne
	add	w9, w9, #1
	b.lt	LBB0_9
LBB0_10:
	mov	x19, x20
	cbz	x20, LBB0_17
LBB0_11:
Lloh2:
	adrp	x8, _CONTENTS_TRIGGER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CONTENTS_TRIGGER@GOTPAGEOFF]
Lloh4:
	adrp	x9, _EF_NODRAW@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EF_NODRAW@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	ldr	w10, [x19, #28]
	bic	w9, w10, w9
Lloh8:
	adrp	x10, _SVF_NOCLIENT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SVF_NOCLIENT@GOTPAGEOFF]
	str	w9, [x19, #28]
Lloh10:
	ldr	w9, [x10]
	ldr	w10, [x19, #8]
	bic	w9, w10, w9
	stp	w9, w8, [x19, #8]
	mov	x0, x19
	bl	_trap_LinkEntity
	ldr	x8, [x19, #40]
	ldr	x9, [x8]
Lloh11:
	adrp	x10, _IT_POWERUP@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IT_POWERUP@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_13
; %bb.12:
	ldr	x8, [x19, #32]
Lloh14:
	adrp	x9, _EV_GLOBAL_SOUND@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EV_GLOBAL_SOUND@GOTPAGEOFF]
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x10, _EV_GENERAL_SOUND@GOTPAGE
Lloh17:
	ldr	x10, [x10, _EV_GENERAL_SOUND@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	bl	_G_TempEntity
	mov	x20, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_G_SoundIndex
	str	x0, [x20, #16]
Lloh20:
	adrp	x8, _SVF_BROADCAST@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SVF_BROADCAST@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	ldr	x8, [x19, #40]
	ldr	x9, [x8]
LBB0_13:
Lloh23:
	adrp	x10, _IT_HOLDABLE@GOTPAGE
Lloh24:
	ldr	x10, [x10, _IT_HOLDABLE@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_16
; %bb.14:
	ldr	x8, [x8, #8]
Lloh26:
	adrp	x9, _HI_KAMIKAZE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _HI_KAMIKAZE@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	ldr	x8, [x19, #32]
Lloh29:
	adrp	x9, _EV_GLOBAL_SOUND@GOTPAGE
Lloh30:
	ldr	x9, [x9, _EV_GLOBAL_SOUND@GOTPAGEOFF]
	ldr	w0, [x19, #24]
Lloh31:
	adrp	x10, _EV_GENERAL_SOUND@GOTPAGE
Lloh32:
	ldr	x10, [x10, _EV_GENERAL_SOUND@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	bl	_G_TempEntity
	mov	x20, x0
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_G_SoundIndex
	str	x0, [x20, #16]
Lloh35:
	adrp	x8, _SVF_BROADCAST@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SVF_BROADCAST@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
LBB0_16:
Lloh38:
	adrp	x8, _EV_ITEM_RESPAWN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EV_ITEM_RESPAWN@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_G_AddEvent
	str	xzr, [x19]
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	w19, #0
	bl	_rand
	cbnz	x20, LBB0_7
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RespawnItem: bad teammaster"

	.comm	_CONTENTS_TRIGGER,4,2           ; @CONTENTS_TRIGGER
	.comm	_EF_NODRAW,4,2                  ; @EF_NODRAW
	.comm	_SVF_NOCLIENT,4,2               ; @SVF_NOCLIENT
	.comm	_IT_POWERUP,8,3                 ; @IT_POWERUP
	.comm	_EV_GENERAL_SOUND,4,2           ; @EV_GENERAL_SOUND
	.comm	_EV_GLOBAL_SOUND,4,2            ; @EV_GLOBAL_SOUND
l_.str.1:                               ; @.str.1
	.asciz	"sound/items/poweruprespawn.wav"

	.comm	_SVF_BROADCAST,4,2              ; @SVF_BROADCAST
	.comm	_IT_HOLDABLE,8,3                ; @IT_HOLDABLE
	.comm	_HI_KAMIKAZE,8,3                ; @HI_KAMIKAZE
l_.str.2:                               ; @.str.2
	.asciz	"sound/items/kamikazerespawn.wav"

	.comm	_EV_ITEM_RESPAWN,4,2            ; @EV_ITEM_RESPAWN
.subsections_via_symbols
