	.file	"extr_cx25821-video0.c_video_release.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	video_release, @function
video_release:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR channel0[rip]
	mov	rbp, QWORD PTR [rdi]
	mov	edi, DWORD PTR [rax]
	mov	r13, QWORD PTR 16[rbp]
	lea	r12, 8[rbp]
	call	cx_write@PLT
	mov	esi, DWORD PTR RESOURCE_VIDEO0[rip]
	mov	rdi, rbp
	call	res_check@PLT
	test	rax, rax
	jne	.L12
.L2:
	mov	rsi, QWORD PTR 8[rbp]
	test	rsi, rsi
	je	.L3
	mov	rdi, r12
	call	buffer_release@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	kfree@PLT
.L3:
	mov	rdi, r12
	call	videobuf_mmap_free@PLT
	mov	rsi, rbp
	mov	rdi, r13
	call	v4l2_prio_close@PLT
	mov	QWORD PTR [rbx], 0
	mov	rdi, rbp
	call	kfree@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, r12
	call	videobuf_queue_cancel@PLT
	mov	edx, DWORD PTR RESOURCE_VIDEO0[rip]
	mov	rsi, rbp
	mov	rdi, r13
	call	res_free@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	video_release, .-video_release
	.comm	channel0,8,8
	.comm	RESOURCE_VIDEO0,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_cx25821-video0.c_video_release.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	video_release, %function
video_release:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	ldr	r4, [r0]
	ldr	r6, .L13+4
	mov	r1, #0
	mov	r5, r0
	ldr	r0, [r3]
	ldr	r8, [r4, #8]
	bl	cx_write
	mov	r0, r4
	ldr	r1, [r6]
	bl	res_check
	cmp	r0, #0
	add	r7, r4, #4
	bne	.L12
.L2:
	ldr	r1, [r4, #4]
	cmp	r1, #0
	beq	.L3
	mov	r0, r7
	bl	buffer_release
	ldr	r0, [r4, #4]
	bl	kfree
.L3:
	mov	r6, #0
	mov	r0, r7
	bl	videobuf_mmap_free
	mov	r1, r4
	mov	r0, r8
	bl	v4l2_prio_close
	mov	r0, r4
	str	r6, [r5]
	bl	kfree
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mov	r0, r7
	bl	videobuf_queue_cancel
	mov	r1, r4
	mov	r0, r8
	ldr	r2, [r6]
	bl	res_free
	b	.L2
.L14:
	.align	2
.L13:
	.word	channel0
	.word	RESOURCE_VIDEO0
	.size	video_release, .-video_release
	.comm	channel0,4,4
	.comm	RESOURCE_VIDEO0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
