	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_unref_domain_locked
_dmar_unref_domain_locked:              ## @dmar_unref_domain_locked
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_DMAR_ASSERT_LOCKED
	movslq	(%rbx), %rsi
	xorl	%edi, %edi
	testq	%rsi, %rsi
	setg	%dil
	callq	_KASSERT
	movslq	4(%rbx), %rsi
	xorl	%edi, %edi
	cmpl	%esi, (%rbx)
	setg	%dil
	callq	_KASSERT
	movl	(%rbx), %eax
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.1:
	decl	%eax
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DMAR_UNLOCK                    ## TAILCALL
LBB0_2:
	movq	_DMAR_DOMAIN_RMRR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	8(%rbx), %eax
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_LIST_REMOVE
	movq	%r14, %rdi
	callq	_DMAR_UNLOCK
	movl	(%r14), %edi
	leaq	12(%rbx), %rsi
	callq	_taskqueue_drain
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dmar_domain_destroy            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_DOMAIN_RMRR,4,2           ## @DMAR_DOMAIN_RMRR
	.comm	_link,4,2                       ## @link
	.no_dead_strip	_dmar_unref_domain_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_unref_domain_locked
_dmar_unref_domain_locked:              ; @dmar_unref_domain_locked
	.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, x1
	mov	x20, x0
	bl	_DMAR_ASSERT_LOCKED
	ldrsw	x1, [x19]
	cmp	x1, #0
	cset	w0, gt
	bl	_KASSERT
	ldp	w8, w1, [x19]
                                        ; kill: def $w1 killed $w1 def $x1
	sxtw	x1, w1
	cmp	w8, w1
	cset	w0, gt
	bl	_KASSERT
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
	sub	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DMAR_UNLOCK
LBB0_2:
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x9, _DMAR_DOMAIN_RMRR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMAR_DOMAIN_RMRR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
Lloh3:
	adrp	x8, _link@GOTPAGE
Lloh4:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_LIST_REMOVE
	mov	x0, x20
	bl	_DMAR_UNLOCK
	ldr	w0, [x20]
	add	x1, x19, #12
	bl	_taskqueue_drain
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dmar_domain_destroy
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_DOMAIN_RMRR,4,2           ; @DMAR_DOMAIN_RMRR
	.comm	_link,4,2                       ; @link
	.no_dead_strip	_dmar_unref_domain_locked
.subsections_via_symbols
