	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_get_device_list         ## -- Begin function libusb_get_device_list
	.p2align	4, 0x90
_libusb_get_device_list:                ## @libusb_get_device_list
	.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	%rsi, %r12
	callq	_GET_CONTEXT
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	testq	%r12, %r12
	je	LBB0_11
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_libusb20_be_alloc_default
	testq	%rax, %rax
	je	LBB0_17
## %bb.3:
	movq	%rax, %r15
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_libusb20_be_device_foreach
	addl	$8, %ebx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_16
## %bb.6:
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_libusb20_be_device_foreach
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$24, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_libusb20_be_dequeue_device
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%r14, %rdi
	addq	$16, %rdi
	callq	_TAILQ_INIT
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r14)
	movq	%rbx, (%r14)
	movq	%r14, (%rbx)
	movq	%r14, %rdi
	callq	_libusb_ref_device
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%r13,8)
	incq	%r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_libusb20_be_device_foreach
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
LBB0_10:
	movq	(%r12), %rax
	movl	%r13d, %ecx
	movq	$0, (%rax,%rcx,8)
	movq	%r15, %rdi
	callq	_libusb20_be_free
	jmp	LBB0_19
LBB0_11:
	movq	_LIBUSB_ERROR_INVALID_PARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_12:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.13:
	movslq	%r13d, %rax
	leaq	-8(,%rax,8), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	addq	%r14, %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_libusb_unref_device
	leaq	-1(%rbx), %rax
	addl	%r13d, %ebx
	cmpl	$1, %ebx
	movq	%rax, %rbx
	jne	LBB0_14
LBB0_15:
	movq	(%r12), %rdi
	callq	_free
	movq	$0, (%r12)
LBB0_16:
	movq	%r15, %rdi
	callq	_libusb20_be_free
LBB0_17:
	movq	_LIBUSB_ERROR_NO_MEM@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %r13d
LBB0_19:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ## @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_ERROR_NO_MEM,4,2        ## @LIBUSB_ERROR_NO_MEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libusb_get_device_list         ; -- Begin function libusb_get_device_list
	.p2align	2
_libusb_get_device_list:                ; @libusb_get_device_list
	.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	x19, x1
	bl	_GET_CONTEXT
	cbz	x0, LBB0_10
; %bb.1:
	cbz	x19, LBB0_10
; %bb.2:
	mov	x22, x0
	bl	_libusb20_be_alloc_default
	cbz	x0, LBB0_18
; %bb.3:
	mov	x20, x0
	mov	w21, #0
	mov	x1, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_libusb20_be_device_foreach
	mov	x1, x0
	add	w21, w21, #8
	cbnz	x0, LBB0_4
; %bb.5:
	mov	x0, x21
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_17
; %bb.6:
	mov	x0, x20
	mov	x1, #0
	bl	_libusb20_be_device_foreach
	cbz	x0, LBB0_11
; %bb.7:
	mov	x23, x0
	mov	x21, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #24
	bl	_malloc
	cbz	x0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x24, x0
	mov	x0, x20
	mov	x1, x23
	bl	_libusb20_be_dequeue_device
	mov	x0, x24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	add	x0, x24, #16
	bl	_TAILQ_INIT
	stp	x23, x22, [x24]
	str	x24, [x23]
	mov	x0, x24
	bl	_libusb_ref_device
	ldr	x8, [x19]
	str	x0, [x8, x21, lsl #3]
	add	x21, x21, #1
	mov	x0, x20
	mov	x1, #0
	bl	_libusb20_be_device_foreach
	mov	x23, x0
	cbnz	x0, LBB0_8
	b	LBB0_12
LBB0_10:
Lloh0:
	adrp	x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBUSB_ERROR_INVALID_PARAM@GOTPAGEOFF]
	b	LBB0_19
LBB0_11:
	mov	w21, #0
LBB0_12:
	ldr	x8, [x19]
	str	xzr, [x8, w21, uxtw #3]
	mov	x0, x20
	bl	_libusb20_be_free
	b	LBB0_20
LBB0_13:
	cbz	w21, LBB0_16
; %bb.14:
	mov	x22, #0
	sxtw	x8, w21
	lsl	x8, x8, #3
	sub	x23, x8, #8
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	x0, [x8, x22, lsl #3]
	bl	_libusb_unref_device
	add	w8, w21, w22
	sub	x22, x22, #1
	cmp	w8, #1
	b.ne	LBB0_15
LBB0_16:
	ldr	x0, [x19]
	bl	_free
	str	xzr, [x19]
LBB0_17:
	mov	x0, x20
	bl	_libusb20_be_free
LBB0_18:
Lloh2:
	adrp	x8, _LIBUSB_ERROR_NO_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LIBUSB_ERROR_NO_MEM@GOTPAGEOFF]
LBB0_19:
	ldr	w21, [x8]
LBB0_20:
	mov	x0, x21
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_LIBUSB_ERROR_INVALID_PARAM,4,2 ; @LIBUSB_ERROR_INVALID_PARAM
	.comm	_LIBUSB_ERROR_NO_MEM,4,2        ; @LIBUSB_ERROR_NO_MEM
.subsections_via_symbols
