	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap24xxcam_release
_omap24xxcam_release:                   ## @omap24xxcam_release
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	8(%r15), %rbx
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	callq	_atomic_inc
	xorl	%eax, %eax
	callq	_flush_scheduled_work
	movq	%r15, %rdi
	callq	_videobuf_streamoff
	leaq	8(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpq	%r14, 32(%rbx)
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_3
LBB0_1:
	movq	$0, 32(%rbx)
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	24(%rbx), %rdi
	leaq	L_.str(%rip), %rdx
	xorl	%esi, %esi
	callq	_sysfs_notify
LBB0_3:
	movq	%r13, %rdi
	callq	_atomic_dec
	movq	%r15, %rdi
	callq	_omap24xxcam_vbq_free_mmap_buffers
	xorl	%eax, %eax
	callq	_flush_scheduled_work
	movq	%r12, %rdi
	callq	_mutex_lock
	leaq	12(%rbx), %rdi
	callq	_atomic_dec_return
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_omap24xxcam_sensor_disable
	movq	%rbx, %rdi
	callq	_omap24xxcam_poweron_reset
LBB0_5:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	$0, (%r14)
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_module_put
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"streaming"

	.no_dead_strip	_omap24xxcam_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap24xxcam_release
_omap24xxcam_release:                   ; @omap24xxcam_release
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x19, [x0]
	ldr	x21, [x19, #8]
	add	x23, x21, #16
	mov	x0, x23
	bl	_atomic_inc
	bl	_flush_scheduled_work
	mov	x0, x19
	bl	_videobuf_streamoff
	add	x22, x21, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x21, #32]
	cmp	x8, x20
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_3
LBB0_2:
	str	xzr, [x21, #32]
	mov	x0, x22
	bl	_mutex_unlock
	ldr	x0, [x21, #24]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, #0
	bl	_sysfs_notify
LBB0_3:
	mov	x0, x23
	bl	_atomic_dec
	mov	x0, x19
	bl	_omap24xxcam_vbq_free_mmap_buffers
	bl	_flush_scheduled_work
	mov	x0, x22
	bl	_mutex_lock
	add	x0, x21, #12
	bl	_atomic_dec_return
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_omap24xxcam_sensor_disable
	mov	x0, x21
	bl	_omap24xxcam_poweron_reset
LBB0_5:
	mov	x0, x22
	bl	_mutex_unlock
	str	xzr, [x20]
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_module_put
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"streaming"

	.no_dead_strip	_omap24xxcam_release
.subsections_via_symbols
