	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function analogix_dp_full_link_train
_analogix_dp_full_link_train:           ## @analogix_dp_full_link_train
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_analogix_dp_reset_macro
	leaq	8(%r14), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_analogix_dp_get_max_rx_bandwidth
	leaq	16(%r14), %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_analogix_dp_get_max_rx_lane_count
	movq	8(%r14), %rdx
	movq	_DP_LINK_BW_1_62@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rdx
	je	LBB0_4
## %bb.1:
	movq	_DP_LINK_BW_2_7@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_4
## %bb.2:
	movq	_DP_LINK_BW_5_4@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	(%rbx), %rax
	movq	%rax, 8(%r14)
LBB0_4:
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	cmpq	%r12, %rax
	jle	LBB0_8
LBB0_7:
	movq	%r12, (%r13)
LBB0_8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%r15)
	jle	LBB0_10
## %bb.9:
	movq	%rax, (%r15)
LBB0_10:
	movq	_POWER_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_analogix_dp_set_analog_power_down
	movl	$128, 24(%r14)
	movl	$128, %eax
	leaq	LJTI0_0(%rip), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addl	$-128, %eax
	movl	$0, %ebx
	movl	$0, %r12d
	cmpl	$4, %eax
	ja	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	(%r15,%rax,4), %rax
	addq	%r15, %rax
	jmpq	*%rax
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r14, %rdi
	callq	_analogix_dp_link_start
	movl	$0, %ebx
	movl	$0, %r12d
	testl	%eax, %eax
	je	LBB0_22
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %r13d
	movl	(%r14), %edi
	xorl	%r12d, %r12d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r14, %rdi
	callq	_analogix_dp_process_equalizer_training
	movl	$0, %ebx
	movl	$0, %r12d
	testl	%eax, %eax
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %r13d
	movl	(%r14), %edi
	xorl	%r12d, %r12d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r14, %rdi
	callq	_analogix_dp_process_clock_recovery
	movl	$0, %ebx
	movl	$0, %r12d
	testl	%eax, %eax
	je	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %r13d
	movl	(%r14), %edi
	xorl	%r12d, %r12d
	leaq	L_.str.3(%rip), %rsi
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r13d, %ebx
LBB0_22:                                ##   in Loop: Header=BB0_11 Depth=1
	orl	%ebx, %r12d
	jne	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	24(%r14), %eax
	jmp	LBB0_11
LBB0_21:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, %r12d
	xorl	%ebx, %ebx
	orl	%ebx, %r12d
	je	LBB0_23
LBB0_24:
	testl	%ebx, %ebx
	je	LBB0_25
## %bb.26:
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_27
LBB0_5:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_LANE_COUNT1@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, 16(%r14)
	cmpq	%r12, %rax
	jg	LBB0_7
	jmp	LBB0_8
LBB0_25:
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_20:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_21
	.long	L0_0_set_20
	.long	L0_0_set_18
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.comm	_DP_LINK_BW_1_62,8,3            ## @DP_LINK_BW_1_62
	.comm	_DP_LINK_BW_2_7,8,3             ## @DP_LINK_BW_2_7
	.comm	_DP_LINK_BW_5_4,8,3             ## @DP_LINK_BW_5_4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Rx Max Link Rate is abnormal :%x !\n"

L_.str.1:                               ## @.str.1
	.asciz	"Rx Max Lane count is abnormal :%x !\n"

	.comm	_LANE_COUNT1,8,3                ## @LANE_COUNT1
	.comm	_POWER_ALL,4,2                  ## @POWER_ALL
L_.str.2:                               ## @.str.2
	.asciz	"LT link start failed!\n"

L_.str.3:                               ## @.str.3
	.asciz	"LT CR failed!\n"

L_.str.4:                               ## @.str.4
	.asciz	"LT EQ failed!\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.5:                               ## @.str.5
	.asciz	"eDP link training failed (%d)\n"

	.no_dead_strip	_analogix_dp_full_link_train
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function analogix_dp_full_link_train
_analogix_dp_full_link_train:           ; @analogix_dp_full_link_train
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_analogix_dp_reset_macro
	add	x21, x19, #8
	mov	x0, x19
	mov	x1, x21
	bl	_analogix_dp_get_max_rx_bandwidth
	add	x23, x19, #16
	mov	x0, x19
	mov	x1, x23
	bl	_analogix_dp_get_max_rx_lane_count
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x24, _DP_LINK_BW_1_62@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DP_LINK_BW_1_62@GOTPAGEOFF]
	ldr	x9, [x24]
Lloh2:
	adrp	x10, _DP_LINK_BW_2_7@GOTPAGE
Lloh3:
	ldr	x10, [x10, _DP_LINK_BW_2_7@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	adrp	x11, _DP_LINK_BW_5_4@GOTPAGE
Lloh6:
	ldr	x11, [x11, _DP_LINK_BW_5_4@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_22
; %bb.1:
	ldr	x8, [x23]
	cbz	x8, LBB0_23
LBB0_2:
	cmp	x8, x22
	b.le	LBB0_4
LBB0_3:
	str	x22, [x23]
LBB0_4:
	ldr	x8, [x21]
	cmp	x8, x20
	b.le	LBB0_6
; %bb.5:
	str	x20, [x21]
LBB0_6:
Lloh8:
	adrp	x8, _POWER_ALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_analogix_dp_set_analog_power_down
	mov	w8, #128
	str	w8, [x19, #24]
Lloh11:
	adrp	x24, lJTI0_0@PAGE
Lloh12:
	add	x24, x24, lJTI0_0@PAGEOFF
Lloh13:
	adrp	x20, l_.str.2@PAGE
Lloh14:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh15:
	adrp	x21, l_.str.4@PAGE
Lloh16:
	add	x21, x21, l_.str.4@PAGEOFF
Lloh17:
	adrp	x22, l_.str.3@PAGE
Lloh18:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	bl	_dev_err
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	w8, #0
	orr	w8, w8, w23
	cbnz	w8, LBB0_20
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19, #24]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	adr	x9, LBB0_12
	ldrb	w10, [x24, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	bl	_analogix_dp_link_start
	mov	x23, x0
	cbz	w0, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	mov	x1, x20
	b	LBB0_7
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	bl	_analogix_dp_process_equalizer_training
	mov	x23, x0
	cbz	w0, LBB0_8
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	mov	x1, x21
	b	LBB0_7
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	bl	_analogix_dp_process_clock_recovery
	mov	x23, x0
	cbz	w0, LBB0_8
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19]
	mov	x1, x22
	b	LBB0_7
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w23, #0
	b	LBB0_8
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w23, #0
	mov	w8, #1
	orr	w8, w8, w23
	cbz	w8, LBB0_9
LBB0_20:
	cbz	w23, LBB0_25
; %bb.21:
	ldr	w0, [x19]
	str	x23, [sp]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_25
LBB0_22:
	ldr	w0, [x19]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	x8, [x24]
	str	x8, [x19, #8]
	ldr	x8, [x23]
	cbnz	x8, LBB0_2
LBB0_23:
	ldr	w0, [x19]
	str	xzr, [sp]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _LANE_COUNT1@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LANE_COUNT1@GOTPAGEOFF]
Lloh27:
	ldrsw	x8, [x8]
	str	x8, [x19, #16]
	cmp	x8, x22
	b.gt	LBB0_3
	b	LBB0_4
LBB0_24:
Lloh28:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_25:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_19-LBB0_12)>>2
	.byte	(LBB0_24-LBB0_12)>>2
	.byte	(LBB0_14-LBB0_12)>>2
	.byte	(LBB0_16-LBB0_12)>>2
                                        ; -- End function
	.comm	_DP_LINK_BW_1_62,8,3            ; @DP_LINK_BW_1_62
	.comm	_DP_LINK_BW_2_7,8,3             ; @DP_LINK_BW_2_7
	.comm	_DP_LINK_BW_5_4,8,3             ; @DP_LINK_BW_5_4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Rx Max Link Rate is abnormal :%x !\n"

l_.str.1:                               ; @.str.1
	.asciz	"Rx Max Lane count is abnormal :%x !\n"

	.comm	_LANE_COUNT1,8,3                ; @LANE_COUNT1
	.comm	_POWER_ALL,4,2                  ; @POWER_ALL
l_.str.2:                               ; @.str.2
	.asciz	"LT link start failed!\n"

l_.str.3:                               ; @.str.3
	.asciz	"LT CR failed!\n"

l_.str.4:                               ; @.str.4
	.asciz	"LT EQ failed!\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.5:                               ; @.str.5
	.asciz	"eDP link training failed (%d)\n"

	.no_dead_strip	_analogix_dp_full_link_train
.subsections_via_symbols
