	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usbhid_close                   ## -- Begin function usbhid_close
	.p2align	4, 0x90
_usbhid_close:                          ## @usbhid_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_hid_open_mut@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_spin_lock_irq
	decl	(%rbx)
	setne	%bl
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	testb	%bl, %bl
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_hid_cancel_delayed_stuff
	movl	16(%r14), %edi
	callq	_usb_kill_urb
	movq	8(%r14), %rax
	movq	$0, (%rax)
LBB0_2:
	movq	_hid_open_mut@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_hid_open_mut,4,2               ## @hid_open_mut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usbhid_close                   ; -- Begin function usbhid_close
	.p2align	2
_usbhid_close:                          ; @usbhid_close
	.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
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x0, _hid_open_mut@GOTPAGE
Lloh1:
	ldr	x0, [x0, _hid_open_mut@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x19
	bl	_spin_lock_irq
	ldr	w8, [x20]
	sub	w21, w8, #1
	str	w21, [x20]
	mov	x0, x19
	bl	_spin_unlock_irq
	cbnz	w21, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_hid_cancel_delayed_stuff
	ldr	w0, [x19, #16]
	bl	_usb_kill_urb
	ldr	x8, [x19, #8]
	str	xzr, [x8]
LBB0_2:
Lloh2:
	adrp	x0, _hid_open_mut@GOTPAGE
Lloh3:
	ldr	x0, [x0, _hid_open_mut@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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_hid_open_mut,4,2               ; @hid_open_mut
.subsections_via_symbols
