	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dma_ops_domain_alloc
_dma_ops_domain_alloc:                  ## @dma_ops_domain_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$56, %rdi
	callq	_spin_lock_init
	xorl	%eax, %eax
	callq	_domain_id_alloc
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_PAGE_MODE_2_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movl	(%r15), %edi
	callq	_get_zeroed_page
	movq	%rax, 32(%rbx)
	movq	_PD_DMA_OPS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	movq	%rbx, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movabsq	$281470681743360, %rax          ## imm = 0xFFFF00000000
	movq	%rax, (%rbx)
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_alloc_new_range
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	callq	_dma_ops_domain_free
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	movq	$0, 8(%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_PAGE_MODE_2_LEVEL,4,2          ## @PAGE_MODE_2_LEVEL
	.comm	_PD_DMA_OPS_MASK,4,2            ## @PD_DMA_OPS_MASK
	.no_dead_strip	_dma_ops_domain_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dma_ops_domain_alloc
_dma_ops_domain_alloc:                  ; @dma_ops_domain_alloc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #64
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
	add	x0, x19, #56
	bl	_spin_lock_init
	bl	_domain_id_alloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _PAGE_MODE_2_LEVEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_MODE_2_LEVEL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #52]
	ldr	w0, [x21]
	bl	_get_zeroed_page
Lloh5:
	adrp	x8, _PD_DMA_OPS_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PD_DMA_OPS_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #48]
	stp	x0, x19, [x19, #32]
	cbz	x0, LBB0_4
; %bb.3:
	movi	d0, #0x00ffff00000000
	str	d0, [x19]
	ldr	w3, [x21]
	mov	w21, #1
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_alloc_new_range
	cbz	x0, LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_dma_ops_domain_free
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
	str	w21, [x8]
	str	xzr, [x19, #8]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PAGE_MODE_2_LEVEL,4,2          ; @PAGE_MODE_2_LEVEL
	.comm	_PD_DMA_OPS_MASK,4,2            ; @PD_DMA_OPS_MASK
	.no_dead_strip	_dma_ops_domain_alloc
.subsections_via_symbols
