	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	callq	_to_radeon_connector
	cmpq	$0, 8(%rax)
	je	LBB0_1
## %bb.5:
	movq	(%rbx), %rdx
	movq	_CHIP_RV100@GOTPCREL(%rip), %rsi
	movl	(%r14), %ecx
	cmpq	(%rsi), %rdx
	jne	LBB0_8
## %bb.6:
	cmpl	$135000, %ecx                   ## imm = 0x20F58
	jle	LBB0_2
LBB0_7:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %r15
	jmp	LBB0_16
LBB0_1:
	movl	(%r14), %ecx
	jmp	LBB0_2
LBB0_8:
	cmpl	$165001, %ecx                   ## imm = 0x28489
	jl	LBB0_2
## %bb.9:
	movq	(%rax), %rax
	movq	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I@GOTPCREL(%rip), %rcx
	movq	_MODE_OK@GOTPCREL(%rip), %r15
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.10:
	movq	_CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.11:
	movq	_CONNECTOR_OBJECT_ID_HDMI_TYPE_B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.12:
	movq	_CONNECTOR_OBJECT_ID_HDMI_TYPE_A@GOTPCREL(%rip), %rcx
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %r15
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.13:
	movq	%rbx, %rdi
	callq	_ASIC_IS_DCE6
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	cmpl	$340001, (%r14)                 ## imm = 0x53021
	jge	LBB0_7
	jmp	LBB0_15
LBB0_2:
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %r15
	cmpl	8(%rbx), %eax
	jg	LBB0_16
## %bb.3:
	movq	%rbx, %rdi
	callq	_ASIC_IS_RN50
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_radeon_mode_bandwidth
	cmpl	$300, %eax                      ## imm = 0x12C
	jg	LBB0_16
LBB0_15:
	movq	_MODE_OK@GOTPCREL(%rip), %r15
LBB0_16:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	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
	.comm	_CONNECTOR_OBJECT_ID_HDMI_TYPE_A,8,3 ## @CONNECTOR_OBJECT_ID_HDMI_TYPE_A
	.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
	ldr	x8, [x0]
	ldr	x20, [x8]
	bl	_to_radeon_connector
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %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_4
; %bb.2:
	mov	w9, #3928
	movk	w9, #2, lsl #16
	cmp	w8, w9
	b.le	LBB0_9
	b	LBB0_12
LBB0_3:
	ldr	w8, [x19]
	b	LBB0_9
LBB0_4:
	mov	w9, #33929
	movk	w9, #2, lsl #16
	cmp	w8, w9
	b.lt	LBB0_9
; %bb.5:
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _CONNECTOR_OBJECT_ID_HDMI_TYPE_B@GOTPAGE
Lloh10:
	ldr	x11, [x11, _CONNECTOR_OBJECT_ID_HDMI_TYPE_B@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
Lloh12:
	adrp	x21, _MODE_OK@GOTPAGE
Lloh13:
	ldr	x21, [x21, _MODE_OK@GOTPAGEOFF]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.eq	LBB0_14
; %bb.6:
Lloh14:
	adrp	x9, _CONNECTOR_OBJECT_ID_HDMI_TYPE_A@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CONNECTOR_OBJECT_ID_HDMI_TYPE_A@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.7:
	mov	x0, x20
	bl	_ASIC_IS_DCE6
Lloh17:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	cbz	x0, LBB0_15
; %bb.8:
	ldr	w9, [x19]
	mov	w10, #12320
	movk	w10, #5, lsl #16
	cmp	w9, w10
	csel	x21, x8, x21, gt
	b	LBB0_14
LBB0_9:
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	ldr	w10, [x20, #8]
	add	w8, w8, w9
	cmp	w8, w10
	b.gt	LBB0_12
; %bb.10:
	mov	x0, x20
	bl	_ASIC_IS_RN50
	cbz	x0, LBB0_13
; %bb.11:
	mov	x0, x19
	mov	w1, #4
	bl	_radeon_mode_bandwidth
	cmp	w0, #300
	b.le	LBB0_13
LBB0_12:
Lloh19:
	adrp	x21, _MODE_CLOCK_HIGH@GOTPAGE
Lloh20:
	ldr	x21, [x21, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh21:
	adrp	x21, _MODE_OK@GOTPAGE
Lloh22:
	ldr	x21, [x21, _MODE_OK@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x21]
	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_15:
	mov	x21, x8
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.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
	.comm	_CONNECTOR_OBJECT_ID_HDMI_TYPE_A,8,3 ; @CONNECTOR_OBJECT_ID_HDMI_TYPE_A
	.no_dead_strip	_radeon_dvi_mode_valid
.subsections_via_symbols
