	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_fetch_and_parse_descriptors ## -- Begin function usb_fetch_and_parse_descriptors
	.p2align	4, 0x90
_usb_fetch_and_parse_descriptors:       ## @usb_fetch_and_parse_descriptors
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r13
	callq	_usb_device
	movl	8(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.2:
	movq	%rax, %r14
	shll	$2, %ebx
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	cmpl	$0, 8(%r14)
	je	LBB0_8
## %bb.4:
	xorl	%r15d, %r15d
	leaq	-52(%rbp), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rdi
	addq	%r15, %rdi
	movq	-48(%rbp), %rsi
	callq	_usb_parse_configuration
	movq	-48(%rbp), %rdi
	callq	_free
	incq	%rbx
	movl	8(%r14), %eax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jne	LBB0_5
	jmp	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	callq	_usb_destroy_configuration
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usb_fetch_and_parse_descriptors ; -- Begin function usb_fetch_and_parse_descriptors
	.p2align	2
_usb_fetch_and_parse_descriptors:       ; @usb_fetch_and_parse_descriptors
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	bl	_usb_device
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_8
; %bb.2:
	mov	x20, x0
	lsl	w21, w8, #2
	mov	x0, x21
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_8
; %bb.3:
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_8
; %bb.4:
	mov	x22, #0
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x19
	mov	x3, x21
	blr	x8
	cbnz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20]
	add	x0, x8, x22
	ldr	x1, [sp, #8]
	bl	_usb_parse_configuration
	ldr	x0, [sp, #8]
	bl	_free
	add	x21, x21, #1
	ldr	w8, [x20, #8]
	add	x22, x22, #4
	cmp	x21, x8
	b.ne	LBB0_5
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_usb_destroy_configuration
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
