	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SelectRandomTeamSpawnPoint     ## -- Begin function SelectRandomTeamSpawnPoint
	.p2align	4, 0x90
_SelectRandomTeamSpawnPoint:            ## @SelectRandomTeamSpawnPoint
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_TEAM_SPAWN_POINTS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_TEAM_BEGIN@GOTPCREL(%rip), %rcx
	movq	_TEAM_RED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	%ebx, (%rcx)
	jne	LBB0_3
## %bb.1:
	cmpq	%r14, %rax
	jne	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %r14
	jmp	LBB0_9
LBB0_3:
	cmpq	%r14, %rax
	jne	LBB0_7
## %bb.4:
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_9
LBB0_5:
	movq	_TEAM_BLUE@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_18
## %bb.6:
	leaq	L_.str.1(%rip), %r14
	jmp	LBB0_9
LBB0_7:
	movq	_TEAM_BLUE@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_18
## %bb.8:
	leaq	L_.str.3(%rip), %r14
LBB0_9:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_FOFS
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_G_Find
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_SpotWouldTelefrag
	testq	%rax, %rax
	jne	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, (%r15,%r13,8)
	incq	%r13
	movl	(%r12), %eax
	cmpq	%rax, %r13
	jne	LBB0_10
LBB0_13:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	callq	_rand
	cltd
	idivl	%r13d
	movslq	%edx, %rax
	movq	(%r15,%rax,8), %rax
	jmp	LBB0_19
LBB0_15:
	movq	%r14, %rdi
	callq	_FOFS
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.16:
	xorl	%edi, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_G_Find                         ## TAILCALL
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TEAM_SPAWN_POINTS,4,2      ## @MAX_TEAM_SPAWN_POINTS
	.comm	_TEAM_BEGIN,4,2                 ## @TEAM_BEGIN
	.comm	_TEAM_RED,8,3                   ## @TEAM_RED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"team_CTF_redplayer"

	.comm	_TEAM_BLUE,8,3                  ## @TEAM_BLUE
L_.str.1:                               ## @.str.1
	.asciz	"team_CTF_blueplayer"

L_.str.2:                               ## @.str.2
	.asciz	"team_CTF_redspawn"

L_.str.3:                               ## @.str.3
	.asciz	"team_CTF_bluespawn"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SelectRandomTeamSpawnPoint     ; -- Begin function SelectRandomTeamSpawnPoint
	.p2align	2
_SelectRandomTeamSpawnPoint:            ; @SelectRandomTeamSpawnPoint
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x22, _MAX_TEAM_SPAWN_POINTS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAX_TEAM_SPAWN_POINTS@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh7:
	adrp	x8, _TEAM_BEGIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TEAM_BEGIN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x8]
Lloh10:
	adrp	x8, _TEAM_RED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TEAM_RED@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	w9, w0
	b.ne	LBB0_3
; %bb.1:
	cmp	x8, x1
	b.ne	LBB0_5
; %bb.2:
Lloh13:
	adrp	x19, l_.str@PAGE
Lloh14:
	add	x19, x19, l_.str@PAGEOFF
	b	LBB0_9
LBB0_3:
	cmp	x8, x1
	b.ne	LBB0_7
; %bb.4:
Lloh15:
	adrp	x19, l_.str.2@PAGE
Lloh16:
	add	x19, x19, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh17:
	adrp	x8, _TEAM_BLUE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TEAM_BLUE@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_17
; %bb.6:
Lloh20:
	adrp	x19, l_.str.1@PAGE
Lloh21:
	add	x19, x19, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh22:
	adrp	x8, _TEAM_BLUE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TEAM_BLUE@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_17
; %bb.8:
Lloh25:
	adrp	x19, l_.str.3@PAGE
Lloh26:
	add	x19, x19, l_.str.3@PAGEOFF
LBB0_9:
	mov	x23, #0
	mov	x20, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_FOFS
	mov	x1, x0
	mov	x0, x20
	mov	x2, x19
	bl	_G_Find
	cbz	x0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x20, x0
	bl	_SpotWouldTelefrag
	cbnz	x0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	str	x20, [x21, x23, lsl #3]
	add	x23, x23, #1
	ldr	w8, [x22]
	cmp	x23, x8
	b.ne	LBB0_10
LBB0_13:
	cbz	w23, LBB0_15
; %bb.14:
	bl	_rand
	sdiv	w8, w0, w23
	msub	w8, w8, w23, w0
	ldr	x0, [x21, w8, sxtw #3]
	b	LBB0_18
LBB0_15:
	mov	x0, x19
	bl	_FOFS
	ldur	x8, [x29, #-56]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.16:
	mov	x1, x0
	mov	x0, #0
	mov	x2, x19
	sub	sp, x29, #48
	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
	b	_G_Find
LBB0_17:
	mov	x0, #0
LBB0_18:
	ldur	x8, [x29, #-56]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	sub	sp, x29, #48
	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
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TEAM_SPAWN_POINTS,4,2      ; @MAX_TEAM_SPAWN_POINTS
	.comm	_TEAM_BEGIN,4,2                 ; @TEAM_BEGIN
	.comm	_TEAM_RED,8,3                   ; @TEAM_RED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"team_CTF_redplayer"

	.comm	_TEAM_BLUE,8,3                  ; @TEAM_BLUE
l_.str.1:                               ; @.str.1
	.asciz	"team_CTF_blueplayer"

l_.str.2:                               ; @.str.2
	.asciz	"team_CTF_redspawn"

l_.str.3:                               ; @.str.3
	.asciz	"team_CTF_bluespawn"

.subsections_via_symbols
