	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_dvi_mode_valid
_radeon_dvi_mode_valid:                 ## @radeon_dvi_mode_valid
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r15
	callq	_to_radeon_connector
	cmpq	$0, 8(%rax)
	je	LBB0_1
## %bb.3:
	movq	(%r15), %rdx
	movq	_CHIP_RV100@GOTPCREL(%rip), %rsi
	movl	(%r14), %ecx
	cmpq	(%rsi), %rdx
	jne	LBB0_6
## %bb.4:
	cmpl	$135000, %ecx                   ## imm = 0x20F58
	jle	LBB0_2
	jmp	LBB0_5
LBB0_1:
	movl	(%r14), %ecx
	jmp	LBB0_2
LBB0_6:
	cmpl	$165001, %ecx                   ## imm = 0x28489
	jl	LBB0_2
## %bb.7:
	movq	(%rax), %rax
	movq	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I@GOTPCREL(%rip), %rcx
	movq	_MODE_OK@GOTPCREL(%rip), %r12
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.8:
	movq	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.9:
	movq	_CONNECTOR_OBJECT_ID_HDMI_TYPE_B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE6
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%rbx, %rdi
	callq	_radeon_connector_edid
	movl	%eax, %edi
	callq	_drm_detect_hdmi_monitor
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	cmpl	$340001, (%r14)                 ## imm = 0x53021
	jge	LBB0_5
LBB0_13:
	movq	_MODE_OK@GOTPCREL(%rip), %r12
	jmp	LBB0_14
LBB0_2:
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	cmpl	8(%r15), %eax
	jle	LBB0_13
LBB0_5:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %r12
LBB0_14:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_RV100,8,3                 ## @CHIP_RV100
	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I,8,3 ## @CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I
	.comm	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D,8,3 ## @CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
	.comm	_CONNECTOR_OBJECT_ID_HDMI_TYPE_B,8,3 ## @CONNECTOR_OBJECT_ID_HDMI_TYPE_B
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_radeon_dvi_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_dvi_mode_valid
_radeon_dvi_mode_valid:                 ; @radeon_dvi_mode_valid
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x20, [x8]
	bl	_to_radeon_connector
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x9, [x20]
Lloh0:
	adrp	x8, _CHIP_RV100@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHIP_RV100@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	w8, [x19]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.2:
	mov	w9, #3928
	movk	w9, #2, lsl #16
	cmp	w8, w9
	b.le	LBB0_10
LBB0_3:
Lloh3:
	adrp	x22, _MODE_CLOCK_HIGH@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
	ldr	w8, [x19]
	b	LBB0_10
LBB0_5:
	mov	w9, #33929
	movk	w9, #2, lsl #16
	cmp	w8, w9
	b.lt	LBB0_10
; %bb.6:
	ldr	x8, [x0]
Lloh5:
	adrp	x9, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
Lloh11:
	adrp	x11, _CONNECTOR_OBJECT_ID_HDMI_TYPE_B@GOTPAGE
Lloh12:
	ldr	x11, [x11, _CONNECTOR_OBJECT_ID_HDMI_TYPE_B@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
Lloh14:
	adrp	x22, _MODE_OK@GOTPAGE
Lloh15:
	ldr	x22, [x22, _MODE_OK@GOTPAGEOFF]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.eq	LBB0_11
; %bb.7:
	mov	x0, x20
	bl	_ASIC_IS_DCE6
	cbz	x0, LBB0_3
; %bb.8:
	mov	x0, x21
	bl	_radeon_connector_edid
	bl	_drm_detect_hdmi_monitor
Lloh16:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	cbz	x0, LBB0_12
; %bb.9:
	ldr	w9, [x19]
	mov	w10, #12320
	movk	w10, #5, lsl #16
	cmp	w9, w10
	csel	x22, x8, x22, gt
	b	LBB0_11
LBB0_10:
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #34
Lloh18:
	adrp	x10, _MODE_OK@GOTPAGE
Lloh19:
	ldr	x10, [x10, _MODE_OK@GOTPAGEOFF]
	ldr	w11, [x20, #8]
Lloh20:
	adrp	x12, _MODE_CLOCK_HIGH@GOTPAGE
Lloh21:
	ldr	x12, [x12, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	add	w8, w8, w9
	cmp	w8, w11
	csel	x22, x12, x10, gt
LBB0_11:
	ldr	w0, [x22]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x22, x8
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_RV100,8,3                 ; @CHIP_RV100
	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I,8,3 ; @CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I
	.comm	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D,8,3 ; @CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
	.comm	_CONNECTOR_OBJECT_ID_HDMI_TYPE_B,8,3 ; @CONNECTOR_OBJECT_ID_HDMI_TYPE_B
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_radeon_dvi_mode_valid
.subsections_via_symbols
