	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_hdmi_detect
_cdv_hdmi_detect:                       ## @cdv_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_gma_attached_encoder
	movq	(%rax), %rsi
	movq	8(%rax), %r15
	movq	_connector_status_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_drm_get_edid
	movq	$0, (%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	_DRM_EDID_INPUT_DIGITAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	_connector_status_connected@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_drm_detect_hdmi_monitor
	movl	%eax, (%r15)
	movq	%rbx, %rdi
	callq	_drm_detect_monitor_audio
	movl	%eax, 4(%r15)
LBB0_3:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	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
	.no_dead_strip	_cdv_hdmi_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdv_hdmi_detect
_cdv_hdmi_detect:                       ; @cdv_hdmi_detect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_gma_attached_encoder
Lloh0:
	adrp	x8, _connector_status_disconnected@GOTPAGE
Lloh1:
	ldr	x8, [x8, _connector_status_disconnected@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldp	x1, x21, [x0]
	mov	x0, x20
	bl	_drm_get_edid
	str	xzr, [x21]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _DRM_EDID_INPUT_DIGITAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_EDID_INPUT_DIGITAL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _connector_status_connected@GOTPAGE
Lloh7:
	ldr	x8, [x8, _connector_status_connected@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_drm_detect_hdmi_monitor
	str	w0, [x21]
	mov	x0, x20
	bl	_drm_detect_monitor_audio
	str	w0, [x21, #4]
LBB0_3:
	mov	x0, x20
	bl	_kfree
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.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
	.no_dead_strip	_cdv_hdmi_detect
.subsections_via_symbols
