	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_SelectNextPlayer            ## -- Begin function CG_SelectNextPlayer
	.p2align	4, 0x90
_CG_SelectNextPlayer:                   ## @CG_SelectNextPlayer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_CG_CheckOrderPending
	movq	_cg_currentSelectedPlayer@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_numSortedTeamPlayers@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	leaq	1(%rcx), %rdx
	cmovgeq	%rbx, %rdx
	testq	%rcx, %rcx
	cmovsq	%rbx, %rdx
	movq	%rdx, (%rax)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_CG_SetSelectedPlayerName       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cg_currentSelectedPlayer,8,3   ## @cg_currentSelectedPlayer
	.comm	_numSortedTeamPlayers,8,3       ## @numSortedTeamPlayers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_SelectNextPlayer            ; -- Begin function CG_SelectNextPlayer
	.p2align	2
_CG_SelectNextPlayer:                   ; @CG_SelectNextPlayer
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_CG_CheckOrderPending
Lloh0:
	adrp	x8, _cg_currentSelectedPlayer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg_currentSelectedPlayer@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _numSortedTeamPlayers@GOTPAGE
Lloh3:
	ldr	x10, [x10, _numSortedTeamPlayers@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	mov	x10, #-1
	ccmp	x9, x10, #4, lt
	csinc	x9, xzr, x9, le
	str	x9, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_CG_SetSelectedPlayerName
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_cg_currentSelectedPlayer,8,3   ; @cg_currentSelectedPlayer
	.comm	_numSortedTeamPlayers,8,3       ; @numSortedTeamPlayers
.subsections_via_symbols
