	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen6_fdi_link_train
_gen6_fdi_link_train:                   ## @gen6_fdi_link_train
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_to_intel_crtc
	movq	%rax, %r15
	movl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_FDI_RX_IMR
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_I915_READ
	movq	_FDI_RX_SYMBOL_LOCK@GOTPCREL(%rip), %rcx
	movq	_FDI_RX_BIT_LOCK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_POSTING_READ
	movl	$150, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_TX_CTL
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_I915_READ
	andl	$-3670017, %eax                 ## imm = 0xFFC7FFFF
	movl	4(%r15), %ecx
	shll	$19, %ecx
	addl	$-524288, %ecx                  ## imm = 0xFFF80000
	orl	%eax, %ecx
	movq	_FDI_LINK_TRAIN_NONE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	notl	%eax
	andl	%ecx, %eax
	movq	_FDI_LINK_TRAIN_PATTERN_1@GOTPCREL(%rip), %r14
	orl	(%r14), %eax
	movq	_FDI_LINK_TRAIN_VOL_EMP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_FDI_LINK_TRAIN_400MV_0DB_SNB_B@GOTPCREL(%rip), %rdx
	movq	_FDI_TX_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%rdx), %esi
	orl	%ecx, %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	%r12d, %edi
	callq	_FDI_RX_MISC
	movq	_FDI_RX_TP1_TO_TP2_48@GOTPCREL(%rip), %rcx
	movq	_FDI_RX_FDI_DELAY_90@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	%r12d, %edi
	callq	_FDI_RX_CTL
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_HAS_PCH_CPT
	testq	%rax, %rax
	movq	_FDI_LINK_TRAIN_PATTERN_MASK_CPT@GOTPCREL(%rip), %rax
	cmoveq	%r13, %rax
	movl	(%rax), %esi
	cmovneq	_FDI_LINK_TRAIN_PATTERN_1_CPT@GOTPCREL(%rip), %r14
	notl	%esi
	andl	%r15d, %esi
	orl	(%r14), %esi
	movq	_FDI_RX_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_POSTING_READ
	movl	$150, %edi
	callq	_udelay
	movq	$-16, %r14
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_FDI_TX_CTL
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_I915_READ
	movq	_FDI_LINK_TRAIN_VOL_EMP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_snb_b_fdi_train_param@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orl	16(%rax,%r14), %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_POSTING_READ
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_BIT_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_BIT_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_BIT_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_BIT_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_BIT_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$50, %edi
	callq	_udelay
	addq	$4, %r14
	jne	LBB0_1
	jmp	LBB0_8
LBB0_7:
	orl	%eax, %ebx
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	testl	%r14d, %r14d
	jne	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
LBB0_9:
	movl	%r12d, %edi
	callq	_FDI_TX_CTL
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_I915_READ
	movq	_FDI_LINK_TRAIN_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	_FDI_LINK_TRAIN_PATTERN_2@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_IS_GEN6
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_FDI_LINK_TRAIN_VOL_EMP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movq	_FDI_LINK_TRAIN_400MV_0DB_SNB_B@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_11:
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	%r12d, %edi
	callq	_FDI_RX_CTL
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_HAS_PCH_CPT
	testq	%rax, %rax
	movq	_FDI_LINK_TRAIN_PATTERN_MASK_CPT@GOTPCREL(%rip), %rax
	cmoveq	_FDI_LINK_TRAIN_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FDI_LINK_TRAIN_PATTERN_2_CPT@GOTPCREL(%rip), %rax
	cmoveq	_FDI_LINK_TRAIN_PATTERN_2@GOTPCREL(%rip), %rax
	notl	%esi
	andl	%r15d, %esi
	orl	(%rax), %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_POSTING_READ
	movl	$150, %edi
	callq	_udelay
	movq	$-16, %r13
	leaq	L_.str(%rip), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_FDI_TX_CTL
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_I915_READ
	movq	_FDI_LINK_TRAIN_VOL_EMP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_snb_b_fdi_train_param@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orl	16(%rax,%r13), %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_POSTING_READ
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_SYMBOL_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_SYMBOL_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_SYMBOL_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_SYMBOL_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$50, %edi
	callq	_udelay
	movl	%r12d, %edi
	callq	_FDI_RX_IIR
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_FDI_RX_SYMBOL_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %eax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$50, %edi
	callq	_udelay
	addq	$4, %r13
	jne	LBB0_12
	jmp	LBB0_19
LBB0_18:
	orl	%eax, %ebx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	testl	%r13d, %r13d
	jne	LBB0_20
LBB0_19:
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_ERROR
LBB0_20:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FDI_RX_SYMBOL_LOCK,4,2         ## @FDI_RX_SYMBOL_LOCK
	.comm	_FDI_RX_BIT_LOCK,4,2            ## @FDI_RX_BIT_LOCK
	.comm	_FDI_LINK_TRAIN_NONE,4,2        ## @FDI_LINK_TRAIN_NONE
	.comm	_FDI_LINK_TRAIN_PATTERN_1,4,2   ## @FDI_LINK_TRAIN_PATTERN_1
	.comm	_FDI_LINK_TRAIN_VOL_EMP_MASK,4,2 ## @FDI_LINK_TRAIN_VOL_EMP_MASK
	.comm	_FDI_LINK_TRAIN_400MV_0DB_SNB_B,4,2 ## @FDI_LINK_TRAIN_400MV_0DB_SNB_B
	.comm	_FDI_TX_ENABLE,4,2              ## @FDI_TX_ENABLE
	.comm	_FDI_RX_TP1_TO_TP2_48,4,2       ## @FDI_RX_TP1_TO_TP2_48
	.comm	_FDI_RX_FDI_DELAY_90,4,2        ## @FDI_RX_FDI_DELAY_90
	.comm	_FDI_LINK_TRAIN_PATTERN_MASK_CPT,4,2 ## @FDI_LINK_TRAIN_PATTERN_MASK_CPT
	.comm	_FDI_LINK_TRAIN_PATTERN_1_CPT,4,2 ## @FDI_LINK_TRAIN_PATTERN_1_CPT
	.comm	_FDI_RX_ENABLE,4,2              ## @FDI_RX_ENABLE
	.comm	_snb_b_fdi_train_param,8,3      ## @snb_b_fdi_train_param
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FDI_RX_IIR 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"FDI train 1 done.\n"

L_.str.2:                               ## @.str.2
	.asciz	"FDI train 1 fail!\n"

	.comm	_FDI_LINK_TRAIN_PATTERN_2,4,2   ## @FDI_LINK_TRAIN_PATTERN_2
	.comm	_FDI_LINK_TRAIN_PATTERN_2_CPT,4,2 ## @FDI_LINK_TRAIN_PATTERN_2_CPT
L_.str.3:                               ## @.str.3
	.asciz	"FDI train 2 done.\n"

L_.str.4:                               ## @.str.4
	.asciz	"FDI train 2 fail!\n"

L_.str.5:                               ## @.str.5
	.asciz	"FDI train done.\n"

	.no_dead_strip	_gen6_fdi_link_train
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen6_fdi_link_train
_gen6_fdi_link_train:                   ; @gen6_fdi_link_train
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x20, [x0]
	bl	_to_intel_crtc
	mov	x21, x0
	ldr	w19, [x0]
	mov	x0, x19
	bl	_FDI_RX_IMR
	mov	x22, x0
	bl	_I915_READ
Lloh0:
	adrp	x24, _FDI_RX_SYMBOL_LOCK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _FDI_RX_SYMBOL_LOCK@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x28, _FDI_RX_BIT_LOCK@GOTPAGE
Lloh3:
	ldr	x28, [x28, _FDI_RX_BIT_LOCK@GOTPAGEOFF]
	ldr	w9, [x28]
	orr	w8, w9, w8
	bic	w1, w0, w8
	mov	x0, x22
	bl	_I915_WRITE
	mov	x0, x22
	bl	_POSTING_READ
	mov	w0, #150
	bl	_udelay
	mov	x0, x19
	bl	_FDI_TX_CTL
	mov	x22, x0
	bl	_I915_READ
	and	w8, w0, #0xffc7ffff
	ldr	w9, [x21, #4]
	lsl	w9, w9, #19
	sub	w9, w9, #128, lsl #12           ; =524288
	orr	w8, w9, w8
Lloh4:
	adrp	x26, _FDI_LINK_TRAIN_NONE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _FDI_LINK_TRAIN_NONE@GOTPAGEOFF]
	ldr	w9, [x26]
	bic	w8, w8, w9
Lloh6:
	adrp	x23, _FDI_LINK_TRAIN_PATTERN_1@GOTPAGE
Lloh7:
	ldr	x23, [x23, _FDI_LINK_TRAIN_PATTERN_1@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w8, w9
Lloh8:
	adrp	x25, _FDI_LINK_TRAIN_VOL_EMP_MASK@GOTPAGE
Lloh9:
	ldr	x25, [x25, _FDI_LINK_TRAIN_VOL_EMP_MASK@GOTPAGEOFF]
	ldr	w9, [x25]
	bic	w8, w8, w9
Lloh10:
	adrp	x9, _FDI_LINK_TRAIN_400MV_0DB_SNB_B@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FDI_LINK_TRAIN_400MV_0DB_SNB_B@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _FDI_TX_ENABLE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _FDI_TX_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w10, w9
	orr	w1, w9, w8
	mov	x0, x22
	bl	_I915_WRITE
	mov	x0, x19
	bl	_FDI_RX_MISC
Lloh16:
	adrp	x8, _FDI_RX_TP1_TO_TP2_48@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FDI_RX_TP1_TO_TP2_48@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _FDI_RX_FDI_DELAY_90@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FDI_RX_FDI_DELAY_90@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_I915_WRITE
	mov	x0, x19
	bl	_FDI_RX_CTL
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	mov	x0, x20
	bl	_HAS_PCH_CPT
Lloh22:
	adrp	x8, _FDI_LINK_TRAIN_PATTERN_MASK_CPT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FDI_LINK_TRAIN_PATTERN_MASK_CPT@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x26, x8, eq
	ldr	w8, [x8]
	bic	w8, w22, w8
Lloh24:
	adrp	x9, _FDI_LINK_TRAIN_PATTERN_1_CPT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _FDI_LINK_TRAIN_PATTERN_1_CPT@GOTPAGEOFF]
	csel	x9, x23, x9, eq
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh26:
	adrp	x9, _FDI_RX_ENABLE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _FDI_RX_ENABLE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x21
	bl	_I915_WRITE
	mov	x0, x21
	bl	_POSTING_READ
	mov	w0, #150
	bl	_udelay
	mov	x27, #0
Lloh29:
	adrp	x26, _snb_b_fdi_train_param@GOTPAGE
Lloh30:
	ldr	x26, [x26, _snb_b_fdi_train_param@GOTPAGEOFF]
Lloh31:
	adrp	x21, l_.str@PAGE
Lloh32:
	add	x21, x21, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_FDI_TX_CTL
	mov	x22, x0
	bl	_I915_READ
	ldr	w8, [x25]
	bic	w8, w0, w8
	ldr	x9, [x26]
	ldr	w9, [x9, x27]
	orr	w1, w9, w8
	mov	x0, x22
	bl	_I915_WRITE
	mov	x0, x22
	bl	_POSTING_READ
	mov	w0, #500
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x22, x0
	bl	_I915_READ
	mov	x23, x0
	str	x23, [sp]
	mov	x0, x21
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x28]
	tst	w8, w23
	b.ne	LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x22, x0
	bl	_I915_READ
	mov	x23, x0
	str	x23, [sp]
	mov	x0, x21
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x28]
	tst	w8, w23
	b.ne	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x22, x0
	bl	_I915_READ
	mov	x23, x0
	str	x23, [sp]
	mov	x0, x21
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x28]
	tst	w8, w23
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x22, x0
	bl	_I915_READ
	mov	x23, x0
	str	x23, [sp]
	mov	x0, x21
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x28]
	tst	w8, w23
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x22, x0
	bl	_I915_READ
	mov	x23, x0
	str	x23, [sp]
	mov	x0, x21
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x28]
	tst	w8, w23
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #50
	bl	_udelay
	add	x27, x27, #4
	cmp	x27, #16
	b.ne	LBB0_1
	b	LBB0_9
LBB0_7:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
LBB0_8:
	orr	w1, w8, w23
	mov	x0, x22
	bl	_I915_WRITE
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	cmp	w27, #16
	b.ne	LBB0_10
LBB0_9:
Lloh35:
	adrp	x0, l_.str.2@PAGE
Lloh36:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_10:
	mov	x0, x19
	bl	_FDI_TX_CTL
	mov	x21, x0
	bl	_I915_READ
Lloh37:
	adrp	x27, _FDI_LINK_TRAIN_NONE@GOTPAGE
Lloh38:
	ldr	x27, [x27, _FDI_LINK_TRAIN_NONE@GOTPAGEOFF]
	ldr	w8, [x27]
	bic	w8, w0, w8
Lloh39:
	adrp	x23, _FDI_LINK_TRAIN_PATTERN_2@GOTPAGE
Lloh40:
	ldr	x23, [x23, _FDI_LINK_TRAIN_PATTERN_2@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w22, w8, w9
	mov	x0, x20
	bl	_IS_GEN6
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w8, [x25]
	bic	w8, w22, w8
Lloh41:
	adrp	x9, _FDI_LINK_TRAIN_400MV_0DB_SNB_B@GOTPAGE
Lloh42:
	ldr	x9, [x9, _FDI_LINK_TRAIN_400MV_0DB_SNB_B@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w22, w8, w9
LBB0_12:
Lloh44:
	adrp	x28, _FDI_LINK_TRAIN_PATTERN_MASK_CPT@GOTPAGE
Lloh45:
	ldr	x28, [x28, _FDI_LINK_TRAIN_PATTERN_MASK_CPT@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x22
	bl	_I915_WRITE
	mov	x0, x19
	bl	_FDI_RX_CTL
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	mov	x0, x20
	bl	_HAS_PCH_CPT
	cmp	x0, #0
	csel	x8, x27, x28, eq
	ldr	w8, [x8]
	bic	w8, w22, w8
Lloh46:
	adrp	x9, _FDI_LINK_TRAIN_PATTERN_2_CPT@GOTPAGE
Lloh47:
	ldr	x9, [x9, _FDI_LINK_TRAIN_PATTERN_2_CPT@GOTPAGEOFF]
	csel	x9, x23, x9, eq
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_I915_WRITE
	mov	x0, x21
	bl	_POSTING_READ
	mov	w0, #150
	bl	_udelay
	mov	x23, #0
Lloh48:
	adrp	x20, l_.str@PAGE
Lloh49:
	add	x20, x20, l_.str@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_FDI_TX_CTL
	mov	x21, x0
	bl	_I915_READ
	ldr	w8, [x25]
	bic	w8, w0, w8
	ldr	x9, [x26]
	ldr	w9, [x9, x23]
	orr	w1, w9, w8
	mov	x0, x21
	bl	_I915_WRITE
	mov	x0, x21
	bl	_POSTING_READ
	mov	w0, #500
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	str	x22, [sp]
	mov	x0, x20
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x24]
	tst	w8, w22
	b.ne	LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	str	x22, [sp]
	mov	x0, x20
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x24]
	tst	w8, w22
	b.ne	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	str	x22, [sp]
	mov	x0, x20
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x24]
	tst	w8, w22
	b.ne	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	str	x22, [sp]
	mov	x0, x20
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x24]
	tst	w8, w22
	b.ne	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_FDI_RX_IIR
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	str	x22, [sp]
	mov	x0, x20
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x24]
	tst	w8, w22
	b.ne	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	w0, #50
	bl	_udelay
	add	x23, x23, #4
	cmp	x23, #16
	b.ne	LBB0_13
	b	LBB0_21
LBB0_19:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
LBB0_20:
	orr	w1, w8, w22
	mov	x0, x21
	bl	_I915_WRITE
Lloh50:
	adrp	x0, l_.str.3@PAGE
Lloh51:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
	cmp	w23, #16
	b.ne	LBB0_22
LBB0_21:
Lloh52:
	adrp	x0, l_.str.4@PAGE
Lloh53:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
LBB0_22:
Lloh54:
	adrp	x0, l_.str.5@PAGE
Lloh55:
	add	x0, x0, l_.str.5@PAGEOFF
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_DRM_DEBUG_KMS
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_FDI_RX_SYMBOL_LOCK,4,2         ; @FDI_RX_SYMBOL_LOCK
	.comm	_FDI_RX_BIT_LOCK,4,2            ; @FDI_RX_BIT_LOCK
	.comm	_FDI_LINK_TRAIN_NONE,4,2        ; @FDI_LINK_TRAIN_NONE
	.comm	_FDI_LINK_TRAIN_PATTERN_1,4,2   ; @FDI_LINK_TRAIN_PATTERN_1
	.comm	_FDI_LINK_TRAIN_VOL_EMP_MASK,4,2 ; @FDI_LINK_TRAIN_VOL_EMP_MASK
	.comm	_FDI_LINK_TRAIN_400MV_0DB_SNB_B,4,2 ; @FDI_LINK_TRAIN_400MV_0DB_SNB_B
	.comm	_FDI_TX_ENABLE,4,2              ; @FDI_TX_ENABLE
	.comm	_FDI_RX_TP1_TO_TP2_48,4,2       ; @FDI_RX_TP1_TO_TP2_48
	.comm	_FDI_RX_FDI_DELAY_90,4,2        ; @FDI_RX_FDI_DELAY_90
	.comm	_FDI_LINK_TRAIN_PATTERN_MASK_CPT,4,2 ; @FDI_LINK_TRAIN_PATTERN_MASK_CPT
	.comm	_FDI_LINK_TRAIN_PATTERN_1_CPT,4,2 ; @FDI_LINK_TRAIN_PATTERN_1_CPT
	.comm	_FDI_RX_ENABLE,4,2              ; @FDI_RX_ENABLE
	.comm	_snb_b_fdi_train_param,8,3      ; @snb_b_fdi_train_param
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FDI_RX_IIR 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"FDI train 1 done.\n"

l_.str.2:                               ; @.str.2
	.asciz	"FDI train 1 fail!\n"

	.comm	_FDI_LINK_TRAIN_PATTERN_2,4,2   ; @FDI_LINK_TRAIN_PATTERN_2
	.comm	_FDI_LINK_TRAIN_PATTERN_2_CPT,4,2 ; @FDI_LINK_TRAIN_PATTERN_2_CPT
l_.str.3:                               ; @.str.3
	.asciz	"FDI train 2 done.\n"

l_.str.4:                               ; @.str.4
	.asciz	"FDI train 2 fail!\n"

l_.str.5:                               ; @.str.5
	.asciz	"FDI train done.\n"

	.no_dead_strip	_gen6_fdi_link_train
.subsections_via_symbols
