	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_mode_valid
_intel_dp_mode_valid:                   ## @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
	subq	$24, %rsp
	.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	_intel_attached_dp
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_to_intel_connector
	movq	(%rax), %r14
	movl	(%rbx), %edi
	callq	_to_i915
	movq	%rax, %r13
	movq	_DRM_MODE_FLAG_DBLSCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_2
## %bb.1:
	movq	_MODE_NO_DBLESCAN@GOTPCREL(%rip), %rcx
LBB0_26:
	movl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%r12), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_intel_dp_downstream_max_dotclock
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_intel_dp_is_edp
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	testq	%r14, %r14
	je	LBB0_7
## %bb.4:
	movq	8(%r12), %rax
	movq	_MODE_PANEL@GOTPCREL(%rip), %rcx
	cmpq	8(%r14), %rax
	jg	LBB0_26
## %bb.5:
	movq	16(%r12), %rax
	cmpq	16(%r14), %rax
	jg	LBB0_26
## %bb.6:
	movl	(%r14), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
LBB0_7:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_intel_dp_max_link_rate
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_intel_dp_max_lane_count
	movl	%eax, %ebx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_intel_dp_max_data_rate
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	$18, %esi
	callq	_intel_dp_link_required
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_INTEL_GEN
	cmpl	$9, %eax
	jg	LBB0_10
## %bb.8:
	movq	%r13, %rdi
	callq	_IS_GEMINILAKE
	testq	%rax, %rax
	je	LBB0_9
LBB0_10:
	movl	4(%r15), %edi
	callq	_drm_dp_sink_supports_dsc
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:
	movq	%r15, %rdi
	callq	_intel_dp_is_edp
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	4(%r15), %edi
	callq	_drm_edp_dsc_sink_output_bpp
	movl	%eax, %r14d
	sarl	$4, %r14d
	movl	4(%r15), %edi
	movl	$1, %esi
	callq	_drm_dp_dsc_sink_max_slice_count
	jmp	LBB0_15
LBB0_13:
	movl	(%r15), %edi
	callq	_drm_dp_sink_supports_fec
	testq	%rax, %rax
	je	LBB0_9
## %bb.14:
	movq	8(%r12), %rcx
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_intel_dp_dsc_get_output_bpp
	movl	%eax, %r14d
	sarl	$4, %r14d
	movq	8(%r12), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_intel_dp_dsc_get_slice_count
	jmp	LBB0_15
LBB0_9:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
LBB0_15:
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	%ecx, %esi
	jle	LBB0_21
## %bb.16:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rcx
	testl	%r14d, %r14d
	je	LBB0_26
## %bb.17:
	testq	%rax, %rax
	je	LBB0_26
## %bb.18:
	cmpl	%edx, -56(%rbp)                 ## 4-byte Folded Reload
	jle	LBB0_19
	jmp	LBB0_26
LBB0_21:
	cmpl	%edx, -56(%rbp)                 ## 4-byte Folded Reload
	jle	LBB0_19
## %bb.22:
	movq	_MODE_CLOCK_HIGH@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_19:
	cmpl	$10000, (%r12)                  ## imm = 0x2710
	jge	LBB0_23
## %bb.20:
	movq	_MODE_CLOCK_LOW@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_23:
	movq	_DRM_MODE_FLAG_DBLCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	jne	LBB0_24
## %bb.25:
	movq	_MODE_OK@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_24:
	movq	_MODE_H_ILLEGAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ## @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ## @MODE_NO_DBLESCAN
	.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	_DRM_MODE_FLAG_DBLCLK,4,2       ## @DRM_MODE_FLAG_DBLCLK
	.comm	_MODE_H_ILLEGAL,4,2             ## @MODE_H_ILLEGAL
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_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 intel_dp_mode_valid
_intel_dp_mode_valid:                   ; @intel_dp_mode_valid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	bl	_intel_attached_dp
	mov	x22, x0
	mov	x0, x20
	bl	_to_intel_connector
	ldr	x23, [x0]
	ldr	w0, [x20]
	bl	_to_i915
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_FLAG_DBLSCAN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _MODE_NO_DBLESCAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MODE_NO_DBLESCAN@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x25, x0
	ldr	w21, [x19]
	mov	x0, x22
	bl	_intel_dp_downstream_max_dotclock
	mov	x20, x0
	mov	x0, x22
	bl	_intel_dp_is_edp
	cbz	x0, LBB0_9
; %bb.4:
	cbz	x23, LBB0_9
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x9, [x23, #8]
	cmp	x8, x9
	b.gt	LBB0_7
; %bb.6:
	ldr	x8, [x19, #16]
	ldr	x9, [x23, #16]
	cmp	x8, x9
	b.le	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _MODE_PANEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MODE_PANEL@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
	ldr	w21, [x23]
LBB0_9:
	mov	x0, x22
	bl	_intel_dp_max_link_rate
	mov	x26, x0
	mov	x0, x22
	bl	_intel_dp_max_lane_count
	mov	x27, x0
	mov	x0, x26
	mov	x1, x27
	bl	_intel_dp_max_data_rate
	mov	x23, x0
	mov	x0, x21
	mov	w1, #18
	bl	_intel_dp_link_required
	mov	x24, x0
	mov	x0, x25
	bl	_INTEL_GEN
	cmp	w0, #9
	b.gt	LBB0_11
; %bb.10:
	mov	x0, x25
	bl	_IS_GEMINILAKE
	cbz	x0, LBB0_18
LBB0_11:
	ldr	w0, [x22, #4]
	bl	_drm_dp_sink_supports_dsc
	cbz	x0, LBB0_18
; %bb.12:
	mov	x0, x22
	bl	_intel_dp_is_edp
	cbz	x0, LBB0_16
; %bb.13:
	ldr	w0, [x22, #4]
	bl	_drm_edp_dsc_sink_output_bpp
	asr	w25, w0, #4
	ldr	w0, [x22, #4]
	mov	w1, #1
	bl	_drm_dp_dsc_sink_max_slice_count
	cmp	w24, w23
	b.gt	LBB0_19
LBB0_14:
	cmp	w21, w20
	b.le	LBB0_22
; %bb.15:
Lloh7:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	b	LBB0_2
LBB0_16:
	ldr	w0, [x22]
	bl	_drm_dp_sink_supports_fec
	cbz	x0, LBB0_18
; %bb.17:
	ldr	x3, [x19, #8]
	mov	x0, x26
	mov	x1, x27
	mov	x2, x21
	bl	_intel_dp_dsc_get_output_bpp
	asr	w25, w0, #4
	ldr	x2, [x19, #8]
	mov	x0, x22
	mov	x1, x21
	bl	_intel_dp_dsc_get_slice_count
	cmp	w24, w23
	b.le	LBB0_14
	b	LBB0_19
LBB0_18:
	mov	w25, #0
	cmp	w24, w23
	b.le	LBB0_14
LBB0_19:
Lloh9:
	adrp	x8, _MODE_CLOCK_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MODE_CLOCK_HIGH@GOTPAGEOFF]
	cbz	w25, LBB0_2
; %bb.20:
	cbz	x0, LBB0_2
; %bb.21:
	cmp	w21, w20
	b.gt	LBB0_2
LBB0_22:
	ldr	w8, [x19]
	mov	w9, #10000
	cmp	w8, w9
	b.ge	LBB0_24
; %bb.23:
Lloh11:
	adrp	x8, _MODE_CLOCK_LOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE_CLOCK_LOW@GOTPAGEOFF]
	b	LBB0_2
LBB0_24:
	ldr	w8, [x19, #4]
Lloh13:
	adrp	x9, _DRM_MODE_FLAG_DBLCLK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DRM_MODE_FLAG_DBLCLK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _MODE_H_ILLEGAL@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MODE_H_ILLEGAL@GOTPAGEOFF]
Lloh18:
	adrp	x11, _MODE_OK@GOTPAGE
Lloh19:
	ldr	x11, [x11, _MODE_OK@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_DBLSCAN,4,2      ; @DRM_MODE_FLAG_DBLSCAN
	.comm	_MODE_NO_DBLESCAN,4,2           ; @MODE_NO_DBLESCAN
	.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	_DRM_MODE_FLAG_DBLCLK,4,2       ; @DRM_MODE_FLAG_DBLCLK
	.comm	_MODE_H_ILLEGAL,4,2             ; @MODE_H_ILLEGAL
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_intel_dp_mode_valid
.subsections_via_symbols
