	.file	"extr_venc.c_venc_power_on.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	venc_power_on, @function
venc_power_on:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	venc_runtime_get@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L12
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, rbp
	call	venc_reset@PLT
	mov	esi, DWORD PTR 24[rbp]
	mov	rdi, rbp
	call	venc_write_config@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	rsi, QWORD PTR 0[rbp]
	call	dss_set_venc_output@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, 1
	call	dss_set_dac_pwrdn_bgz@PLT
	mov	rax, QWORD PTR OMAP_DSS_VENC_TYPE_COMPOSITE[rip]
	xor	edx, edx
	cmp	QWORD PTR 0[rbp], rax
	mov	eax, DWORD PTR 8[rbp]
	setne	dl
	lea	edx, 2[rdx+rdx*2]
	test	eax, eax
	jne	.L4
	or	edx, 8
.L4:
	mov	esi, DWORD PTR VENC_OUTPUT_CONTROL[rip]
	mov	rdi, rbp
	call	venc_write_reg@PLT
	mov	edi, DWORD PTR 16[rbp]
	call	regulator_enable@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	lea	rdi, 20[rbp]
	call	dss_mgr_enable@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	edi, DWORD PTR 16[rbp]
	call	regulator_disable@PLT
.L5:
	mov	esi, DWORD PTR VENC_OUTPUT_CONTROL[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	venc_write_reg@PLT
	mov	edi, DWORD PTR 12[rbp]
	xor	esi, esi
	call	dss_set_dac_pwrdn_bgz@PLT
	mov	rdi, rbp
	call	venc_runtime_put@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	venc_power_on, .-venc_power_on
	.comm	VENC_OUTPUT_CONTROL,4,4
	.comm	OMAP_DSS_VENC_TYPE_COMPOSITE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_venc.c_venc_power_on.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	venc_power_on, %function
venc_power_on:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	venc_runtime_get
	subs	r5, r0, #0
	beq	.L12
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L12:
	mov	r0, r4
	bl	venc_reset
	ldr	r1, [r4, #20]
	mov	r0, r4
	bl	venc_write_config
	ldr	r1, [r4]
	ldr	r0, [r4, #8]
	bl	dss_set_venc_output
	mov	r1, #1
	ldr	r0, [r4, #8]
	bl	dss_set_dac_pwrdn_bgz
	ldr	r3, .L13
	ldr	r2, [r4]
	ldr	r1, [r3]
	ldr	r3, [r4, #4]
	cmp	r2, r1
	moveq	r2, #2
	ldr	r6, .L13+4
	movne	r2, #5
	cmp	r3, #0
	orreq	r2, r2, #8
	ldr	r1, [r6]
	mov	r0, r4
	bl	venc_write_reg
	ldr	r0, [r4, #12]
	bl	regulator_enable
	subs	r5, r0, #0
	bne	.L5
	add	r0, r4, #16
	bl	dss_mgr_enable
	subs	r5, r0, #0
	beq	.L1
	ldr	r0, [r4, #12]
	bl	regulator_disable
.L5:
	mov	r2, #0
	ldr	r1, [r6]
	mov	r0, r4
	bl	venc_write_reg
	mov	r1, #0
	ldr	r0, [r4, #8]
	bl	dss_set_dac_pwrdn_bgz
	mov	r0, r4
	bl	venc_runtime_put
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	OMAP_DSS_VENC_TYPE_COMPOSITE
	.word	VENC_OUTPUT_CONTROL
	.size	venc_power_on, .-venc_power_on
	.comm	VENC_OUTPUT_CONTROL,4,4
	.comm	OMAP_DSS_VENC_TYPE_COMPOSITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
