	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_device_release
_v4l2_device_release:                   ## @v4l2_device_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_to_video_device
	movq	%rax, %rbx
	movq	48(%rax), %r14
	movq	_videodev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_video_devices@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	xorl	%edi, %edi
	cmpq	%rbx, (%rax,%rcx,8)
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	_videodev_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_1:
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	40(%rbx), %rdi
	callq	_cdev_del
	movq	$0, 40(%rbx)
	movq	%rbx, %rdi
	callq	_devnode_clear
	movq	_videodev_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	(%r14), %r15
	movq	%rbx, %rdi
	callq	*16(%rbx)
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	testq	%r14, %r14
	je	LBB0_3
## %bb.5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_device_put                ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_videodev_lock,4,2              ## @videodev_lock
	.comm	_video_devices,8,3              ## @video_devices
	.comm	_MEDIA_ENT_F_UNKNOWN,8,3        ## @MEDIA_ENT_F_UNKNOWN
	.comm	_VFL_DIR_M2M,8,3                ## @VFL_DIR_M2M
	.no_dead_strip	_v4l2_device_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_device_release
_v4l2_device_release:                   ; @v4l2_device_release
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_to_video_device
	mov	x20, x0
	ldr	x19, [x0, #48]
Lloh0:
	adrp	x0, _videodev_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _videodev_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x21, _video_devices@GOTPAGE
Lloh3:
	ldr	x21, [x21, _video_devices@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x20]
	ldr	x8, [x8, x9, lsl #3]
	cmp	x8, x20
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x0, _videodev_lock@GOTPAGE
Lloh5:
	ldr	x0, [x0, _videodev_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_2:
	ldr	x8, [x21]
	ldr	x9, [x20]
	str	xzr, [x8, x9, lsl #3]
	ldr	x0, [x20, #40]
	bl	_cdev_del
	str	xzr, [x20, #40]
	mov	x0, x20
	bl	_devnode_clear
Lloh6:
	adrp	x0, _videodev_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _videodev_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	x21, [x19]
	ldr	x8, [x20, #16]
	mov	x0, x20
	blr	x8
	cmp	x21, #0
	ccmp	x19, #0, #4, ne
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_v4l2_device_put
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_videodev_lock,4,2              ; @videodev_lock
	.comm	_video_devices,8,3              ; @video_devices
	.comm	_MEDIA_ENT_F_UNKNOWN,8,3        ; @MEDIA_ENT_F_UNKNOWN
	.comm	_VFL_DIR_M2M,8,3                ; @VFL_DIR_M2M
	.no_dead_strip	_v4l2_device_release
.subsections_via_symbols
