	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_autotest_link_training
_intel_dp_autotest_link_training:       ## @intel_dp_autotest_link_training
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	8(%rdi), %rbx
	movq	_DP_TEST_LANE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movq	_DP_MAX_LANE_COUNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, -20(%rbp)
	movq	_DP_TEST_LINK_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:
	movl	-24(%rbp), %edi
	callq	_drm_dp_bw_code_to_link_rate
	movl	%eax, %ebx
	movl	-20(%rbp), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intel_dp_link_params_valid
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movl	-20(%rbp), %eax
	movl	%eax, 4(%r14)
	movl	%ebx, (%r14)
	movq	_DP_TEST_ACK@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	callq	_DRM_DEBUG_KMS
LBB0_7:
	movq	_DP_TEST_NAK@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_TEST_LANE_COUNT,4,2         ## @DP_TEST_LANE_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Lane count read failed\n"

	.comm	_DP_TEST_NAK,4,2                ## @DP_TEST_NAK
	.comm	_DP_MAX_LANE_COUNT_MASK,4,2     ## @DP_MAX_LANE_COUNT_MASK
	.comm	_DP_TEST_LINK_RATE,4,2          ## @DP_TEST_LINK_RATE
L_.str.1:                               ## @.str.1
	.asciz	"Link Rate read failed\n"

	.comm	_DP_TEST_ACK,4,2                ## @DP_TEST_ACK
	.no_dead_strip	_intel_dp_autotest_link_training
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_autotest_link_training
_intel_dp_autotest_link_training:       ; @intel_dp_autotest_link_training
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	add	x20, x0, #8
Lloh0:
	adrp	x8, _DP_TEST_LANE_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_TEST_LANE_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_drm_dp_dpcd_readb
	cmp	w0, #0
	b.le	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _DP_MAX_LANE_COUNT_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_MAX_LANE_COUNT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
Lloh6:
	adrp	x8, _DP_TEST_LINK_RATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DP_TEST_LINK_RATE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_drm_dp_dpcd_readb
	cmp	w0, #0
	b.le	LBB0_5
; %bb.2:
	ldr	w0, [sp, #8]
	bl	_drm_dp_bw_code_to_link_rate
	mov	x20, x0
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_intel_dp_link_params_valid
	cbz	w0, LBB0_7
; %bb.3:
	ldr	w8, [sp, #12]
	stp	w20, w8, [x19]
Lloh9:
	adrp	x8, _DP_TEST_ACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DP_TEST_ACK@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_DRM_DEBUG_KMS
LBB0_7:
Lloh15:
	adrp	x8, _DP_TEST_NAK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DP_TEST_NAK@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_TEST_LANE_COUNT,4,2         ; @DP_TEST_LANE_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Lane count read failed\n"

	.comm	_DP_TEST_NAK,4,2                ; @DP_TEST_NAK
	.comm	_DP_MAX_LANE_COUNT_MASK,4,2     ; @DP_MAX_LANE_COUNT_MASK
	.comm	_DP_TEST_LINK_RATE,4,2          ; @DP_TEST_LINK_RATE
l_.str.1:                               ; @.str.1
	.asciz	"Link Rate read failed\n"

	.comm	_DP_TEST_ACK,4,2                ; @DP_TEST_ACK
	.no_dead_strip	_intel_dp_autotest_link_training
.subsections_via_symbols
