	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_find_devices               ## -- Begin function usb_find_devices
	.p2align	4, 0x90
_usb_find_devices:                      ## @usb_find_devices
	.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
	movq	_usb_backend@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	xorl	%esi, %esi
	callq	_libusb20_be_device_foreach
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	_usb_global_bus@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rdi
	xorl	%esi, %esi
	callq	_libusb20_be_device_foreach
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %r14
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_libusb20_be_dequeue_device
	movq	%rbx, %rdi
	callq	_libusb20_dev_free
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_LIST_DEL
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_4
LBB0_5:
	movq	(%r12), %rdi
	callq	_libusb20_be_free
	xorl	%eax, %eax
	callq	_libusb20_be_alloc_default
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_libusb20_be_device_foreach
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r12
	movl	$1, %r14d
	movq	_usb_global_bus@GOTPCREL(%rip), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_usb_global_bus@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_LIST_ADD
	movq	_usb_backend@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	callq	_libusb20_be_device_foreach
	movq	%rax, %r12
	incl	%r14d
	testq	%rax, %rax
	je	LBB0_14
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	$96, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$96, %edx
	callq	_memset
	movq	%r15, 88(%rbx)
	movl	80(%rbx), %r13d
	movq	%r12, %rdi
	callq	_libusb20_dev_get_bus_number
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_libusb20_dev_get_address
	movl	%r13d, %edi
	movl	$4, %esi
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	callq	_snprintf
	movq	%r12, %rdi
	callq	_libusb20_dev_get_device_desc
	movl	$64, 16(%rbx)
	movups	40(%rax), %xmm0
	movups	%xmm0, 64(%rbx)
	movups	24(%rax), %xmm0
	movups	%xmm0, 48(%rbx)
	movups	8(%rax), %xmm0
	movups	%xmm0, 32(%rbx)
	movq	(%rax), %rax
	movq	_USB_MAXCONFIG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovlq	%rax, %rcx
	movq	%rcx, 24(%rbx)
	movl	%r14d, 8(%rbx)
	movq	%r12, (%rbx)
	movq	%rbx, (%r12)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_libusb20_dev_open
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	callq	_usb_fetch_and_parse_descriptors
	movq	%r12, %rdi
	callq	_libusb20_dev_close
	jmp	LBB0_13
LBB0_6:
	movl	$-1, %r14d
	jmp	LBB0_15
LBB0_8:
	movl	$1, %r14d
LBB0_14:
	decl	%r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_usb_backend,8,3                ## @usb_backend
	.comm	_usb_global_bus,4,2             ## @usb_global_bus
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/ugen%u.%u"

	.comm	_USB_MAXCONFIG,8,3              ## @USB_MAXCONFIG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_find_devices               ; -- Begin function usb_find_devices
	.p2align	2
_usb_find_devices:                      ; @usb_find_devices
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x24, _usb_backend@GOTPAGE
Lloh1:
	ldr	x24, [x24, _usb_backend@GOTPAGEOFF]
	ldr	x0, [x24]
	mov	x1, #0
	bl	_libusb20_be_device_foreach
Lloh2:
	adrp	x25, _usb_global_bus@GOTPAGE
Lloh3:
	ldr	x25, [x25, _usb_global_bus@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x24]
	mov	x1, #0
	bl	_libusb20_be_device_foreach
	mov	x20, x0
	cbz	x0, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x19, [x20]
	ldr	x0, [x24]
	mov	x1, x20
	bl	_libusb20_be_dequeue_device
	mov	x0, x20
	bl	_libusb20_dev_free
	cbz	x19, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x25]
	mov	x1, x19
	bl	_LIST_DEL
	mov	x0, x19
	bl	_free
	b	LBB0_2
LBB0_5:
	ldr	x0, [x24]
	bl	_libusb20_be_free
	bl	_libusb20_be_alloc_default
	str	x0, [x24]
	cbz	x0, LBB0_12
; %bb.6:
	mov	x1, #0
	bl	_libusb20_be_device_foreach
	cbz	x0, LBB0_13
; %bb.7:
	mov	x19, x0
	mov	w26, #1
	mov	w27, #64
Lloh4:
	adrp	x28, _USB_MAXCONFIG@GOTPAGE
Lloh5:
	ldr	x28, [x28, _USB_MAXCONFIG@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x25]
	mov	x1, x21
	bl	_LIST_ADD
	ldr	x0, [x24]
	mov	x1, x19
	bl	_libusb20_be_device_foreach
	mov	x19, x0
	add	w26, w26, #1
	cbz	x0, LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #96
	bl	_malloc
	cbz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x21, x0
	mov	w1, #0
	mov	w2, #96
	bl	_memset
	str	x25, [x21, #88]
	ldr	w22, [x21, #80]
	mov	x0, x19
	bl	_libusb20_dev_get_bus_number
	mov	x23, x0
	mov	x0, x19
	bl	_libusb20_dev_get_address
	mov	x4, x0
	mov	x0, x22
	mov	w1, #4
	mov	x2, x20
	mov	x3, x23
	bl	_snprintf
	mov	x0, x19
	bl	_libusb20_dev_get_device_desc
	str	w27, [x21, #16]
	ldur	q0, [x0, #40]
	str	q0, [x21, #64]
	ldur	q0, [x0, #24]
	str	q0, [x21, #48]
	ldur	q0, [x0, #8]
	str	q0, [x21, #32]
	ldr	x8, [x0]
	ldr	x9, [x28]
	cmp	x8, x9
	csel	x8, x8, x9, lt
	str	x8, [x21, #24]
	str	w26, [x21, #8]
	str	x19, [x21]
	str	x21, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_libusb20_dev_open
	cbnz	w0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	bl	_usb_fetch_and_parse_descriptors
	mov	x0, x19
	bl	_libusb20_dev_close
	b	LBB0_8
LBB0_12:
	mov	w0, #-1
	b	LBB0_15
LBB0_13:
	mov	w26, #1
LBB0_14:
	sub	w0, w26, #1
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_usb_backend,8,3                ; @usb_backend
	.comm	_usb_global_bus,4,2             ; @usb_global_bus
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/ugen%u.%u"

	.comm	_USB_MAXCONFIG,8,3              ; @USB_MAXCONFIG
.subsections_via_symbols
