	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function domain_wait_iotlb_flush
_domain_wait_iotlb_flush:               ## @domain_wait_iotlb_flush
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %eax
	movq	%rdi, %r14
	movslq	%edx, %rbx
	movq	_DMAR_IOTLB_REG_OFF@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	movq	_DMAR_IOTLB_IVT@GOTPCREL(%rip), %r12
	movq	_DMAR_IOTLB_DR@GOTPCREL(%rip), %rcx
	movq	_DMAR_IOTLB_DW@GOTPCREL(%rip), %rdx
	orl	(%r12), %eax
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movl	%eax, %edx
	callq	_dmar_write8
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	movq	%r14, %rdi
	callq	_dmar_read8
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cpu_spinwait
	jmp	LBB0_2
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_IOTLB_REG_OFF,8,3         ## @DMAR_IOTLB_REG_OFF
	.comm	_DMAR_IOTLB_IVT,4,2             ## @DMAR_IOTLB_IVT
	.comm	_DMAR_IOTLB_DR,4,2              ## @DMAR_IOTLB_DR
	.comm	_DMAR_IOTLB_DW,4,2              ## @DMAR_IOTLB_DW
	.no_dead_strip	_domain_wait_iotlb_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function domain_wait_iotlb_flush
_domain_wait_iotlb_flush:               ; @domain_wait_iotlb_flush
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x19, x0
	sxtw	x20, w2
Lloh0:
	adrp	x21, _DMAR_IOTLB_REG_OFF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DMAR_IOTLB_REG_OFF@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x8, x8, x20
Lloh2:
	adrp	x22, _DMAR_IOTLB_IVT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _DMAR_IOTLB_IVT@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh4:
	adrp	x10, _DMAR_IOTLB_DR@GOTPAGE
Lloh5:
	ldr	x10, [x10, _DMAR_IOTLB_DR@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
Lloh7:
	adrp	x11, _DMAR_IOTLB_DW@GOTPAGE
Lloh8:
	ldr	x11, [x11, _DMAR_IOTLB_DW@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	orr	w9, w9, w1
	orr	w9, w9, w10
	orr	w2, w9, w11
	mov	x1, x8
	bl	_dmar_write8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x1, x8, x20
	mov	x0, x19
	bl	_dmar_read8
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_spinwait
	b	LBB0_1
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_IOTLB_REG_OFF,8,3         ; @DMAR_IOTLB_REG_OFF
	.comm	_DMAR_IOTLB_IVT,4,2             ; @DMAR_IOTLB_IVT
	.comm	_DMAR_IOTLB_DR,4,2              ; @DMAR_IOTLB_DR
	.comm	_DMAR_IOTLB_DW,4,2              ; @DMAR_IOTLB_DW
	.no_dead_strip	_domain_wait_iotlb_flush
.subsections_via_symbols
