	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_bus_dmamem_free
_dmar_bus_dmamem_free:                  ## @dmar_bus_dmamem_free
	.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
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdx), %eax
	movq	_BUS_DMAMAP_DMAR_MALLOC@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_free_domain
	jmp	LBB0_3
LBB0_2:
	movq	_BUS_DMAMAP_DMAR_KMEM_ALLOC@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	andl	(%r12), %eax
	setne	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movl	(%r14), %esi
	movl	%r15d, %edi
	callq	_kmem_free
LBB0_3:
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dmar_bus_dmamap_destroy        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BUS_DMAMAP_DMAR_MALLOC,4,2     ## @BUS_DMAMAP_DMAR_MALLOC
	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_BUS_DMAMAP_DMAR_KMEM_ALLOC,4,2 ## @BUS_DMAMAP_DMAR_KMEM_ALLOC
	.no_dead_strip	_dmar_bus_dmamem_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_bus_dmamem_free
_dmar_bus_dmamem_free:                  ; @dmar_bus_dmamem_free
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _BUS_DMAMAP_DMAR_MALLOC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BUS_DMAMAP_DMAR_MALLOC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _M_DEVBUF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M_DEVBUF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_free_domain
Lloh6:
	adrp	x22, _BUS_DMAMAP_DMAR_MALLOC@GOTPAGE
Lloh7:
	ldr	x22, [x22, _BUS_DMAMAP_DMAR_MALLOC@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x22, _BUS_DMAMAP_DMAR_KMEM_ALLOC@GOTPAGE
Lloh9:
	ldr	x22, [x22, _BUS_DMAMAP_DMAR_KMEM_ALLOC@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	cset	w0, ne
	mov	x1, x19
	bl	_KASSERT
	ldr	w1, [x20]
	mov	x0, x21
	bl	_kmem_free
LBB0_3:
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	mov	x0, x20
	mov	x1, x19
	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_bus_dmamap_destroy
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BUS_DMAMAP_DMAR_MALLOC,4,2     ; @BUS_DMAMAP_DMAR_MALLOC
	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_BUS_DMAMAP_DMAR_KMEM_ALLOC,4,2 ; @BUS_DMAMAP_DMAR_KMEM_ALLOC
	.no_dead_strip	_dmar_bus_dmamem_free
.subsections_via_symbols
