	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gart_iommu_domain_alloc
_gart_iommu_domain_alloc:               ## @gart_iommu_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
	movq	_IOMMU_DOMAIN_UNMANAGED@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_4
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_gart_handle@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	8(%rcx), %edx
	movl	%edx, 16(%rax)
	movq	(%rcx), %rcx
	decq	%rcx
	movq	%rcx, 8(%rax)
	movl	$1, (%rax)
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOMMU_DOMAIN_UNMANAGED,4,2     ## @IOMMU_DOMAIN_UNMANAGED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_gart_handle,8,3                ## @gart_handle
	.no_dead_strip	_gart_iommu_domain_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gart_iommu_domain_alloc
_gart_iommu_domain_alloc:               ; @gart_iommu_domain_alloc
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _IOMMU_DOMAIN_UNMANAGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOMMU_DOMAIN_UNMANAGED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _gart_handle@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gart_handle@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w9, [x8, #8]
	str	w9, [x0, #16]
	ldr	x8, [x8]
	sub	x8, x8, #1
	str	x8, [x0, #8]
	mov	w8, #1
	str	w8, [x0]
LBB0_3:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IOMMU_DOMAIN_UNMANAGED,4,2     ; @IOMMU_DOMAIN_UNMANAGED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_gart_handle,8,3                ; @gart_handle
	.no_dead_strip	_gart_iommu_domain_alloc
.subsections_via_symbols
