	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function domain_init
_domain_init:                           ## @domain_init
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	40(%rdi), %rbx
	movq	_VTD_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IOVA_START_PFN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_init_iova_domain
	movq	_iommu_flush_iova@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_iova_entry_free@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_init_iova_flush_queue
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%r15, %rdi
	callq	_domain_reserve_special_ranges
	movl	4(%r14), %edi
	callq	_cap_mgaw
	cmpl	%r12d, %eax
	jge	LBB0_3
## %bb.2:
	movl	4(%r14), %edi
	callq	_cap_mgaw
	movl	%eax, %r12d
LBB0_3:
	movl	%r12d, (%r15)
	movl	%r12d, %edi
	callq	_guestwidth_to_adjustwidth
	movl	%eax, %edi
	callq	_width_to_agaw
	movl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_cap_sagaw
	movq	%rax, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movl	%ebx, %edi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_debug
	leaq	-40(%rbp), %rdi
	movl	$5, %esi
	movl	%ebx, %edx
	callq	_find_next_bit
	movl	%eax, %ebx
	cmpl	$5, %eax
	jl	LBB0_7
## %bb.5:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_7:
	movl	%ebx, 4(%r15)
	movl	8(%r14), %edi
	callq	_ecap_coherent
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, 8(%r15)
	movl	8(%r14), %edi
	callq	_ecap_sc_support
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, 12(%r15)
	movq	_intel_iommu_superpage@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.9:
	movl	4(%r14), %edi
	callq	_cap_super_page_val
	movl	%eax, %edi
	callq	_fls
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
LBB0_10:
	movq	%rax, 32(%r15)
	movl	(%r14), %edi
	movl	%edi, 24(%r15)
	callq	_alloc_pgtable_page
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	___iommu_flush_cache
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VTD_PAGE_SIZE,4,2              ## @VTD_PAGE_SIZE
	.comm	_IOVA_START_PFN,4,2             ## @IOVA_START_PFN
	.comm	_iommu_flush_iova,4,2           ## @iommu_flush_iova
	.comm	_iova_entry_free,4,2            ## @iova_entry_free
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hardware doesn't support agaw %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_intel_iommu_superpage,8,3      ## @intel_iommu_superpage
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_domain_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function domain_init
_domain_init:                           ; @domain_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x22, x0, #40
Lloh0:
	adrp	x8, _VTD_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VTD_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _IOVA_START_PFN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOVA_START_PFN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_init_iova_domain
Lloh6:
	adrp	x8, _iommu_flush_iova@GOTPAGE
Lloh7:
	ldr	x8, [x8, _iommu_flush_iova@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _iova_entry_free@GOTPAGE
Lloh10:
	ldr	x8, [x8, _iova_entry_free@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_init_iova_flush_queue
	cbnz	w0, LBB0_13
; %bb.1:
	mov	x0, x20
	bl	_domain_reserve_special_ranges
	ldr	w0, [x19, #4]
	bl	_cap_mgaw
	cmp	w0, w21
	b.ge	LBB0_3
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_cap_mgaw
	mov	x21, x0
LBB0_3:
	str	w21, [x20]
	mov	x0, x21
	bl	_guestwidth_to_adjustwidth
	bl	_width_to_agaw
	mov	x21, x0
	ldr	w0, [x19, #4]
	bl	_cap_sagaw
	str	x0, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	bl	_test_bit
	cbnz	w0, LBB0_6
; %bb.4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_pr_debug
	add	x0, sp, #8
	mov	w1, #5
	mov	x2, x21
	bl	_find_next_bit
	mov	x21, x0
	cmp	w0, #5
	b.lt	LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_12
LBB0_6:
	str	w21, [x20, #4]
	ldr	w0, [x19, #8]
	bl	_ecap_coherent
	cmp	x0, #0
	cset	w8, ne
	str	w8, [x20, #8]
	ldr	w0, [x19, #8]
	bl	_ecap_sc_support
	cmp	x0, #0
	cset	w8, ne
	str	w8, [x20, #12]
Lloh16:
	adrp	x8, _intel_iommu_superpage@GOTPAGE
Lloh17:
	ldr	x8, [x8, _intel_iommu_superpage@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w0, [x19, #4]
	bl	_cap_super_page_val
	bl	_fls
	b	LBB0_9
LBB0_8:
	mov	x0, #0
LBB0_9:
	str	x0, [x20, #32]
	ldr	w0, [x19]
	str	w0, [x20, #24]
	bl	_alloc_pgtable_page
	str	x0, [x20, #16]
	cbz	x0, LBB0_11
; %bb.10:
	mov	x1, x0
Lloh19:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	___iommu_flush_cache
	mov	w0, #0
	b	LBB0_13
LBB0_11:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_VTD_PAGE_SIZE,4,2              ; @VTD_PAGE_SIZE
	.comm	_IOVA_START_PFN,4,2             ; @IOVA_START_PFN
	.comm	_iommu_flush_iova,4,2           ; @iommu_flush_iova
	.comm	_iova_entry_free,4,2            ; @iova_entry_free
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hardware doesn't support agaw %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_intel_iommu_superpage,8,3      ; @intel_iommu_superpage
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_domain_init
.subsections_via_symbols
