	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dp_retrain_link_dp_test        ## -- Begin function dp_retrain_link_dp_test
	.p2align	4, 0x90
_dp_retrain_link_dp_test:               ## @dp_retrain_link_dp_test
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	_MAX_PIPES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_13
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	32(%rax), %rax
	movq	(%rax), %rbx
	leaq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movl	(%r13), %eax
	addq	$40, %rbx
	cmpq	%rax, %r14
	jae	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 36(%rbx)
	jne	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 32(%rbx)
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$100, %edi
	callq	_udelay
	movq	(%rbx), %rdi
	movq	(%rdi), %rax
	callq	*8(%rax)
	movq	_DP_TEST_PATTERN_VIDEO_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_dp_set_hw_test_pattern
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_dp_receiver_power_ctrl
	movq	(%r12), %rax
	movq	%rbx, %rdi
	callq	*16(%rax)
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	cmpl	$0, 24(%rax)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdi), %rax
	callq	*8(%rax)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rdi
	movq	(%rdi), %rax
	movq	_SIGNAL_TYPE_DISPLAY_PORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	callq	*8(%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	16(%r12), %rdi
	movq	(%rdi), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rsi
	callq	*(%rax)
	movl	(%r15), %eax
	movl	%eax, 8(%r12)
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_dp_receiver_power_ctrl
	movq	_LINK_TRAINING_ATTEMPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_perform_link_training_with_retries
	movq	(%r12), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	(%r12), %rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rdi), %rax
	callq	*(%rax)
	movq	(%rbx), %rdi
	movq	(%rdi), %rax
	xorl	%esi, %esi
	callq	*(%rax)
	jmp	LBB0_12
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PIPES,4,2                  ## @MAX_PIPES
	.comm	_DP_TEST_PATTERN_VIDEO_MODE,4,2 ## @DP_TEST_PATTERN_VIDEO_MODE
	.comm	_SIGNAL_TYPE_DISPLAY_PORT,4,2   ## @SIGNAL_TYPE_DISPLAY_PORT
	.comm	_LINK_TRAINING_ATTEMPTS,4,2     ## @LINK_TRAINING_ATTEMPTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dp_retrain_link_dp_test        ; -- Begin function dp_retrain_link_dp_test
	.p2align	2
_dp_retrain_link_dp_test:               ; @dp_retrain_link_dp_test
	.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
Lloh0:
	adrp	x24, _MAX_PIPES@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAX_PIPES@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_13
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x25, #0
	ldr	x8, [x0]
	ldr	x8, [x8, #32]
	ldr	x22, [x8]
	add	x23, x0, #8
Lloh2:
	adrp	x26, _DP_TEST_PATTERN_VIDEO_MODE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _DP_TEST_PATTERN_VIDEO_MODE@GOTPAGEOFF]
Lloh4:
	adrp	x27, _SIGNAL_TYPE_DISPLAY_PORT@GOTPAGE
Lloh5:
	ldr	x27, [x27, _SIGNAL_TYPE_DISPLAY_PORT@GOTPAGEOFF]
Lloh6:
	adrp	x28, _LINK_TRAINING_ATTEMPTS@GOTPAGE
Lloh7:
	ldr	x28, [x28, _LINK_TRAINING_ATTEMPTS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	ldr	w8, [x24]
	add	x22, x22, #40
	cmp	x25, x8
	b.hs	LBB0_13
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x22, #36]
	cbnz	w9, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x22, #32]
	cbnz	w9, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	bl	_udelay
	ldr	x0, [x22]
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	blr	x8
	ldr	w1, [x26]
	mov	x0, x21
	mov	x2, #0
	mov	w3, #0
	bl	_dp_set_hw_test_pattern
	mov	x0, x21
	mov	w1, #0
	bl	_dp_receiver_power_ctrl
	ldr	x8, [x21]
	ldr	x8, [x8, #16]
	mov	x0, x22
	blr	x8
	ldr	x0, [x22, #8]
	cbz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	ldr	w8, [x8, #24]
	cbnz	w8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	blr	x8
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x21, #16]
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	ldr	w1, [x27]
	blr	x8
	mov	x0, x23
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x0, [x21, #16]
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x9, [x22, #16]
	ldr	w2, [x9]
	mov	x1, x20
	blr	x8
	ldr	w8, [x20]
	str	w8, [x21, #8]
	mov	x0, x21
	mov	w1, #1
	bl	_dp_receiver_power_ctrl
	ldr	w3, [x28]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_perform_link_training_with_retries
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	mov	x0, x22
	blr	x8
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x22
	mov	x1, x20
	blr	x8
	ldr	x0, [x22, #8]
	cbz	x0, LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x0]
	ldr	x8, [x8]
	blr	x8
	ldr	x0, [x22]
	ldr	x8, [x0]
	ldr	x8, [x8]
	mov	w1, #0
	blr	x8
	b	LBB0_2
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PIPES,4,2                  ; @MAX_PIPES
	.comm	_DP_TEST_PATTERN_VIDEO_MODE,4,2 ; @DP_TEST_PATTERN_VIDEO_MODE
	.comm	_SIGNAL_TYPE_DISPLAY_PORT,4,2   ; @SIGNAL_TYPE_DISPLAY_PORT
	.comm	_LINK_TRAINING_ATTEMPTS,4,2     ; @LINK_TRAINING_ATTEMPTS
.subsections_via_symbols
