	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3066_hdmi_encoder_enable
_rk3066_hdmi_encoder_enable:            ## @rk3066_hdmi_encoder_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_to_rk3066_hdmi
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_drm_of_encoder_active_endpoint_id
	movq	_HDMI_VIDEO_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	shll	$16, %ecx
	testl	%eax, %eax
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.1(%rip), %r14
	cmoveq	%rsi, %r14
	cmovel	%eax, %edx
	orl	%ecx, %edx
	movl	16(%rbx), %edi
	movq	_GRF_SOC_CON0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_DRM_DEV_DEBUG
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rk3066_hdmi_setup              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_VIDEO_SEL,4,2             ## @HDMI_VIDEO_SEL
	.comm	_GRF_SOC_CON0,4,2               ## @GRF_SOC_CON0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdmi encoder enable select: vop%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"1"

L_.str.2:                               ## @.str.2
	.asciz	"0"

	.no_dead_strip	_rk3066_hdmi_encoder_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3066_hdmi_encoder_enable
_rk3066_hdmi_encoder_enable:            ; @rk3066_hdmi_encoder_enable
	.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
	mov	x19, x0
	bl	_to_rk3066_hdmi
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_drm_of_encoder_active_endpoint_id
Lloh0:
	adrp	x8, _HDMI_VIDEO_SEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDMI_VIDEO_SEL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, l_.str.1@PAGE
Lloh4:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh5:
	adrp	x10, l_.str.2@PAGE
Lloh6:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w0, #0
	csel	w11, wzr, w8, eq
	csel	x19, x10, x9, eq
	orr	w2, w11, w8, lsl #16
	ldr	w0, [x20, #16]
Lloh7:
	adrp	x8, _GRF_SOC_CON0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GRF_SOC_CON0@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_regmap_write
	ldr	x0, [x20, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_DRM_DEV_DEBUG
	mov	x0, x20
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rk3066_hdmi_setup
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_VIDEO_SEL,4,2             ; @HDMI_VIDEO_SEL
	.comm	_GRF_SOC_CON0,4,2               ; @GRF_SOC_CON0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdmi encoder enable select: vop%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"1"

l_.str.2:                               ; @.str.2
	.asciz	"0"

	.no_dead_strip	_rk3066_hdmi_encoder_enable
.subsections_via_symbols
