	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_roccat_disconnect              ## -- Begin function roccat_disconnect
	.p2align	4, 0x90
_roccat_disconnect:                     ## @roccat_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_devices_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_devices@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movslq	%ebx, %r15
	movq	(%rax,%r15,8), %rbx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	$0, 24(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %r12d
	movq	_roccat_major@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_MKDEV
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_device_destroy
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	movq	$0, (%rax,%r15,8)
	movq	%r14, %rdi
	callq	_mutex_unlock
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %edi
	callq	_hid_hw_close
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up_interruptible          ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_devices_lock,4,2               ## @devices_lock
	.comm	_devices,8,3                    ## @devices
	.comm	_roccat_major,4,2               ## @roccat_major
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_roccat_disconnect              ; -- Begin function roccat_disconnect
	.p2align	2
_roccat_disconnect:                     ; @roccat_disconnect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
Lloh0:
	adrp	x21, _devices_lock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _devices_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_mutex_lock
Lloh2:
	adrp	x23, _devices@GOTPAGE
Lloh3:
	ldr	x23, [x23, _devices@GOTPAGEOFF]
	ldr	x8, [x23]
	sbfiz	x24, x20, #3, #32
	ldr	x19, [x8, x24]
	mov	x0, x21
	bl	_mutex_unlock
	str	xzr, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	w22, [x8]
Lloh4:
	adrp	x8, _roccat_major@GOTPAGE
Lloh5:
	ldr	x8, [x8, _roccat_major@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_MKDEV
	mov	x1, x0
	mov	x0, x22
	bl	_device_destroy
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x23]
	str	xzr, [x8, x24]
	mov	x0, x21
	bl	_mutex_unlock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_hid_hw_close
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_wake_up_interruptible
LBB0_2:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_devices_lock,4,2               ; @devices_lock
	.comm	_devices,8,3                    ; @devices
	.comm	_roccat_major,4,2               ; @roccat_major
.subsections_via_symbols
