	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdmi_detect
_intel_hdmi_detect:                     ## @intel_hdmi_detect
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	callq	_intel_attached_hdmi
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_hdmi_to_dig_port
	movq	%rax, %r14
	movq	(%r15), %rdi
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	$0, (%r12)
	movl	$0, 8(%r12)
	movl	24(%r12), %esi
	callq	_intel_gmbus_get_adapter
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_drm_get_edid
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	_DRM_EDID_INPUT_DIGITAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.2:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	16(%r12), %rax
	movq	_HDMI_AUDIO_OFF_DVI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_drm_detect_hdmi_monitor
	movl	%eax, (%r12)
LBB0_4:
	movq	%rbx, %rdi
	callq	_drm_detect_monitor_audio
	movl	%eax, 4(%r12)
	movq	%rbx, %rdi
	callq	_drm_rgb_quant_range_selectable
	movl	%eax, 8(%r12)
LBB0_5:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_6:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_10
## %bb.7:
	movq	16(%r12), %rax
	movq	_HDMI_AUDIO_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movq	_HDMI_AUDIO_ON@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movl	%edx, 4(%r12)
LBB0_9:
	movq	_INTEL_OUTPUT_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_disconnected,4,2 ## @connector_status_disconnected
	.comm	_DRM_EDID_INPUT_DIGITAL,4,2     ## @DRM_EDID_INPUT_DIGITAL
	.comm	_connector_status_connected,4,2 ## @connector_status_connected
	.comm	_HDMI_AUDIO_OFF_DVI,8,3         ## @HDMI_AUDIO_OFF_DVI
	.comm	_HDMI_AUDIO_AUTO,8,3            ## @HDMI_AUDIO_AUTO
	.comm	_HDMI_AUDIO_ON,8,3              ## @HDMI_AUDIO_ON
	.comm	_INTEL_OUTPUT_HDMI,4,2          ## @INTEL_OUTPUT_HDMI
	.no_dead_strip	_intel_hdmi_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdmi_detect
_intel_hdmi_detect:                     ; @intel_hdmi_detect
	.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	x22, x0
	ldr	x21, [x0]
	bl	_intel_attached_hdmi
	mov	x19, x0
	bl	_hdmi_to_dig_port
	mov	x20, x0
Lloh0:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh1:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh2:
	ldr	w21, [x8]
	str	xzr, [x19]
	str	wzr, [x19, #8]
	ldr	w1, [x19, #24]
	bl	_intel_gmbus_get_adapter
	mov	x1, x0
	mov	x0, x22
	bl	_drm_get_edid
Lloh3:
	adrp	x23, _connector_status_connected@GOTPAGE
Lloh4:
	ldr	x23, [x23, _connector_status_connected@GOTPAGEOFF]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
	ldr	w8, [x0]
Lloh5:
	adrp	x9, _DRM_EDID_INPUT_DIGITAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DRM_EDID_INPUT_DIGITAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	w21, [x23]
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x9, _HDMI_AUDIO_OFF_DVI@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HDMI_AUDIO_OFF_DVI@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x22
	bl	_drm_detect_hdmi_monitor
	str	w0, [x19]
LBB0_4:
	mov	x0, x22
	bl	_drm_detect_monitor_audio
	str	w0, [x19, #4]
	mov	x0, x22
	bl	_drm_rgb_quant_range_selectable
	str	w0, [x19, #8]
LBB0_5:
	mov	x0, x22
	bl	_kfree
LBB0_6:
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_10
; %bb.7:
	ldr	x8, [x19, #16]
Lloh11:
	adrp	x9, _HDMI_AUDIO_AUTO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HDMI_AUDIO_AUTO@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.8:
Lloh14:
	adrp	x9, _HDMI_AUDIO_ON@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HDMI_AUDIO_ON@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	str	w8, [x19, #4]
LBB0_9:
Lloh17:
	adrp	x8, _INTEL_OUTPUT_HDMI@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INTEL_OUTPUT_HDMI@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_10:
	mov	x0, x21
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_disconnected,4,2 ; @connector_status_disconnected
	.comm	_DRM_EDID_INPUT_DIGITAL,4,2     ; @DRM_EDID_INPUT_DIGITAL
	.comm	_connector_status_connected,4,2 ; @connector_status_connected
	.comm	_HDMI_AUDIO_OFF_DVI,8,3         ; @HDMI_AUDIO_OFF_DVI
	.comm	_HDMI_AUDIO_AUTO,8,3            ; @HDMI_AUDIO_AUTO
	.comm	_HDMI_AUDIO_ON,8,3              ; @HDMI_AUDIO_ON
	.comm	_INTEL_OUTPUT_HDMI,4,2          ; @INTEL_OUTPUT_HDMI
	.no_dead_strip	_intel_hdmi_detect
.subsections_via_symbols
