	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function domain_unmap_buf_locked
_domain_unmap_buf_locked:               ## @domain_unmap_buf_locked
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_DMAR_DOMAIN_ASSERT_PGLOCKED
	testq	%r15, %r15
	je	LBB0_14
## %bb.1:
	movq	_DMAR_DOMAIN_IDMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r12), %eax
	sete	%dil
	movq	%r12, %rsi
	callq	_KASSERT
	movq	_DMAR_PAGE_MASK@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	movq	(%r13), %rax
	andq	%rbx, %rax
	sete	%dil
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movslq	%r15d, %r14
	movq	%r14, %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	movq	(%r13), %rax
	andq	%r15, %rax
	sete	%dil
	movq	%r14, %rsi
	callq	_KASSERT
	movq	8(%r12), %rcx
	movq	%rbx, %rax
	shrq	%cl, %rax
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	movq	%rcx, %rsi
	callq	_KASSERT
	leaq	(%r15,%rbx), %r13
	movq	8(%r12), %rcx
	movq	%r13, %rax
	shrq	%cl, %rax
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	movq	%rcx, %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	cmpq	%rbx, %r13
	movq	%rbx, %r13
	seta	%dil
	movq	%r14, %rsi
	callq	_KASSERT
	movq	_DMAR_PGF_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	xorl	%edi, %edi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %eax
	sete	%dil
	movslq	%ecx, %r14
	movq	%r14, %rsi
	callq	_KASSERT
	movq	_DMAR_PGF_OBJL@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	$0, -56(%rbp)
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r13, %r8
	movq	%r15, %r13
	leaq	-56(%rbp), %r9
	callq	_domain_unmap_clear_pte
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%rbx, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	cmpq	%rbx, %r15
	setae	%dil
	movslq	%ebx, %rsi
	callq	_KASSERT
	addq	%rbx, %r13
	subq	%rbx, %r15
	je	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	16(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	incl	%r14d
	movl	16(%r12), %eax
	cmpl	%eax, %r14d
	jge	LBB0_11
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	decl	%eax
	cmpl	%eax, %r14d
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_domain_is_sp_lvl
	testl	%eax, %eax
	je	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_domain_page_size
	movq	%rax, %rbx
	cmpq	%r15, %rax
	ja	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rbx
	movq	%r12, %rdi
	movq	%r13, %r15
	movq	%r13, %rsi
	movl	%r14d, %edx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %ecx
	leaq	-84(%rbp), %r8
	leaq	-56(%rbp), %r9
	callq	_domain_pgtbl_map_pte
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	movq	%r12, %rsi
	callq	_KASSERT
	movq	_DMAR_PTE_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	16(%rbx), %eax
	decl	%eax
	cmpl	%eax, %r14d
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%r15, %r13
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%rbx, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_12:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_dmar_unmap_pgtbl
LBB0_14:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_DOMAIN_IDMAP,4,2          ## @DMAR_DOMAIN_IDMAP
	.comm	_DMAR_PAGE_MASK,8,3             ## @DMAR_PAGE_MASK
	.comm	_DMAR_PGF_WAITOK,4,2            ## @DMAR_PGF_WAITOK
	.comm	_DMAR_PGF_OBJL,4,2              ## @DMAR_PGF_OBJL
	.comm	_TD_PREP_PINNED_ASSERT,4,2      ## @TD_PREP_PINNED_ASSERT
	.comm	_DMAR_PTE_SP,4,2                ## @DMAR_PTE_SP
	.comm	_TD_PINNED_ASSERT,4,2           ## @TD_PINNED_ASSERT
	.no_dead_strip	_domain_unmap_buf_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function domain_unmap_buf_locked
_domain_unmap_buf_locked:               ; @domain_unmap_buf_locked
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_DMAR_DOMAIN_ASSERT_PGLOCKED
	cbz	x19, LBB0_14
; %bb.1:
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _DMAR_DOMAIN_IDMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMAR_DOMAIN_IDMAP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	mov	x1, x21
	bl	_KASSERT
Lloh3:
	adrp	x24, _DMAR_PAGE_MASK@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DMAR_PAGE_MASK@GOTPAGEOFF]
	ldr	x8, [x24]
	tst	x8, x20
	cset	w0, eq
	sxtw	x23, w19
	mov	x1, x23
	bl	_KASSERT
	ldr	x8, [x24]
	tst	x8, x19
	cset	w0, eq
	mov	x1, x23
	bl	_KASSERT
	ldr	x1, [x21, #8]
	lsr	x8, x20, x1
	cmp	x8, #0
	cset	w0, eq
	bl	_KASSERT
	add	x24, x19, x20
	ldr	x1, [x21, #8]
	lsr	x8, x24, x1
	cmp	x8, #0
	cset	w0, eq
	bl	_KASSERT
	cmp	x24, x20
	cset	w0, hi
	mov	x1, x23
	bl	_KASSERT
Lloh5:
	adrp	x8, _DMAR_PGF_WAITOK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMAR_PGF_WAITOK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bics	wzr, w22, w8
	cset	w0, eq
	sxtw	x1, w22
	bl	_KASSERT
	mov	x24, #0
Lloh8:
	adrp	x8, _DMAR_PGF_OBJL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMAR_PGF_OBJL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w22, w8, w22
	sxtw	x23, w22
	str	xzr, [sp, #8]
Lloh11:
	adrp	x27, _DMAR_PTE_SP@GOTPAGE
Lloh12:
	ldr	x27, [x27, _DMAR_PTE_SP@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x5, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	mov	x3, x22
	mov	x4, x26
	mov	w6, #0
	bl	_domain_unmap_clear_pte
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	subs	x19, x19, x24
	cset	w0, hs
	sxtw	x1, w24
	bl	_KASSERT
	add	x20, x24, x20
	cbz	x19, LBB0_12
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w8, [x21, #16]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w25, w25, #1
	ldr	w8, [x21, #16]
	cmp	w25, w8
	b.ge	LBB0_3
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w8, w8, #1
	cmp	w25, w8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x21
	mov	x1, x25
	bl	_domain_is_sp_lvl
	cbz	w0, LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x21
	mov	x1, x25
	bl	_domain_page_size
	mov	x24, x0
	cmp	x0, x19
	b.hi	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	add	x4, sp, #4
	add	x5, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	mov	x3, x22
	bl	_domain_pgtbl_map_pte
	mov	x26, x0
	cmp	x0, #0
	cset	w0, ne
	mov	x1, x23
	bl	_KASSERT
	ldr	w8, [x26]
	ldr	w9, [x27]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	w8, [x21, #16]
	sub	w8, w8, #1
	cmp	w25, w8
	b.ne	LBB0_6
	b	LBB0_2
LBB0_12:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_dmar_unmap_pgtbl
LBB0_14:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_DOMAIN_IDMAP,4,2          ; @DMAR_DOMAIN_IDMAP
	.comm	_DMAR_PAGE_MASK,8,3             ; @DMAR_PAGE_MASK
	.comm	_DMAR_PGF_WAITOK,4,2            ; @DMAR_PGF_WAITOK
	.comm	_DMAR_PGF_OBJL,4,2              ; @DMAR_PGF_OBJL
	.comm	_TD_PREP_PINNED_ASSERT,4,2      ; @TD_PREP_PINNED_ASSERT
	.comm	_DMAR_PTE_SP,4,2                ; @DMAR_PTE_SP
	.comm	_TD_PINNED_ASSERT,4,2           ; @TD_PINNED_ASSERT
	.no_dead_strip	_domain_unmap_buf_locked
.subsections_via_symbols
