	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_intel_dp_mode_valid
_cdv_intel_dp_mode_valid:               ## @cdv_intel_dp_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	%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
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_gma_attached_encoder
	movq	%rax, %r13
	movq	(%rax), %r14
	movq	%rax, %rdi
	callq	_cdv_intel_dp_max_link_bw
	movl	%eax, %edi
	callq	_cdv_intel_dp_link_clock
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_cdv_intel_dp_max_lane_count
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_is_edp
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.2:
	movq	(%r12), %rdx
	movq	_MODE_PANEL@GOTPCREL(%rip), %rax
	cmpq	(%rcx), %rdx
	jg	LBB0_13
## %bb.3:
	movq	8(%r12), %rdx
	cmpq	8(%rcx), %rdx
	jg	LBB0_13
LBB0_4:
	movq	%r13, %rdi
	callq	_is_edp
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	16(%r12), %edi
	movl	(%rbx), %esi
	callq	_cdv_intel_dp_link_required
	movq	%rax, %rbx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	callq	_cdv_intel_dp_max_data_rate
	cmpq	%rax, %rbx
	jg	LBB0_6
LBB0_7:
	movq	%r13, %rdi
	callq	_is_edp
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	16(%r12), %edi
	movl	$24, %esi
	callq	_cdv_intel_dp_link_required
	movq	%rax, %rbx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	callq	_cdv_intel_dp_max_data_rate
	cmpq	%rax, %rbx
	jle	LBB0_10
LBB0_6:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	cmpl	$10000, 16(%r12)                ## imm = 0x2710
	jge	LBB0_12
## %bb.11:
	movq	_MODE_CLOCK_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MODE_PANEL,4,2                 ## @MODE_PANEL
	.comm	_MODE_CLOCK_HIGH,4,2            ## @MODE_CLOCK_HIGH
	.comm	_MODE_CLOCK_LOW,4,2             ## @MODE_CLOCK_LOW
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_cdv_intel_dp_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdv_intel_dp_mode_valid
_cdv_intel_dp_mode_valid:               ; @cdv_intel_dp_mode_valid
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x23, x0
	bl	_gma_attached_encoder
	mov	x22, x0
	ldr	x24, [x0]
	bl	_cdv_intel_dp_max_link_bw
	bl	_cdv_intel_dp_link_clock
	mov	x20, x0
	mov	x0, x22
	bl	_cdv_intel_dp_max_lane_count
	mov	x21, x0
	ldr	x8, [x23]
	ldr	x23, [x8]
	mov	x0, x22
	bl	_is_edp
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x24]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	x9, [x19]
	ldr	x10, [x8]
	cmp	x9, x10
	b.gt	LBB0_4
; %bb.3:
	ldr	x9, [x19, #8]
	ldr	x8, [x8, #8]
	cmp	x9, x8
	b.le	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _MODE_PANEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODE_PANEL@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
	mov	x0, x22
	bl	_is_edp
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x19, #16]
	ldr	w1, [x23]
	bl	_cdv_intel_dp_link_required
	mov	x23, x0
	mov	x0, x20
	mov	x1, x21
	bl	_cdv_intel_dp_max_data_rate
	cmp	x23, x0
	b.gt	LBB0_9
LBB0_7:
	mov	x0, x22
	bl	_is_edp
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w0, [x19, #16]
	mov	w1, #24
	bl	_cdv_intel_dp_link_required
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	bl	_cdv_intel_dp_max_data_rate
	cmp	x22, x0
	b.le	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
	ldr	w9, [x19, #16]
Lloh6:
	adrp	x10, _MODE_CLOCK_LOW@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MODE_CLOCK_LOW@GOTPAGEOFF]
	mov	w11, #10000
	cmp	w9, w11
	csel	x8, x10, x8, lt
LBB0_11:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MODE_PANEL,4,2                 ; @MODE_PANEL
	.comm	_MODE_CLOCK_HIGH,4,2            ; @MODE_CLOCK_HIGH
	.comm	_MODE_CLOCK_LOW,4,2             ; @MODE_CLOCK_LOW
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_cdv_intel_dp_mode_valid
.subsections_via_symbols
