	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dev_close
_dev_close:                             ## @dev_close
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	_D_STREAM@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	cmpq	%r14, 32(%r15)
	jne	LBB0_6
## %bb.3:
	cmpq	$0, 24(%r15)
	je	LBB0_5
## %bb.4:
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	$0, 16(%r15)
	movq	%r15, %rdi
	callq	_gspca_stream_off
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_5:
	movq	%r15, %rdi
	callq	_frame_free
LBB0_6:
	movq	$0, (%r14)
	movl	4(%r15), %edi
	callq	_module_put
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PDEBUG
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%s] close"

	.comm	_current,8,3                    ## @current
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"close done"

	.no_dead_strip	_dev_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dev_close
_dev_close:                             ; @dev_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x22, _D_STREAM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _D_STREAM@GOTPAGEOFF]
	ldr	x19, [x0]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _current@GOTPAGE
Lloh3:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	ldr	x8, [x19, #32]
	cmp	x8, x20
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
; %bb.4:
	add	x21, x19, #8
	mov	x0, x21
	bl	_mutex_lock
	str	xzr, [x19, #16]
	mov	x0, x19
	bl	_gspca_stream_off
	mov	x0, x21
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x19
	bl	_frame_free
LBB0_6:
	str	xzr, [x20]
	ldr	w0, [x19, #4]
	bl	_module_put
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w0, [x22]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
	mov	w0, #0
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%s] close"

	.comm	_current,8,3                    ; @current
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"close done"

	.no_dead_strip	_dev_close
.subsections_via_symbols
