	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dp_link_train_eq
_dp_link_train_eq:                      ## @dp_link_train_eq
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$2, %esi
	callq	_dp_set_training_pattern
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%r14, %rdi
	movl	$400, %esi                      ## imm = 0x190
	callq	_dp_link_train_update
	testq	%rax, %rax
	jne	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %r8
	movq	_DPCD_LS04_INTERLANE_ALIGN_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%r8), %eax
	setne	%r12b
	movl	8(%r14), %r9d
	movl	$1, %r13d
	testl	%r9d, %r9d
	jle	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_DPCD_LS02_LANE0_CR_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_DPCD_LS02_LANE0_CHANNEL_EQ_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DPCD_LS02_LANE0_SYMBOL_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %eax
	xorl	%edx, %edx
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	-1(%rax), %ecx
	shrl	%ecx
	movl	(%r8,%rcx,4), %esi
	movl	%edx, %ecx
	andb	$4, %cl
	sarl	%cl, %esi
	movl	%r13d, %ecx
	andl	$15, %esi
	movl	%esi, %r13d
	andl	%r10d, %r13d
	cmovnel	%ecx, %r13d
	testl	%edi, %esi
	setne	%cl
	testl	%esi, %ebx
	setne	%r12b
	andb	%cl, %r12b
	cmpl	%r9d, %eax
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	incl	%eax
	addl	$4, %edx
	testb	%r12b, %r12b
	jne	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_dp_link_train_commit
	testq	%rax, %rax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	%r12b, %r12b
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	incl	%r15d
	cmpl	$6, %r15d
	jne	LBB0_1
LBB0_11:
	xorl	%r12d, %r12d
LBB0_12:
	movzbl	%r12b, %eax
	decl	%eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPCD_LS04_INTERLANE_ALIGN_DONE,4,2 ## @DPCD_LS04_INTERLANE_ALIGN_DONE
	.comm	_DPCD_LS02_LANE0_CR_DONE,4,2    ## @DPCD_LS02_LANE0_CR_DONE
	.comm	_DPCD_LS02_LANE0_CHANNEL_EQ_DONE,4,2 ## @DPCD_LS02_LANE0_CHANNEL_EQ_DONE
	.comm	_DPCD_LS02_LANE0_SYMBOL_LOCKED,4,2 ## @DPCD_LS02_LANE0_SYMBOL_LOCKED
	.no_dead_strip	_dp_link_train_eq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dp_link_train_eq
_dp_link_train_eq:                      ; @dp_link_train_eq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	mov	w1, #2
	bl	_dp_set_training_pattern
	mov	w20, #0
Lloh0:
	adrp	x21, _DPCD_LS04_INTERLANE_ALIGN_DONE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DPCD_LS04_INTERLANE_ALIGN_DONE@GOTPAGEOFF]
Lloh2:
	adrp	x22, _DPCD_LS02_LANE0_CR_DONE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _DPCD_LS02_LANE0_CR_DONE@GOTPAGEOFF]
Lloh4:
	adrp	x23, _DPCD_LS02_LANE0_CHANNEL_EQ_DONE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _DPCD_LS02_LANE0_CHANNEL_EQ_DONE@GOTPAGEOFF]
Lloh6:
	adrp	x24, _DPCD_LS02_LANE0_SYMBOL_LOCKED@GOTPAGE
Lloh7:
	ldr	x24, [x24, _DPCD_LS02_LANE0_SYMBOL_LOCKED@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x0, x19
	mov	w1, #400
	bl	_dp_link_train_update
	cbnz	x0, LBB0_11
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19]
	ldr	w9, [x8, #8]
	ldr	w10, [x21]
	ands	w10, w10, w9
	cset	w25, ne
	ldr	w9, [x19, #8]
	cmp	w9, #1
	ccmp	w10, #0, #4, ge
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w26, #1
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	w10, #0
	ldr	w11, [x22]
	ldr	w12, [x23]
	mov	w13, #1
	mov	w26, #1
	ldr	w14, [x24]
LBB0_5:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w15, w13, #1
	lsr	w15, w15, #1
	ldr	w15, [x8, w15, uxtw #2]
	and	w16, w10, #0x4
	asr	w15, w15, w16
	and	w15, w15, #0xf
	tst	w15, w11
	csel	w26, wzr, w26, eq
	tst	w15, w12
	cset	w16, ne
	tst	w14, w15
	cset	w15, ne
	and	w25, w16, w15
	cmp	w13, w9
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w13, w13, #1
	add	w10, w10, #4
	tbnz	w25, #0, LBB0_5
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_dp_link_train_commit
	cbnz	x0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	tbnz	w25, #0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w26, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	add	w20, w20, #1
	cmp	w20, #6
	b.ne	LBB0_1
LBB0_11:
	mov	w25, #0
LBB0_12:
	sub	w0, w25, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DPCD_LS04_INTERLANE_ALIGN_DONE,4,2 ; @DPCD_LS04_INTERLANE_ALIGN_DONE
	.comm	_DPCD_LS02_LANE0_CR_DONE,4,2    ; @DPCD_LS02_LANE0_CR_DONE
	.comm	_DPCD_LS02_LANE0_CHANNEL_EQ_DONE,4,2 ; @DPCD_LS02_LANE0_CHANNEL_EQ_DONE
	.comm	_DPCD_LS02_LANE0_SYMBOL_LOCKED,4,2 ; @DPCD_LS02_LANE0_SYMBOL_LOCKED
	.no_dead_strip	_dp_link_train_eq
.subsections_via_symbols
