	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_get_monitor_bpc         ## -- Begin function radeon_get_monitor_bpc
	.p2align	4, 0x90
_radeon_get_monitor_bpc:                ## @radeon_get_monitor_bpc
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	32(%rdi), %rax
	movq	(%rax), %r12
	callq	_to_radeon_connector
	movq	%rax, %r14
	movl	(%r15), %eax
	movl	$8, %ebx
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_11
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	movl	4(%r15), %ebx
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.8:
	movq	%r12, %rdi
	callq	_ASIC_IS_DCE41
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_ASIC_IS_DCE5
	movl	$8, %ebx
	testl	%eax, %eax
	je	LBB0_11
LBB0_10:
	movq	24(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movq	%rax, %rdi
	callq	_to_radeon_encoder
	movq	(%rax), %rax
	movq	_ATOM_PANEL_MISC_V13_6BIT_PER_COLOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	testl	%ecx, (%rax)
	sete	%dl
	leal	(%rdx,%rdx), %ebx
	addl	$6, %ebx
	jmp	LBB0_11
LBB0_2:
	cmpl	$0, 16(%r14)
	jne	LBB0_3
	jmp	LBB0_11
LBB0_5:
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movq	_CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.6:
	movq	_CONNECTOR_OBJECT_ID_eDP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
LBB0_3:
	movq	%r15, %rdi
	callq	_radeon_connector_edid
	movl	%eax, %edi
	callq	_drm_detect_hdmi_monitor
	movl	$8, %ebx
	testq	%rax, %rax
	je	LBB0_11
LBB0_4:
	movl	4(%r15), %eax
	testl	%eax, %eax
	movl	$8, %ebx
	cmovnel	%eax, %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_radeon_connector_edid
	movl	%eax, %edi
	callq	_drm_detect_hdmi_monitor
	testq	%rax, %rax
	je	LBB0_29
## %bb.12:
	cmpl	$9, %ebx
	jl	LBB0_15
## %bb.13:
	movq	%r12, %rdi
	callq	_ASIC_IS_DCE4
	testl	%eax, %eax
	je	LBB0_18
## %bb.14:
	cmpl	$12, %ebx
	jbe	LBB0_15
## %bb.19:
	movl	16(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	8(%r15), %r12d
	movl	$12, %ebx
	testl	%r12d, %r12d
	jg	LBB0_20
	jmp	LBB0_17
LBB0_15:
	movl	8(%r15), %r12d
	testl	%r12d, %r12d
	jg	LBB0_20
## %bb.16:
	cmpl	$9, %ebx
	jl	LBB0_33
LBB0_17:
	movl	16(%r15), %esi
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_32
LBB0_18:
	movl	16(%r15), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	8(%r15), %r12d
	movl	$8, %ebx
	testl	%r12d, %r12d
	jle	LBB0_33
LBB0_20:
	movl	(%r14), %r14d
	movl	16(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	cmpl	$12, %ebx
	jne	LBB0_26
## %bb.21:
	leal	(%r14,%r14,2), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	$12, %ebx
	cmpl	%r12d, %ecx
	jle	LBB0_29
## %bb.22:
	movq	_DRM_EDID_HDMI_DC_30@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r15)
	je	LBB0_24
## %bb.23:
	leal	(%r14,%r14,4), %eax
	leal	(%r14,%r14,4), %ecx
	addl	$3, %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	$10, %ebx
	cmpl	%r12d, %ecx
	jle	LBB0_25
LBB0_24:
	movl	$8, %ebx
LBB0_25:
	movl	16(%r15), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
LBB0_26:
	cmpl	$10, %ebx
	jne	LBB0_29
## %bb.27:
	leal	(%r14,%r14,4), %eax
	leal	(%r14,%r14,4), %ecx
	addl	$3, %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	$10, %ebx
	cmpl	%r12d, %ecx
	jle	LBB0_29
## %bb.28:
	movl	16(%r15), %esi
	leaq	L_.str.4(%rip), %rdi
	movl	$8, %ebx
	movl	$8, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_33
LBB0_29:
	movq	_radeon_deep_color@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_33
## %bb.30:
	cmpl	$9, %ebx
	jl	LBB0_33
## %bb.31:
	movl	16(%r15), %esi
	leaq	L_.str.6(%rip), %rdi
LBB0_32:
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	$8, %ebx
LBB0_33:
	movl	4(%r15), %edx
	movl	16(%r15), %esi
	leaq	L_.str.7(%rip), %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,4,2 ## @CONNECTOR_OBJECT_ID_DISPLAYPORT
	.comm	_CONNECTOR_OBJECT_ID_eDP,4,2    ## @CONNECTOR_OBJECT_ID_eDP
	.comm	_ATOM_PANEL_MISC_V13_6BIT_PER_COLOR,4,2 ## @ATOM_PANEL_MISC_V13_6BIT_PER_COLOR
	.comm	_ATOM_PANEL_MISC_V13_8BIT_PER_COLOR,4,2 ## @ATOM_PANEL_MISC_V13_8BIT_PER_COLOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: HDMI deep color %d bpc unsupported. Using 8 bpc.\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: HDMI deep color %d bpc unsupported. Using 12 bpc.\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n"

	.comm	_DRM_EDID_HDMI_DC_30,4,2        ## @DRM_EDID_HDMI_DC_30
L_.str.3:                               ## @.str.3
	.asciz	"%s: HDMI deep color 12 bpc exceeds max tmds clock. Using %d bpc.\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s: HDMI deep color 10 bpc exceeds max tmds clock. Using %d bpc.\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n"

	.comm	_radeon_deep_color,8,3          ## @radeon_deep_color
L_.str.6:                               ## @.str.6
	.asciz	"%s: Deep color disabled. Set radeon module param deep_color=1 to enable.\n"

L_.str.7:                               ## @.str.7
	.asciz	"%s: Display bpc=%d, returned bpc=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_get_monitor_bpc         ; -- Begin function radeon_get_monitor_bpc
	.p2align	2
_radeon_get_monitor_bpc:                ; @radeon_get_monitor_bpc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x22, [x8]
	bl	_to_radeon_connector
	mov	x20, x0
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_13
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w21, [x19, #4]
	cbnz	w21, LBB0_14
; %bb.3:
	mov	x0, x22
	bl	_ASIC_IS_DCE41
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x22
	bl	_ASIC_IS_DCE5
	cbz	w0, LBB0_13
LBB0_5:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	bl	_to_radeon_encoder
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _ATOM_PANEL_MISC_V13_6BIT_PER_COLOR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATOM_PANEL_MISC_V13_6BIT_PER_COLOR@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #6
	mov	w9, #8
	b	LBB0_12
LBB0_6:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_13
LBB0_7:
	mov	x0, x19
	bl	_radeon_connector_edid
	bl	_drm_detect_hdmi_monitor
	mov	w21, #8
	cbz	x0, LBB0_14
; %bb.8:
	ldr	w8, [x19, #4]
	cmp	w8, #0
	csel	w21, w21, w8, eq
	b	LBB0_14
LBB0_9:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CONNECTOR_OBJECT_ID_DISPLAYPORT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _CONNECTOR_OBJECT_ID_eDP@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CONNECTOR_OBJECT_ID_eDP@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_radeon_connector_edid
	bl	_drm_detect_hdmi_monitor
	cbz	x0, LBB0_13
LBB0_11:
	ldr	w8, [x19, #4]
	mov	w9, #8
	cmp	w8, #0
LBB0_12:
	csel	w21, w9, w8, eq
	b	LBB0_14
LBB0_13:
	mov	w21, #8
LBB0_14:
	mov	x0, x19
	bl	_radeon_connector_edid
	bl	_drm_detect_hdmi_monitor
	cbz	x0, LBB0_36
; %bb.15:
	cmp	w21, #9
	b.lt	LBB0_20
; %bb.16:
	mov	x0, x22
	bl	_ASIC_IS_DCE4
	cbz	w0, LBB0_23
; %bb.17:
	cmp	w21, #12
	b.ls	LBB0_20
; %bb.18:
	ldr	w1, [x19, #16]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w22, [x19, #8]
	cmp	w22, #1
	b.lt	LBB0_22
; %bb.19:
	mov	w21, #12
	b	LBB0_24
LBB0_20:
	ldr	w22, [x19, #8]
	cmp	w22, #0
	b.gt	LBB0_24
; %bb.21:
	cmp	w21, #9
	b.lt	LBB0_39
LBB0_22:
	ldr	w1, [x19, #16]
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_38
LBB0_23:
	ldr	w1, [x19, #16]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w22, [x19, #8]
	mov	w21, #8
	cmp	w22, #0
	b.le	LBB0_39
LBB0_24:
	ldr	w20, [x20]
	ldr	w1, [x19, #16]
	stp	x20, x22, [sp]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
	cmp	w21, #12
	b.ne	LBB0_32
; %bb.25:
	add	w8, w20, w20, lsl #1
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w22, w8, asr #1
	b.ge	LBB0_29
; %bb.26:
	ldr	w8, [x19, #12]
Lloh19:
	adrp	x9, _DRM_EDID_HDMI_DC_30@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DRM_EDID_HDMI_DC_30@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_28
; %bb.27:
	add	w8, w20, w20, lsl #2
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w22, w8, asr #2
	b.ge	LBB0_30
LBB0_28:
	mov	w21, #8
	b	LBB0_31
LBB0_29:
	mov	w21, #12
	b	LBB0_36
LBB0_30:
	mov	w21, #10
LBB0_31:
	ldr	w1, [x19, #16]
	str	x21, [sp]
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_32:
	cmp	w21, #10
	b.ne	LBB0_36
; %bb.33:
	add	w8, w20, w20, lsl #2
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w22, w8, asr #2
	b.ge	LBB0_35
; %bb.34:
	ldr	w1, [x19, #16]
	mov	w21, #8
	str	x21, [sp]
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_39
LBB0_35:
	mov	w21, #10
LBB0_36:
Lloh26:
	adrp	x8, _radeon_deep_color@GOTPAGE
Lloh27:
	ldr	x8, [x8, _radeon_deep_color@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cmp	x8, #0
	ccmp	w21, #9, #8, eq
	b.lt	LBB0_39
; %bb.37:
	ldr	w1, [x19, #16]
Lloh29:
	adrp	x0, l_.str.6@PAGE
Lloh30:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_38:
	bl	_DRM_DEBUG
	mov	w21, #8
LBB0_39:
	ldr	w1, [x19, #16]
	ldr	w8, [x19, #4]
	stp	x8, x21, [sp]
Lloh31:
	adrp	x0, l_.str.7@PAGE
Lloh32:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_CONNECTOR_OBJECT_ID_DISPLAYPORT,4,2 ; @CONNECTOR_OBJECT_ID_DISPLAYPORT
	.comm	_CONNECTOR_OBJECT_ID_eDP,4,2    ; @CONNECTOR_OBJECT_ID_eDP
	.comm	_ATOM_PANEL_MISC_V13_6BIT_PER_COLOR,4,2 ; @ATOM_PANEL_MISC_V13_6BIT_PER_COLOR
	.comm	_ATOM_PANEL_MISC_V13_8BIT_PER_COLOR,4,2 ; @ATOM_PANEL_MISC_V13_8BIT_PER_COLOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: HDMI deep color %d bpc unsupported. Using 8 bpc.\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: HDMI deep color %d bpc unsupported. Using 12 bpc.\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n"

	.comm	_DRM_EDID_HDMI_DC_30,4,2        ; @DRM_EDID_HDMI_DC_30
l_.str.3:                               ; @.str.3
	.asciz	"%s: HDMI deep color 12 bpc exceeds max tmds clock. Using %d bpc.\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s: HDMI deep color 10 bpc exceeds max tmds clock. Using %d bpc.\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s: Required max tmds clock for HDMI deep color missing. Using 8 bpc.\n"

	.comm	_radeon_deep_color,8,3          ; @radeon_deep_color
l_.str.6:                               ; @.str.6
	.asciz	"%s: Deep color disabled. Set radeon module param deep_color=1 to enable.\n"

l_.str.7:                               ; @.str.7
	.asciz	"%s: Display bpc=%d, returned bpc=%d\n"

.subsections_via_symbols
