	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcom_iommu_detach_dev
_qcom_iommu_detach_dev:                 ## @qcom_iommu_detach_dev
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_dev_iommu_fwspec_get
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_to_iommu
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_to_qcom_iommu_domain
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_pm_runtime_get_sync
	cmpl	$0, (%r12)
	je	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_ARM_SMMU_CB_SCTLR@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_to_ctx
	movq	%rax, %r13
	movl	(%r14), %esi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_iommu_writel
	movq	$0, (%r13)
	incq	%rbx
	movl	(%r12), %eax
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_pm_runtime_put_sync
	movq	$0, (%r15)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARM_SMMU_CB_SCTLR,4,2          ## @ARM_SMMU_CB_SCTLR
	.no_dead_strip	_qcom_iommu_detach_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcom_iommu_detach_dev
_qcom_iommu_detach_dev:                 ; @qcom_iommu_detach_dev
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	mov	x0, x1
	bl	_dev_iommu_fwspec_get
	mov	x19, x0
	bl	_to_iommu
	mov	x21, x0
	mov	x0, x20
	bl	_to_qcom_iommu_domain
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w0, [x21]
	bl	_pm_runtime_get_sync
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x23, #0
Lloh0:
	adrp	x24, _ARM_SMMU_CB_SCTLR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ARM_SMMU_CB_SCTLR@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x19
	bl	_to_ctx
	mov	x22, x0
	ldr	w1, [x24]
	mov	w2, #0
	bl	_iommu_writel
	str	xzr, [x22]
	add	x23, x23, #1
	ldr	w8, [x19]
	cmp	x23, x8
	b.lo	LBB0_3
LBB0_4:
	ldr	w0, [x21]
	bl	_pm_runtime_put_sync
	str	xzr, [x20]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ARM_SMMU_CB_SCTLR,4,2          ; @ARM_SMMU_CB_SCTLR
	.no_dead_strip	_qcom_iommu_detach_dev
.subsections_via_symbols
