	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_hdmi_rockchip_encoder_enable
_dw_hdmi_rockchip_encoder_enable:       ## @dw_hdmi_rockchip_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_rockchip_hdmi
	movq	%rax, %r15
	movq	16(%rax), %rax
	cmpq	$0, (%rax)
	js	LBB0_6
## %bb.1:
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_drm_of_encoder_active_endpoint_id
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movq	16(%r15), %rax
	movl	8(%rax,%rcx,4), %r14d
	movl	8(%r15), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movl	24(%r15), %edi
	movq	16(%r15), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edx
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	leaq	L_.str.3(%rip), %rbx
	jmp	LBB0_5
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEV_ERROR                  ## TAILCALL
LBB0_3:
	leaq	L_.str.4(%rip), %rbx
LBB0_5:
	movl	8(%r15), %edi
	callq	_clk_disable_unprepare
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEV_DEBUG                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable grfclk %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not write to GRF: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"vop %s output to hdmi\n"

L_.str.3:                               ## @.str.3
	.asciz	"LIT"

L_.str.4:                               ## @.str.4
	.asciz	"BIG"

	.no_dead_strip	_dw_hdmi_rockchip_encoder_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_hdmi_rockchip_encoder_enable
_dw_hdmi_rockchip_encoder_enable:       ; @dw_hdmi_rockchip_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	x20, x0
	bl	_to_rockchip_hdmi
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	tbnz	x8, #63, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_drm_of_encoder_active_endpoint_id
	ldr	x8, [x19, #16]
	cmp	w0, #0
	mov	w9, #12
	mov	w10, #8
	csel	x9, x10, x9, eq
	ldr	w20, [x8, x9]
	ldr	w0, [x19, #8]
	bl	_clk_prepare_enable
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	mov	x2, x20
	bl	_regmap_write
	cbz	w0, LBB0_6
; %bb.3:
	mov	x2, x0
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DRM_DEV_ERROR
Lloh2:
	adrp	x20, l_.str.3@PAGE
Lloh3:
	add	x20, x20, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x2, x0
	ldr	x0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_DEV_ERROR
LBB0_6:
Lloh6:
	adrp	x20, l_.str.4@PAGE
Lloh7:
	add	x20, x20, l_.str.4@PAGEOFF
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_clk_disable_unprepare
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_DEV_DEBUG
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable grfclk %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not write to GRF: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"vop %s output to hdmi\n"

l_.str.3:                               ; @.str.3
	.asciz	"LIT"

l_.str.4:                               ; @.str.4
	.asciz	"BIG"

	.no_dead_strip	_dw_hdmi_rockchip_encoder_enable
.subsections_via_symbols
