	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_release
_vpif_release:                          ## @vpif_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movq	24(%r12), %r14
	movq	32(%r14), %r13
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %rbx
	leaq	4(,%rbx,8), %r15
	addq	%r13, %r15
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r12), %rax
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	movq	%r12, %r15
	je	LBB0_9
## %bb.3:
	movq	%r13, %r12
	movq	%rbx, %r13
	movq	$0, 16(%r12,%rbx,8)
	movq	_VPIF_CHANNEL2_VIDEO@GOTPCREL(%rip), %rcx
	movq	(%r14), %rax
	cmpq	%rax, (%rcx)
	jne	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	callq	_enable_channel2
	xorl	%edi, %edi
	callq	_channel2_intr_enable
	movq	(%r14), %rax
LBB0_5:
	leaq	(%r12,%r13,8), %rbx
	movq	_VPIF_CHANNEL3_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_7
## %bb.6:
	cmpl	$2, (%rbx)
	jne	LBB0_8
LBB0_7:
	xorl	%edi, %edi
	callq	_enable_channel3
	xorl	%edi, %edi
	callq	_channel3_intr_enable
LBB0_8:
	movl	$0, (%rbx)
	leaq	(%r12,%r13,8), %rbx
	addq	$12, %rbx
	movq	%rbx, %rdi
	callq	_videobuf_queue_cancel
	movq	%rbx, %rdi
	callq	_videobuf_mmap_free
	movq	_config_params@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 8(%r12,%r13,8)
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	leaq	24(%r14), %rdi
	callq	_atomic_dec
	cmpq	$0, (%r15)
	je	LBB0_11
## %bb.10:
	movq	$0, 16(%r14)
LBB0_11:
	addq	$8, %r14
	leaq	8(%r15), %rsi
	movq	%r14, %rdi
	callq	_v4l2_prio_close
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	$0, (%r15)
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_VPIF_CHANNEL2_VIDEO,8,3        ## @VPIF_CHANNEL2_VIDEO
	.comm	_VPIF_CHANNEL3_VIDEO,8,3        ## @VPIF_CHANNEL3_VIDEO
	.comm	_config_params,8,3              ## @config_params
	.no_dead_strip	_vpif_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_release
_vpif_release:                          ; @vpif_release
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	ldr	x19, [x0]
	ldr	x23, [x19, #24]
	ldr	x22, [x23, #32]
Lloh0:
	adrp	x26, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh1:
	ldr	x26, [x26, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
	ldr	x24, [x26]
	mov	w8, #24
	madd	x25, x24, x8, x22
	add	x21, x25, #4
	mov	x0, x21
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x9, [x26]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_9
; %bb.3:
	mov	w8, #24
	madd	x8, x24, x8, x22
	str	xzr, [x8, #16]
Lloh5:
	adrp	x8, _VPIF_CHANNEL2_VIDEO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VPIF_CHANNEL2_VIDEO@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x8]
	ldr	x8, [x23]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	bl	_enable_channel2
	mov	w0, #0
	bl	_channel2_intr_enable
	ldr	x8, [x23]
LBB0_5:
Lloh8:
	adrp	x9, _VPIF_CHANNEL3_VIDEO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VPIF_CHANNEL3_VIDEO@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x25]
	cmp	w8, #2
	b.ne	LBB0_8
LBB0_7:
	mov	w0, #0
	bl	_enable_channel3
	mov	w0, #0
	bl	_channel3_intr_enable
LBB0_8:
	str	wzr, [x25]
	mov	w8, #24
	madd	x24, x24, x8, x22
	add	x22, x24, #12
	mov	x0, x22
	bl	_videobuf_queue_cancel
	mov	x0, x22
	bl	_videobuf_mmap_free
Lloh11:
	adrp	x8, _config_params@GOTPAGE
Lloh12:
	ldr	x8, [x8, _config_params@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x23]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x24, #8]
LBB0_9:
	mov	x0, x21
	bl	_mutex_unlock
	add	x0, x23, #24
	bl	_atomic_dec
	ldr	x8, [x19]
	cbz	x8, LBB0_11
; %bb.10:
	str	xzr, [x23, #16]
LBB0_11:
	add	x0, x23, #8
	add	x1, x19, #8
	bl	_v4l2_prio_close
	str	xzr, [x20]
	str	xzr, [x19]
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_VPIF_CHANNEL2_VIDEO,8,3        ; @VPIF_CHANNEL2_VIDEO
	.comm	_VPIF_CHANNEL3_VIDEO,8,3        ; @VPIF_CHANNEL3_VIDEO
	.comm	_config_params,8,3              ; @config_params
	.no_dead_strip	_vpif_release
.subsections_via_symbols
