	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cmd_FollowCycle_f              ## -- Begin function Cmd_FollowCycle_f
	.p2align	4, 0x90
_Cmd_FollowCycle_f:                     ## @Cmd_FollowCycle_f
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_g_gametype@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_GT_TOURNAMENT@GOTPCREL(%rip), %rdx
	movq	(%rdi), %rax
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.1:
	movq	(%rax), %rcx
	movq	_TEAM_FREE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.2:
	incl	20(%rax)
LBB0_3:
	movq	8(%rax), %rax
	movq	_SPECTATOR_NOT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_SetTeam
LBB0_5:
	cmpl	$-1, %r15d
	je	LBB0_8
## %bb.6:
	cmpl	$1, %r15d
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_G_Error
LBB0_8:
	movq	(%r14), %r8
	movl	16(%r8), %r11d
	testl	%r11d, %r11d
	js	LBB0_13
## %bb.9:
	movq	_level@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leal	-1(%rdx), %esi
	movq	8(%rax), %rdi
	movq	_CON_CONNECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_TEAM_SPECTATOR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	xorl	%r10d, %r10d
	movl	%r11d, %ecx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpl	%r11d, %ecx
	je	LBB0_18
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	addl	%r15d, %ecx
	cmpl	%edx, %ecx
	cmovgel	%r10d, %ecx
	testl	%ecx, %ecx
	cmovsl	%esi, %ecx
	movslq	%ecx, %rbx
	shlq	$4, %rbx
	cmpq	%rax, 8(%rdi,%rbx)
	jne	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r9, (%rdi,%rbx)
	je	LBB0_17
## %bb.12:
	movl	%ecx, 16(%r8)
	movq	_SPECTATOR_FOLLOW@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r8)
	jmp	LBB0_18
LBB0_13:
	cmpl	$-2, %r11d
	je	LBB0_16
## %bb.14:
	cmpl	$-1, %r11d
	jne	LBB0_18
## %bb.15:
	movl	$-2, 16(%r8)
	jmp	LBB0_18
LBB0_16:
	movl	$-1, 16(%r8)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_gametype,8,3                 ## @g_gametype
	.comm	_GT_TOURNAMENT,8,3              ## @GT_TOURNAMENT
	.comm	_TEAM_FREE,8,3                  ## @TEAM_FREE
	.comm	_SPECTATOR_NOT,8,3              ## @SPECTATOR_NOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spectator"

L_.str.1:                               ## @.str.1
	.asciz	"Cmd_FollowCycle_f: bad dir %i"

	.comm	_level,16,3                     ## @level
	.comm	_CON_CONNECTED,8,3              ## @CON_CONNECTED
	.comm	_TEAM_SPECTATOR,8,3             ## @TEAM_SPECTATOR
	.comm	_SPECTATOR_FOLLOW,8,3           ## @SPECTATOR_FOLLOW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cmd_FollowCycle_f              ; -- Begin function Cmd_FollowCycle_f
	.p2align	2
_Cmd_FollowCycle_f:                     ; @Cmd_FollowCycle_f
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _g_gametype@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_gametype@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x8, _GT_TOURNAMENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GT_TOURNAMENT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x8]
	ldr	x8, [x0]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
	ldr	x9, [x8]
Lloh6:
	adrp	x10, _TEAM_FREE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TEAM_FREE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
	ldr	w9, [x8, #20]
	add	w9, w9, #1
	str	w9, [x8, #20]
LBB0_3:
	ldr	x8, [x8, #8]
Lloh9:
	adrp	x9, _SPECTATOR_NOT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SPECTATOR_NOT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_SetTeam
LBB0_5:
	cmn	w19, #1
	b.eq	LBB0_8
; %bb.6:
	cmp	w19, #1
	b.eq	LBB0_8
; %bb.7:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_G_Error
LBB0_8:
	ldr	x8, [x20]
	ldr	w9, [x8, #16]
	tbnz	w9, #31, LBB0_14
; %bb.9:
Lloh16:
	adrp	x12, _level@GOTPAGE
Lloh17:
	ldr	x12, [x12, _level@GOTPAGEOFF]
	ldr	w10, [x12]
	sub	w11, w10, #1
Lloh18:
	adrp	x13, _CON_CONNECTED@GOTPAGE
Lloh19:
	ldr	x13, [x13, _CON_CONNECTED@GOTPAGEOFF]
	ldr	x12, [x12, #8]
Lloh20:
	ldr	x13, [x13]
Lloh21:
	adrp	x14, _TEAM_SPECTATOR@GOTPAGE
Lloh22:
	ldr	x14, [x14, _TEAM_SPECTATOR@GOTPAGEOFF]
Lloh23:
	ldr	x14, [x14]
	mov	x15, x9
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	w15, w9
	b.eq	LBB0_19
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w15, w15, w19
	cmp	w15, w10
	csel	w15, w15, wzr, lt
	cmp	w15, #0
	csel	w15, w11, w15, lt
	add	x16, x12, w15, sxtw #4
	ldr	x16, [x16, #8]
	cmp	x16, x13
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	sxtw	x16, w15
	lsl	x16, x16, #4
	ldr	x16, [x12, x16]
	cmp	x16, x14
	b.eq	LBB0_10
; %bb.13:
	str	w15, [x8, #16]
Lloh24:
	adrp	x9, _SPECTATOR_FOLLOW@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SPECTATOR_FOLLOW@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	str	x9, [x8, #8]
	b	LBB0_19
LBB0_14:
	cmn	w9, #2
	b.eq	LBB0_17
; %bb.15:
	cmn	w9, #1
	b.ne	LBB0_19
; %bb.16:
	mov	w9, #-2
	b	LBB0_18
LBB0_17:
	mov	w9, #-1
LBB0_18:
	str	w9, [x8, #16]
LBB0_19:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_g_gametype,8,3                 ; @g_gametype
	.comm	_GT_TOURNAMENT,8,3              ; @GT_TOURNAMENT
	.comm	_TEAM_FREE,8,3                  ; @TEAM_FREE
	.comm	_SPECTATOR_NOT,8,3              ; @SPECTATOR_NOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spectator"

l_.str.1:                               ; @.str.1
	.asciz	"Cmd_FollowCycle_f: bad dir %i"

	.comm	_level,16,3                     ; @level
	.comm	_CON_CONNECTED,8,3              ; @CON_CONNECTED
	.comm	_TEAM_SPECTATOR,8,3             ; @TEAM_SPECTATOR
	.comm	_SPECTATOR_FOLLOW,8,3           ; @SPECTATOR_FOLLOW
.subsections_via_symbols
