	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_BotSelectMenu_UpdateGrid
_UI_BotSelectMenu_UpdateGrid:           ## @UI_BotSelectMenu_UpdateGrid
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MAX_MODELSPERPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_PLAYERGRID_ROWS@GOTPCREL(%rip), %r9
	movq	_PLAYERGRID_COLS@GOTPCREL(%rip), %r10
	movl	(%r10), %eax
	imull	(%r9), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	_botSelectInfo@GOTPCREL(%rip), %r15
	imull	(%r15), %r8d
	movslq	%r8d, %r11
	leaq	(,%r11,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_QMF_INACTIVE@GOTPCREL(%rip), %r8
	movq	_QMF_HIGHLIGHT@GOTPCREL(%rip), %rbx
	movq	_QMF_PULSEIFFOCUS@GOTPCREL(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r11, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	32(%r15), %rdi
	movq	$0, 8(%rdi,%r14)
	movq	24(%r15), %rcx
	movl	(%rcx,%r13,4), %eax
	orl	(%r8), %eax
	movl	%eax, (%rcx,%r13,4)
	movq	40(%r15), %rdx
	movq	(%rdx,%r13,8), %rdx
	movq	$0, (%rdx)
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edx
	notl	%edx
	andl	%edx, (%rdi,%r14)
	movq	$0, 16(%rdi,%r14)
	orl	(%rsi), %eax
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	movslq	(%r9), %rax
	movslq	(%r10), %rdx
	imulq	%rax, %rdx
	addq	$24, %r14
	cmpq	%rdx, %r13
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r11,%r13), %rax
	movslq	4(%r15), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	64(%r15), %rax
	addq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	movl	(%rax,%r13,4), %edi
	callq	_UI_GetBotInfoByNumber
	movq	%rax, %rbx
	movq	%rax, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_Info_ValueForKey
	movq	56(%r15), %rcx
	movq	(%rcx,%r13,8), %rsi
	movq	_MAX_QPATH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_ServerPlayerIcon
	movq	40(%r15), %rax
	movq	(%rax,%r13,8), %r12
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_Info_ValueForKey
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$16, %edx
	callq	_Q_strncpyz
	movq	40(%r15), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_Q_CleanStr
	movq	32(%r15), %rax
	movq	56(%r15), %rcx
	movq	(%rcx,%r13,8), %rcx
	movq	%rcx, 8(%rax,%r14)
	movq	40(%r15), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_BotAlreadySelected
	movq	_color_red@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_color_blue@GOTPCREL(%rip), %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rcx), %eax
	movq	48(%r15), %rcx
	movl	%eax, (%rcx,%r13,4)
	movq	_QMF_INACTIVE@GOTPCREL(%rip), %r8
	movl	(%r8), %eax
	notl	%eax
	movq	24(%r15), %rcx
	andl	(%rcx,%r13,4), %eax
	movl	%eax, (%rcx,%r13,4)
	movq	32(%r15), %rdi
	movq	_PLAYERGRID_ROWS@GOTPCREL(%rip), %r9
	movq	_PLAYERGRID_COLS@GOTPCREL(%rip), %r10
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	movq	_QMF_HIGHLIGHT@GOTPCREL(%rip), %rbx
	movq	_QMF_PULSEIFFOCUS@GOTPCREL(%rip), %rsi
	jmp	LBB0_8
LBB0_9:
	movq	_MAX_MODELSPERPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	jmp	LBB0_10
LBB0_1:
	movq	_botSelectInfo@GOTPCREL(%rip), %rax
	movq	24(%rax), %rcx
	movq	32(%rax), %rdi
LBB0_10:
	movq	_botSelectInfo@GOTPCREL(%rip), %rsi
	movl	8(%rsi), %eax
	cltd
	idivl	%r8d
	movq	_QMF_HIGHLIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%edx, %rdx
	leaq	(%rdx,%rdx,2), %rbx
	orl	%eax, (%rdi,%rbx,8)
	movq	_QMF_PULSEIFFOCUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rcx,%rdx,4)
	movl	12(%rsi), %ecx
	cmpl	$2, %ecx
	jl	LBB0_17
## %bb.11:
	movl	(%rsi), %edi
	movq	_QMF_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	notl	%eax
	testl	%edi, %edi
	jle	LBB0_13
## %bb.12:
	movl	20(%rsi), %ebx
	andl	%eax, %ebx
	jmp	LBB0_14
LBB0_17:
	movq	_QMF_INACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%rsi)
	orl	16(%rsi), %eax
	jmp	LBB0_18
LBB0_13:
	movl	20(%rsi), %ebx
	orl	%edx, %ebx
LBB0_14:
	movl	%ebx, 20(%rsi)
	decl	%ecx
	cmpl	%ecx, %edi
	jge	LBB0_16
## %bb.15:
	andl	16(%rsi), %eax
	jmp	LBB0_18
LBB0_16:
	orl	16(%rsi), %edx
	movl	%edx, %eax
LBB0_18:
	movl	%eax, 16(%rsi)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_botSelectInfo,72,3             ## @botSelectInfo
	.comm	_MAX_MODELSPERPAGE,4,2          ## @MAX_MODELSPERPAGE
	.comm	_PLAYERGRID_ROWS,4,2            ## @PLAYERGRID_ROWS
	.comm	_PLAYERGRID_COLS,4,2            ## @PLAYERGRID_COLS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"model"

	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
L_.str.1:                               ## @.str.1
	.asciz	"name"

	.comm	_color_red,4,2                  ## @color_red
	.comm	_color_blue,4,2                 ## @color_blue
	.comm	_QMF_INACTIVE,4,2               ## @QMF_INACTIVE
	.comm	_QMF_HIGHLIGHT,4,2              ## @QMF_HIGHLIGHT
	.comm	_QMF_PULSEIFFOCUS,4,2           ## @QMF_PULSEIFFOCUS
	.no_dead_strip	_UI_BotSelectMenu_UpdateGrid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_BotSelectMenu_UpdateGrid
_UI_BotSelectMenu_UpdateGrid:           ; @UI_BotSelectMenu_UpdateGrid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _MAX_MODELSPERPAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_MODELSPERPAGE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
Lloh3:
	adrp	x27, _PLAYERGRID_ROWS@GOTPAGE
Lloh4:
	ldr	x27, [x27, _PLAYERGRID_ROWS@GOTPAGEOFF]
Lloh5:
	adrp	x0, _PLAYERGRID_COLS@GOTPAGE
Lloh6:
	ldr	x0, [x0, _PLAYERGRID_COLS@GOTPAGEOFF]
	ldr	w8, [x27]
	ldr	w9, [x0]
Lloh7:
	adrp	x23, _botSelectInfo@GOTPAGE
Lloh8:
	ldr	x23, [x23, _botSelectInfo@GOTPAGEOFF]
Lloh9:
	adrp	x15, _QMF_INACTIVE@GOTPAGE
Lloh10:
	ldr	x15, [x15, _QMF_INACTIVE@GOTPAGEOFF]
	mul	w8, w9, w8
Lloh11:
	adrp	x24, _QMF_HIGHLIGHT@GOTPAGE
Lloh12:
	ldr	x24, [x24, _QMF_HIGHLIGHT@GOTPAGEOFF]
Lloh13:
	adrp	x16, _QMF_PULSEIFFOCUS@GOTPAGE
Lloh14:
	ldr	x16, [x16, _QMF_PULSEIFFOCUS@GOTPAGEOFF]
	cmp	w8, #0
	b.le	LBB0_7
; %bb.1:
	mov	x19, #0
	mov	x20, #0
	ldr	w8, [x23]
	mul	w8, w10, w8
	sxtw	x25, w8
	sbfiz	x8, x8, #2, #32
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	x8, x9, [x23, #24]
	add	x10, x9, x19
	str	xzr, [x10, #8]
	ldr	w10, [x15]
	lsl	x11, x20, #2
	ldr	w12, [x8, x11]
	orr	w10, w12, w10
	str	w10, [x8, x11]
	ldr	x11, [x23, #40]
	ldr	x11, [x11, x20, lsl #3]
	str	xzr, [x11]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w11, [x24]
	add	x12, x9, x19
	ldr	w13, [x12]
	bic	w11, w13, w11
	str	w11, [x12]
	str	xzr, [x12, #16]
	ldr	w11, [x16]
	orr	w10, w10, w11
	str	w10, [x8, x20, lsl #2]
	add	x20, x20, #1
	ldrsw	x10, [x27]
	ldrsw	x11, [x0]
	mul	x10, x11, x10
	add	x19, x19, #24
	cmp	x20, x10
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x23, #4]
	add	x9, x25, x20
	cmp	x9, x8
	b.ge	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23, #64]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x8, x9
	lsl	x26, x20, #2
	ldr	w0, [x8, x26]
	bl	_UI_GetBotInfoByNumber
	mov	x21, x0
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Info_ValueForKey
	ldr	x8, [x23, #56]
	lsl	x28, x20, #3
	ldr	x1, [x8, x28]
Lloh17:
	adrp	x8, _MAX_QPATH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAX_QPATH@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	bl	_ServerPlayerIcon
	ldr	x8, [x23, #40]
	ldr	x22, [x8, x28]
	mov	x0, x21
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_Info_ValueForKey
	mov	x1, x0
	mov	x0, x22
	mov	w2, #16
	bl	_Q_strncpyz
	ldr	x8, [x23, #40]
	ldr	x0, [x8, x28]
	bl	_Q_CleanStr
	ldr	x8, [x23, #56]
	ldr	x8, [x8, x28]
	ldp	x9, x10, [x23, #32]
	add	x9, x9, x19
	str	x8, [x9, #8]
	ldr	x0, [x10, x28]
	bl	_BotAlreadySelected
Lloh22:
	adrp	x16, _QMF_PULSEIFFOCUS@GOTPAGE
Lloh23:
	ldr	x16, [x16, _QMF_PULSEIFFOCUS@GOTPAGEOFF]
Lloh24:
	adrp	x15, _QMF_INACTIVE@GOTPAGE
Lloh25:
	ldr	x15, [x15, _QMF_INACTIVE@GOTPAGEOFF]
	cmp	x0, #0
Lloh26:
	adrp	x0, _PLAYERGRID_COLS@GOTPAGE
Lloh27:
	ldr	x0, [x0, _PLAYERGRID_COLS@GOTPAGEOFF]
Lloh28:
	adrp	x8, _color_blue@GOTPAGE
Lloh29:
	ldr	x8, [x8, _color_blue@GOTPAGEOFF]
Lloh30:
	adrp	x9, _color_red@GOTPAGE
Lloh31:
	ldr	x9, [x9, _color_red@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	ldr	x9, [x23, #48]
	str	w8, [x9, x26]
	ldr	w10, [x15]
	ldp	x8, x9, [x23, #24]
	ldr	w11, [x8, x26]
	bic	w10, w11, w10
	str	w10, [x8, x26]
	b	LBB0_3
LBB0_6:
Lloh32:
	adrp	x10, _MAX_MODELSPERPAGE@GOTPAGE
Lloh33:
	ldr	x10, [x10, _MAX_MODELSPERPAGE@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	b	LBB0_8
LBB0_7:
	ldp	x8, x9, [x23, #24]
LBB0_8:
	ldp	w12, w11, [x23, #8]
	sdiv	w13, w12, w10
	msub	w10, w13, w10, w12
	mov	w12, #24
	smull	x12, w10, w12
	ldr	w13, [x9, x12]
	ldr	w14, [x24]
	orr	w13, w13, w14
	str	w13, [x9, x12]
	ldr	w9, [x16]
	sbfiz	x10, x10, #2, #32
	ldr	w12, [x8, x10]
	bic	w9, w12, w9
	str	w9, [x8, x10]
	cmp	w11, #2
	b.lt	LBB0_11
; %bb.9:
	ldr	w9, [x23]
	ldr	w8, [x15]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.10:
	ldr	w10, [x23, #20]
	bic	w10, w10, w8
	b	LBB0_13
LBB0_11:
	ldr	w8, [x15]
	ldp	w10, w9, [x23, #16]
	orr	w9, w9, w8
	str	w9, [x23, #20]
	orr	w8, w10, w8
	b	LBB0_16
LBB0_12:
	ldr	w10, [x23, #20]
	orr	w10, w10, w8
LBB0_13:
	str	w10, [x23, #20]
	sub	w10, w11, #1
	cmp	w9, w10
	b.ge	LBB0_15
; %bb.14:
	ldr	w9, [x23, #16]
	bic	w8, w9, w8
	b	LBB0_16
LBB0_15:
	ldr	w9, [x23, #16]
	orr	w8, w9, w8
LBB0_16:
	str	w8, [x23, #16]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_botSelectInfo,72,3             ; @botSelectInfo
	.comm	_MAX_MODELSPERPAGE,4,2          ; @MAX_MODELSPERPAGE
	.comm	_PLAYERGRID_ROWS,4,2            ; @PLAYERGRID_ROWS
	.comm	_PLAYERGRID_COLS,4,2            ; @PLAYERGRID_COLS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"model"

	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
l_.str.1:                               ; @.str.1
	.asciz	"name"

	.comm	_color_red,4,2                  ; @color_red
	.comm	_color_blue,4,2                 ; @color_blue
	.comm	_QMF_INACTIVE,4,2               ; @QMF_INACTIVE
	.comm	_QMF_HIGHLIGHT,4,2              ; @QMF_HIGHLIGHT
	.comm	_QMF_PULSEIFFOCUS,4,2           ; @QMF_PULSEIFFOCUS
	.no_dead_strip	_UI_BotSelectMenu_UpdateGrid
.subsections_via_symbols
