	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_exit                    ## -- Begin function libusb_exit
	.p2align	4, 0x90
_libusb_exit:                           ## @libusb_exit
	.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
	callq	_GET_CONTEXT
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_NO_THREAD@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_HOTPLUG_LOCK
	movq	(%rbx), %r14
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_HOTPLUG_UNLOCK
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_pthread_join
LBB0_3:
	leaq	32(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_libusb10_remove_pollfd
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	callq	_close
	movq	24(%rbx), %rax
	movl	4(%rax), %edi
	callq	_close
	leaq	16(%rbx), %rdi
	callq	_pthread_mutex_destroy
	leaq	12(%rbx), %rdi
	callq	_pthread_mutex_destroy
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_pthread_cond_destroy
	movq	_default_context_lock@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_lock
	movq	_usbi_default_context@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_5
## %bb.4:
	movq	$0, (%rax)
LBB0_5:
	movq	_default_context_lock@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_unlock
	movq	%rbx, %rdi
	callq	_free
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NO_THREAD,8,3                  ## @NO_THREAD
	.comm	_default_context_lock,4,2       ## @default_context_lock
	.comm	_usbi_default_context,8,3       ## @usbi_default_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_exit                    ; -- Begin function libusb_exit
	.p2align	2
_libusb_exit:                           ; @libusb_exit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	bl	_GET_CONTEXT
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _NO_THREAD@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NO_THREAD@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_HOTPLUG_LOCK
	ldr	x20, [x19]
	ldr	x8, [x21]
	str	x8, [x19]
	mov	x0, x19
	bl	_HOTPLUG_UNLOCK
	add	x1, sp, #8
	mov	x0, x20
	bl	_pthread_join
LBB0_3:
	add	x1, x19, #32
	mov	x0, x19
	bl	_libusb10_remove_pollfd
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_close
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #4]
	bl	_close
	add	x0, x19, #16
	bl	_pthread_mutex_destroy
	add	x0, x19, #12
	bl	_pthread_mutex_destroy
	add	x0, x19, #8
	bl	_pthread_cond_destroy
Lloh2:
	adrp	x0, _default_context_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _default_context_lock@GOTPAGEOFF]
	bl	_pthread_mutex_lock
Lloh4:
	adrp	x8, _usbi_default_context@GOTPAGE
Lloh5:
	ldr	x8, [x8, _usbi_default_context@GOTPAGEOFF]
	ldr	x9, [x8]
	cmp	x19, x9
	b.ne	LBB0_5
; %bb.4:
	str	xzr, [x8]
LBB0_5:
Lloh6:
	adrp	x0, _default_context_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _default_context_lock@GOTPAGEOFF]
	bl	_pthread_mutex_unlock
	mov	x0, x19
	bl	_free
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NO_THREAD,8,3                  ; @NO_THREAD
	.comm	_default_context_lock,4,2       ; @default_context_lock
	.comm	_usbi_default_context,8,3       ; @usbi_default_context
.subsections_via_symbols
