	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_instantiate_rmrr_ctxs     ## -- Begin function dmar_instantiate_rmrr_ctxs
	.p2align	4, 0x90
_dmar_instantiate_rmrr_ctxs:            ## @dmar_instantiate_rmrr_ctxs
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_DMAR_BARRIER_RMRR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_dmar_barrier_enter
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -32(%rbp)
	movq	_dmar_inst_rmrr_iter@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-32(%rbp), %rsi
	callq	_dmar_iterate_tbl
	movq	%rbx, %rdi
	callq	_DMAR_LOCK
	leaq	8(%rbx), %rdi
	callq	_LIST_EMPTY
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_3
LBB0_7:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_dmar_barrier_exit
	jmp	LBB0_8
LBB0_1:
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_DMAR_GCMD_TE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	movslq	4(%rbx), %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	callq	_dmar_enable_translation
	movl	%eax, %r14d
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.4:
	movl	4(%rbx), %esi
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_BARRIER_RMRR,4,2          ## @DMAR_BARRIER_RMRR
	.comm	_dmar_inst_rmrr_iter,4,2        ## @dmar_inst_rmrr_iter
	.comm	_DMAR_GCMD_TE,4,2               ## @DMAR_GCMD_TE
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"dmar%d: enabled translation\n"

L_.str.2:                               ## @.str.2
	.asciz	"dmar%d: enabling translation failed, error %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_instantiate_rmrr_ctxs     ; -- Begin function dmar_instantiate_rmrr_ctxs
	.p2align	2
_dmar_instantiate_rmrr_ctxs:            ; @dmar_instantiate_rmrr_ctxs
	.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	x19, x0
Lloh0:
	adrp	x21, _DMAR_BARRIER_RMRR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DMAR_BARRIER_RMRR@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_dmar_barrier_enter
	cbz	w0, LBB0_3
; %bb.1:
	str	x19, [sp, #8]
Lloh2:
	adrp	x8, _dmar_inst_rmrr_iter@GOTPAGE
Lloh3:
	ldr	x8, [x8, _dmar_inst_rmrr_iter@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_dmar_iterate_tbl
	mov	x0, x19
	bl	_DMAR_LOCK
	add	x0, x19, #8
	bl	_LIST_EMPTY
	cbz	w0, LBB0_4
; %bb.2:
	mov	w20, #0
	b	LBB0_9
LBB0_3:
	mov	w20, #0
	b	LBB0_10
LBB0_4:
Lloh5:
	adrp	x8, _DMAR_GCMD_TE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMAR_GCMD_TE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldp	w9, w1, [x19]
                                        ; kill: def $w1 killed $w1 def $x1
	sxtw	x1, w1
	tst	w8, w9
	cset	w0, eq
	bl	_KASSERT
	mov	x0, x19
	bl	_dmar_enable_translation
	mov	x20, x0
Lloh8:
	adrp	x8, _bootverbose@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.5:
	ldr	w1, [x19, #4]
	cbz	w20, LBB0_7
; %bb.6:
	str	x20, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_printf
LBB0_9:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_dmar_barrier_exit
LBB0_10:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_BARRIER_RMRR,4,2          ; @DMAR_BARRIER_RMRR
	.comm	_dmar_inst_rmrr_iter,4,2        ; @dmar_inst_rmrr_iter
	.comm	_DMAR_GCMD_TE,4,2               ; @DMAR_GCMD_TE
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"dmar%d: enabled translation\n"

l_.str.2:                               ; @.str.2
	.asciz	"dmar%d: enabling translation failed, error %d\n"

.subsections_via_symbols
