	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perform_link_training_int
_perform_link_training_int:             ## @perform_link_training_int
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_DPCD_TRAINING_PATTERN_VIDEOIDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dpcd_set_training_pattern
	movq	_DP_TEST_PATTERN_VIDEO_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dp_set_hw_test_pattern
	cmpl	$1, (%rbx)
	jne	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_get_supported_tp
	movq	_DP_TRAINING_PATTERN_SEQUENCE_4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	movq	_LINK_TRAINING_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_perform_post_lt_adj_req_sequence
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_LINK_TRAINING_LQA_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_5:
	movl	4(%r15), %eax
	movl	%eax, -28(%rbp)
	movl	(%r15), %eax
	movl	%eax, -32(%rbp)
	movq	$0, -40(%rbp)
	movq	_DP_LANE_COUNT_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$16, %ecx
	callq	_core_link_write_dpcd
LBB0_6:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPCD_TRAINING_PATTERN_VIDEOIDLE,4,2 ## @DPCD_TRAINING_PATTERN_VIDEOIDLE
	.comm	_DP_TEST_PATTERN_VIDEO_MODE,4,2 ## @DP_TEST_PATTERN_VIDEO_MODE
	.comm	_DP_TRAINING_PATTERN_SEQUENCE_4,8,3 ## @DP_TRAINING_PATTERN_SEQUENCE_4
	.comm	_LINK_TRAINING_SUCCESS,4,2      ## @LINK_TRAINING_SUCCESS
	.comm	_LINK_TRAINING_LQA_FAIL,4,2     ## @LINK_TRAINING_LQA_FAIL
	.comm	_DP_LANE_COUNT_SET,4,2          ## @DP_LANE_COUNT_SET
	.no_dead_strip	_perform_link_training_int
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perform_link_training_int
_perform_link_training_int:             ; @perform_link_training_int
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DPCD_TRAINING_PATTERN_VIDEOIDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DPCD_TRAINING_PATTERN_VIDEOIDLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_dpcd_set_training_pattern
Lloh3:
	adrp	x8, _DP_TEST_PATTERN_VIDEO_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_TEST_PATTERN_VIDEO_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	bl	_dp_set_hw_test_pattern
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_get_supported_tp
Lloh6:
	adrp	x8, _DP_TRAINING_PATTERN_SEQUENCE_4@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DP_TRAINING_PATTERN_SEQUENCE_4@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.2:
Lloh9:
	adrp	x8, _LINK_TRAINING_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LINK_TRAINING_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x21
	bl	_perform_post_lt_adj_req_sequence
Lloh12:
	adrp	x8, _LINK_TRAINING_LQA_FAIL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LINK_TRAINING_LQA_FAIL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w19, w8, w19, eq
LBB0_4:
	ldr	d0, [x21]
	str	d0, [sp, #8]
	str	xzr, [sp]
Lloh15:
	adrp	x8, _DP_LANE_COUNT_SET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DP_LANE_COUNT_SET@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x20
	mov	w3, #16
	bl	_core_link_write_dpcd
LBB0_5:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DPCD_TRAINING_PATTERN_VIDEOIDLE,4,2 ; @DPCD_TRAINING_PATTERN_VIDEOIDLE
	.comm	_DP_TEST_PATTERN_VIDEO_MODE,4,2 ; @DP_TEST_PATTERN_VIDEO_MODE
	.comm	_DP_TRAINING_PATTERN_SEQUENCE_4,8,3 ; @DP_TRAINING_PATTERN_SEQUENCE_4
	.comm	_LINK_TRAINING_SUCCESS,4,2      ; @LINK_TRAINING_SUCCESS
	.comm	_LINK_TRAINING_LQA_FAIL,4,2     ; @LINK_TRAINING_LQA_FAIL
	.comm	_DP_LANE_COUNT_SET,4,2          ; @DP_LANE_COUNT_SET
	.no_dead_strip	_perform_link_training_int
.subsections_via_symbols
