	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dma_alloc
_dma_alloc:                             ## @dma_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.1:
	movq	%rsi, %r12
	cmpl	$0, (%rsi)
	jle	LBB0_13
## %bb.2:
	movl	%edx, %r14d
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	24(%r12), %edx
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_dma_map_single
	movq	16(%r12), %rcx
	movl	%eax, (%rcx,%rbx)
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_9
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_alt_dma@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	24(%r12), %eax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	___GFP_RETRY_MAYFAIL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kmalloc
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%rbx,2)
	movq	8(%r12), %rax
	movq	(%rax,%rbx,2), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	testl	%r14d, %r14d
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r12), %rdx
	addq	%rbx, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%rbx,2)
	movq	8(%r12), %rax
	cmpq	$0, (%rax,%rbx,2)
	jne	LBB0_11
	jmp	LBB0_5
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	movq	8(%r12), %rax
	movq	(%rax,%rbx,2), %rdi
	callq	_kfree
	movq	8(%r12), %rax
	movq	$0, (%rax,%rbx,2)
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_alt_dma,8,3                    ## @alt_dma
	.comm	___GFP_RETRY_MAYFAIL,4,2        ## @__GFP_RETRY_MAYFAIL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_dma_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dma_alloc
_dma_alloc:                             ; @dma_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x1, LBB0_10
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x20, x2
	mov	x21, x0
	mov	x23, #0
	mov	x22, #0
	mov	x24, #0
Lloh0:
	adrp	x25, _alt_dma@GOTPAGE
Lloh1:
	ldr	x25, [x25, _alt_dma@GOTPAGEOFF]
Lloh2:
	adrp	x27, ___GFP_RETRY_MAYFAIL@GOTPAGE
Lloh3:
	ldr	x27, [x27, ___GFP_RETRY_MAYFAIL@GOTPAGEOFF]
Lloh4:
	adrp	x28, _DMA_TO_DEVICE@GOTPAGE
Lloh5:
	ldr	x28, [x28, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh6:
	adrp	x26, _DMA_FROM_DEVICE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #16]
	add	x2, x9, x23
Lloh8:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x9]
	mov	x0, x21
	mov	x1, x8
	bl	_dma_alloc_coherent
	ldr	x8, [x19, #8]
	str	x0, [x8, x22]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x22]
	cbz	x8, LBB0_9
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x19]
	add	x22, x22, #8
	add	x23, x23, #4
	cmp	x24, x8
	b.ge	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	ldr	w8, [x19, #24]
	cbz	x9, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x27]
	mov	x0, x8
	bl	_kmalloc
	ldr	x8, [x19, #8]
	str	x0, [x8, x22]
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x22]
	cbz	x1, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x19, #24]
	cmp	w20, #0
	csel	x8, x26, x28, eq
	ldr	w3, [x8]
	mov	x0, x21
	bl	_dma_map_single
	mov	x1, x0
	ldr	x8, [x19, #16]
	str	w0, [x8, x23]
	mov	x0, x21
	bl	_dma_mapping_error
	cbz	x0, LBB0_4
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x22]
	bl	_kfree
	ldr	x8, [x19, #8]
	str	xzr, [x8, x22]
LBB0_9:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_alt_dma,8,3                    ; @alt_dma
	.comm	___GFP_RETRY_MAYFAIL,4,2        ; @__GFP_RETRY_MAYFAIL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_dma_alloc
.subsections_via_symbols
