	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venc_power_on
_venc_power_on:                         ## @venc_power_on
	.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, %r14
	callq	_venc_runtime_get
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%r14, %rdi
	callq	_venc_reset
	movl	24(%r14), %esi
	movq	%r14, %rdi
	callq	_venc_write_config
	movl	12(%r14), %edi
	movq	(%r14), %rsi
	callq	_dss_set_venc_output
	movl	12(%r14), %edi
	movl	$1, %esi
	callq	_dss_set_dac_pwrdn_bgz
	movq	(%r14), %rax
	movq	_OMAP_DSS_VENC_TYPE_COMPOSITE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	setne	%dl
	leal	(%rdx,%rdx,2), %eax
	xorl	%edx, %edx
	cmpl	$0, 8(%r14)
	sete	%dl
	shll	$3, %edx
	orl	%eax, %edx
	addl	$2, %edx
	movq	_VENC_OUTPUT_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_venc_write_reg
	movl	16(%r14), %edi
	callq	_regulator_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	leaq	20(%r14), %rdi
	callq	_dss_mgr_enable
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movl	16(%r14), %edi
	callq	_regulator_disable
LBB0_5:
	movl	(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_venc_write_reg
	movl	12(%r14), %edi
	xorl	%esi, %esi
	callq	_dss_set_dac_pwrdn_bgz
	movq	%r14, %rdi
	callq	_venc_runtime_put
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_DSS_VENC_TYPE_COMPOSITE,8,3 ## @OMAP_DSS_VENC_TYPE_COMPOSITE
	.comm	_VENC_OUTPUT_CONTROL,4,2        ## @VENC_OUTPUT_CONTROL
	.no_dead_strip	_venc_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venc_power_on
_venc_power_on:                         ; @venc_power_on
	.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
	mov	x19, x0
	bl	_venc_runtime_get
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_venc_reset
	ldr	w1, [x19, #24]
	mov	x0, x19
	bl	_venc_write_config
	ldr	w0, [x19, #12]
	ldr	x1, [x19]
	bl	_dss_set_venc_output
	ldr	w0, [x19, #12]
	mov	w1, #1
	bl	_dss_set_dac_pwrdn_bgz
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _OMAP_DSS_VENC_TYPE_COMPOSITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OMAP_DSS_VENC_TYPE_COMPOSITE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #5
	mov	w9, #2
	csel	w8, w9, w8, eq
	ldr	w9, [x19, #8]
	orr	w10, w8, #0x8
	cmp	w9, #0
	csel	w2, w10, w8, eq
Lloh3:
	adrp	x21, _VENC_OUTPUT_CONTROL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _VENC_OUTPUT_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_venc_write_reg
	ldr	w0, [x19, #16]
	bl	_regulator_enable
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.2:
	add	x0, x19, #20
	bl	_dss_mgr_enable
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x19, #16]
	bl	_regulator_disable
LBB0_4:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_venc_write_reg
	ldr	w0, [x19, #12]
	mov	w1, #0
	bl	_dss_set_dac_pwrdn_bgz
	mov	x0, x19
	bl	_venc_runtime_put
LBB0_5:
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_DSS_VENC_TYPE_COMPOSITE,8,3 ; @OMAP_DSS_VENC_TYPE_COMPOSITE
	.comm	_VENC_OUTPUT_CONTROL,4,2        ; @VENC_OUTPUT_CONTROL
	.no_dead_strip	_venc_power_on
.subsections_via_symbols
