	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GraphicsOptions_ApplyChanges
_GraphicsOptions_ApplyChanges:          ## @GraphicsOptions_ApplyChanges
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_QM_ACTIVATED@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_24
## %bb.1:
	movq	_s_graphicsoptions@GOTPCREL(%rip), %r12
	movl	36(%r12), %esi
	cmpl	$2, %esi
	ja	LBB0_3
## %bb.2:
	shll	$4, %esi
	leaq	L_.str(%rip), %rdi
	callq	_trap_Cvar_SetValue
LBB0_3:
	movl	$3, %esi
	subl	32(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_trap_Cvar_SetValue
	movl	28(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_trap_Cvar_SetValue
	movq	_resolutionsDetected@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	24(%r12), %ebx
	je	LBB0_10
## %bb.4:
	cmpl	$-1, %ebx
	je	LBB0_7
## %bb.5:
	movq	_detectedResolutions@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_LEN
	cmpl	%eax, %ebx
	jge	LBB0_7
## %bb.6:
	movl	24(%r12), %edi
	jmp	LBB0_8
LBB0_7:
	movl	$0, 24(%r12)
	xorl	%edi, %edi
LBB0_8:
	callq	_GraphicsOptions_FindBuiltinResolution
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.9:
	movq	_detectedResolutions@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movslq	24(%r12), %rcx
	movq	(%rax,%rcx,8), %rsi
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_Q_strncpyz
	movq	%r14, %rdi
	movl	$120, %esi
	callq	_strchr
	movb	$0, (%rax)
	movq	(%r15), %rax
	movslq	24(%r12), %rcx
	movq	(%rax,%rcx,8), %rdi
	movl	$120, %esi
	callq	_strchr
	leaq	1(%rax), %rsi
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_Q_strncpyz
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	callq	_trap_Cvar_Set
	leaq	L_.str.4(%rip), %rdi
	movq	%r15, %rsi
	callq	_trap_Cvar_Set
LBB0_10:
	leaq	L_.str.5(%rip), %rdi
	movl	%ebx, %esi
	callq	_trap_Cvar_SetValue
	movl	20(%r12), %esi
	leaq	L_.str.6(%rip), %rdi
	callq	_trap_Cvar_SetValue
	movl	16(%r12), %eax
	cmpl	$2, %eax
	je	LBB0_15
## %bb.11:
	cmpl	$1, %eax
	je	LBB0_14
## %bb.12:
	testl	%eax, %eax
	jne	LBB0_17
## %bb.13:
	leaq	L_.str.7(%rip), %rdi
	xorl	%esi, %esi
	callq	_trap_Cvar_SetValue
	leaq	L_.str.8(%rip), %rdi
	xorl	%esi, %esi
	callq	_trap_Cvar_SetValue
	leaq	L_.str.9(%rip), %rdi
	callq	_trap_Cvar_Reset
	jmp	LBB0_17
LBB0_15:
	leaq	L_.str.7(%rip), %rdi
	movl	$32, %esi
	callq	_trap_Cvar_SetValue
	leaq	L_.str.8(%rip), %rdi
	movl	$24, %esi
	callq	_trap_Cvar_SetValue
	leaq	L_.str.9(%rip), %rdi
	movl	$8, %esi
	jmp	LBB0_16
LBB0_14:
	leaq	L_.str.7(%rip), %rdi
	movl	$16, %esi
	callq	_trap_Cvar_SetValue
	leaq	L_.str.8(%rip), %rdi
	movl	$16, %esi
	callq	_trap_Cvar_SetValue
	leaq	L_.str.9(%rip), %rdi
	xorl	%esi, %esi
LBB0_16:
	callq	_trap_Cvar_SetValue
LBB0_17:
	movl	12(%r12), %esi
	leaq	L_.str.10(%rip), %rdi
	callq	_trap_Cvar_SetValue
	movl	8(%r12), %eax
	cmpl	$2, %eax
	je	LBB0_18
## %bb.19:
	cmpl	$1, %eax
	jne	LBB0_21
## %bb.20:
	movl	$12, %ebx
	jmp	LBB0_22
LBB0_18:
	movl	$4, %ebx
	xorl	%esi, %esi
	jmp	LBB0_23
LBB0_21:
	movl	$20, %ebx
LBB0_22:
	movl	$1, %esi
LBB0_23:
	leaq	L_.str.11(%rip), %rdi
	callq	_trap_Cvar_SetValue
	leaq	L_.str.12(%rip), %rdi
	movl	%ebx, %esi
	callq	_trap_Cvar_SetValue
	cmpq	$0, (%r12)
	leaq	L_.str.15(%rip), %rax
	leaq	L_.str.14(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.13(%rip), %rdi
	callq	_trap_Cvar_Set
	movq	_EXEC_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.16(%rip), %rsi
	callq	_trap_Cmd_ExecuteText
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_ACTIVATED,4,2               ## @QM_ACTIVATED
	.comm	_s_graphicsoptions,40,3         ## @s_graphicsoptions
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r_texturebits"

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

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

	.comm	_resolutionsDetected,8,3        ## @resolutionsDetected
	.comm	_detectedResolutions,8,3        ## @detectedResolutions
L_.str.3:                               ## @.str.3
	.asciz	"r_customwidth"

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

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

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

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

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

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

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

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

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

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

L_.str.14:                              ## @.str.14
	.asciz	"GL_LINEAR_MIPMAP_LINEAR"

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

	.comm	_EXEC_APPEND,4,2                ## @EXEC_APPEND
L_.str.16:                              ## @.str.16
	.asciz	"vid_restart\n"

	.no_dead_strip	_GraphicsOptions_ApplyChanges
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GraphicsOptions_ApplyChanges
_GraphicsOptions_ApplyChanges:          ; @GraphicsOptions_ApplyChanges
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x8, _QM_ACTIVATED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QM_ACTIVATED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_24
; %bb.1:
Lloh6:
	adrp	x20, _s_graphicsoptions@GOTPAGE
Lloh7:
	ldr	x20, [x20, _s_graphicsoptions@GOTPAGEOFF]
	ldr	w8, [x20, #36]
	cmp	w8, #2
	b.hi	LBB0_3
; %bb.2:
	lsl	w1, w8, #4
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trap_Cvar_SetValue
LBB0_3:
	ldr	w8, [x20, #32]
	mov	w9, #3
	sub	w1, w9, w8
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldr	w1, [x20, #28]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_trap_Cvar_SetValue
Lloh14:
	adrp	x8, _resolutionsDetected@GOTPAGE
Lloh15:
	ldr	x8, [x8, _resolutionsDetected@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w19, [x20, #24]
	cbz	x8, LBB0_10
; %bb.4:
Lloh17:
	adrp	x21, _detectedResolutions@GOTPAGE
Lloh18:
	ldr	x21, [x21, _detectedResolutions@GOTPAGEOFF]
	cmn	w19, #1
	b.eq	LBB0_7
; %bb.5:
	ldr	x0, [x21]
	bl	_ARRAY_LEN
	cmp	w19, w0
	b.ge	LBB0_7
; %bb.6:
	ldr	w0, [x20, #24]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
	str	wzr, [x20, #24]
LBB0_8:
	bl	_GraphicsOptions_FindBuiltinResolution
	mov	x19, x0
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.9:
	ldr	x8, [x21]
	ldrsw	x9, [x20, #24]
	ldr	x1, [x8, x9, lsl #3]
	add	x0, sp, #24
	mov	w2, #16
	bl	_Q_strncpyz
	add	x0, sp, #24
	mov	w1, #120
	bl	_strchr
	strb	wzr, [x0]
	ldr	x8, [x21]
	ldrsw	x9, [x20, #24]
	ldr	x0, [x8, x9, lsl #3]
	mov	w1, #120
	bl	_strchr
	add	x1, x0, #1
	add	x0, sp, #8
	mov	w2, #16
	bl	_Q_strncpyz
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	add	x1, sp, #24
	bl	_trap_Cvar_Set
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	add	x1, sp, #8
	bl	_trap_Cvar_Set
LBB0_10:
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x19
	bl	_trap_Cvar_SetValue
	ldr	w1, [x20, #20]
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldr	w8, [x20, #16]
	cmp	w8, #2
	b.eq	LBB0_14
; %bb.11:
	cmp	w8, #1
	b.eq	LBB0_15
; %bb.12:
	cbnz	w8, LBB0_17
; %bb.13:
Lloh27:
	adrp	x0, l_.str.7@PAGE
Lloh28:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	w1, #0
	bl	_trap_Cvar_SetValue
Lloh29:
	adrp	x0, l_.str.8@PAGE
Lloh30:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	w1, #0
	bl	_trap_Cvar_SetValue
Lloh31:
	adrp	x0, l_.str.9@PAGE
Lloh32:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_trap_Cvar_Reset
	b	LBB0_17
LBB0_14:
Lloh33:
	adrp	x0, l_.str.7@PAGE
Lloh34:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	w1, #32
	bl	_trap_Cvar_SetValue
Lloh35:
	adrp	x0, l_.str.8@PAGE
Lloh36:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	w1, #24
	bl	_trap_Cvar_SetValue
Lloh37:
	adrp	x0, l_.str.9@PAGE
Lloh38:
	add	x0, x0, l_.str.9@PAGEOFF
	mov	w1, #8
	b	LBB0_16
LBB0_15:
Lloh39:
	adrp	x0, l_.str.7@PAGE
Lloh40:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	w1, #16
	bl	_trap_Cvar_SetValue
Lloh41:
	adrp	x0, l_.str.8@PAGE
Lloh42:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	w1, #16
	bl	_trap_Cvar_SetValue
Lloh43:
	adrp	x0, l_.str.9@PAGE
Lloh44:
	add	x0, x0, l_.str.9@PAGEOFF
	mov	w1, #0
LBB0_16:
	bl	_trap_Cvar_SetValue
LBB0_17:
	ldr	w1, [x20, #12]
Lloh45:
	adrp	x0, l_.str.10@PAGE
Lloh46:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldr	w8, [x20, #8]
	cmp	w8, #2
	b.eq	LBB0_20
; %bb.18:
	cmp	w8, #1
	b.ne	LBB0_21
; %bb.19:
	mov	w19, #12
	b	LBB0_22
LBB0_20:
	mov	w1, #0
	mov	w19, #4
	b	LBB0_23
LBB0_21:
	mov	w19, #20
LBB0_22:
	mov	w1, #1
LBB0_23:
Lloh47:
	adrp	x0, l_.str.11@PAGE
Lloh48:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_trap_Cvar_SetValue
Lloh49:
	adrp	x0, l_.str.12@PAGE
Lloh50:
	add	x0, x0, l_.str.12@PAGEOFF
	mov	x1, x19
	bl	_trap_Cvar_SetValue
	ldr	x8, [x20]
Lloh51:
	adrp	x9, l_.str.14@PAGE
Lloh52:
	add	x9, x9, l_.str.14@PAGEOFF
Lloh53:
	adrp	x10, l_.str.15@PAGE
Lloh54:
	add	x10, x10, l_.str.15@PAGEOFF
	cmp	x8, #0
	csel	x1, x10, x9, eq
Lloh55:
	adrp	x0, l_.str.13@PAGE
Lloh56:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_trap_Cvar_Set
Lloh57:
	adrp	x8, _EXEC_APPEND@GOTPAGE
Lloh58:
	ldr	x8, [x8, _EXEC_APPEND@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
Lloh60:
	adrp	x1, l_.str.16@PAGE
Lloh61:
	add	x1, x1, l_.str.16@PAGEOFF
	bl	_trap_Cmd_ExecuteText
LBB0_24:
	ldr	x8, [sp, #40]
Lloh62:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh63:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh64:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_ACTIVATED,4,2               ; @QM_ACTIVATED
	.comm	_s_graphicsoptions,40,3         ; @s_graphicsoptions
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r_texturebits"

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

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

	.comm	_resolutionsDetected,8,3        ; @resolutionsDetected
	.comm	_detectedResolutions,8,3        ; @detectedResolutions
l_.str.3:                               ; @.str.3
	.asciz	"r_customwidth"

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

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

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

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

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

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

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

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

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

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

l_.str.14:                              ; @.str.14
	.asciz	"GL_LINEAR_MIPMAP_LINEAR"

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

	.comm	_EXEC_APPEND,4,2                ; @EXEC_APPEND
l_.str.16:                              ; @.str.16
	.asciz	"vid_restart\n"

	.no_dead_strip	_GraphicsOptions_ApplyChanges
.subsections_via_symbols
