	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc_wait_link_training
_tc_wait_link_training:                 ## @tc_wait_link_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DP0_LTSTAT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_LT_LOOPDONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	movl	$1, %r8d
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_tc_poll_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_4
LBB0_2:
	movl	(%r14), %edi
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	-28(%rbp), %ebx
	shrl	$8, %ebx
	andl	$7, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP0_LTSTAT,4,2                 ## @DP0_LTSTAT
	.comm	_LT_LOOPDONE,4,2                ## @LT_LOOPDONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Link training timeout waiting for LT_LOOPDONE!\n"

	.no_dead_strip	_tc_wait_link_training
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc_wait_link_training
_tc_wait_link_training:                 ; @tc_wait_link_training
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x21, _DP0_LTSTAT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DP0_LTSTAT@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _LT_LOOPDONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LT_LOOPDONE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x3, x2
	mov	w4, #1
	mov	w5, #1000
	bl	_tc_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	w0, [x20, #4]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_4
LBB0_2:
	ldr	w0, [x20]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	mov	x19, x0
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w8, [sp, #12]
	ubfx	w19, w8, #8, #3
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DP0_LTSTAT,4,2                 ; @DP0_LTSTAT
	.comm	_LT_LOOPDONE,4,2                ; @LT_LOOPDONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Link training timeout waiting for LT_LOOPDONE!\n"

	.no_dead_strip	_tc_wait_link_training
.subsections_via_symbols
