	.file	"extr_dc_link_dp.c_dc_link_dp_perform_link_training.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	dc_link_dp_perform_link_training
	.type	dc_link_dp_perform_link_training, @function
dc_link_dp_perform_link_training:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	lea	rdx, 8[rdi]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rbp, 4[rsp]
	mov	rcx, rbp
	call	initialize_training_settings@PLT
	mov	rsi, rbp
	mov	rdi, rbx
	call	dpcd_set_link_settings@PLT
	mov	rsi, rbp
	mov	rdi, rbx
	call	perform_clock_recovery_sequence@PLT
	mov	r12d, eax
	mov	eax, DWORD PTR LINK_TRAINING_SUCCESS[rip]
	cmp	r12d, eax
	je	.L13
.L2:
	test	r13d, r13d
	je	.L7
	cmp	eax, r12d
	je	.L7
.L3:
	mov	edx, r12d
	mov	rsi, rbp
	mov	rdi, rbx
	call	print_status_message@PLT
	cmp	DWORD PTR LINK_TRAINING_SUCCESS[rip], r12d
	je	.L1
	mov	rax, QWORD PTR [rbx]
	mov	rax, QWORD PTR [rax]
	add	DWORD PTR [rax], 1
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edx, r12d
	mov	rsi, rbp
	mov	rdi, rbx
	call	perform_link_training_int@PLT
	mov	r12d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rsi, rbp
	mov	rdi, rbx
	call	perform_channel_equalization_sequence@PLT
	mov	r12d, eax
	mov	eax, DWORD PTR LINK_TRAINING_SUCCESS[rip]
	jmp	.L2
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dc_link_dp_perform_link_training, .-dc_link_dp_perform_link_training
	.comm	LINK_TRAINING_SUCCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_dc_link_dp.c_dc_link_dp_perform_link_training.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dc_link_dp_perform_link_training
	.syntax unified
	.arm
	.fpu softvfp
	.type	dc_link_dp_perform_link_training, %function
dc_link_dp_perform_link_training:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r0
	sub	sp, sp, #12
	ldr	ip, .L14
	mov	r3, sp
	mov	r6, r2
	add	r2, r0, #4
	ldr	ip, [ip]
	str	ip, [sp, #4]
	mov	ip,#0
	bl	initialize_training_settings
	mov	r1, sp
	mov	r0, r5
	bl	dpcd_set_link_settings
	mov	r1, sp
	mov	r0, r5
	bl	perform_clock_recovery_sequence
	ldr	r7, .L14+4
	ldr	r3, [r7]
	cmp	r0, r3
	movne	r4, r0
	beq	.L12
.L2:
	cmp	r3, r4
	cmpne	r6, #0
	bne	.L3
	mov	r2, r4
	mov	r1, sp
	mov	r0, r5
	bl	perform_link_training_int
	mov	r4, r0
.L3:
	mov	r2, r4
	mov	r1, sp
	mov	r0, r5
	bl	print_status_message
	ldr	r3, [r7]
	cmp	r3, r4
	ldrne	r3, [r5]
	ldrne	r2, [r3]
	ldrne	r3, [r2]
	addne	r3, r3, #1
	strne	r3, [r2]
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L12:
	mov	r1, sp
	mov	r0, r5
	bl	perform_channel_equalization_sequence
	ldr	r3, [r7]
	mov	r4, r0
	b	.L2
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	LINK_TRAINING_SUCCESS
	.size	dc_link_dp_perform_link_training, .-dc_link_dp_perform_link_training
	.comm	LINK_TRAINING_SUCCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
