	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_G_InitSessionData              ## -- Begin function G_InitSessionData
	.p2align	4, 0x90
_G_InitSessionData:                     ## @G_InitSessionData
	.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, %r15
	movq	%rdi, %r14
	movw	$0, -42(%rbp)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_Info_ValueForKey
	movq	%rax, %r12
	cmpb	$0, (%rax)
	je	LBB0_1
LBB0_4:
	movq	_level@GOTPCREL(%rip), %r13
	movq	%r14, %rax
	subq	8(%r13), %rax
	shrq	$3, %rax
	imull	$-1431655765, %eax, %ebx        ## imm = 0xAAAAAAAB
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_Info_ValueForKey
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_dmlab_select_team
	movb	%al, -42(%rbp)
	testb	%al, %al
	leaq	-42(%rbp), %rsi
	cmoveq	%r12, %rsi
	movq	_g_gametype@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GT_TEAM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_5
## %bb.8:
	cmpb	$115, (%rsi)
	jne	LBB0_9
LBB0_15:
	movq	_TEAM_SPECTATOR@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_5:
	movq	_TEAM_SPECTATOR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
	movq	_SPECTATOR_FREE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	cmpb	$0, (%rsi)
	jne	LBB0_7
## %bb.6:
	movq	_g_teamAutoJoin@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
LBB0_7:
	movq	_g_entities@GOTPCREL(%rip), %rax
	movq	%r14, %rcx
	subq	8(%r13), %rcx
	sarq	$3, %rcx
	movabsq	$-6148914691236517204, %rdi     ## imm = 0xAAAAAAAAAAAAAAAC
	imulq	%rcx, %rdi
	addq	(%rax), %rdi
	callq	_SetTeam
	jmp	LBB0_17
LBB0_1:
	movq	_g_localTeamPref@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpb	$0, (%rbx)
	je	LBB0_4
## %bb.2:
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_trap_Cvar_Set
	movq	%rbx, %r12
	jmp	LBB0_4
LBB0_9:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.13:
	cmpl	$2, (%r13)
	jge	LBB0_15
## %bb.14:
	movq	_TEAM_FREE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_10:
	movq	_g_maxGameClients@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_TEAM_FREE@GOTPCREL(%rip), %rdx
	movq	%rdx, %rax
	cmpl	%ecx, (%r13)
	jl	LBB0_12
## %bb.11:
	movq	_TEAM_SPECTATOR@GOTPCREL(%rip), %rax
LBB0_12:
	testl	%ecx, %ecx
	cmovleq	%rdx, %rax
LBB0_16:
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
	movq	_SPECTATOR_FREE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_17:
	movq	%r14, %rdi
	callq	_AddTournamentQueue
	movq	%r14, %rdi
	callq	_G_WriteClientSessionData
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"teampref"

	.comm	_g_localTeamPref,8,3            ## @g_localTeamPref
L_.str.1:                               ## @.str.1
	.asciz	"g_localTeamPref"

L_.str.2:                               ## @.str.2
	.space	1

	.comm	_level,16,3                     ## @level
L_.str.3:                               ## @.str.3
	.asciz	"name"

	.comm	_g_gametype,4,2                 ## @g_gametype
	.comm	_GT_TEAM,4,2                    ## @GT_TEAM
	.comm	_TEAM_SPECTATOR,8,3             ## @TEAM_SPECTATOR
	.comm	_SPECTATOR_FREE,8,3             ## @SPECTATOR_FREE
	.comm	_g_teamAutoJoin,8,3             ## @g_teamAutoJoin
	.comm	_g_entities,8,3                 ## @g_entities
	.comm	_g_maxGameClients,4,2           ## @g_maxGameClients
	.comm	_TEAM_FREE,8,3                  ## @TEAM_FREE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_G_InitSessionData              ; -- Begin function G_InitSessionData
	.p2align	2
_G_InitSessionData:                     ; @G_InitSessionData
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	strh	wzr, [sp, #14]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_Info_ValueForKey
	mov	x21, x0
	ldrb	w8, [x0]
	cbnz	w8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _g_localTeamPref@GOTPAGE
Lloh3:
	ldr	x8, [x8, _g_localTeamPref@GOTPAGEOFF]
Lloh4:
	ldr	x22, [x8]
	ldrb	w8, [x22]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_trap_Cvar_Set
	mov	x21, x22
LBB0_4:
Lloh9:
	adrp	x23, _level@GOTPAGE
Lloh10:
	ldr	x23, [x23, _level@GOTPAGEOFF]
	ldr	x8, [x23, #8]
	sub	x8, x19, x8
	lsr	x8, x8, #3
	mov	w9, #43691
	movk	w9, #43690, lsl #16
	mul	w22, w8, w9
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_Info_ValueForKey
	mov	x1, x0
	mov	x0, x22
	bl	_dmlab_select_team
	strb	w0, [sp, #14]
	cmp	w0, #0
	add	x8, sp, #14
Lloh13:
	adrp	x9, _g_gametype@GOTPAGE
Lloh14:
	ldr	x9, [x9, _g_gametype@GOTPAGEOFF]
	csel	x1, x21, x8, eq
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x8, _GT_TEAM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GT_TEAM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w9, w8
	b.ge	LBB0_8
; %bb.5:
	ldrb	w10, [x1]
Lloh19:
	adrp	x8, _TEAM_SPECTATOR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TEAM_SPECTATOR@GOTPAGEOFF]
	cmp	w10, #115
	b.eq	LBB0_11
; %bb.6:
	cmp	w9, #128
	b.ne	LBB0_10
; %bb.7:
	ldr	w9, [x23]
Lloh21:
	adrp	x10, _TEAM_FREE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _TEAM_FREE@GOTPAGEOFF]
	cmp	w9, #1
	csel	x8, x8, x10, gt
	b	LBB0_11
LBB0_8:
Lloh23:
	adrp	x8, _TEAM_SPECTATOR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TEAM_SPECTATOR@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	adrp	x9, _SPECTATOR_FREE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SPECTATOR_FREE@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #8]
	ldrb	w8, [x1]
Lloh29:
	adrp	x9, _g_teamAutoJoin@GOTPAGE
Lloh30:
	ldr	x9, [x9, _g_teamAutoJoin@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	w8, #0
	ccmp	x9, #0, #0, eq
	b.eq	LBB0_12
; %bb.9:
Lloh32:
	adrp	x8, _g_entities@GOTPAGE
Lloh33:
	ldr	x8, [x8, _g_entities@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	ldr	x9, [x23, #8]
	sub	x9, x19, x9
	asr	x9, x9, #3
	mov	x10, #-6148914691236517206
	movk	x10, #43692
	madd	x0, x9, x10, x8
	bl	_SetTeam
	b	LBB0_12
LBB0_10:
Lloh35:
	adrp	x9, _g_maxGameClients@GOTPAGE
Lloh36:
	ldr	x9, [x9, _g_maxGameClients@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	ldr	w10, [x23]
	cmp	w10, w9
	ccmp	w9, #1, #8, ge
Lloh38:
	adrp	x9, _TEAM_FREE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _TEAM_FREE@GOTPAGEOFF]
	csel	x8, x9, x8, lt
LBB0_11:
	ldr	x8, [x8]
Lloh40:
	adrp	x9, _SPECTATOR_FREE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _SPECTATOR_FREE@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #8]
LBB0_12:
	mov	x0, x19
	bl	_AddTournamentQueue
	mov	x0, x19
	bl	_G_WriteClientSessionData
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"teampref"

	.comm	_g_localTeamPref,8,3            ; @g_localTeamPref
l_.str.1:                               ; @.str.1
	.asciz	"g_localTeamPref"

l_.str.2:                               ; @.str.2
	.space	1

	.comm	_level,16,3                     ; @level
l_.str.3:                               ; @.str.3
	.asciz	"name"

	.comm	_g_gametype,4,2                 ; @g_gametype
	.comm	_GT_TEAM,4,2                    ; @GT_TEAM
	.comm	_TEAM_SPECTATOR,8,3             ; @TEAM_SPECTATOR
	.comm	_SPECTATOR_FREE,8,3             ; @SPECTATOR_FREE
	.comm	_g_teamAutoJoin,8,3             ; @g_teamAutoJoin
	.comm	_g_entities,8,3                 ; @g_entities
	.comm	_g_maxGameClients,4,2           ; @g_maxGameClients
	.comm	_TEAM_FREE,8,3                  ; @TEAM_FREE
.subsections_via_symbols
