	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edp_ctrl_training
_edp_ctrl_training:                     ## @edp_ctrl_training
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$0, 4(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	callq	_edp_do_link_train
	movq	_EDP_TRAIN_RECONFIG@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_edp_ctrl_irq_enable
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_edp_ctrl_link_enable
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_msm_edp_phy_ctrl
	xorl	%eax, %eax
	callq	_wmb
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%rbx), %edi
	movl	$1, %esi
	callq	_msm_edp_phy_ctrl
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_edp_ctrl_link_enable
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_edp_ctrl_irq_enable
	movq	%rbx, %rdi
	callq	_edp_do_link_train
	cmpl	(%r14), %eax
	je	LBB0_2
	jmp	LBB0_4
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EDP_TRAIN_RECONFIG,4,2         ## @EDP_TRAIN_RECONFIG
	.no_dead_strip	_edp_ctrl_training
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edp_ctrl_training
_edp_ctrl_training:                     ; @edp_ctrl_training
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_edp_do_link_train
Lloh0:
	adrp	x20, _EDP_TRAIN_RECONFIG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _EDP_TRAIN_RECONFIG@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_edp_ctrl_irq_enable
	mov	x0, x19
	mov	w1, #0
	bl	_edp_ctrl_link_enable
	ldr	w0, [x19]
	mov	w1, #0
	bl	_msm_edp_phy_ctrl
	bl	_wmb
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w0, [x19]
	mov	w1, #1
	bl	_msm_edp_phy_ctrl
	mov	x0, x19
	mov	w1, #1
	bl	_edp_ctrl_link_enable
	mov	x0, x19
	mov	w1, #1
	bl	_edp_ctrl_irq_enable
	mov	x0, x19
	bl	_edp_do_link_train
	b	LBB0_2
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EDP_TRAIN_RECONFIG,4,2         ; @EDP_TRAIN_RECONFIG
	.no_dead_strip	_edp_ctrl_training
.subsections_via_symbols
