	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_destroy_domain_context
_arm_smmu_destroy_domain_context:       ## @arm_smmu_destroy_domain_context
	.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, %r15
	callq	_to_smmu_domain
	movq	24(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	_IOMMU_DOMAIN_IDENTITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	callq	_arm_smmu_rpm_get
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movq	24(%rbx), %rax
	movq	8(%r14), %rsi
	movq	$0, (%rax,%rsi,8)
	movq	%rbx, %rdi
	callq	_arm_smmu_write_context_bank
	movq	16(%r14), %rax
	movq	_INVALID_IRPTNDX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rcx
	addq	8(%rbx), %rax
	movl	(%rcx,%rax,4), %esi
	movl	20(%rbx), %edi
	movq	%r15, %rdx
	callq	_devm_free_irq
LBB0_5:
	movl	(%r14), %edi
	callq	_free_io_pgtable_ops
	movl	16(%rbx), %edi
	movq	8(%r14), %rsi
	callq	___arm_smmu_free_bitmap
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_arm_smmu_rpm_put               ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOMMU_DOMAIN_IDENTITY,8,3      ## @IOMMU_DOMAIN_IDENTITY
	.comm	_INVALID_IRPTNDX,8,3            ## @INVALID_IRPTNDX
	.no_dead_strip	_arm_smmu_destroy_domain_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_destroy_domain_context
_arm_smmu_destroy_domain_context:       ; @arm_smmu_destroy_domain_context
	.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, x0
	bl	_to_smmu_domain
	ldr	x19, [x0, #24]
	cbz	x19, LBB0_6
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _IOMMU_DOMAIN_IDENTITY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IOMMU_DOMAIN_IDENTITY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_arm_smmu_rpm_get
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	x1, [x20, #8]
	str	xzr, [x8, x1, lsl #3]
	mov	x0, x19
	bl	_arm_smmu_write_context_bank
	ldr	x8, [x20, #16]
Lloh3:
	adrp	x9, _INVALID_IRPTNDX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INVALID_IRPTNDX@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	ldp	x9, x10, [x19]
	add	x8, x10, x8
	ldr	w1, [x9, x8, lsl #2]
	ldr	w0, [x19, #20]
	mov	x2, x21
	bl	_devm_free_irq
LBB0_5:
	ldr	w0, [x20]
	bl	_free_io_pgtable_ops
	ldr	w0, [x19, #16]
	ldr	x1, [x20, #8]
	bl	___arm_smmu_free_bitmap
	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	_arm_smmu_rpm_put
LBB0_6:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IOMMU_DOMAIN_IDENTITY,8,3      ; @IOMMU_DOMAIN_IDENTITY
	.comm	_INVALID_IRPTNDX,8,3            ; @INVALID_IRPTNDX
	.no_dead_strip	_arm_smmu_destroy_domain_context
.subsections_via_symbols
