	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coh901318_lli_alloc            ## -- Begin function coh901318_lli_alloc
	.p2align	4, 0x90
_coh901318_lli_alloc:                   ## @coh901318_lli_alloc
	.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
	testl	%esi, %esi
	je	LBB0_9
## %bb.1:
	movl	%esi, %r13d
	movq	%rdi, %r15
	callq	_spin_lock
	movl	4(%r15), %edi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_dma_pool_alloc
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r12
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_DEBUGFS_POOL_COUNTER_ADD
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r12)
	movl	$0, (%r12)
	movq	$0, 8(%r12)
	cmpl	$2, %r13d
	jb	LBB0_6
## %bb.3:
	decl	%r13d
	movq	%r12, %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %edi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_dma_pool_alloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_DEBUGFS_POOL_COUNTER_ADD
	movq	-48(%rbp), %rax
	movq	%rax, 16(%rbx)
	movl	$0, (%rbx)
	movq	$0, 8(%rbx)
	movl	%eax, (%r14)
	movq	%rbx, 8(%r14)
	movq	%rbx, %r14
	decl	%r13d
	jne	LBB0_4
LBB0_6:
	movq	%r15, %rdi
	callq	_spin_unlock
	jmp	LBB0_10
LBB0_7:
	movq	%r15, %rdi
	callq	_spin_unlock
	jmp	LBB0_9
LBB0_8:
	movl	$0, (%r14)
	movq	%r15, %rdi
	callq	_spin_unlock
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_coh901318_lli_free
LBB0_9:
	xorl	%r12d, %r12d
LBB0_10:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coh901318_lli_alloc            ; -- Begin function coh901318_lli_alloc
	.p2align	2
_coh901318_lli_alloc:                   ; @coh901318_lli_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	w1, LBB0_8
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	bl	_spin_lock
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x22, _GFP_NOWAIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_NOWAIT@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, sp
	bl	_dma_pool_alloc
	mov	x20, x0
	str	x0, [sp, #8]
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_DEBUGFS_POOL_COUNTER_ADD
	ldr	x8, [sp]
	str	wzr, [x20]
	stp	xzr, x8, [x20, #8]
	cmp	w21, #2
	b.lo	LBB0_6
; %bb.3:
	sub	w23, w21, #1
	mov	x24, x20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	mov	x2, sp
	bl	_dma_pool_alloc
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	mov	x0, x19
	mov	w1, #1
	bl	_DEBUGFS_POOL_COUNTER_ADD
	ldr	x8, [sp]
	str	wzr, [x21]
	stp	xzr, x8, [x21, #8]
	str	w8, [x24]
	str	x21, [x24, #8]
	mov	x24, x21
	subs	w23, w23, #1
	b.ne	LBB0_4
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock
	b	LBB0_9
LBB0_7:
	str	wzr, [x24]
	mov	x0, x19
	bl	_spin_unlock
	add	x1, sp, #8
	mov	x0, x19
	bl	_coh901318_lli_free
LBB0_8:
	mov	x20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
.subsections_via_symbols
