	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_domain_map_buf                 ## -- Begin function domain_map_buf
	.p2align	4, 0x90
_domain_map_buf:                        ## @domain_map_buf
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_DMAR_DOMAIN_IDMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r13), %eax
	sete	%dil
	movq	%r13, %rsi
	callq	_KASSERT
	movq	_DMAR_PAGE_MASK@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	movq	(%r14), %rax
	andq	%r12, %rax
	sete	%dil
	movslq	%ebx, %r15
	movq	%r15, %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	movq	(%r14), %rax
	andq	%rbx, %rax
	sete	%dil
	movq	%r15, %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	movq	%r15, %rsi
	callq	_KASSERT
	movq	8(%r13), %rcx
	movq	%r12, %rax
	shrq	%cl, %rax
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	movq	%rcx, %rsi
	callq	_KASSERT
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	addq	%r12, %rbx
	movq	8(%r13), %rcx
	movq	%rbx, %rax
	shrq	%cl, %rax
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	movq	%rcx, %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	cmpq	%r12, %rbx
	seta	%dil
	movq	%r15, %rsi
	callq	_KASSERT
	movq	_DMAR_PTE_R@GOTPCREL(%rip), %r14
	movq	_DMAR_PTE_W@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	orl	(%r14), %eax
	xorl	%edi, %edi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %eax
	setne	%dil
	movslq	%ecx, %rbx
	movq	%rbx, %rsi
	callq	_KASSERT
	movl	(%r15), %eax
	orl	(%r14), %eax
	movq	_DMAR_PTE_SNP@GOTPCREL(%rip), %r15
	orl	(%r15), %eax
	movq	_DMAR_PTE_TM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	xorl	%edi, %edi
	testl	%ebx, %eax
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movl	$1, %r14d
	movl	$1, %edi
	testl	%ebx, (%r15)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_2
## %bb.1:
	movq	_DMAR_ECAP_SC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	testl	%eax, (%r15)
	setne	%dil
LBB0_2:
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	_DMAR_PTE_TM@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_DMAR_ECAP_DI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, (%r15)
	setne	%r14b
LBB0_4:
	movl	%r14d, %edi
	movq	%rbx, %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	%r13, %rdi
	callq	_DMAR_DOMAIN_PGLOCK
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	callq	_domain_map_buf_locked
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_DMAR_DOMAIN_PGUNLOCK
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.5:
	movl	4(%r15), %eax
	movq	_DMAR_CAP_CM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_domain_flush_iotlb_sync
	jmp	LBB0_9
LBB0_7:
	movq	_DMAR_CAP_RWBF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_DMAR_LOCK
	movq	%r15, %rdi
	callq	_dmar_flush_write_bufs
	movq	%r15, %rdi
	callq	_DMAR_UNLOCK
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %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_PTE_R,4,2                 ## @DMAR_PTE_R
	.comm	_DMAR_PTE_W,4,2                 ## @DMAR_PTE_W
	.comm	_DMAR_PTE_SNP,4,2               ## @DMAR_PTE_SNP
	.comm	_DMAR_PTE_TM,4,2                ## @DMAR_PTE_TM
	.comm	_DMAR_ECAP_SC,4,2               ## @DMAR_ECAP_SC
	.comm	_DMAR_ECAP_DI,4,2               ## @DMAR_ECAP_DI
	.comm	_DMAR_PGF_WAITOK,4,2            ## @DMAR_PGF_WAITOK
	.comm	_DMAR_CAP_CM,4,2                ## @DMAR_CAP_CM
	.comm	_DMAR_CAP_RWBF,4,2              ## @DMAR_CAP_RWBF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_domain_map_buf                 ; -- Begin function domain_map_buf
	.p2align	2
_domain_map_buf:                        ; @domain_map_buf
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x24, x4
	mov	x25, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x0, #16]
	ldr	w8, [x0]
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, x22
	bl	_KASSERT
Lloh3:
	adrp	x27, _DMAR_PAGE_MASK@GOTPAGE
Lloh4:
	ldr	x27, [x27, _DMAR_PAGE_MASK@GOTPAGEOFF]
	ldr	x8, [x27]
	tst	x8, x21
	cset	w0, eq
	sxtw	x26, w20
	mov	x1, x26
	bl	_KASSERT
	ldr	x8, [x27]
	tst	x8, x20
	cset	w0, eq
	mov	x1, x26
	bl	_KASSERT
	cmp	x20, #0
	cset	w0, ne
	mov	x1, x26
	bl	_KASSERT
	ldr	x1, [x22, #8]
	lsr	x8, x21, x1
	cmp	x8, #0
	cset	w0, eq
	bl	_KASSERT
	add	x27, x20, x21
	ldr	x1, [x22, #8]
	lsr	x8, x27, x1
	cmp	x8, #0
	cset	w0, eq
	bl	_KASSERT
	cmp	x27, x21
	cset	w0, hi
	mov	x1, x26
	bl	_KASSERT
Lloh5:
	adrp	x27, _DMAR_PTE_R@GOTPAGE
Lloh6:
	ldr	x27, [x27, _DMAR_PTE_R@GOTPAGEOFF]
Lloh7:
	adrp	x28, _DMAR_PTE_W@GOTPAGE
Lloh8:
	ldr	x28, [x28, _DMAR_PTE_W@GOTPAGEOFF]
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w8, w9, w8
	tst	w8, w24
	cset	w0, ne
	sxtw	x26, w24
	mov	x1, x26
	bl	_KASSERT
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w8, w9, w8
Lloh9:
	adrp	x28, _DMAR_PTE_SNP@GOTPAGE
Lloh10:
	ldr	x28, [x28, _DMAR_PTE_SNP@GOTPAGEOFF]
	ldr	w9, [x28]
	orr	w8, w8, w9
Lloh11:
	adrp	x27, _DMAR_PTE_TM@GOTPAGE
Lloh12:
	ldr	x27, [x27, _DMAR_PTE_TM@GOTPAGEOFF]
	ldr	w9, [x27]
	orr	w8, w8, w9
	bics	wzr, w24, w8
	cset	w0, eq
	mov	x1, x26
	bl	_KASSERT
	ldr	w8, [x28]
	tst	w8, w24
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _DMAR_ECAP_SC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DMAR_ECAP_SC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	mov	x1, x26
	bl	_KASSERT
	ldr	w8, [x27]
	tst	w8, w24
	b.eq	LBB0_5
; %bb.4:
	ldr	w8, [x19]
Lloh16:
	adrp	x9, _DMAR_ECAP_DI@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DMAR_ECAP_DI@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	mov	x1, x26
	bl	_KASSERT
Lloh19:
	adrp	x8, _DMAR_PGF_WAITOK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DMAR_PGF_WAITOK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	bics	wzr, w23, w8
	cset	w0, eq
	sxtw	x1, w23
	bl	_KASSERT
	mov	x0, x22
	bl	_DMAR_DOMAIN_PGLOCK
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x25
	mov	x4, x24
	mov	x5, x23
	bl	_domain_map_buf_locked
	mov	x23, x0
	mov	x0, x22
	bl	_DMAR_DOMAIN_PGUNLOCK
	cbnz	w23, LBB0_11
; %bb.7:
	ldr	w8, [x19, #4]
Lloh22:
	adrp	x9, _DMAR_CAP_CM@GOTPAGE
Lloh23:
	ldr	x9, [x9, _DMAR_CAP_CM@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_domain_flush_iotlb_sync
	b	LBB0_11
LBB0_9:
Lloh25:
	adrp	x9, _DMAR_CAP_RWBF@GOTPAGE
Lloh26:
	ldr	x9, [x9, _DMAR_CAP_RWBF@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_DMAR_LOCK
	mov	x0, x19
	bl	_dmar_flush_write_bufs
	mov	x0, x19
	bl	_DMAR_UNLOCK
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_DOMAIN_IDMAP,4,2          ; @DMAR_DOMAIN_IDMAP
	.comm	_DMAR_PAGE_MASK,8,3             ; @DMAR_PAGE_MASK
	.comm	_DMAR_PTE_R,4,2                 ; @DMAR_PTE_R
	.comm	_DMAR_PTE_W,4,2                 ; @DMAR_PTE_W
	.comm	_DMAR_PTE_SNP,4,2               ; @DMAR_PTE_SNP
	.comm	_DMAR_PTE_TM,4,2                ; @DMAR_PTE_TM
	.comm	_DMAR_ECAP_SC,4,2               ; @DMAR_ECAP_SC
	.comm	_DMAR_ECAP_DI,4,2               ; @DMAR_ECAP_DI
	.comm	_DMAR_PGF_WAITOK,4,2            ; @DMAR_PGF_WAITOK
	.comm	_DMAR_CAP_CM,4,2                ; @DMAR_CAP_CM
	.comm	_DMAR_CAP_RWBF,4,2              ; @DMAR_CAP_RWBF
.subsections_via_symbols
