	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tm6000_alloc_urb_buffers
_tm6000_alloc_urb_buffers:              ## @tm6000_alloc_urb_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
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rdi)
	jne	LBB0_3
## %bb.1:
	movq	%rdi, %r12
	movq	_TM6000_NUM_URB_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_kmalloc_array
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movl	(%rbx), %edx
	movl	%r15d, %edi
	movl	$8, %esi
	callq	_kmalloc_array
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:
	testl	%r15d, %r15d
	jle	LBB0_3
## %bb.6:
	movl	(%r12), %esi
	movl	24(%r12), %edi
	movl	(%rbx), %edx
	movq	%rax, %rcx
	callq	_usb_alloc_coherent
	movq	8(%r12), %rcx
	movl	%eax, (%rcx)
	movl	$0, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	shlq	$2, %r15
	xorl	%r14d, %r14d
	movl	$4, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_memset
	cmpq	%r13, %r15
	je	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %esi
	movl	24(%r12), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	16(%r12), %rcx
	addq	%r13, %rcx
	callq	_usb_alloc_coherent
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%r13)
	incl	%ebx
	addq	$4, %r13
	testl	%eax, %eax
	jne	LBB0_8
LBB0_10:
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_tm6000_err
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TM6000_NUM_URB_BUF,4,2         ## @TM6000_NUM_URB_BUF
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate %i bytes for transfer buffer %i\n"

	.no_dead_strip	_tm6000_alloc_urb_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tm6000_alloc_urb_buffers
_tm6000_alloc_urb_buffers:              ; @tm6000_alloc_urb_buffers
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_11
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x8, _TM6000_NUM_URB_BUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TM6000_NUM_URB_BUF@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x21
	mov	w1, #8
	bl	_kmalloc_array
	str	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.3:
	ldr	w2, [x22]
	mov	x0, x21
	mov	w1, #8
	bl	_kmalloc_array
	str	x0, [x19, #16]
	cbz	x0, LBB0_10
; %bb.4:
	cmp	w21, #1
	b.lt	LBB0_1
; %bb.5:
	mov	x3, x0
	ldr	w0, [x19, #24]
	ldr	w1, [x19]
	ldr	w2, [x22]
	bl	_usb_alloc_coherent
	ldr	x8, [x19, #8]
	str	w0, [x8]
	mov	w20, #0
	cbz	w0, LBB0_9
; %bb.6:
	lsl	x21, x21, #2
	mov	w23, #4
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19]
	mov	w1, #0
	bl	_memset
	cmp	x21, x23
	b.eq	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x19, #24]
	ldr	w1, [x19]
	ldr	w2, [x22]
	add	x3, x8, x23
	bl	_usb_alloc_coherent
	ldr	x8, [x19, #8]
	str	w0, [x8, x23]
	add	w20, w20, #1
	add	x23, x23, #4
	cbnz	w0, LBB0_7
LBB0_9:
	ldr	w1, [x19]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_tm6000_err
LBB0_10:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_TM6000_NUM_URB_BUF,4,2         ; @TM6000_NUM_URB_BUF
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate %i bytes for transfer buffer %i\n"

	.no_dead_strip	_tm6000_alloc_urb_buffers
.subsections_via_symbols
