	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_usb_disconnect
_em28xx_usb_disconnect:                 ## @em28xx_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_5
## %bb.1:
	movq	32(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_em28xx_info
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	44(%r15), %rdi
	callq	_wake_up_interruptible_all
	leaq	40(%r15), %rdi
	callq	_v4l2_device_disconnect
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.2:
	movq	32(%r15), %rdi
	callq	_video_device_node_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_em28xx_warn
	movq	_DEV_MISCONFIGURED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r15)
	movq	%r15, %rdi
	callq	_em28xx_uninit_isoc
	movq	_DEV_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r15)
	leaq	28(%r15), %rdi
	callq	_wake_up_interruptible
	movq	%r15, %rdi
	addq	$24, %rdi
	callq	_wake_up_interruptible
	jmp	LBB0_4
LBB0_3:
	movq	_DEV_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r15)
	movq	%r15, %rdi
	callq	_em28xx_release_resources
LBB0_4:
	movq	%r15, %rdi
	callq	_em28xx_close_extension
	movq	%r14, %rdi
	callq	_mutex_unlock
	cmpq	$0, 8(%r15)
	je	LBB0_6
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r15), %rdi
	callq	_kfree
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disconnecting %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"device %s is open! Deregistration and memory deallocation are deferred on close.\n"

	.comm	_DEV_MISCONFIGURED,4,2          ## @DEV_MISCONFIGURED
	.comm	_DEV_DISCONNECTED,4,2           ## @DEV_DISCONNECTED
	.no_dead_strip	_em28xx_usb_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_usb_disconnect
_em28xx_usb_disconnect:                 ; @em28xx_usb_disconnect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_usb_get_intfdata
	mov	x19, x0
	mov	x0, x20
	mov	x1, #0
	bl	_usb_set_intfdata
	cbz	x19, LBB0_5
; %bb.1:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_em28xx_info
	add	x20, x19, #16
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #44
	bl	_wake_up_interruptible_all
	add	x0, x19, #40
	bl	_v4l2_device_disconnect
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x0, [x19, #32]
	bl	_video_device_node_name
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_em28xx_warn
Lloh4:
	adrp	x8, _DEV_MISCONFIGURED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DEV_MISCONFIGURED@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
	mov	x0, x19
	bl	_em28xx_uninit_isoc
Lloh7:
	adrp	x8, _DEV_DISCONNECTED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DEV_DISCONNECTED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
	add	x0, x19, #28
	bl	_wake_up_interruptible
	add	x0, x19, #24
	bl	_wake_up_interruptible
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _DEV_DISCONNECTED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DEV_DISCONNECTED@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
	mov	x0, x19
	bl	_em28xx_release_resources
LBB0_4:
	mov	x0, x19
	bl	_em28xx_close_extension
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x0, [x19]
	bl	_kfree
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disconnecting %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"device %s is open! Deregistration and memory deallocation are deferred on close.\n"

	.comm	_DEV_MISCONFIGURED,4,2          ; @DEV_MISCONFIGURED
	.comm	_DEV_DISCONNECTED,4,2           ; @DEV_DISCONNECTED
	.no_dead_strip	_em28xx_usb_disconnect
.subsections_via_symbols
