	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_domain_destroy
_dmar_domain_destroy:                   ## @dmar_domain_destroy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	addq	$52, %rdi
	callq	_TAILQ_EMPTY
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_KASSERT
	leaq	48(%rbx), %rdi
	callq	_LIST_EMPTY
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	(%rbx), %rsi
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	callq	_KASSERT
	movq	8(%rbx), %rsi
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	callq	_KASSERT
	movl	16(%rbx), %eax
	movq	_DMAR_DOMAIN_GAS_INITED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_DMAR_DOMAIN_LOCK
	movq	%rbx, %rdi
	callq	_dmar_gas_fini_domain
	movq	%rbx, %rdi
	callq	_DMAR_DOMAIN_UNLOCK
	movl	16(%rbx), %eax
LBB0_2:
	movq	_DMAR_DOMAIN_PGTBL_INITED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.3:
	cmpq	$0, 40(%rbx)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_DMAR_DOMAIN_PGLOCK
LBB0_5:
	movq	%rbx, %rdi
	callq	_domain_free_pgtbl
LBB0_6:
	leaq	32(%rbx), %rdi
	callq	_mtx_destroy
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	callq	_free_unr
	movq	_M_DMAR_DOMAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_DOMAIN_GAS_INITED,4,2     ## @DMAR_DOMAIN_GAS_INITED
	.comm	_DMAR_DOMAIN_PGTBL_INITED,4,2   ## @DMAR_DOMAIN_PGTBL_INITED
	.comm	_M_DMAR_DOMAIN,4,2              ## @M_DMAR_DOMAIN
	.no_dead_strip	_dmar_domain_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_domain_destroy
_dmar_domain_destroy:                   ; @dmar_domain_destroy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x0, x0, #52
	bl	_TAILQ_EMPTY
	mov	x1, x19
	bl	_KASSERT
	add	x0, x19, #48
	bl	_LIST_EMPTY
	mov	x1, x19
	bl	_KASSERT
	ldr	x1, [x19]
	cmp	x1, #0
	cset	w0, eq
	bl	_KASSERT
	ldr	x1, [x19, #8]
	cmp	x1, #0
	cset	w0, eq
	bl	_KASSERT
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x9, _DMAR_DOMAIN_GAS_INITED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMAR_DOMAIN_GAS_INITED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_DMAR_DOMAIN_LOCK
	mov	x0, x19
	bl	_dmar_gas_fini_domain
	mov	x0, x19
	bl	_DMAR_DOMAIN_UNLOCK
	ldr	w8, [x19, #16]
LBB0_2:
Lloh3:
	adrp	x9, _DMAR_DOMAIN_PGTBL_INITED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMAR_DOMAIN_PGTBL_INITED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_DMAR_DOMAIN_PGLOCK
LBB0_5:
	mov	x0, x19
	bl	_domain_free_pgtbl
LBB0_6:
	add	x0, x19, #32
	bl	_mtx_destroy
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	ldr	w1, [x19, #20]
	bl	_free_unr
Lloh6:
	adrp	x8, _M_DMAR_DOMAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_DMAR_DOMAIN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_DOMAIN_GAS_INITED,4,2     ; @DMAR_DOMAIN_GAS_INITED
	.comm	_DMAR_DOMAIN_PGTBL_INITED,4,2   ; @DMAR_DOMAIN_PGTBL_INITED
	.comm	_M_DMAR_DOMAIN,4,2              ; @M_DMAR_DOMAIN
	.no_dead_strip	_dmar_domain_destroy
.subsections_via_symbols
