	.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, %rbx
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	je	LBB0_1
## %bb.11:
	movq	%rbx, %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	%r14, %rdi
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	je	LBB0_2
## %bb.12:
	movq	%rbx, %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	%r14, %rdi
	callq	_IS_G4X
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_IS_GM45
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	movl	$1, %ebx
	jmp	LBB0_6
LBB0_4:
	movl	$2, %ebx
LBB0_6:
	movq	_PORT_HOTPLUG_EN@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_I915_READ
	movl	%eax, %r13d
	movq	_CRT_HOTPLUG_FORCE_DETECT@GOTPCREL(%rip), %r14
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	orl	(%r14), %r13d
	leaq	L_.str(%rip), %r15
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	decl	%ebx
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	%r13d, %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
	callq	_I915_READ
	xorl	%edi, %edi
	andl	(%r14), %eax
	sete	%dil
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_9
LBB0_10:
	movq	_PORT_HOTPLUG_STAT@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	movq	_CRT_HOTPLUG_MONITOR_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CRT_HOTPLUG_MONITOR_NONE@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	setne	%bl
	movl	(%r14), %edi
	movq	_CRT_HOTPLUG_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_I915_WRITE
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_HOTPLUG_EN,4,2            ## @PORT_HOTPLUG_EN
	.comm	_CRT_HOTPLUG_FORCE_DETECT,4,2   ## @CRT_HOTPLUG_FORCE_DETECT
	.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	x19, [x0]
	mov	x0, x19
	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_G4X
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_IS_GM45
	cbz	w0, LBB0_7
LBB0_6:
	mov	w23, #1
	b	LBB0_8
LBB0_7:
	mov	w23, #0
LBB0_8:
Lloh0:
	adrp	x21, _PORT_HOTPLUG_EN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PORT_HOTPLUG_EN@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_I915_READ
	mov	x19, x0
Lloh2:
	adrp	x22, _CRT_HOTPLUG_FORCE_DETECT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CRT_HOTPLUG_FORCE_DETECT@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w20, w8, w0
	ldr	w0, [x21]
	mov	x1, x20
	bl	_I915_WRITE
	ldr	w0, [x21]
	bl	_I915_READ
	ldr	w8, [x22]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #1000
	bl	_wait_for
	cbz	x0, LBB0_10
; %bb.9:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_10:
	tbnz	w23, #0, LBB0_13
; %bb.11:
	ldr	w0, [x21]
	mov	x1, x20
	bl	_I915_WRITE
	ldr	w0, [x21]
	bl	_I915_READ
	ldr	w8, [x22]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #1000
	bl	_wait_for
	cbz	x0, LBB0_13
; %bb.12:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_13:
Lloh8:
	adrp	x22, _PORT_HOTPLUG_STAT@GOTPAGE
Lloh9:
	ldr	x22, [x22, _PORT_HOTPLUG_STAT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh10:
	adrp	x8, _CRT_HOTPLUG_MONITOR_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CRT_HOTPLUG_MONITOR_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh13:
	adrp	x9, _CRT_HOTPLUG_MONITOR_NONE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CRT_HOTPLUG_MONITOR_NONE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w20, ne
	ldr	w0, [x22]
Lloh16:
	adrp	x8, _CRT_HOTPLUG_INT_STATUS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CRT_HOTPLUG_INT_STATUS@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_I915_WRITE
	ldr	w0, [x21]
	mov	x1, x19
	bl	_I915_WRITE
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_HOTPLUG_EN,4,2            ; @PORT_HOTPLUG_EN
	.comm	_CRT_HOTPLUG_FORCE_DETECT,4,2   ; @CRT_HOTPLUG_FORCE_DETECT
	.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
