	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function configure_graphics_mode_v
_configure_graphics_mode_v:             ## @configure_graphics_mode_v
	.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
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	(%rdi), %rdi
	movq	_mmCOL_MAN_OUTPUT_CSC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_dm_read_reg
	movl	%eax, %r15d
	movq	_COL_MAN_OUTPUT_CSC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OUTPUT_CSC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_set_reg_field_value
	movq	_GRAPHICS_CSC_ADJUST_TYPE_SW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_5
## %bb.1:
	movq	_CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC@GOTPCREL(%rip), %rcx
	movl	$1, %eax
	cmpl	%r12d, (%rcx)
	je	LBB0_11
## %bb.2:
	addl	$-128, %r13d
	xorl	%eax, %eax
	cmpl	$6, %r13d
	jae	LBB0_11
## %bb.3:
	movl	$39, %ecx
	btl	%r13d, %ecx
	jae	LBB0_11
## %bb.4:
	movslq	%r13d, %rax
	leaq	l_switch.table.configure_graphics_mode_v(%rip), %rcx
	jmp	LBB0_9
LBB0_5:
	movq	_GRAPHICS_CSC_ADJUST_TYPE_HW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_10
## %bb.6:
	addl	$-128, %r13d
	xorl	%eax, %eax
	cmpl	$6, %r13d
	jae	LBB0_11
## %bb.7:
	movl	$47, %ecx
	btl	%r13d, %ecx
	jae	LBB0_11
## %bb.8:
	movslq	%r13d, %rax
	leaq	l_switch.table.configure_graphics_mode_v.1(%rip), %rcx
LBB0_9:
	leaq	(%rcx,%rax,4), %rax
	movl	(%rax), %r14d
LBB0_10:
	movq	_COL_MAN_OUTPUT_CSC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OUTPUT_CSC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_set_reg_field_value
	movq	_mmCOL_MAN_OUTPUT_CSC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_dm_write_reg
	movl	$1, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmCOL_MAN_OUTPUT_CSC_CONTROL,4,2 ## @mmCOL_MAN_OUTPUT_CSC_CONTROL
	.comm	_COL_MAN_OUTPUT_CSC_CONTROL,4,2 ## @COL_MAN_OUTPUT_CSC_CONTROL
	.comm	_OUTPUT_CSC_MODE,4,2            ## @OUTPUT_CSC_MODE
	.comm	_GRAPHICS_CSC_ADJUST_TYPE_SW,4,2 ## @GRAPHICS_CSC_ADJUST_TYPE_SW
	.comm	_CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC,4,2 ## @CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC
	.comm	_GRAPHICS_CSC_ADJUST_TYPE_HW,4,2 ## @GRAPHICS_CSC_ADJUST_TYPE_HW
	.no_dead_strip	_configure_graphics_mode_v
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.configure_graphics_mode_v
l_switch.table.configure_graphics_mode_v:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.p2align	2                               ## @switch.table.configure_graphics_mode_v.1
l_switch.table.configure_graphics_mode_v.1:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	0                               ## 0x0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function configure_graphics_mode_v
_configure_graphics_mode_v:             ; @configure_graphics_mode_v
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x24, _mmCOL_MAN_OUTPUT_CSC_CONTROL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _mmCOL_MAN_OUTPUT_CSC_CONTROL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_dm_read_reg
	mov	x20, x0
Lloh2:
	adrp	x25, _COL_MAN_OUTPUT_CSC_CONTROL@GOTPAGE
Lloh3:
	ldr	x25, [x25, _COL_MAN_OUTPUT_CSC_CONTROL@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh4:
	adrp	x26, _OUTPUT_CSC_MODE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _OUTPUT_CSC_MODE@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	w1, #0
	bl	_set_reg_field_value
Lloh6:
	adrp	x8, _GRAPHICS_CSC_ADJUST_TYPE_SW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GRAPHICS_CSC_ADJUST_TYPE_SW@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.1:
Lloh9:
	adrp	x8, _CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w23
	b.eq	LBB0_13
; %bb.2:
	sub	w8, w21, #128
	cmp	w8, #6
	b.hs	LBB0_8
; %bb.3:
	mov	w9, #39
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_8
; %bb.4:
Lloh12:
	adrp	x9, l_switch.table.configure_graphics_mode_v@PAGE
Lloh13:
	add	x9, x9, l_switch.table.configure_graphics_mode_v@PAGEOFF
	b	LBB0_11
LBB0_5:
Lloh14:
	adrp	x8, _GRAPHICS_CSC_ADJUST_TYPE_HW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GRAPHICS_CSC_ADJUST_TYPE_HW@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_9
; %bb.6:
	sub	w8, w21, #128
	cmp	w8, #6
	b.hs	LBB0_8
; %bb.7:
	mov	w9, #47
	lsr	w9, w9, w8
	tbnz	w9, #0, LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_14
LBB0_9:
	mov	w1, #0
	b	LBB0_12
LBB0_10:
Lloh17:
	adrp	x9, l_switch.table.configure_graphics_mode_v.1@PAGE
Lloh18:
	add	x9, x9, l_switch.table.configure_graphics_mode_v.1@PAGEOFF
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_11:
	ldr	w1, [x9, w8, sxtw #2]
LBB0_12:
	ldr	w2, [x25]
	ldr	w3, [x26]
	mov	x0, x20
	bl	_set_reg_field_value
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	bl	_dm_write_reg
LBB0_13:
	mov	w0, #1
LBB0_14:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_mmCOL_MAN_OUTPUT_CSC_CONTROL,4,2 ; @mmCOL_MAN_OUTPUT_CSC_CONTROL
	.comm	_COL_MAN_OUTPUT_CSC_CONTROL,4,2 ; @COL_MAN_OUTPUT_CSC_CONTROL
	.comm	_OUTPUT_CSC_MODE,4,2            ; @OUTPUT_CSC_MODE
	.comm	_GRAPHICS_CSC_ADJUST_TYPE_SW,4,2 ; @GRAPHICS_CSC_ADJUST_TYPE_SW
	.comm	_CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC,4,2 ; @CSC_COLOR_MODE_GRAPHICS_OUTPUT_CSC
	.comm	_GRAPHICS_CSC_ADJUST_TYPE_HW,4,2 ; @GRAPHICS_CSC_ADJUST_TYPE_HW
	.no_dead_strip	_configure_graphics_mode_v
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.configure_graphics_mode_v
l_switch.table.configure_graphics_mode_v:
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.p2align	2                               ; @switch.table.configure_graphics_mode_v.1
l_switch.table.configure_graphics_mode_v.1:
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	0                               ; 0x0

.subsections_via_symbols
