	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_tv_detect_type
_intel_tv_detect_type:                  ## @intel_tv_detect_type
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_to_intel_crtc
	movq	%rax, %r15
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movq	_DRM_CONNECTOR_POLL_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_PIPE_HOTPLUG_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movq	_PIPE_HOTPLUG_TV_INTERRUPT_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_i915_disable_pipestat
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_2:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	_TV_DAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movl	%eax, %r12d
	movq	_TV_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_TV_ENC_ENABLE@GOTPCREL(%rip), %rdx
	movq	_TV_TEST_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	notl	%ecx
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	andl	%eax, %ecx
	movq	_TV_TEST_MODE_MONITOR_DETECT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_TV_ENC_PIPEB_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %eax
	orl	%ecx, %eax
	notl	%r14d
	andl	%ecx, %r14d
	cmpl	$1, (%r15)
	cmovel	%eax, %r14d
	movq	_TVDAC_SENSE_MASK@GOTPCREL(%rip), %rcx
	movq	_DAC_A_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_DAC_B_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_DAC_C_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	movq	_TVDAC_STATE_CHG_EN@GOTPCREL(%rip), %r15
	movq	_TVDAC_A_SENSE_CTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%r15), %ebx
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	andl	%r12d, %eax
	orl	%eax, %ebx
	movq	_TVDAC_B_SENSE_CTL@GOTPCREL(%rip), %r13
	movq	_TVDAC_C_SENSE_CTL@GOTPCREL(%rip), %r12
	movq	_DAC_CTL_OVERRIDE@GOTPCREL(%rip), %rax
	movq	_DAC_A_0_7_V@GOTPCREL(%rip), %rcx
	movq	_DAC_B_0_7_V@GOTPCREL(%rip), %rdx
	movq	_DAC_C_0_7_V@GOTPCREL(%rip), %rsi
	orl	(%r13), %ebx
	orl	(%r12), %ebx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	orl	(%rdx), %ebx
	orl	(%rsi), %ebx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_GM45
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_TVDAC_A_SENSE_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r15), %eax
	orl	(%r13), %eax
	orl	(%r12), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_4:
	movq	_DRM_CONNECTOR_POLL_HPD@GOTPCREL(%rip), %r12
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	_TV_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movq	_TV_DAC@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r15), %edi
	callq	_POSTING_READ
	movq	(%r13), %rdi
	movq	8(%r13), %rbx
	callq	_to_intel_crtc
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_intel_wait_for_vblank
	movl	(%r15), %edi
	callq	_I915_READ
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_TVDAC_SENSE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_TVDAC_B_SENSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_TVDAC_C_SENSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	cmpl	%edx, %eax
	jne	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_DRM_MODE_CONNECTOR_Composite@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	movq	_TVDAC_A_SENSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, %ecx
	andl	%ebx, %ecx
	cmpl	%edx, %ecx
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_DRM_MODE_CONNECTOR_SVIDEO@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r14d
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	_TVDAC_STATE_CHG_EN@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_9:
	testl	%eax, %eax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_10
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	$-1, %r14d
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_DRM_MODE_CONNECTOR_Component@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_12:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	_TVDAC_STATE_CHG_EN@GOTPCREL(%rip), %rcx
LBB0_13:
	movq	_TV_DAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rcx), %eax
	notl	%eax
	andl	%eax, %esi
	callq	_I915_WRITE
	movq	_TV_CTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_I915_WRITE
	movl	(%rbx), %edi
	callq	_POSTING_READ
	movq	(%r13), %rdi
	movq	8(%r13), %rbx
	callq	_to_intel_crtc
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_intel_wait_for_vblank
	movl	(%r12), %eax
	testl	%eax, (%r15)
	je	LBB0_15
## %bb.14:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_PIPE_HOTPLUG_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movq	_PIPE_HOTPLUG_TV_INTERRUPT_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_i915_enable_pipestat
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_15:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ## @DRM_CONNECTOR_POLL_HPD
	.comm	_PIPE_HOTPLUG_INTERRUPT_ENABLE,4,2 ## @PIPE_HOTPLUG_INTERRUPT_ENABLE
	.comm	_PIPE_HOTPLUG_TV_INTERRUPT_ENABLE,4,2 ## @PIPE_HOTPLUG_TV_INTERRUPT_ENABLE
	.comm	_TV_DAC,4,2                     ## @TV_DAC
	.comm	_TV_CTL,4,2                     ## @TV_CTL
	.comm	_TV_ENC_ENABLE,4,2              ## @TV_ENC_ENABLE
	.comm	_TV_TEST_MODE_MASK,4,2          ## @TV_TEST_MODE_MASK
	.comm	_TV_TEST_MODE_MONITOR_DETECT,4,2 ## @TV_TEST_MODE_MONITOR_DETECT
	.comm	_TV_ENC_PIPEB_SELECT,4,2        ## @TV_ENC_PIPEB_SELECT
	.comm	_TVDAC_SENSE_MASK,4,2           ## @TVDAC_SENSE_MASK
	.comm	_DAC_A_MASK,4,2                 ## @DAC_A_MASK
	.comm	_DAC_B_MASK,4,2                 ## @DAC_B_MASK
	.comm	_DAC_C_MASK,4,2                 ## @DAC_C_MASK
	.comm	_TVDAC_STATE_CHG_EN,4,2         ## @TVDAC_STATE_CHG_EN
	.comm	_TVDAC_A_SENSE_CTL,4,2          ## @TVDAC_A_SENSE_CTL
	.comm	_TVDAC_B_SENSE_CTL,4,2          ## @TVDAC_B_SENSE_CTL
	.comm	_TVDAC_C_SENSE_CTL,4,2          ## @TVDAC_C_SENSE_CTL
	.comm	_DAC_CTL_OVERRIDE,4,2           ## @DAC_CTL_OVERRIDE
	.comm	_DAC_A_0_7_V,4,2                ## @DAC_A_0_7_V
	.comm	_DAC_B_0_7_V,4,2                ## @DAC_B_0_7_V
	.comm	_DAC_C_0_7_V,4,2                ## @DAC_C_0_7_V
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TV detected: %x, %x\n"

	.comm	_TVDAC_B_SENSE,4,2              ## @TVDAC_B_SENSE
	.comm	_TVDAC_C_SENSE,4,2              ## @TVDAC_C_SENSE
L_.str.1:                               ## @.str.1
	.asciz	"Detected Composite TV connection\n"

	.comm	_DRM_MODE_CONNECTOR_Composite,4,2 ## @DRM_MODE_CONNECTOR_Composite
	.comm	_TVDAC_A_SENSE,4,2              ## @TVDAC_A_SENSE
L_.str.2:                               ## @.str.2
	.asciz	"Detected S-Video TV connection\n"

	.comm	_DRM_MODE_CONNECTOR_SVIDEO,4,2  ## @DRM_MODE_CONNECTOR_SVIDEO
L_.str.3:                               ## @.str.3
	.asciz	"Detected Component TV connection\n"

	.comm	_DRM_MODE_CONNECTOR_Component,4,2 ## @DRM_MODE_CONNECTOR_Component
L_.str.4:                               ## @.str.4
	.asciz	"Unrecognised TV connection\n"

	.no_dead_strip	_intel_tv_detect_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_tv_detect_type
_intel_tv_detect_type:                  ; @intel_tv_detect_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
	mov	x21, x0
	ldr	x0, [x0]
	bl	_to_intel_crtc
	mov	x24, x0
	ldr	x25, [x21, #8]
	ldr	x19, [x25]
	mov	x22, x20
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _DRM_CONNECTOR_POLL_HPD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_CONNECTOR_POLL_HPD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x20, _PIPE_HOTPLUG_INTERRUPT_ENABLE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PIPE_HOTPLUG_INTERRUPT_ENABLE@GOTPAGEOFF]
Lloh5:
	adrp	x23, _PIPE_HOTPLUG_TV_INTERRUPT_ENABLE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PIPE_HOTPLUG_TV_INTERRUPT_ENABLE@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w1, #0
	bl	_i915_disable_pipestat
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_2:
Lloh7:
	adrp	x8, _TV_DAC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TV_DAC@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_I915_READ
	mov	x20, x0
Lloh10:
	adrp	x8, _TV_CTL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TV_CTL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh13:
	adrp	x8, _TV_ENC_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TV_ENC_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _TV_TEST_MODE_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TV_TEST_MODE_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	bic	w8, w0, w8
Lloh19:
	adrp	x9, _TV_TEST_MODE_MONITOR_DETECT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _TV_TEST_MODE_MONITOR_DETECT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _TV_ENC_PIPEB_SELECT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _TV_ENC_PIPEB_SELECT@GOTPAGEOFF]
	ldr	w10, [x24]
Lloh24:
	ldr	w9, [x9]
	orr	w11, w9, w8
	bic	w8, w8, w9
	cmp	w10, #1
	csel	w24, w11, w8, eq
Lloh25:
	adrp	x8, _TVDAC_SENSE_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TVDAC_SENSE_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _DAC_A_MASK@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DAC_A_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh31:
	adrp	x9, _DAC_B_MASK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _DAC_B_MASK@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
Lloh34:
	adrp	x10, _DAC_C_MASK@GOTPAGE
Lloh35:
	ldr	x10, [x10, _DAC_C_MASK@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh36:
	ldr	w9, [x10]
	orr	w8, w8, w9
	str	w20, [sp, #24]                  ; 4-byte Folded Spill
	bic	w8, w20, w8
Lloh37:
	adrp	x23, _TVDAC_STATE_CHG_EN@GOTPAGE
Lloh38:
	ldr	x23, [x23, _TVDAC_STATE_CHG_EN@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh39:
	adrp	x28, _TVDAC_A_SENSE_CTL@GOTPAGE
Lloh40:
	ldr	x28, [x28, _TVDAC_A_SENSE_CTL@GOTPAGEOFF]
	ldr	w10, [x28]
Lloh41:
	adrp	x20, _TVDAC_B_SENSE_CTL@GOTPAGE
Lloh42:
	ldr	x20, [x20, _TVDAC_B_SENSE_CTL@GOTPAGEOFF]
	orr	w9, w10, w9
	ldr	w10, [x20]
Lloh43:
	adrp	x27, _TVDAC_C_SENSE_CTL@GOTPAGE
Lloh44:
	ldr	x27, [x27, _TVDAC_C_SENSE_CTL@GOTPAGEOFF]
Lloh45:
	adrp	x11, _DAC_CTL_OVERRIDE@GOTPAGE
Lloh46:
	ldr	x11, [x11, _DAC_CTL_OVERRIDE@GOTPAGEOFF]
	ldr	w12, [x27]
Lloh47:
	ldr	w11, [x11]
Lloh48:
	adrp	x13, _DAC_A_0_7_V@GOTPAGE
Lloh49:
	ldr	x13, [x13, _DAC_A_0_7_V@GOTPAGEOFF]
Lloh50:
	adrp	x14, _DAC_B_0_7_V@GOTPAGE
Lloh51:
	ldr	x14, [x14, _DAC_B_0_7_V@GOTPAGEOFF]
Lloh52:
	ldr	w13, [x13]
Lloh53:
	ldr	w14, [x14]
Lloh54:
	adrp	x15, _DAC_C_0_7_V@GOTPAGE
Lloh55:
	ldr	x15, [x15, _DAC_C_0_7_V@GOTPAGEOFF]
Lloh56:
	ldr	w15, [x15]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w8, w8, w12
	orr	w8, w8, w11
	orr	w8, w8, w13
	orr	w8, w8, w14
	orr	w26, w8, w15
	mov	x0, x25
	bl	_IS_GM45
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x23]
	ldr	w9, [x28]
	orr	w8, w9, w8
	ldr	w9, [x20]
	orr	w8, w8, w9
	ldr	w9, [x27]
	orr	w8, w8, w9
	bic	w26, w26, w8
LBB0_4:
	mov	x20, x22
Lloh57:
	adrp	x22, _TV_CTL@GOTPAGE
Lloh58:
	ldr	x22, [x22, _TV_CTL@GOTPAGEOFF]
Lloh59:
	adrp	x27, _TV_DAC@GOTPAGE
Lloh60:
	ldr	x27, [x27, _TV_DAC@GOTPAGEOFF]
Lloh61:
	adrp	x23, _TVDAC_SENSE_MASK@GOTPAGE
Lloh62:
	ldr	x23, [x23, _TVDAC_SENSE_MASK@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x24
	bl	_I915_WRITE
	ldr	w0, [x27]
	mov	x1, x26
	bl	_I915_WRITE
	ldr	w0, [x27]
	bl	_POSTING_READ
	ldp	x0, x25, [x21]
	bl	_to_intel_crtc
	ldr	w1, [x0]
	mov	x0, x25
	bl	_intel_wait_for_vblank
	ldr	w0, [x27]
	bl	_I915_READ
	mov	x25, x0
	stp	x24, x25, [sp]
Lloh63:
	adrp	x0, l_.str@PAGE
Lloh64:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh65:
	ldr	w8, [x23]
	and	w8, w8, w25
Lloh66:
	adrp	x9, _TVDAC_B_SENSE@GOTPAGE
Lloh67:
	ldr	x9, [x9, _TVDAC_B_SENSE@GOTPAGEOFF]
Lloh68:
	ldr	w9, [x9]
Lloh69:
	adrp	x10, _TVDAC_C_SENSE@GOTPAGE
Lloh70:
	ldr	x10, [x10, _TVDAC_C_SENSE@GOTPAGEOFF]
Lloh71:
	ldr	w10, [x10]
	orr	w10, w10, w9
	cmp	w8, w10
	b.ne	LBB0_6
; %bb.5:
Lloh72:
	adrp	x0, l_.str.1@PAGE
Lloh73:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh74:
	adrp	x8, _DRM_MODE_CONNECTOR_Composite@GOTPAGE
Lloh75:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_Composite@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh76:
	adrp	x10, _TVDAC_A_SENSE@GOTPAGE
Lloh77:
	ldr	x10, [x10, _TVDAC_A_SENSE@GOTPAGEOFF]
Lloh78:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w9, w9, w25
	cmp	w9, w10
	b.ne	LBB0_12
; %bb.7:
Lloh79:
	adrp	x0, l_.str.2@PAGE
Lloh80:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh81:
	adrp	x8, _DRM_MODE_CONNECTOR_SVIDEO@GOTPAGE
Lloh82:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_SVIDEO@GOTPAGEOFF]
LBB0_8:
	ldr	w24, [x8]
Lloh83:
	adrp	x25, _DRM_CONNECTOR_POLL_HPD@GOTPAGE
Lloh84:
	ldr	x25, [x25, _DRM_CONNECTOR_POLL_HPD@GOTPAGEOFF]
	ldr	w26, [sp, #28]                  ; 4-byte Folded Reload
LBB0_9:
Lloh85:
	adrp	x8, _TVDAC_STATE_CHG_EN@GOTPAGE
Lloh86:
	ldr	x8, [x8, _TVDAC_STATE_CHG_EN@GOTPAGEOFF]
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	ldr	w0, [x27]
Lloh87:
	ldr	w8, [x8]
	bic	w1, w9, w8
	bl	_I915_WRITE
	ldr	w0, [x22]
	mov	x1, x26
	bl	_I915_WRITE
	ldr	w0, [x22]
	bl	_POSTING_READ
	ldp	x0, x22, [x21]
	bl	_to_intel_crtc
	ldr	w1, [x0]
	mov	x0, x22
	bl	_intel_wait_for_vblank
	ldr	w8, [x20]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh88:
	adrp	x8, _PIPE_HOTPLUG_INTERRUPT_ENABLE@GOTPAGE
Lloh89:
	ldr	x8, [x8, _PIPE_HOTPLUG_INTERRUPT_ENABLE@GOTPAGEOFF]
Lloh90:
	ldr	w8, [x8]
Lloh91:
	adrp	x9, _PIPE_HOTPLUG_TV_INTERRUPT_ENABLE@GOTPAGE
Lloh92:
	ldr	x9, [x9, _PIPE_HOTPLUG_TV_INTERRUPT_ENABLE@GOTPAGEOFF]
Lloh93:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w1, #0
	bl	_i915_enable_pipestat
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_11:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_12:
Lloh94:
	adrp	x25, _DRM_CONNECTOR_POLL_HPD@GOTPAGE
Lloh95:
	ldr	x25, [x25, _DRM_CONNECTOR_POLL_HPD@GOTPAGEOFF]
	ldr	w26, [sp, #28]                  ; 4-byte Folded Reload
	cbz	w8, LBB0_14
; %bb.13:
Lloh96:
	adrp	x0, l_.str.4@PAGE
Lloh97:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w24, #-1
	b	LBB0_9
LBB0_14:
Lloh98:
	adrp	x0, l_.str.3@PAGE
Lloh99:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh100:
	adrp	x8, _DRM_MODE_CONNECTOR_Component@GOTPAGE
Lloh101:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_Component@GOTPAGEOFF]
Lloh102:
	ldr	w24, [x8]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh52
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh65
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh74, Lloh75
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGot	Lloh81, Lloh82
	.loh AdrpAdd	Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGot	Lloh94, Lloh95
	.loh AdrpAdd	Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh100, Lloh101, Lloh102
	.loh AdrpAdd	Lloh98, Lloh99
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_CONNECTOR_POLL_HPD,4,2     ; @DRM_CONNECTOR_POLL_HPD
	.comm	_PIPE_HOTPLUG_INTERRUPT_ENABLE,4,2 ; @PIPE_HOTPLUG_INTERRUPT_ENABLE
	.comm	_PIPE_HOTPLUG_TV_INTERRUPT_ENABLE,4,2 ; @PIPE_HOTPLUG_TV_INTERRUPT_ENABLE
	.comm	_TV_DAC,4,2                     ; @TV_DAC
	.comm	_TV_CTL,4,2                     ; @TV_CTL
	.comm	_TV_ENC_ENABLE,4,2              ; @TV_ENC_ENABLE
	.comm	_TV_TEST_MODE_MASK,4,2          ; @TV_TEST_MODE_MASK
	.comm	_TV_TEST_MODE_MONITOR_DETECT,4,2 ; @TV_TEST_MODE_MONITOR_DETECT
	.comm	_TV_ENC_PIPEB_SELECT,4,2        ; @TV_ENC_PIPEB_SELECT
	.comm	_TVDAC_SENSE_MASK,4,2           ; @TVDAC_SENSE_MASK
	.comm	_DAC_A_MASK,4,2                 ; @DAC_A_MASK
	.comm	_DAC_B_MASK,4,2                 ; @DAC_B_MASK
	.comm	_DAC_C_MASK,4,2                 ; @DAC_C_MASK
	.comm	_TVDAC_STATE_CHG_EN,4,2         ; @TVDAC_STATE_CHG_EN
	.comm	_TVDAC_A_SENSE_CTL,4,2          ; @TVDAC_A_SENSE_CTL
	.comm	_TVDAC_B_SENSE_CTL,4,2          ; @TVDAC_B_SENSE_CTL
	.comm	_TVDAC_C_SENSE_CTL,4,2          ; @TVDAC_C_SENSE_CTL
	.comm	_DAC_CTL_OVERRIDE,4,2           ; @DAC_CTL_OVERRIDE
	.comm	_DAC_A_0_7_V,4,2                ; @DAC_A_0_7_V
	.comm	_DAC_B_0_7_V,4,2                ; @DAC_B_0_7_V
	.comm	_DAC_C_0_7_V,4,2                ; @DAC_C_0_7_V
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TV detected: %x, %x\n"

	.comm	_TVDAC_B_SENSE,4,2              ; @TVDAC_B_SENSE
	.comm	_TVDAC_C_SENSE,4,2              ; @TVDAC_C_SENSE
l_.str.1:                               ; @.str.1
	.asciz	"Detected Composite TV connection\n"

	.comm	_DRM_MODE_CONNECTOR_Composite,4,2 ; @DRM_MODE_CONNECTOR_Composite
	.comm	_TVDAC_A_SENSE,4,2              ; @TVDAC_A_SENSE
l_.str.2:                               ; @.str.2
	.asciz	"Detected S-Video TV connection\n"

	.comm	_DRM_MODE_CONNECTOR_SVIDEO,4,2  ; @DRM_MODE_CONNECTOR_SVIDEO
l_.str.3:                               ; @.str.3
	.asciz	"Detected Component TV connection\n"

	.comm	_DRM_MODE_CONNECTOR_Component,4,2 ; @DRM_MODE_CONNECTOR_Component
l_.str.4:                               ; @.str.4
	.asciz	"Unrecognised TV connection\n"

	.no_dead_strip	_intel_tv_detect_type
.subsections_via_symbols
