	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdn_dp_training_start
_cdn_dp_training_start:                 ## @cdn_dp_training_start
	.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
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_LINK_TRAINING_RUN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_MB_MODULE_ID_DP_TX@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_DPTX_TRAINING_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-60(%rbp), %r8
	movl	$4, %ecx
	callq	_cdn_dp_mailbox_send
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_1
## %bb.4:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_LINK_TRAINING_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r14
	addq	%rbx, %r14
	movq	_DPTX_READ_EVENT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_LINK_TRAINING_RETRY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_cdn_dp_mailbox_send
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	$8, %ecx
	callq	_cdn_dp_mailbox_validate_receive
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	movl	$8, %edx
	callq	_cdn_dp_mailbox_read_receive
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_EQ_PHASE_FINISHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -52(%rbp)
	je	LBB0_5
## %bb.10:
	xorl	%ebx, %ebx
	jmp	LBB0_2
LBB0_12:
	movl	%eax, %ebx
	jmp	LBB0_1
LBB0_11:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_1:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_DRM_DEV_ERROR
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.3:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LINK_TRAINING_RUN,4,2          ## @LINK_TRAINING_RUN
	.comm	_MB_MODULE_ID_DP_TX,4,2         ## @MB_MODULE_ID_DP_TX
	.comm	_DPTX_TRAINING_CONTROL,4,2      ## @DPTX_TRAINING_CONTROL
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_LINK_TRAINING_TIMEOUT_MS,4,2   ## @LINK_TRAINING_TIMEOUT_MS
	.comm	_LINK_TRAINING_RETRY_MS,4,2     ## @LINK_TRAINING_RETRY_MS
	.comm	_DPTX_READ_EVENT,4,2            ## @DPTX_READ_EVENT
	.comm	_EQ_PHASE_FINISHED,4,2          ## @EQ_PHASE_FINISHED
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"training failed: %d\n"

	.no_dead_strip	_cdn_dp_training_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdn_dp_training_start
_cdn_dp_training_start:                 ; @cdn_dp_training_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _LINK_TRAINING_RUN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LINK_TRAINING_RUN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh6:
	adrp	x22, _MB_MODULE_ID_DP_TX@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MB_MODULE_ID_DP_TX@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _DPTX_TRAINING_CONTROL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DPTX_TRAINING_CONTROL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	w3, #4
	bl	_cdn_dp_mailbox_send
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.1:
Lloh11:
	adrp	x23, _jiffies@GOTPAGE
Lloh12:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x20, [x23]
Lloh13:
	adrp	x8, _LINK_TRAINING_TIMEOUT_MS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LINK_TRAINING_TIMEOUT_MS@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
Lloh16:
	adrp	x24, _LINK_TRAINING_RETRY_MS@GOTPAGE
Lloh17:
	ldr	x24, [x24, _LINK_TRAINING_RETRY_MS@GOTPAGEOFF]
Lloh18:
	adrp	x25, _DPTX_READ_EVENT@GOTPAGE
Lloh19:
	ldr	x25, [x25, _DPTX_READ_EVENT@GOTPAGEOFF]
Lloh20:
	adrp	x26, _EQ_PHASE_FINISHED@GOTPAGE
Lloh21:
	ldr	x26, [x26, _EQ_PHASE_FINISHED@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	mov	x1, x20
	bl	_time_before
	cbz	x0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x24]
	bl	_msleep
	ldr	w1, [x22]
	ldr	w2, [x25]
	mov	x0, x19
	mov	w3, #0
	mov	x4, #0
	bl	_cdn_dp_mailbox_send
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x22]
	ldr	w2, [x25]
	mov	x0, x19
	mov	w3, #8
	bl	_cdn_dp_mailbox_validate_receive
	cbnz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #8
	bl	_cdn_dp_mailbox_read_receive
	cbnz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #20]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.7:
	mov	w21, #0
	b	LBB0_11
LBB0_8:
	mov	x21, x0
	b	LBB0_10
LBB0_9:
Lloh22:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	ldr	w0, [x19]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_DEV_ERROR
LBB0_11:
	ldr	x8, [sp, #24]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_LINK_TRAINING_RUN,4,2          ; @LINK_TRAINING_RUN
	.comm	_MB_MODULE_ID_DP_TX,4,2         ; @MB_MODULE_ID_DP_TX
	.comm	_DPTX_TRAINING_CONTROL,4,2      ; @DPTX_TRAINING_CONTROL
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_LINK_TRAINING_TIMEOUT_MS,4,2   ; @LINK_TRAINING_TIMEOUT_MS
	.comm	_LINK_TRAINING_RETRY_MS,4,2     ; @LINK_TRAINING_RETRY_MS
	.comm	_DPTX_READ_EVENT,4,2            ; @DPTX_READ_EVENT
	.comm	_EQ_PHASE_FINISHED,4,2          ; @EQ_PHASE_FINISHED
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"training failed: %d\n"

	.no_dead_strip	_cdn_dp_training_start
.subsections_via_symbols
