	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remove_adapter
_remove_adapter:                        ## @remove_adapter
	.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	_adapters@GOTPCREL(%rip), %rbx
	movq	16(%rbx), %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.1:
	cmpq	%rsi, 56(%rcx)
	jne	LBB0_3
## %bb.2:
	movq	%rdi, %r14
	movq	48(%rcx), %rsi
	movq	(%rbx), %rdi
	callq	_input_autoconfigure_disconnect
	movq	16(%rbx), %rax
	movl	$1, 8(%rax)
	movl	40(%rax), %edi
	callq	_sthread_join
	movq	(%rbx), %rsi
	leaq	(,%rsi,4), %rdi
	addq	(%r14), %rdi
	callq	_pad_connection_pad_deinit
	movl	36(%rbx), %edi
	callq	_slock_free
	movl	32(%rbx), %edi
	callq	_fifo_free
	movq	16(%rbx), %rax
	movl	24(%rax), %edi
	movl	28(%rax), %esi
	callq	_libusb_release_interface
	movq	16(%rbx), %rax
	movl	24(%rax), %edi
	callq	_libusb_close
	movq	16(%rbx), %rdi
	movq	16(%rdi), %r14
	callq	_free
	movq	%r14, 16(%rbx)
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_adapters,4,2                   ## @adapters
	.no_dead_strip	_remove_adapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remove_adapter
_remove_adapter:                        ; @remove_adapter
	.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
Lloh0:
	adrp	x20, _adapters@GOTPAGE
Lloh1:
	ldr	x20, [x20, _adapters@GOTPAGEOFF]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x9, [x8, #56]
	cmp	x9, x1
	b.eq	LBB0_3
LBB0_2:
	mov	w0, #-1
	b	LBB0_4
LBB0_3:
	mov	x19, x0
	ldr	x1, [x8, #48]
	ldr	x0, [x20]
	bl	_input_autoconfigure_disconnect
	ldr	x8, [x20, #16]
	mov	w9, #1
	str	w9, [x8, #8]
	ldr	w0, [x8, #40]
	bl	_sthread_join
	ldr	x8, [x19]
	ldr	x1, [x20]
	add	x0, x8, x1, lsl #2
	bl	_pad_connection_pad_deinit
	ldr	w0, [x20, #36]
	bl	_slock_free
	ldr	w0, [x20, #32]
	bl	_fifo_free
	ldr	x8, [x20, #16]
	ldp	w0, w1, [x8, #24]
	bl	_libusb_release_interface
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #24]
	bl	_libusb_close
	ldr	x0, [x20, #16]
	ldr	x19, [x0, #16]
	bl	_free
	mov	w0, #0
	str	x19, [x20, #16]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_adapters,4,2                   ; @adapters
	.no_dead_strip	_remove_adapter
.subsections_via_symbols
