	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmi_power_on_full
_hdmi_power_on_full:                    ## @hdmi_power_on_full
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	callq	_hdmi_power_on_core
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	leaq	4(%rbx), %r14
	movq	_HDMI_IRQ_CORE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	notl	%esi
	movq	%r14, %rdi
	callq	_hdmi_wp_clear_irqenable
	movl	(%r15), %esi
	notl	%esi
	movq	%r14, %rdi
	callq	_hdmi_wp_set_irqstatus
	movl	20(%rbx), %edx
	movl	24(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DSSDBG
	movl	12(%rbx), %eax
	movq	_DISPLAY_FLAGS_DOUBLECLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	16(%rbx), %ecx
	setne	%cl
	shll	%cl, %eax
	movl	(%rbx), %edi
	addl	%eax, %eax
	leal	(%rax,%rax,4), %r15d
	callq	_clk_get_rate
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_dss_pll_calc_b
	movq	%rbx, %rdi
	callq	_dss_pll_enable
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_DSSERR
	jmp	LBB0_14
LBB0_3:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_dss_pll_set_config
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	callq	_DSSERR
	jmp	LBB0_13
LBB0_5:
	leaq	32(%rbx), %rdi
	movl	-40(%rbp), %esi
	movq	-48(%rbp), %rax
	movl	(%rax), %edx
	callq	_hdmi_phy_configure
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DSSDBG
	jmp	LBB0_13
LBB0_7:
	movq	_HDMI_PHYPWRCMD_LDOON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hdmi_wp_set_phy_pwr
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	leaq	12(%rbx), %rdx
	leaq	28(%rbx), %rdi
	movq	%r14, %rsi
	callq	_hdmi4_configure
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_dss_mgr_enable
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	callq	_hdmi_wp_video_start
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%r15, %rdi
	callq	_dss_mgr_disable
LBB0_12:
	movq	_HDMI_PHYPWRCMD_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hdmi_wp_set_phy_pwr
LBB0_13:
	movq	%rbx, %rdi
	callq	_dss_pll_disable
LBB0_14:
	movq	%rbx, %rdi
	callq	_hdmi_power_off_core
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_HDMI_IRQ_LINK_CONNECT@GOTPCREL(%rip), %rax
	movq	_HDMI_IRQ_LINK_DISCONNECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_hdmi_wp_set_irqenable
	xorl	%eax, %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_IRQ_CORE,4,2              ## @HDMI_IRQ_CORE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdmi_power_on hactive= %d vactive = %d\n"

	.comm	_DISPLAY_FLAGS_DOUBLECLK,4,2    ## @DISPLAY_FLAGS_DOUBLECLK
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable PLL\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to configure PLL\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to configure PHY\n"

	.comm	_HDMI_PHYPWRCMD_LDOON,4,2       ## @HDMI_PHYPWRCMD_LDOON
	.comm	_HDMI_IRQ_LINK_CONNECT,4,2      ## @HDMI_IRQ_LINK_CONNECT
	.comm	_HDMI_IRQ_LINK_DISCONNECT,4,2   ## @HDMI_IRQ_LINK_DISCONNECT
	.comm	_HDMI_PHYPWRCMD_OFF,4,2         ## @HDMI_PHYPWRCMD_OFF
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_hdmi_power_on_full
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_power_on_full
_hdmi_power_on_full:                    ; @hdmi_power_on_full
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	stp	xzr, xzr, [sp, #16]
	bl	_hdmi_power_on_core
	cbnz	w0, LBB0_14
; %bb.1:
	add	x20, x19, #4
Lloh0:
	adrp	x21, _HDMI_IRQ_CORE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HDMI_IRQ_CORE@GOTPAGEOFF]
	ldr	w8, [x21]
	mvn	w1, w8
	mov	x0, x20
	bl	_hdmi_wp_clear_irqenable
	ldr	w8, [x21]
	mvn	w1, w8
	mov	x0, x20
	bl	_hdmi_wp_set_irqstatus
	ldp	w9, w8, [x19, #20]
	stp	x8, x9, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DSSDBG
	mov	x21, x19
	ldr	w8, [x21, #12]!
	ldr	w9, [x19, #16]
Lloh4:
	adrp	x10, _DISPLAY_FLAGS_DOUBLECLK@GOTPAGE
Lloh5:
	ldr	x10, [x10, _DISPLAY_FLAGS_DOUBLECLK@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w9, ne
	lsl	w8, w8, w9
	add	w8, w8, w8, lsl #2
	lsl	w22, w8, #1
	ldr	w0, [x19]
	bl	_clk_get_rate
	mov	x1, x0
	add	x3, sp, #16
	mov	x0, x19
	mov	x2, x22
	bl	_dss_pll_calc_b
	mov	x0, x19
	bl	_dss_pll_enable
	cbz	w0, LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DSSERR
	b	LBB0_13
LBB0_3:
	add	x1, sp, #16
	mov	x0, x19
	bl	_dss_pll_set_config
	cbz	w0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DSSERR
	b	LBB0_12
LBB0_5:
	add	x0, x19, #32
	ldr	w1, [sp, #24]
	ldr	x8, [sp, #16]
	ldr	w2, [x8]
	bl	_hdmi_phy_configure
	cbz	w0, LBB0_7
; %bb.6:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DSSDBG
	b	LBB0_12
LBB0_7:
Lloh13:
	adrp	x8, _HDMI_PHYPWRCMD_LDOON@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HDMI_PHYPWRCMD_LDOON@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hdmi_wp_set_phy_pwr
	cbnz	w0, LBB0_12
; %bb.8:
	add	x0, x19, #28
	mov	x1, x20
	mov	x2, x21
	bl	_hdmi4_configure
	add	x21, x19, #8
	mov	x0, x21
	bl	_dss_mgr_enable
	cbnz	w0, LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_hdmi_wp_video_start
	cbz	w0, LBB0_15
; %bb.10:
	mov	x0, x21
	bl	_dss_mgr_disable
LBB0_11:
Lloh16:
	adrp	x8, _HDMI_PHYPWRCMD_OFF@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HDMI_PHYPWRCMD_OFF@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hdmi_wp_set_phy_pwr
LBB0_12:
	mov	x0, x19
	bl	_dss_pll_disable
LBB0_13:
	mov	x0, x19
	bl	_hdmi_power_off_core
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
Lloh22:
	adrp	x8, _HDMI_IRQ_LINK_CONNECT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HDMI_IRQ_LINK_CONNECT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _HDMI_IRQ_LINK_DISCONNECT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _HDMI_IRQ_LINK_DISCONNECT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_hdmi_wp_set_irqenable
	mov	w0, #0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_IRQ_CORE,4,2              ; @HDMI_IRQ_CORE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdmi_power_on hactive= %d vactive = %d\n"

	.comm	_DISPLAY_FLAGS_DOUBLECLK,4,2    ; @DISPLAY_FLAGS_DOUBLECLK
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable PLL\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to configure PLL\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to configure PHY\n"

	.comm	_HDMI_PHYPWRCMD_LDOON,4,2       ; @HDMI_PHYPWRCMD_LDOON
	.comm	_HDMI_IRQ_LINK_CONNECT,4,2      ; @HDMI_IRQ_LINK_CONNECT
	.comm	_HDMI_IRQ_LINK_DISCONNECT,4,2   ; @HDMI_IRQ_LINK_DISCONNECT
	.comm	_HDMI_PHYPWRCMD_OFF,4,2         ; @HDMI_PHYPWRCMD_OFF
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_hdmi_power_on_full
.subsections_via_symbols
