	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_hdmi_encoder_disable
_vc4_hdmi_encoder_disable:              ## @vc4_hdmi_encoder_disable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rdi
	callq	_to_vc4_dev
	movq	(%rax), %r14
	movq	_VC4_HDMI_RAM_PACKET_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_HDMI_WRITE
	movq	_VC4_HDMI_TX_PHY_RESET_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$983040, %esi                   ## imm = 0xF0000
	callq	_HDMI_WRITE
	movq	_VC4_HD_VID_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_HD_READ
	movq	_VC4_HD_VID_CTL_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	callq	_HD_WRITE
	movl	8(%r14), %edi
	callq	_clk_disable_unprepare
	movq	(%r14), %rdi
	callq	_pm_runtime_put
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VC4_HDMI_RAM_PACKET_CONFIG,4,2 ## @VC4_HDMI_RAM_PACKET_CONFIG
	.comm	_VC4_HDMI_TX_PHY_RESET_CTL,4,2  ## @VC4_HDMI_TX_PHY_RESET_CTL
	.comm	_VC4_HD_VID_CTL,4,2             ## @VC4_HD_VID_CTL
	.comm	_VC4_HD_VID_CTL_ENABLE,4,2      ## @VC4_HD_VID_CTL_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to release power domain: %d\n"

	.no_dead_strip	_vc4_hdmi_encoder_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_hdmi_encoder_disable
_vc4_hdmi_encoder_disable:              ; @vc4_hdmi_encoder_disable
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x0, [x0]
	bl	_to_vc4_dev
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _VC4_HDMI_RAM_PACKET_CONFIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC4_HDMI_RAM_PACKET_CONFIG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_HDMI_WRITE
Lloh3:
	adrp	x8, _VC4_HDMI_TX_PHY_RESET_CTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VC4_HDMI_TX_PHY_RESET_CTL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #983040
	bl	_HDMI_WRITE
Lloh6:
	adrp	x8, _VC4_HD_VID_CTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC4_HD_VID_CTL@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_HD_READ
Lloh9:
	adrp	x8, _VC4_HD_VID_CTL_ENABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VC4_HD_VID_CTL_ENABLE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w1, w0, w8
	mov	x0, x19
	bl	_HD_WRITE
	ldr	w0, [x20, #8]
	bl	_clk_disable_unprepare
	ldr	x0, [x20]
	bl	_pm_runtime_put
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_ERROR
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VC4_HDMI_RAM_PACKET_CONFIG,4,2 ; @VC4_HDMI_RAM_PACKET_CONFIG
	.comm	_VC4_HDMI_TX_PHY_RESET_CTL,4,2  ; @VC4_HDMI_TX_PHY_RESET_CTL
	.comm	_VC4_HD_VID_CTL,4,2             ; @VC4_HD_VID_CTL
	.comm	_VC4_HD_VID_CTL_ENABLE,4,2      ; @VC4_HD_VID_CTL_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to release power domain: %d\n"

	.no_dead_strip	_vc4_hdmi_encoder_disable
.subsections_via_symbols
