	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_edma_alloc_chunk
_dw_edma_alloc_chunk:                   ## @dw_edma_alloc_chunk
	.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	%rdi, %r14
	movq	16(%rdi), %r12
	movq	8(%r12), %rax
	movq	(%rax), %r13
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	xorl	%ebx, %ebx
LBB0_2:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %r15
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r12, 40(%rbx)
	movl	(%r14), %eax
	movl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	movl	%ecx, (%rbx)
	movdqu	(%r13), %xmm0
	movq	(%r12), %xmm1                   ## xmm1 = mem[0],zero
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 24(%rbx)
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.4:
	incl	%eax
	movl	%eax, (%r14)
	addq	$16, %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_dw_edma_alloc_burst
	testl	%eax, %eax
	jne	LBB0_2
## %bb.5:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_1
LBB0_6:
	movq	$0, 8(%rbx)
	movl	$0, (%r14)
	movq	%rbx, 8(%r14)
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.no_dead_strip	_dw_edma_alloc_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_edma_alloc_chunk
_dw_edma_alloc_chunk:                   ; @dw_edma_alloc_chunk
	.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
	mov	x20, x0
	ldr	x22, [x0, #16]
	ldr	x8, [x22, #8]
	ldr	x23, [x8]
Lloh0:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_1:
	mov	x19, #0
LBB0_2:
	mov	x0, x19
	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
LBB0_3:
	add	x21, x19, #16
	mov	x0, x21
	bl	_INIT_LIST_HEAD
	str	x22, [x19, #40]
	ldr	w8, [x20]
	mvn	w9, w8
	and	w9, w9, #0x1
	str	w9, [x19]
	ldr	q0, [x23]
	ld1r.2d	{ v1 }, [x22]
	add.2d	v0, v1, v0
	stur	q0, [x19, #24]
	ldr	x9, [x20, #8]
	cbz	x9, LBB0_6
; %bb.4:
	add	w8, w8, #1
	str	w8, [x20]
	add	x1, x9, #16
	mov	x0, x21
	bl	_list_add_tail
	mov	x0, x19
	bl	_dw_edma_alloc_burst
	cbnz	w0, LBB0_2
; %bb.5:
	mov	x0, x19
	bl	_kfree
	b	LBB0_1
LBB0_6:
	str	xzr, [x19, #8]
	str	wzr, [x20]
	str	x19, [x20, #8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.no_dead_strip	_dw_edma_alloc_chunk
.subsections_via_symbols
