	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GraphicsOptions_SetMenuItems
_GraphicsOptions_SetMenuItems:          ## @GraphicsOptions_SetMenuItems
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	movl	%eax, %edi
	callq	_GraphicsOptions_FindDetectedResolution
	movq	_s_graphicsoptions@GOTPCREL(%rip), %r12
	movl	%eax, 36(%r12)
	testl	%eax, %eax
	jns	LBB0_12
## %bb.1:
	movq	_resolutionsDetected@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.2:
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_MAX_STRING_CHARS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	leal	-2(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	callq	_trap_Cvar_VariableStringBuffer
	movq	%r13, %rdi
	callq	_strlen
	cltq
	movb	$0, 1(%rax,%r13)
	movq	%r13, %rdi
	callq	_strlen
	cltq
	movb	$120, (%r13,%rax)
	movq	%r13, %rdi
	callq	_strlen
	movslq	%eax, %r15
	addq	%r13, %r15
	movq	%r13, %rdi
	callq	_strlen
	subl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_trap_Cvar_VariableStringBuffer
	movq	_detectedResolutions@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_Q_stricmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rax
	movq	8(%rax,%rbx,8), %rsi
	incq	%rbx
	testq	%rsi, %rsi
	jne	LBB0_4
LBB0_7:
	cmpl	$0, 36(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jns	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_11:
	movl	$3, 36(%r12)
	movl	$3, %eax
	jmp	LBB0_12
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_9:
	movl	%ebx, 36(%r12)
LBB0_10:
	movq	%rax, %rsp
	movl	36(%r12), %eax
LBB0_12:
	movq	_resToRatio@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	(%rcx,%rax,4), %eax
	movl	%eax, 40(%r12)
	leaq	L_.str.3(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	movl	%eax, 8(%r12)
	leaq	L_.str.4(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	movl	%eax, 32(%r12)
	leaq	L_.str.5(%rip), %rdi
	callq	_trap_Cvar_VariableValue
                                        ## kill: def $eax killed $eax def $rax
	leal	-3(%rax), %edx
	negl	%edx
	xorl	%ecx, %ecx
	movl	%edx, 28(%r12)
	cmpl	$3, %eax
	jg	LBB0_15
## %bb.13:
	testl	%eax, %eax
	jns	LBB0_16
## %bb.14:
	movl	$3, %ecx
LBB0_15:
	movl	%ecx, 28(%r12)
LBB0_16:
	leaq	L_.str.6(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movl	%ecx, 24(%r12)
	leaq	L_.str.7(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	xorl	%ecx, %ecx
	cmpl	$16, %eax
	sete	%cl
	cmpl	$32, %eax
	movl	$2, %ebx
	cmovel	%ebx, %ecx
	movl	%ecx, 20(%r12)
	leaq	L_.str.8(%rip), %rdi
	callq	_UI_Cvar_VariableString
	leaq	L_.str.9(%rip), %rsi
	movq	%rax, %rdi
	callq	_Q_stricmp
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movl	%ecx, 16(%r12)
	leaq	L_.str.10(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	movl	$2, %ecx
	testl	%eax, %eax
	jle	LBB0_18
## %bb.17:
	leaq	L_.str.11(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	xorl	%ecx, %ecx
	cmpl	$20, %eax
	setl	%cl
LBB0_18:
	movl	%ecx, 12(%r12)
	leaq	L_.str.12(%rip), %rdi
	callq	_trap_Cvar_VariableValue
	xorl	%ecx, %ecx
	cmpl	$16, %eax
	sete	%cl
	cmpl	$32, %eax
	cmovel	%ebx, %ecx
	movl	8(%r12), %eax
	testl	%eax, %eax
	cmovel	%eax, %ecx
	movl	4(%r12), %eax
	cmpl	$1, %eax
	cmovel	%eax, %ecx
	movl	%ecx, (%r12)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r_mode"

	.comm	_s_graphicsoptions,44,2         ## @s_graphicsoptions
	.comm	_resolutionsDetected,8,3        ## @resolutionsDetected
	.comm	_MAX_STRING_CHARS,4,2           ## @MAX_STRING_CHARS
L_.str.1:                               ## @.str.1
	.asciz	"r_customwidth"

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

	.comm	_detectedResolutions,8,3        ## @detectedResolutions
	.comm	_resToRatio,8,3                 ## @resToRatio
L_.str.3:                               ## @.str.3
	.asciz	"r_fullscreen"

L_.str.4:                               ## @.str.4
	.asciz	"r_allowExtensions"

L_.str.5:                               ## @.str.5
	.asciz	"r_picmip"

L_.str.6:                               ## @.str.6
	.asciz	"r_vertexLight"

L_.str.7:                               ## @.str.7
	.asciz	"r_texturebits"

L_.str.8:                               ## @.str.8
	.asciz	"r_textureMode"

L_.str.9:                               ## @.str.9
	.asciz	"GL_LINEAR_MIPMAP_NEAREST"

L_.str.10:                              ## @.str.10
	.asciz	"r_lodBias"

L_.str.11:                              ## @.str.11
	.asciz	"r_subdivisions"

L_.str.12:                              ## @.str.12
	.asciz	"r_colorbits"

	.no_dead_strip	_GraphicsOptions_SetMenuItems
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GraphicsOptions_SetMenuItems
_GraphicsOptions_SetMenuItems:          ; @GraphicsOptions_SetMenuItems
	.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	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trap_Cvar_VariableValue
	bl	_GraphicsOptions_FindDetectedResolution
Lloh5:
	adrp	x22, _s_graphicsoptions@GOTPAGE
Lloh6:
	ldr	x22, [x22, _s_graphicsoptions@GOTPAGEOFF]
	str	w0, [x22, #36]
	tbz	w0, #31, LBB0_11
; %bb.1:
Lloh7:
	adrp	x8, _resolutionsDetected@GOTPAGE
Lloh8:
	ldr	x8, [x8, _resolutionsDetected@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.2:
	mov	x23, sp
Lloh10:
	adrp	x8, _MAX_STRING_CHARS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MAX_STRING_CHARS@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	mov	x9, x20
Lloh13:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh14:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
	sub	w2, w20, #2
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_trap_Cvar_VariableStringBuffer
	mov	x0, x19
	bl	_strlen
	add	x8, x19, w0, sxtw
	strb	wzr, [x8, #1]
	mov	x0, x19
	bl	_strlen
	mov	w8, #120
	strb	w8, [x19, w0, sxtw]
	mov	x0, x19
	bl	_strlen
	add	x21, x19, w0, sxtw
	mov	x0, x19
	bl	_strlen
	sub	w2, w20, w0
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_trap_Cvar_VariableStringBuffer
Lloh19:
	adrp	x20, _detectedResolutions@GOTPAGE
Lloh20:
	ldr	x20, [x20, _detectedResolutions@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x1, [x8]
	cbz	x1, LBB0_6
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_Q_stricmp
	cbz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	add	x8, x8, x21, lsl #3
	add	x21, x21, #1
	ldr	x1, [x8, #8]
	cbnz	x1, LBB0_4
LBB0_6:
	ldr	w8, [x22, #36]
	tbz	w8, #31, LBB0_9
; %bb.7:
	mov	w21, #0
LBB0_8:
	str	w21, [x22, #36]
LBB0_9:
	mov	sp, x23
	ldr	w0, [x22, #36]
	b	LBB0_11
LBB0_10:
	mov	w0, #3
	str	w0, [x22, #36]
LBB0_11:
Lloh21:
	adrp	x8, _resToRatio@GOTPAGE
Lloh22:
	ldr	x8, [x8, _resToRatio@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	w8, [x8, w0, sxtw #2]
	str	w8, [x22, #40]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_trap_Cvar_VariableValue
	str	w0, [x22, #8]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_trap_Cvar_VariableValue
	str	w0, [x22, #32]
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_trap_Cvar_VariableValue
	mov	w8, #3
	sub	w8, w8, w0
	str	w8, [x22, #28]
	cmp	w0, #3
	b.le	LBB0_13
; %bb.12:
	mov	w8, #0
	b	LBB0_15
LBB0_13:
	tbz	w0, #31, LBB0_16
; %bb.14:
	mov	w8, #3
LBB0_15:
	str	w8, [x22, #28]
LBB0_16:
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_trap_Cvar_VariableValue
	cmp	w0, #0
	cset	w8, ne
	str	w8, [x22, #24]
Lloh32:
	adrp	x0, l_.str.7@PAGE
Lloh33:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_trap_Cvar_VariableValue
	cmp	w0, #16
	cset	w8, eq
	mov	w19, #2
	cmp	w0, #32
	csel	w8, w19, w8, eq
	str	w8, [x22, #20]
Lloh34:
	adrp	x0, l_.str.8@PAGE
Lloh35:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_UI_Cvar_VariableString
Lloh36:
	adrp	x1, l_.str.9@PAGE
Lloh37:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_Q_stricmp
	cmp	w0, #0
	cset	w8, ne
	str	w8, [x22, #16]
Lloh38:
	adrp	x0, l_.str.10@PAGE
Lloh39:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_trap_Cvar_VariableValue
	cmp	w0, #1
	b.lt	LBB0_18
; %bb.17:
Lloh40:
	adrp	x0, l_.str.11@PAGE
Lloh41:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_trap_Cvar_VariableValue
	cmp	w0, #20
	cset	w8, lt
	b	LBB0_19
LBB0_18:
	mov	w8, #2
LBB0_19:
	str	w8, [x22, #12]
Lloh42:
	adrp	x0, l_.str.12@PAGE
Lloh43:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_trap_Cvar_VariableValue
	cmp	w0, #16
	cset	w8, eq
	cmp	w0, #32
	csel	w8, w19, w8, eq
	ldp	w10, w9, [x22, #4]
	cmp	w9, #0
	csel	w8, wzr, w8, eq
	cmp	w10, #1
	csinc	w8, w8, wzr, ne
	str	w8, [x22]
	ldur	x8, [x29, #-56]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	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_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r_mode"

	.comm	_s_graphicsoptions,44,2         ; @s_graphicsoptions
	.comm	_resolutionsDetected,8,3        ; @resolutionsDetected
	.comm	_MAX_STRING_CHARS,4,2           ; @MAX_STRING_CHARS
l_.str.1:                               ; @.str.1
	.asciz	"r_customwidth"

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

	.comm	_detectedResolutions,8,3        ; @detectedResolutions
	.comm	_resToRatio,8,3                 ; @resToRatio
l_.str.3:                               ; @.str.3
	.asciz	"r_fullscreen"

l_.str.4:                               ; @.str.4
	.asciz	"r_allowExtensions"

l_.str.5:                               ; @.str.5
	.asciz	"r_picmip"

l_.str.6:                               ; @.str.6
	.asciz	"r_vertexLight"

l_.str.7:                               ; @.str.7
	.asciz	"r_texturebits"

l_.str.8:                               ; @.str.8
	.asciz	"r_textureMode"

l_.str.9:                               ; @.str.9
	.asciz	"GL_LINEAR_MIPMAP_NEAREST"

l_.str.10:                              ; @.str.10
	.asciz	"r_lodBias"

l_.str.11:                              ; @.str.11
	.asciz	"r_subdivisions"

l_.str.12:                              ; @.str.12
	.asciz	"r_colorbits"

	.no_dead_strip	_GraphicsOptions_SetMenuItems
.subsections_via_symbols
