	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_domain_free
_arm_smmu_domain_free:                  ## @arm_smmu_domain_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_smmu_domain
	movq	%rax, %r14
	movq	16(%rax), %r15
	movq	%rbx, %rdi
	callq	_iommu_put_dma_cookie
	movl	48(%r14), %edi
	callq	_free_io_pgtable_ops
	movq	(%r14), %rax
	movq	_ARM_SMMU_DOMAIN_S1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	40(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.2:
	movq	16(%r14), %rax
	movl	8(%rax), %edi
	movq	_CTXDESC_CD_DWORDS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$3, %esi
	movl	32(%r14), %ecx
	callq	_dmam_free_coherent
	movl	4(%r15), %edi
	movq	24(%r14), %rsi
	jmp	LBB0_5
LBB0_3:
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.4:
	movl	(%r15), %edi
LBB0_5:
	callq	_arm_smmu_bitmap_free
LBB0_6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ARM_SMMU_DOMAIN_S1,8,3         ## @ARM_SMMU_DOMAIN_S1
	.comm	_CTXDESC_CD_DWORDS,4,2          ## @CTXDESC_CD_DWORDS
	.no_dead_strip	_arm_smmu_domain_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_domain_free
_arm_smmu_domain_free:                  ; @arm_smmu_domain_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	x20, x0
	bl	_to_smmu_domain
	mov	x19, x0
	ldr	x21, [x0, #16]
	mov	x0, x20
	bl	_iommu_put_dma_cookie
	ldr	w0, [x19, #48]
	bl	_free_io_pgtable_ops
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _ARM_SMMU_DOMAIN_S1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ARM_SMMU_DOMAIN_S1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x2, [x19, #40]
	cbz	x2, LBB0_6
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #8]
Lloh3:
	adrp	x8, _CTXDESC_CD_DWORDS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CTXDESC_CD_DWORDS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w1, w8, #3
	ldr	w3, [x19, #32]
	bl	_dmam_free_coherent
	ldr	w0, [x21, #4]
	ldr	x1, [x19, #24]
	b	LBB0_5
LBB0_3:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_6
; %bb.4:
	ldr	w0, [x21]
LBB0_5:
	bl	_arm_smmu_bitmap_free
LBB0_6:
	mov	x0, 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	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ARM_SMMU_DOMAIN_S1,8,3         ; @ARM_SMMU_DOMAIN_S1
	.comm	_CTXDESC_CD_DWORDS,4,2          ; @CTXDESC_CD_DWORDS
	.no_dead_strip	_arm_smmu_domain_free
.subsections_via_symbols
