	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_domain_unload_entry       ## -- Begin function dmar_domain_unload_entry
	.p2align	4, 0x90
_dmar_domain_unload_entry:              ## @dmar_domain_unload_entry
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	movq	(%rdi), %r14
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_DMAR_LOCK
	movq	16(%rbx), %rdi
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	subq	%rsi, %rdx
	leaq	28(%rbx), %rcx
	movl	$1, %r8d
	callq	_dmar_qi_invalidate_locked
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.2:
	movq	_DMAR_MAP_ENTRY_QI_NF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%rbx)
LBB0_3:
	movq	_dmamap_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DMAR_UNLOCK                    ## TAILCALL
LBB0_4:
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	subq	%rsi, %rdx
	callq	_domain_flush_iotlb_sync
	movq	%rbx, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dmar_domain_free_entry         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_MAP_ENTRY_QI_NF,4,2       ## @DMAR_MAP_ENTRY_QI_NF
	.comm	_dmamap_link,4,2                ## @dmamap_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_domain_unload_entry       ; -- Begin function dmar_domain_unload_entry
	.p2align	2
_dmar_domain_unload_entry:              ; @dmar_domain_unload_entry
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #16]
	ldr	x20, [x0]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_DMAR_LOCK
	ldp	x8, x0, [x19, #8]
	ldr	x1, [x19]
	sub	x2, x8, x1
	add	x3, x19, #28
	mov	w4, #1
	bl	_dmar_qi_invalidate_locked
	cbnz	w21, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _DMAR_MAP_ENTRY_QI_NF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMAR_MAP_ENTRY_QI_NF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
LBB0_3:
Lloh3:
	adrp	x8, _dmamap_link@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dmamap_link@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_TAILQ_INSERT_TAIL
	mov	x0, x20
	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
	b	_DMAR_UNLOCK
LBB0_4:
	ldp	x1, x8, [x19]
	sub	x2, x8, x1
	bl	_domain_flush_iotlb_sync
	mov	x0, x19
	mov	x1, x21
	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
	b	_dmar_domain_free_entry
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_MAP_ENTRY_QI_NF,4,2       ; @DMAR_MAP_ENTRY_QI_NF
	.comm	_dmamap_link,4,2                ; @dmamap_link
.subsections_via_symbols
