	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usb_allocate_stream_buffers
_usb_allocate_stream_buffers:           ## @usb_allocate_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	$0, (%rdi)
	movq	%rdx, 8(%rdi)
	movslq	%esi, %r14
	movq	%r14, %rsi
	imulq	%rdx, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_mem
	movl	$0, (%rbx)
	testl	%r14d, %r14d
	jle	LBB0_5
## %bb.1:
	leaq	L_.str.1(%rip), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_deb_mem
	movl	40(%rbx), %edi
	movl	(%r14), %edx
	movslq	(%rbx), %rcx
	shlq	$3, %rcx
	addq	32(%rbx), %rcx
	movq	%r15, %rsi
	callq	_usb_alloc_coherent
	movq	24(%rbx), %rcx
	movslq	(%rbx), %rsi
	movq	%rax, (%rcx,%rsi,8)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rax,%rsi,8), %rdx
	movq	(%rcx,%rsi,8), %rcx
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_deb_mem
	movq	24(%rbx), %rax
	movslq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_memset
	movq	_USB_STATE_URB_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	movl	(%rbx), %esi
	incl	%esi
	movl	%esi, (%rbx)
	cmpl	%r12d, %esi
	jl	LBB0_2
LBB0_5:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_mem
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_deb_mem
	movq	%rbx, %rdi
	callq	_usb_free_stream_buffers
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"all in all I will use %lu bytes for streaming\n"

L_.str.1:                               ## @.str.1
	.asciz	"allocating buffer %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"not enough memory for urb-buffer allocation.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"buffer %d: %p (dma: %Lu)\n"

	.comm	_USB_STATE_URB_BUF,4,2          ## @USB_STATE_URB_BUF
L_.str.4:                               ## @.str.4
	.asciz	"allocation successful\n"

	.no_dead_strip	_usb_allocate_stream_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usb_allocate_stream_buffers
_usb_allocate_stream_buffers:           ; @usb_allocate_stream_buffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [x0]
	str	x2, [x0, #8]
	sxtw	x8, w21
	mul	x8, x8, x2
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_mem
	str	wzr, [x19]
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w8, #0
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh4:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	adrp	x25, _USB_STATE_URB_BUF@GOTPAGE
Lloh7:
	ldr	x25, [x25, _USB_STATE_URB_BUF@GOTPAGEOFF]
Lloh8:
	adrp	x23, l_.str.3@PAGE
Lloh9:
	add	x23, x23, l_.str.3@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	x8, [sp]
	mov	x0, x22
	bl	_deb_mem
	ldr	w0, [x19, #40]
	ldr	w2, [x24]
	ldr	x8, [x19, #32]
	ldrsw	x9, [x19]
	add	x3, x8, x9, lsl #3
	mov	x1, x20
	bl	_usb_alloc_coherent
	ldr	x9, [x19, #24]
	ldrsw	x8, [x19]
	str	x0, [x9, x8, lsl #3]
	cbz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	x9, x8, #3
	ldp	x10, x11, [x19, #24]
	ldr	x10, [x10, x9]
	ldr	x9, [x11, x9]
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
	mov	x0, x23
	bl	_deb_mem
	ldr	x8, [x19, #24]
	ldrsw	x9, [x19]
	ldr	x0, [x8, x9, lsl #3]
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	ldr	w8, [x25]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	cmp	w8, w21
	b.lt	LBB0_2
LBB0_4:
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_deb_mem
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_deb_mem
	mov	x0, x19
	bl	_usb_free_stream_buffers
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"all in all I will use %lu bytes for streaming\n"

l_.str.1:                               ; @.str.1
	.asciz	"allocating buffer %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"not enough memory for urb-buffer allocation.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"buffer %d: %p (dma: %Lu)\n"

	.comm	_USB_STATE_URB_BUF,4,2          ; @USB_STATE_URB_BUF
l_.str.4:                               ; @.str.4
	.asciz	"allocation successful\n"

	.no_dead_strip	_usb_allocate_stream_buffers
.subsections_via_symbols
