	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_stream_buffers
_alloc_stream_buffers:                  ## @alloc_stream_buffers
	.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
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_queue_length@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rsi)
	movq	_MIN_QUEUE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_max
	movl	%eax, (%r14)
	movq	_MAX_QUEUE_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_min
	movq	%rax, %r15
	movl	%r15d, (%r14)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	divl	4(%r14)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movl	$12, %r12d
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_min
	movq	%rax, %r13
	movl	4(%r14), %ebx
	imull	%r13d, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r14), %rcx
	addq	%r12, %rcx
	movq	%rbx, %rsi
	callq	_usb_buffer_alloc
	movq	8(%r14), %rdi
	movl	%eax, -4(%rdi,%r12)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, -12(%rdi,%r12)
	subl	%r13d, %r15d
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addq	$16, %r12
	cmpq	%rax, %rbx
	jb	LBB0_3
	jmp	LBB0_8
LBB0_7:
	testl	%r15d, %r15d
	je	LBB0_10
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_10
LBB0_6:
	xorl	%r13d, %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_queue_length,4,2               ## @queue_length
	.comm	_MIN_QUEUE_LENGTH,8,3           ## @MIN_QUEUE_LENGTH
	.comm	_MAX_QUEUE_LENGTH,8,3           ## @MAX_QUEUE_LENGTH
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many packets\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_alloc_stream_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_stream_buffers
_alloc_stream_buffers:                  ; @alloc_stream_buffers
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _queue_length@GOTPAGE
Lloh1:
	ldr	x8, [x8, _queue_length@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	w0, [x1]
Lloh3:
	adrp	x8, _MIN_QUEUE_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIN_QUEUE_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_max
	str	w0, [x20]
Lloh6:
	adrp	x8, _MAX_QUEUE_LENGTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_QUEUE_LENGTH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_min
	mov	x21, x0
	str	w21, [x20]
Lloh9:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	ldr	w23, [x20, #4]
	ldr	x0, [x20, #8]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_5
; %bb.1:
	mov	x25, #0
	mov	x26, #0
Lloh12:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
	udiv	w22, w22, w23
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_min
	mov	x23, x0
	ldr	w8, [x20, #4]
	mul	w24, w8, w23
	ldr	x0, [x19]
	ldr	w2, [x27]
	ldr	x8, [x20, #8]
	add	x8, x8, x25
	add	x3, x8, #12
	mov	x1, x24
	bl	_usb_buffer_alloc
	mov	x8, x0
	ldr	x0, [x20, #8]
	add	x9, x0, x25
	str	w8, [x9, #8]
	cbz	w8, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x24, [x0, x25]
	subs	w21, w21, w23
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	add	x25, x25, #16
	cmp	x26, w0, uxtw
	b.lo	LBB0_2
	b	LBB0_6
LBB0_5:
	cbz	w21, LBB0_7
LBB0_6:
	ldr	x0, [x19]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh16:
	adrp	x8, _ENXIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_queue_length,4,2               ; @queue_length
	.comm	_MIN_QUEUE_LENGTH,8,3           ; @MIN_QUEUE_LENGTH
	.comm	_MAX_QUEUE_LENGTH,8,3           ; @MAX_QUEUE_LENGTH
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many packets\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_alloc_stream_buffers
.subsections_via_symbols
