	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucan_prepare_and_anchor_rx_urbs
_ucan_prepare_and_anchor_rx_urbs:       ## @ucan_prepare_and_anchor_rx_urbs
	.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
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_UCAN_MAX_RX_URBS@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	shll	$3, %edx
	xorl	%ebx, %ebx
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_memset
	cmpl	$0, (%r14)
	jle	LBB0_8
## %bb.1:
	xorl	%r14d, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	movq	%rax, (%r13,%r14,8)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r15), %esi
	movl	12(%r15), %edi
	movl	(%rbx), %edx
	addq	$4, %rax
	movq	%rax, %rcx
	callq	_usb_alloc_coherent
	movq	(%r13,%r14,8), %r12
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movl	8(%r15), %esi
	movl	12(%r15), %r13d
	movl	%r13d, %edi
	callq	_usb_rcvbulkpipe
	movl	4(%r15), %r8d
	movq	_ucan_read_bulk_callback@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%r15, (%rsp)
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_usb_fill_bulk_urb
	movq	_URB_NO_TRANSFER_DMA_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r13,%r14,8), %rdi
	orl	%eax, (%rdi)
	movq	%r15, %rsi
	callq	_usb_anchor_urb
	incq	%r14
	movq	_UCAN_MAX_RX_URBS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	jl	LBB0_2
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%r12, %rdi
	callq	_usb_free_urb
	movq	$0, (%r13,%r14,8)
LBB0_5:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ucan_cleanup_rx_urbs
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UCAN_MAX_RX_URBS,4,2           ## @UCAN_MAX_RX_URBS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ucan_read_bulk_callback,4,2    ## @ucan_read_bulk_callback
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ## @URB_NO_TRANSFER_DMA_MAP
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ucan_prepare_and_anchor_rx_urbs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ucan_prepare_and_anchor_rx_urbs
_ucan_prepare_and_anchor_rx_urbs:       ; @ucan_prepare_and_anchor_rx_urbs
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _UCAN_MAX_RX_URBS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _UCAN_MAX_RX_URBS@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w2, w8, #3
	mov	x0, x1
	mov	w1, #0
	bl	_memset
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x25, #0
Lloh2:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	adrp	x27, _ucan_read_bulk_callback@GOTPAGE
Lloh5:
	ldr	x27, [x27, _ucan_read_bulk_callback@GOTPAGEOFF]
Lloh6:
	adrp	x28, _URB_NO_TRANSFER_DMA_MAP@GOTPAGE
Lloh7:
	ldr	x28, [x28, _URB_NO_TRANSFER_DMA_MAP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	w0, #0
	bl	_usb_alloc_urb
	str	x0, [x19, x25, lsl #3]
	cbz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x20, #12]
	ldr	w1, [x20, #4]
	add	x3, x0, #4
	ldr	w2, [x26]
	mov	x0, x8
	bl	_usb_alloc_coherent
	ldr	x22, [x19, x25, lsl #3]
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	ldp	w1, w23, [x20, #8]
	mov	x0, x23
	bl	_usb_rcvbulkpipe
	mov	x2, x0
	ldr	w4, [x20, #4]
	ldr	w5, [x27]
	mov	x0, x22
	mov	x1, x23
	mov	x3, x21
	mov	x6, x20
	bl	_usb_fill_bulk_urb
	ldr	w8, [x28]
	ldr	x0, [x19, x25, lsl #3]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	mov	x1, x20
	bl	_usb_anchor_urb
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.lt	LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	mov	x0, x22
	bl	_usb_free_urb
	str	xzr, [x19, x25, lsl #3]
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_ucan_cleanup_rx_urbs
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_UCAN_MAX_RX_URBS,4,2           ; @UCAN_MAX_RX_URBS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ucan_read_bulk_callback,4,2    ; @ucan_read_bulk_callback
	.comm	_URB_NO_TRANSFER_DMA_MAP,4,2    ; @URB_NO_TRANSFER_DMA_MAP
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ucan_prepare_and_anchor_rx_urbs
.subsections_via_symbols
