	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdma_alloc                     ## -- Begin function sdma_alloc
	.p2align	4, 0x90
_sdma_alloc:                            ## @sdma_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_SDMA_N_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %eax
	cmpl	$2, %ecx
	jl	LBB0_5
## %bb.1:
	movq	_sdma_sc@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx), %rbx
	addq	$16, %rbx
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	addq	$16, %rbx
	cmpq	%r14, %rcx
	jne	LBB0_2
	jmp	LBB0_5
LBB0_4:
	movl	$1, (%rbx)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VM_MEMATTR_UNCACHEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	xorl	%edx, %edx
	movl	$-1, %ecx
	movl	%edi, %r8d
	xorl	%r9d, %r9d
	callq	_kmem_alloc_contig
	movq	%rax, 8(%rbx)
	movl	%r14d, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sdma_sc,8,3                    ## @sdma_sc
	.comm	_SDMA_N_CHANNELS,4,2            ## @SDMA_N_CHANNELS
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_VM_MEMATTR_UNCACHEABLE,4,2     ## @VM_MEMATTR_UNCACHEABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdma_alloc                     ; -- Begin function sdma_alloc
	.p2align	2
_sdma_alloc:                            ; @sdma_alloc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _SDMA_N_CHANNELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_N_CHANNELS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _sdma_sc@GOTPAGE
Lloh4:
	ldr	x9, [x9, _sdma_sc@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x20, x9, #16
	mov	w19, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20]
	cbz	w9, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #1
	add	x20, x20, #16
	cmp	x8, x19
	b.ne	LBB0_2
LBB0_4:
	mov	w19, #-1
	b	LBB0_6
LBB0_5:
	mov	w8, #1
	str	w8, [x20]
Lloh6:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _M_ZERO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _M_ZERO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _VM_MEMATTR_UNCACHEABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VM_MEMATTR_UNCACHEABLE@GOTPAGEOFF]
Lloh14:
	ldr	w6, [x8]
	mov	w2, #0
	mov	w3, #-1
	mov	x4, x0
	mov	w5, #0
	bl	_kmem_alloc_contig
	str	x0, [x20, #8]
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_sdma_sc,8,3                    ; @sdma_sc
	.comm	_SDMA_N_CHANNELS,4,2            ; @SDMA_N_CHANNELS
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_VM_MEMATTR_UNCACHEABLE,4,2     ; @VM_MEMATTR_UNCACHEABLE
.subsections_via_symbols
