	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_crt_detect_hotplug
_intel_crt_detect_hotplug:              ## @intel_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
	movq	(%rdi), %rdi
	callq	_to_i915
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_ironlake_crt_detect_hotplug ## TAILCALL
LBB0_1:
	movq	%r12, %rdi
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	je	LBB0_2
## %bb.8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_valleyview_crt_detect_hotplug  ## TAILCALL
LBB0_2:
	movq	%r12, %rdi
	callq	_IS_G45
	cmpq	$1, %rax
	movl	$2, %ebx
	sbbl	$0, %ebx
	movq	_CRT_HOTPLUG_FORCE_DETECT@GOTPCREL(%rip), %r15
	movq	_PORT_HOTPLUG_EN@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%edx, %esi
	callq	_i915_hotplug_interrupt_update
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_intel_de_wait_for_clear
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_5
LBB0_6:
	movq	_PORT_HOTPLUG_STAT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_CRT_HOTPLUG_MONITOR_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CRT_HOTPLUG_MONITOR_NONE@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpl	(%rcx), %eax
	setne	%r14b
	movl	(%rbx), %edi
	movq	_CRT_HOTPLUG_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_I915_WRITE
	movl	(%r15), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_i915_hotplug_interrupt_update
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CRT_HOTPLUG_FORCE_DETECT,4,2   ## @CRT_HOTPLUG_FORCE_DETECT
	.comm	_PORT_HOTPLUG_EN,4,2            ## @PORT_HOTPLUG_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out waiting for FORCE_DETECT to go off"

	.comm	_PORT_HOTPLUG_STAT,4,2          ## @PORT_HOTPLUG_STAT
	.comm	_CRT_HOTPLUG_MONITOR_MASK,4,2   ## @CRT_HOTPLUG_MONITOR_MASK
	.comm	_CRT_HOTPLUG_MONITOR_NONE,4,2   ## @CRT_HOTPLUG_MONITOR_NONE
	.comm	_CRT_HOTPLUG_INT_STATUS,4,2     ## @CRT_HOTPLUG_INT_STATUS
	.no_dead_strip	_intel_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_crt_detect_hotplug
_intel_crt_detect_hotplug:              ; @intel_crt_detect_hotplug
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x0, [x0]
	bl	_to_i915
	mov	x19, x0
	bl	_HAS_PCH_SPLIT
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_intel_ironlake_crt_detect_hotplug
LBB0_2:
	mov	x0, x19
	bl	_IS_VALLEYVIEW
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_valleyview_crt_detect_hotplug
LBB0_4:
	mov	x0, x19
	bl	_IS_G45
	cmp	x0, #0
	mov	w8, #1
	cinc	w22, w8, ne
Lloh0:
	adrp	x21, _CRT_HOTPLUG_FORCE_DETECT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CRT_HOTPLUG_FORCE_DETECT@GOTPAGEOFF]
Lloh2:
	adrp	x23, _PORT_HOTPLUG_EN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PORT_HOTPLUG_EN@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str@PAGE
Lloh5:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	subs	w22, w22, #1
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x1
	bl	_i915_hotplug_interrupt_update
	ldr	w1, [x23]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #1000
	bl	_intel_de_wait_for_clear
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_DRM_DEBUG_KMS
	b	LBB0_5
LBB0_8:
Lloh6:
	adrp	x22, _PORT_HOTPLUG_STAT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _PORT_HOTPLUG_STAT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh8:
	adrp	x8, _CRT_HOTPLUG_MONITOR_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CRT_HOTPLUG_MONITOR_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh11:
	adrp	x9, _CRT_HOTPLUG_MONITOR_NONE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CRT_HOTPLUG_MONITOR_NONE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w20, ne
	ldr	w0, [x22]
Lloh14:
	adrp	x8, _CRT_HOTPLUG_INT_STATUS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CRT_HOTPLUG_INT_STATUS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_I915_WRITE
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_i915_hotplug_interrupt_update
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CRT_HOTPLUG_FORCE_DETECT,4,2   ; @CRT_HOTPLUG_FORCE_DETECT
	.comm	_PORT_HOTPLUG_EN,4,2            ; @PORT_HOTPLUG_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out waiting for FORCE_DETECT to go off"

	.comm	_PORT_HOTPLUG_STAT,4,2          ; @PORT_HOTPLUG_STAT
	.comm	_CRT_HOTPLUG_MONITOR_MASK,4,2   ; @CRT_HOTPLUG_MONITOR_MASK
	.comm	_CRT_HOTPLUG_MONITOR_NONE,4,2   ; @CRT_HOTPLUG_MONITOR_NONE
	.comm	_CRT_HOTPLUG_INT_STATUS,4,2     ; @CRT_HOTPLUG_INT_STATUS
	.no_dead_strip	_intel_crt_detect_hotplug
.subsections_via_symbols
