	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_bulk_urbs_generic        ## -- Begin function alloc_bulk_urbs_generic
	.p2align	4, 0x90
_alloc_bulk_urbs_generic:               ## @alloc_bulk_urbs_generic
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movl	%r9d, %ebx
	movl	%r8d, %r15d
	movq	%rdx, %r14
	movl	%esi, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movl	%ebx, %esi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r12
	movq	%rax, %rcx
	addq	$4, %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_usb_buffer_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %ebx
	movq	%rax, %r15
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_usb_rcvbulkpipe
	movq	24(%rbp), %rcx
	movq	%rcx, (%rsp)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	movq	%r15, %rcx
	movl	%ebx, %r8d
	movl	16(%rbp), %r9d
	callq	_usb_fill_bulk_urb
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax,%r13,8)
	incq	%r13
	cmpq	%r13, -56(%rbp)                 ## 8-byte Folded Reload
	movl	%ebx, %r15d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_3
## %bb.7:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
                                        ## kill: def $r13d killed $r13d killed $r13 def $r13
	jmp	LBB0_8
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_5:
	movq	%r12, %rdi
	callq	_usb_free_urb
LBB0_8:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_bulk_urbs_generic        ; -- Begin function alloc_bulk_urbs_generic
	.p2align	2
_alloc_bulk_urbs_generic:               ; @alloc_bulk_urbs_generic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	x7, [sp, #8]                    ; 8-byte Folded Spill
	cmp	w1, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x0
	mov	x19, #0
	mov	w20, w1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	mov	x1, x22
	bl	_usb_alloc_urb
	cbz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, x0
	add	x3, x0, #4
	mov	x0, x25
	mov	x1, x23
	mov	x2, x22
	bl	_usb_buffer_alloc
	cbz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x0
	mov	x0, x25
	mov	x1, x24
	bl	_usb_rcvbulkpipe
	mov	x2, x0
	mov	x0, x27
	mov	x1, x25
	mov	x3, x28
	mov	x4, x23
	mov	x5, x21
	ldr	x6, [sp, #8]                    ; 8-byte Folded Reload
	bl	_usb_fill_bulk_urb
Lloh0:
	adrp	x8, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x27]
	orr	w8, w9, w8
	str	w8, [x27]
	str	x27, [x26, x19, lsl #3]
	add	x19, x19, #1
	cmp	x20, x19
	b.ne	LBB0_2
; %bb.5:
	mov	x19, x20
	b	LBB0_8
LBB0_6:
	mov	w19, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x27
	bl	_usb_free_urb
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
.subsections_via_symbols
