	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx231xx_usb_disconnect
_cx231xx_usb_disconnect:                ## @cx231xx_usb_disconnect
	.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
	movq	%rdi, %rbx
	callq	_usb_get_intfdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_usb_set_intfdata
	testq	%r15, %r15
	je	LBB0_8
## %bb.1:
	cmpl	$0, 48(%r15)
	je	LBB0_8
## %bb.2:
	movq	_DEV_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 44(%r15)
	movq	%r15, %rdi
	callq	_flush_request_modules
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	40(%r15), %rdi
	callq	_wake_up_interruptible_all
	cmpq	$0, (%r15)
	je	LBB0_7
## %bb.3:
	movl	36(%r15), %ebx
	leaq	32(%r15), %rdi
	callq	_video_device_node_name
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_warn
	movq	%r15, %rdi
	callq	_cx231xx_ir_exit
	cmpq	$0, 24(%r15)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_cx231xx_uninit_isoc
	jmp	LBB0_6
LBB0_5:
	movq	%r15, %rdi
	callq	_cx231xx_uninit_bulk
LBB0_6:
	leaq	16(%r15), %rdi
	callq	_wake_up_interruptible
	movq	%r15, %rdi
	addq	$12, %rdi
	callq	_wake_up_interruptible
LBB0_7:
	movq	%r15, %rdi
	callq	_cx231xx_close_extension
	movq	%r14, %rdi
	callq	_mutex_unlock
	cmpq	$0, (%r15)
	je	LBB0_9
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cx231xx_release_resources      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_DISCONNECTED,4,2           ## @DEV_DISCONNECTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device %s is open! Deregistration and memory deallocation are deferred on close.\n"

	.no_dead_strip	_cx231xx_usb_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx231xx_usb_disconnect
_cx231xx_usb_disconnect:                ; @cx231xx_usb_disconnect
	.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
	mov	x20, x0
	bl	_usb_get_intfdata
	mov	x19, x0
	mov	x0, x20
	mov	x1, #0
	bl	_usb_set_intfdata
	cbz	x19, LBB0_8
; %bb.1:
	ldr	w8, [x19, #48]
	cbz	w8, LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, _DEV_DISCONNECTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEV_DISCONNECTED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #44]
	orr	w8, w9, w8
	str	w8, [x19, #44]
	mov	x0, x19
	bl	_flush_request_modules
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #40
	bl	_wake_up_interruptible_all
	ldr	x8, [x19]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	w21, [x19, #36]
	add	x0, x19, #32
	bl	_video_device_node_name
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	mov	x0, x19
	bl	_cx231xx_ir_exit
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_cx231xx_uninit_isoc
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_cx231xx_uninit_bulk
LBB0_6:
	add	x0, x19, #16
	bl	_wake_up_interruptible
	add	x0, x19, #12
	bl	_wake_up_interruptible
LBB0_7:
	mov	x0, x19
	bl	_cx231xx_close_extension
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19]
	cbz	x8, LBB0_9
LBB0_8:
	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_9:
	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	_cx231xx_release_resources
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_DISCONNECTED,4,2           ; @DEV_DISCONNECTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device %s is open! Deregistration and memory deallocation are deferred on close.\n"

	.no_dead_strip	_cx231xx_usb_disconnect
.subsections_via_symbols
