	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_hdmi_enable
_sun4i_hdmi_enable:                     ## @sun4i_hdmi_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r14
	callq	_drm_encoder_to_sun4i_hdmi
	movq	%rax, %r15
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movl	16(%r15), %edi
	callq	_clk_prepare_enable
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_sun4i_hdmi_setup_avi_infoframes
	movq	_SUN4I_HDMI_PKT_AVI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_SUN4I_HDMI_PKT_CTRL_TYPE
	movl	%eax, %r12d
	movq	_SUN4I_HDMI_PKT_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_SUN4I_HDMI_PKT_CTRL_TYPE
	orl	%eax, %r12d
	movq	(%r15), %rbx
	xorl	%edi, %edi
	callq	_SUN4I_HDMI_PKT_CTRL_REG
	addq	%rax, %rbx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_writel
	movq	_SUN4I_HDMI_VID_CTRL_ENABLE@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	movq	_SUN4I_HDMI_VID_CTRL_HDMI_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_2:
	orl	(%rax), %r14d
	movq	_SUN4I_HDMI_VID_CTRL_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enabling the HDMI Output\n"

	.comm	_SUN4I_HDMI_PKT_AVI,4,2         ## @SUN4I_HDMI_PKT_AVI
	.comm	_SUN4I_HDMI_PKT_END,4,2         ## @SUN4I_HDMI_PKT_END
	.comm	_SUN4I_HDMI_VID_CTRL_ENABLE,4,2 ## @SUN4I_HDMI_VID_CTRL_ENABLE
	.comm	_SUN4I_HDMI_VID_CTRL_HDMI_MODE,4,2 ## @SUN4I_HDMI_VID_CTRL_HDMI_MODE
	.comm	_SUN4I_HDMI_VID_CTRL_REG,8,3    ## @SUN4I_HDMI_VID_CTRL_REG
	.no_dead_strip	_sun4i_hdmi_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_hdmi_enable
_sun4i_hdmi_enable:                     ; @sun4i_hdmi_enable
	.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
	ldr	x8, [x0]
	ldr	x19, [x8]
	bl	_drm_encoder_to_sun4i_hdmi
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x20, #16]
	bl	_clk_prepare_enable
	mov	x0, x20
	mov	x1, x19
	bl	_sun4i_hdmi_setup_avi_infoframes
Lloh2:
	adrp	x8, _SUN4I_HDMI_PKT_AVI@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SUN4I_HDMI_PKT_AVI@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_SUN4I_HDMI_PKT_CTRL_TYPE
	mov	x19, x0
Lloh5:
	adrp	x8, _SUN4I_HDMI_PKT_END@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SUN4I_HDMI_PKT_END@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_SUN4I_HDMI_PKT_CTRL_TYPE
	orr	w19, w0, w19
	ldr	x21, [x20]
	mov	w0, #0
	bl	_SUN4I_HDMI_PKT_CTRL_REG
	add	x1, x0, x21
	mov	x0, x19
	bl	_writel
Lloh8:
	adrp	x8, _SUN4I_HDMI_VID_CTRL_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SUN4I_HDMI_VID_CTRL_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _SUN4I_HDMI_VID_CTRL_HDMI_MODE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SUN4I_HDMI_VID_CTRL_HDMI_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	ldp	x11, x10, [x20]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w0, w9, w8
Lloh14:
	adrp	x8, _SUN4I_HDMI_VID_CTRL_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SUN4I_HDMI_VID_CTRL_REG@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	add	x1, x8, x11
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enabling the HDMI Output\n"

	.comm	_SUN4I_HDMI_PKT_AVI,4,2         ; @SUN4I_HDMI_PKT_AVI
	.comm	_SUN4I_HDMI_PKT_END,4,2         ; @SUN4I_HDMI_PKT_END
	.comm	_SUN4I_HDMI_VID_CTRL_ENABLE,4,2 ; @SUN4I_HDMI_VID_CTRL_ENABLE
	.comm	_SUN4I_HDMI_VID_CTRL_HDMI_MODE,4,2 ; @SUN4I_HDMI_VID_CTRL_HDMI_MODE
	.comm	_SUN4I_HDMI_VID_CTRL_REG,8,3    ; @SUN4I_HDMI_VID_CTRL_REG
	.no_dead_strip	_sun4i_hdmi_enable
.subsections_via_symbols
