	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_ironlake_crt_detect_hotplug
_intel_ironlake_crt_detect_hotplug:     ## @intel_ironlake_crt_detect_hotplug
	.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), %r14
	callq	_intel_attached_crt
	movq	%rax, %r12
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	callq	_HAS_PCH_SPLIT
	movl	%eax, %r15d
	movq	$0, 8(%r12)
	movl	(%r12), %edi
	callq	_I915_READ
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_ADPA_CRT_HOTPLUG_FORCE_TRIGGER@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	orl	%r14d, %eax
	movq	_ADPA_DAC_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$1, %r15d
	sbbl	%ebx, %ebx
	notl	%ecx
	orl	%ecx, %ebx
	andl	%eax, %ebx
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
	callq	_I915_READ
	xorl	%edi, %edi
	andl	(%r13), %eax
	sete	%dil
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_3:
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	movl	(%r12), %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
	callq	_POSTING_READ
LBB0_5:
	movl	(%r12), %edi
	callq	_I915_READ
	movq	_ADPA_CRT_HOTPLUG_MONITOR_MASK@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%bl
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trigger hotplug detect cycle: adpa=0x%x\n"

	.comm	_ADPA_CRT_HOTPLUG_FORCE_TRIGGER,4,2 ## @ADPA_CRT_HOTPLUG_FORCE_TRIGGER
	.comm	_ADPA_DAC_ENABLE,4,2            ## @ADPA_DAC_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"timed out waiting for FORCE_TRIGGER"

	.comm	_ADPA_CRT_HOTPLUG_MONITOR_MASK,4,2 ## @ADPA_CRT_HOTPLUG_MONITOR_MASK
L_.str.2:                               ## @.str.2
	.asciz	"ironlake hotplug adpa=0x%x, result %d\n"

	.no_dead_strip	_intel_ironlake_crt_detect_hotplug
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_ironlake_crt_detect_hotplug
_intel_ironlake_crt_detect_hotplug:     ; @intel_ironlake_crt_detect_hotplug
	.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
	ldr	x20, [x0]
	bl	_intel_attached_crt
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_HAS_PCH_SPLIT
	mov	x20, x0
	str	xzr, [x19, #8]
	ldr	w0, [x19]
	bl	_I915_READ
	mov	x21, x0
	str	x21, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh2:
	adrp	x22, _ADPA_CRT_HOTPLUG_FORCE_TRIGGER@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ADPA_CRT_HOTPLUG_FORCE_TRIGGER@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w8, w8, w21
Lloh4:
	adrp	x9, _ADPA_DAC_ENABLE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ADPA_DAC_ENABLE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w20, #0
	mov	w10, #-1
	csinv	w9, w10, w9, eq
	and	w1, w9, w8
	ldr	w0, [x19]
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_I915_READ
	ldr	w8, [x22]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #1000
	bl	_wait_for
	cbz	x0, LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_3:
	cbz	w20, LBB0_5
; %bb.4:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_POSTING_READ
LBB0_5:
	ldr	w0, [x19]
	bl	_I915_READ
                                        ; kill: def $w0 killed $w0 def $x0
Lloh9:
	adrp	x8, _ADPA_CRT_HOTPLUG_MONITOR_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADPA_CRT_HOTPLUG_MONITOR_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w19, ne
	stp	x0, x19, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trigger hotplug detect cycle: adpa=0x%x\n"

	.comm	_ADPA_CRT_HOTPLUG_FORCE_TRIGGER,4,2 ; @ADPA_CRT_HOTPLUG_FORCE_TRIGGER
	.comm	_ADPA_DAC_ENABLE,4,2            ; @ADPA_DAC_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"timed out waiting for FORCE_TRIGGER"

	.comm	_ADPA_CRT_HOTPLUG_MONITOR_MASK,4,2 ; @ADPA_CRT_HOTPLUG_MONITOR_MASK
l_.str.2:                               ; @.str.2
	.asciz	"ironlake hotplug adpa=0x%x, result %d\n"

	.no_dead_strip	_intel_ironlake_crt_detect_hotplug
.subsections_via_symbols
