	.file	"extr_vce_v2_0.c_vce_v2_0_stop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"vce is not idle \n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"VCE is busy, Can't set clock gating"
	.text
	.p2align 4
	.type	vce_v2_0_stop, @function
vce_v2_0_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	vce_v2_0_lmi_clean@PLT
	test	rax, rax
	jne	.L10
	mov	rdi, rbp
	call	vce_v2_0_wait_for_idle@PLT
	test	rax, rax
	jne	.L11
	mov	edi, DWORD PTR mmVCE_LMI_CTRL2[rip]
	mov	edx, -257
	mov	esi, 256
	mov	ebx, 100
	call	WREG32_P@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, 1
	call	mdelay@PLT
	sub	ebx, 1
	je	.L5
.L6:
	mov	edi, DWORD PTR mmVCE_LMI_STATUS[rip]
	call	RREG32@PLT
	test	eax, 576
	je	.L12
.L5:
	mov	edi, DWORD PTR mmVCE_VCPU_CNTL[rip]
	mov	edx, -524290
	xor	esi, esi
	call	WREG32_P@PLT
	mov	edi, DWORD PTR mmVCE_SOFT_RESET[rip]
	mov	edx, -2
	mov	esi, 1
	call	WREG32_P@PLT
	mov	edi, DWORD PTR mmVCE_STATUS[rip]
	xor	esi, esi
	call	WREG32@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	DRM_INFO@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	DRM_INFO@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	vce_v2_0_stop, .-vce_v2_0_stop
	.comm	mmVCE_VCPU_CNTL,4,4
	.comm	mmVCE_STATUS,4,4
	.comm	mmVCE_SOFT_RESET,4,4
	.comm	mmVCE_LMI_STATUS,4,4
	.comm	mmVCE_LMI_CTRL2,4,4
	.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_vce_v2_0.c_vce_v2_0_stop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"vce is not idle \012\000"
	.align	2
.LC1:
	.ascii	"VCE is busy, Can't set clock gating\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vce_v2_0_stop, %function
vce_v2_0_stop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	vce_v2_0_lmi_clean
	cmp	r0, #0
	bne	.L10
	mov	r0, r4
	bl	vce_v2_0_wait_for_idle
	cmp	r0, #0
	bne	.L11
	ldr	r3, .L13
	mvn	r2, #256
	mov	r1, #256
	ldr	r0, [r3]
	bl	WREG32_P
	mov	r4, #100
	ldr	r5, .L13+4
	b	.L6
.L12:
	mov	r0, #1
	bl	mdelay
	subs	r4, r4, #1
	beq	.L5
.L6:
	ldr	r0, [r5]
	bl	RREG32
	tst	r0, #576
	beq	.L12
.L5:
	ldr	r3, .L13+8
	mov	r1, #0
	ldr	r2, .L13+12
	ldr	r0, [r3]
	bl	WREG32_P
	ldr	r3, .L13+16
	mvn	r2, #1
	mov	r1, #1
	ldr	r0, [r3]
	bl	WREG32_P
	ldr	r3, .L13+20
	mov	r1, #0
	ldr	r0, [r3]
	bl	WREG32
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L11:
	ldr	r0, .L13+24
	bl	DRM_INFO
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r0, .L13+28
	bl	DRM_INFO
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	mmVCE_LMI_CTRL2
	.word	mmVCE_LMI_STATUS
	.word	mmVCE_VCPU_CNTL
	.word	-524290
	.word	mmVCE_SOFT_RESET
	.word	mmVCE_STATUS
	.word	.LC1
	.word	.LC0
	.size	vce_v2_0_stop, .-vce_v2_0_stop
	.comm	mmVCE_VCPU_CNTL,4,4
	.comm	mmVCE_STATUS,4,4
	.comm	mmVCE_SOFT_RESET,4,4
	.comm	mmVCE_LMI_STATUS,4,4
	.comm	mmVCE_LMI_CTRL2,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
