	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3066_hdmi_encoder_disable
_rk3066_hdmi_encoder_disable:           ## @rk3066_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
	callq	_to_rk3066_hdmi
	movq	%rax, %rbx
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_DEBUG
	movq	%rbx, %rdi
	callq	_rk3066_hdmi_get_power_mode
	movq	_HDMI_SYS_POWER_MODE_E@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_HDMI_VIDEO_CTRL2@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_HDMI_VIDEO_AUDIO_DISABLE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hdmi_writeb
	movl	(%r14), %esi
	movq	_HDMI_AUDIO_CP_LOGIC_RESET_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_HDMI_AUDIO_CP_LOGIC_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_hdmi_modb
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$510, %esi                      ## imm = 0x1FE
	callq	_usleep_range
LBB0_2:
	movq	_HDMI_SYS_POWER_MODE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rk3066_hdmi_set_power_mode     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdmi encoder disable\n"

	.comm	_HDMI_SYS_POWER_MODE_E,8,3      ## @HDMI_SYS_POWER_MODE_E
	.comm	_HDMI_VIDEO_CTRL2,4,2           ## @HDMI_VIDEO_CTRL2
	.comm	_HDMI_VIDEO_AUDIO_DISABLE_MASK,4,2 ## @HDMI_VIDEO_AUDIO_DISABLE_MASK
	.comm	_HDMI_AUDIO_CP_LOGIC_RESET_MASK,4,2 ## @HDMI_AUDIO_CP_LOGIC_RESET_MASK
	.comm	_HDMI_AUDIO_CP_LOGIC_RESET,4,2  ## @HDMI_AUDIO_CP_LOGIC_RESET
	.comm	_HDMI_SYS_POWER_MODE_A,4,2      ## @HDMI_SYS_POWER_MODE_A
	.no_dead_strip	_rk3066_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 rk3066_hdmi_encoder_disable
_rk3066_hdmi_encoder_disable:           ; @rk3066_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
	bl	_to_rk3066_hdmi
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_DEBUG
	mov	x0, x19
	bl	_rk3066_hdmi_get_power_mode
Lloh2:
	adrp	x8, _HDMI_SYS_POWER_MODE_E@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HDMI_SYS_POWER_MODE_E@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x20, _HDMI_VIDEO_CTRL2@GOTPAGE
Lloh6:
	ldr	x20, [x20, _HDMI_VIDEO_CTRL2@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh7:
	adrp	x8, _HDMI_VIDEO_AUDIO_DISABLE_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HDMI_VIDEO_AUDIO_DISABLE_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hdmi_writeb
	ldr	w1, [x20]
Lloh10:
	adrp	x8, _HDMI_AUDIO_CP_LOGIC_RESET_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HDMI_AUDIO_CP_LOGIC_RESET_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _HDMI_AUDIO_CP_LOGIC_RESET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HDMI_AUDIO_CP_LOGIC_RESET@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_hdmi_modb
	mov	w0, #500
	mov	w1, #510
	bl	_usleep_range
LBB0_2:
Lloh16:
	adrp	x8, _HDMI_SYS_POWER_MODE_A@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HDMI_SYS_POWER_MODE_A@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rk3066_hdmi_set_power_mode
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdmi encoder disable\n"

	.comm	_HDMI_SYS_POWER_MODE_E,8,3      ; @HDMI_SYS_POWER_MODE_E
	.comm	_HDMI_VIDEO_CTRL2,4,2           ; @HDMI_VIDEO_CTRL2
	.comm	_HDMI_VIDEO_AUDIO_DISABLE_MASK,4,2 ; @HDMI_VIDEO_AUDIO_DISABLE_MASK
	.comm	_HDMI_AUDIO_CP_LOGIC_RESET_MASK,4,2 ; @HDMI_AUDIO_CP_LOGIC_RESET_MASK
	.comm	_HDMI_AUDIO_CP_LOGIC_RESET,4,2  ; @HDMI_AUDIO_CP_LOGIC_RESET
	.comm	_HDMI_SYS_POWER_MODE_A,4,2      ; @HDMI_SYS_POWER_MODE_A
	.no_dead_strip	_rk3066_hdmi_encoder_disable
.subsections_via_symbols
