	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_fdi_rx_train_status
_check_fdi_rx_train_status:             ## @check_fdi_rx_train_status
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_FDI_RX_IMR
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_FDI_TX_CTL
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_FDI_RX_CTL
	movq	_FDI_LINK_TRAIN_PATTERN1@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_2
## %bb.1:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_FDI_RX_BIT_LOCK@GOTPCREL(%rip), %rcx
	movq	_FDI_LINK_TRAIN_PATTERN_1@GOTPCREL(%rip), %rdx
	movq	_FDI_LINK_TRAIN_PATTERN_1_CPT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_FDI_LINK_TRAIN_PATTERN2@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_9
## %bb.3:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_FDI_RX_SYMBOL_LOCK@GOTPCREL(%rip), %rcx
	movq	_FDI_LINK_TRAIN_PATTERN_2@GOTPCREL(%rip), %rdx
	movq	_FDI_LINK_TRAIN_PATTERN_2_CPT@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rcx), %r12d
	movl	(%rdx), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	_FDI_RX_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_FDI_TX_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_vgpu_vreg_t
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%r12d, %ecx
	jne	LBB0_8
## %bb.5:
	orl	-52(%rbp), %r14d                ## 4-byte Folded Reload
	movq	%r15, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_vgpu_vreg_t
	notl	%eax
	testl	%eax, %r14d
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_vgpu_vreg_t
	movl	%eax, %ecx
	notl	%ecx
	movl	$1, %eax
	testl	%ecx, %ebx
	je	LBB0_8
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_9:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_gvt_vgpu_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FDI_LINK_TRAIN_PATTERN1,4,2    ## @FDI_LINK_TRAIN_PATTERN1
	.comm	_FDI_LINK_TRAIN_PATTERN_1_CPT,4,2 ## @FDI_LINK_TRAIN_PATTERN_1_CPT
	.comm	_FDI_LINK_TRAIN_PATTERN_1,4,2   ## @FDI_LINK_TRAIN_PATTERN_1
	.comm	_FDI_RX_BIT_LOCK,4,2            ## @FDI_RX_BIT_LOCK
	.comm	_FDI_LINK_TRAIN_PATTERN2,4,2    ## @FDI_LINK_TRAIN_PATTERN2
	.comm	_FDI_LINK_TRAIN_PATTERN_2_CPT,4,2 ## @FDI_LINK_TRAIN_PATTERN_2_CPT
	.comm	_FDI_LINK_TRAIN_PATTERN_2,4,2   ## @FDI_LINK_TRAIN_PATTERN_2
	.comm	_FDI_RX_SYMBOL_LOCK,4,2         ## @FDI_RX_SYMBOL_LOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid train pattern %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FDI_RX_ENABLE,4,2              ## @FDI_RX_ENABLE
	.comm	_FDI_TX_ENABLE,4,2              ## @FDI_TX_ENABLE
	.no_dead_strip	_check_fdi_rx_train_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_fdi_rx_train_status
_check_fdi_rx_train_status:             ; @check_fdi_rx_train_status
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_FDI_RX_IMR
	mov	x22, x0
	mov	x0, x20
	bl	_FDI_TX_CTL
	mov	x21, x0
	mov	x0, x20
	bl	_FDI_RX_CTL
	mov	x20, x0
Lloh0:
	adrp	x8, _FDI_LINK_TRAIN_PATTERN1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FDI_LINK_TRAIN_PATTERN1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _FDI_RX_BIT_LOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FDI_RX_BIT_LOCK@GOTPAGEOFF]
Lloh5:
	adrp	x9, _FDI_LINK_TRAIN_PATTERN_1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FDI_LINK_TRAIN_PATTERN_1@GOTPAGEOFF]
Lloh7:
	adrp	x10, _FDI_LINK_TRAIN_PATTERN_1_CPT@GOTPAGE
Lloh8:
	ldr	x10, [x10, _FDI_LINK_TRAIN_PATTERN_1_CPT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh9:
	adrp	x8, _FDI_LINK_TRAIN_PATTERN2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FDI_LINK_TRAIN_PATTERN2@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_9
; %bb.3:
Lloh12:
	adrp	x8, _FDI_RX_SYMBOL_LOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FDI_RX_SYMBOL_LOCK@GOTPAGEOFF]
Lloh14:
	adrp	x9, _FDI_LINK_TRAIN_PATTERN_2@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FDI_LINK_TRAIN_PATTERN_2@GOTPAGEOFF]
Lloh16:
	adrp	x10, _FDI_LINK_TRAIN_PATTERN_2_CPT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _FDI_LINK_TRAIN_PATTERN_2_CPT@GOTPAGEOFF]
LBB0_4:
	ldr	w27, [x8]
	ldr	w25, [x9]
	ldr	w23, [x10]
Lloh18:
	adrp	x8, _FDI_RX_ENABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FDI_RX_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
Lloh21:
	adrp	x8, _FDI_TX_ENABLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FDI_TX_ENABLE@GOTPAGEOFF]
Lloh23:
	ldr	w26, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_vgpu_vreg_t
	tst	w0, w27
	b.ne	LBB0_8
; %bb.5:
	orr	w22, w26, w25
	mov	x0, x19
	mov	x1, x21
	bl	_vgpu_vreg_t
	bics	wzr, w22, w0
	b.ne	LBB0_8
; %bb.6:
	orr	w21, w24, w23
	mov	x0, x19
	mov	x1, x20
	bl	_vgpu_vreg_t
	bics	wzr, w21, w0
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #1
	b	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_gvt_vgpu_err
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_FDI_LINK_TRAIN_PATTERN1,4,2    ; @FDI_LINK_TRAIN_PATTERN1
	.comm	_FDI_LINK_TRAIN_PATTERN_1_CPT,4,2 ; @FDI_LINK_TRAIN_PATTERN_1_CPT
	.comm	_FDI_LINK_TRAIN_PATTERN_1,4,2   ; @FDI_LINK_TRAIN_PATTERN_1
	.comm	_FDI_RX_BIT_LOCK,4,2            ; @FDI_RX_BIT_LOCK
	.comm	_FDI_LINK_TRAIN_PATTERN2,4,2    ; @FDI_LINK_TRAIN_PATTERN2
	.comm	_FDI_LINK_TRAIN_PATTERN_2_CPT,4,2 ; @FDI_LINK_TRAIN_PATTERN_2_CPT
	.comm	_FDI_LINK_TRAIN_PATTERN_2,4,2   ; @FDI_LINK_TRAIN_PATTERN_2
	.comm	_FDI_RX_SYMBOL_LOCK,4,2         ; @FDI_RX_SYMBOL_LOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid train pattern %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FDI_RX_ENABLE,4,2              ; @FDI_RX_ENABLE
	.comm	_FDI_TX_ENABLE,4,2              ; @FDI_TX_ENABLE
	.no_dead_strip	_check_fdi_rx_train_status
.subsections_via_symbols
