	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_display_enable
_hdmi_display_enable:                   ## @hdmi_display_enable
	.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
	callq	_dssdev_to_hdmi
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_DSSDBG
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_hdmi_power_on_full
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DSSERR
	jmp	LBB0_9
LBB0_2:
	movq	%rbx, %r15
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.3:
	leaq	52(%rbx), %rdi
	leaq	48(%rbx), %rsi
	leaq	44(%rbx), %rdx
	movl	40(%r15), %ecx
	callq	_hdmi5_audio_config
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DSSERR
	movq	24(%r15), %rdi
	callq	*32(%r15)
	movl	$0, (%r15)
LBB0_5:
	addq	$12, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, (%r15)
	je	LBB0_8
## %bb.6:
	cmpq	$0, 16(%r15)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_hdmi_start_audio_stream
LBB0_8:
	movl	$1, 4(%r15)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_9:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENTER hdmi_display_enable\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to power on device\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error restoring audio configuration: %d"

	.no_dead_strip	_hdmi_display_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_display_enable
_hdmi_display_enable:                   ; @hdmi_display_enable
	.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
	bl	_dssdev_to_hdmi
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DSSDBG
	add	x19, x20, #8
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_hdmi_power_on_full
	cbz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DSSERR
	b	LBB0_9
LBB0_2:
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.3:
	add	x0, x20, #52
	add	x1, x20, #48
	add	x2, x20, #44
	ldr	w3, [x20, #40]
	bl	_hdmi5_audio_config
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_5
; %bb.4:
	str	x0, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DSSERR
	ldp	x0, x8, [x20, #24]
	blr	x8
	str	wzr, [x20]
LBB0_5:
	add	x21, x20, #12
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
	cbz	w8, LBB0_8
; %bb.6:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_hdmi_start_audio_stream
LBB0_8:
	mov	w8, #1
	str	w8, [x20, #4]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_9:
	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
	b	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENTER hdmi_display_enable\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to power on device\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error restoring audio configuration: %d"

	.no_dead_strip	_hdmi_display_enable
.subsections_via_symbols
