	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_dp_get_link_train_fallback_values ## -- Begin function intel_dp_get_link_train_fallback_values
	.p2align	4, 0x90
_intel_dp_get_link_train_fallback_values: ## @intel_dp_get_link_train_fallback_values
	.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
	movl	%edx, %r14d
	movl	%esi, %edx
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	movl	16(%r15), %esi
	callq	_intel_dp_rate_index
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_intel_dp_is_edp
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	8(%r15), %rax
	decl	%ebx
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_intel_dp_can_link_train_fallback_for_edp
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_6
LBB0_3:
	cmpl	$2, %r14d
	jl	LBB0_9
## %bb.4:
	movq	%r15, %rdi
	callq	_intel_dp_is_edp
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%r15, %rdi
	callq	_intel_dp_max_common_rate
	shrl	%r14d
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_intel_dp_can_link_train_fallback_for_edp
	testl	%eax, %eax
	jne	LBB0_11
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_13
LBB0_7:
	decl	%ebx
LBB0_8:
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %eax
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movl	$-1, %eax
	jmp	LBB0_14
LBB0_10:
	shrl	%r14d
LBB0_11:
	movq	%r15, %rdi
	callq	_intel_dp_max_common_rate
LBB0_12:
	movl	%eax, 4(%r15)
	movl	%r14d, (%r15)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Retrying Link training for eDP with same parameters\n"

L_.str.1:                               ## @.str.1
	.asciz	"Link Training Unsuccessful\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_dp_get_link_train_fallback_values ; -- Begin function intel_dp_get_link_train_fallback_values
	.p2align	2
_intel_dp_get_link_train_fallback_values: ; @intel_dp_get_link_train_fallback_values
	.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	x20, x2
	mov	x2, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldr	w1, [x19, #16]
	bl	_intel_dp_rate_index
	subs	w21, w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_intel_dp_is_edp
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w1, [x8, w21, uxtw #2]
	mov	x0, x19
	mov	x2, x20
	bl	_intel_dp_can_link_train_fallback_for_edp
	cbz	w0, LBB0_7
LBB0_3:
	mov	w0, #0
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x21, lsl #2]
	b	LBB0_11
LBB0_4:
	cmp	w20, #1
	b.le	LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_intel_dp_is_edp
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_intel_dp_max_common_rate
	mov	x1, x0
	lsr	w20, w20, #1
	mov	x0, x19
	mov	x2, x20
	bl	_intel_dp_can_link_train_fallback_for_edp
	cbnz	w0, LBB0_10
LBB0_7:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w0, #0
	b	LBB0_12
LBB0_8:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	mov	w0, #-1
	b	LBB0_12
LBB0_9:
	lsr	w20, w20, #1
LBB0_10:
	mov	x0, x19
	bl	_intel_dp_max_common_rate
	mov	x8, x0
	mov	w0, #0
LBB0_11:
	stp	w20, w8, [x19]
LBB0_12:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Retrying Link training for eDP with same parameters\n"

l_.str.1:                               ; @.str.1
	.asciz	"Link Training Unsuccessful\n"

.subsections_via_symbols
