	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function domain_pgtbl_map_pte
_domain_pgtbl_map_pte:                  ## @domain_pgtbl_map_pte
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_DMAR_DOMAIN_ASSERT_PGLOCKED
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	(%rax), %eax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	andl	%ebx, %eax
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	%r12, %rdi
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edx
	callq	_domain_pgtbl_get_pindex
	movq	%rax, %r13
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	cmpq	(%r15), %r13
	jne	LBB0_3
## %bb.2:
	callq	_sf_buf_kva
	jmp	LBB0_11
LBB0_3:
	callq	_dmar_unmap_pgtbl
LBB0_4:
	movq	%r13, (%r15)
	movl	4(%r12), %edi
	movq	%r13, %rsi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	movq	%rbx, %rcx
	callq	_dmar_map_pgtbl
	movq	%rax, %rbx
	testq	%rax, %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_12
## %bb.5:
	xorl	%eax, %eax
	testl	%edx, %edx
	setg	%al
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	leal	-1(%rdx), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	callq	_KASSERT
	movl	4(%r12), %edi
	movq	_DMAR_PGF_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%r15d, %edx
	movq	%r13, %r14
	movq	%r13, %rsi
	callq	_dmar_pgalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r13
	incl	8(%rax)
	movq	$0, -64(%rbp)
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	leaq	-88(%rbp), %r8
	leaq	-64(%rbp), %r9
	callq	_domain_pgtbl_map_pte
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rbx
	movq	_DMAR_PTE_W@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_DMAR_PTE_R@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%r13, %rdi
	callq	_VM_PAGE_TO_PHYS
	orl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	callq	_dmar_pte_store
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_dmar_flush_pte_to_ram
	movq	-64(%rbp), %rdi
	callq	_sf_buf_page
	incl	(%rax)
	decl	8(%r13)
	movq	-64(%rbp), %rdi
	callq	_dmar_unmap_pgtbl
	movl	4(%r12), %edi
	movq	%r14, %r13
	movq	%r14, %rsi
	movl	%r15d, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	callq	_dmar_map_pgtbl
	testq	%rax, %rax
	je	LBB0_6
LBB0_11:
	movq	%rax, %rbx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_12:
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_domain_pgtbl_pte_off
	cltq
	leaq	(%rbx,%rax,4), %rax
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	xorl	%edi, %edi
	cmpq	$0, (%r13)
	setne	%dil
	movq	%r12, %rsi
	callq	_KASSERT
	decl	8(%r13)
	movl	4(%r12), %edi
	movq	(%r13), %rsi
	movl	%r15d, %edx
	callq	_dmar_pgfree
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_PGF_OBJL,4,2              ## @DMAR_PGF_OBJL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lost PGF_OBJL"

	.comm	_DMAR_PGF_ZERO,4,2              ## @DMAR_PGF_ZERO
	.comm	_DMAR_PTE_R,4,2                 ## @DMAR_PTE_R
	.comm	_DMAR_PTE_W,4,2                 ## @DMAR_PTE_W
	.no_dead_strip	_domain_pgtbl_map_pte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function domain_pgtbl_map_pte
_domain_pgtbl_map_pte:                  ; @domain_pgtbl_map_pte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x23, x5
	mov	x25, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_DMAR_DOMAIN_ASSERT_PGLOCKED
Lloh0:
	adrp	x8, _DMAR_PGF_OBJL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMAR_PGF_OBJL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w0, ne
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_domain_pgtbl_get_pindex
	mov	x24, x0
	ldr	x0, [x23]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x25]
	cmp	x24, x8
	b.ne	LBB0_3
; %bb.2:
	bl	_sf_buf_kva
	mov	x27, x0
	b	LBB0_5
LBB0_3:
	bl	_dmar_unmap_pgtbl
LBB0_4:
	str	x24, [x25]
	ldr	w0, [x19, #4]
	mov	x1, x24
	mov	x2, x20
	mov	x3, x23
	bl	_dmar_map_pgtbl
	mov	x27, x0
	cbz	x0, LBB0_7
LBB0_5:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_domain_pgtbl_pte_off
	add	x0, x27, w0, sxtw #2
LBB0_6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
	cmp	w21, #0
	cset	w25, gt
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	sub	w26, w21, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x19
	bl	_KASSERT
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x8, _DMAR_PGF_ZERO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMAR_PGF_ZERO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w2, w8, w20
	mov	x1, x24
	bl	_dmar_pgalloc
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x27, x0
	ldr	w8, [x0, #8]
	add	w8, w8, #1
	str	w8, [x0, #8]
	str	xzr, [sp, #24]
	add	x4, sp, #16
	add	x5, sp, #24
	mov	x0, x19
	mov	x1, x22
	mov	x2, x26
	mov	x3, x20
	bl	_domain_pgtbl_map_pte
	cbz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x28, x0
Lloh8:
	adrp	x8, _DMAR_PTE_R@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMAR_PTE_R@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _DMAR_PTE_W@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DMAR_PTE_W@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w21, w9, w8
	mov	x0, x27
	bl	_VM_PAGE_TO_PHYS
	orr	w1, w21, w0
	mov	x0, x28
	bl	_dmar_pte_store
	ldr	w0, [x19]
	mov	x1, x28
	bl	_dmar_flush_pte_to_ram
	ldr	x0, [sp, #24]
	bl	_sf_buf_page
	ldr	w8, [x0]
	add	w8, w8, #1
	str	w8, [x0]
	ldr	w8, [x27, #8]
	sub	w8, w8, #1
	str	w8, [x27, #8]
	ldr	x0, [sp, #24]
	bl	_dmar_unmap_pgtbl
	ldr	w0, [x19, #4]
	mov	x1, x24
	mov	x2, x20
	mov	x3, x23
	bl	_dmar_map_pgtbl
	cbz	x0, LBB0_8
; %bb.11:
	mov	x27, x0
	ldr	w21, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_5
LBB0_12:
	ldr	x8, [x27]
	cmp	x8, #0
	cset	w0, ne
	mov	x1, x19
	bl	_KASSERT
	ldr	w8, [x27, #8]
	sub	w8, w8, #1
	str	w8, [x27, #8]
	ldr	w0, [x19, #4]
	ldr	x1, [x27]
	mov	x2, x20
	bl	_dmar_pgfree
	mov	x0, #0
	b	LBB0_6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_PGF_OBJL,4,2              ; @DMAR_PGF_OBJL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lost PGF_OBJL"

	.comm	_DMAR_PGF_ZERO,4,2              ; @DMAR_PGF_ZERO
	.comm	_DMAR_PTE_R,4,2                 ; @DMAR_PTE_R
	.comm	_DMAR_PTE_W,4,2                 ; @DMAR_PTE_W
	.no_dead_strip	_domain_pgtbl_map_pte
.subsections_via_symbols
