	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_device_shutdown
_arm_smmu_device_shutdown:              ## @arm_smmu_device_shutdown
	.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	%rdi, %r14
	callq	_platform_get_drvdata
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movl	12(%rax), %edi
	movq	_ARM_SMMU_MAX_CBS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bitmap_empty
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
LBB0_3:
	movq	%rbx, %rdi
	callq	_arm_smmu_rpm_get
	movq	_ARM_SMMU_GR0_sCR0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_sCR0_CLIENTPD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_arm_smmu_gr0_write
	movq	%rbx, %rdi
	callq	_arm_smmu_rpm_put
	movl	8(%rbx), %edi
	callq	_pm_runtime_enabled
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	8(%rbx), %edi
	callq	_pm_runtime_force_suspend
	jmp	LBB0_6
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_clk_bulk_disable
LBB0_6:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_clk_bulk_unprepare             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ARM_SMMU_MAX_CBS,4,2           ## @ARM_SMMU_MAX_CBS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"removing device with active domains!\n"

	.comm	_ARM_SMMU_GR0_sCR0,4,2          ## @ARM_SMMU_GR0_sCR0
	.comm	_sCR0_CLIENTPD,4,2              ## @sCR0_CLIENTPD
	.no_dead_strip	_arm_smmu_device_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_device_shutdown
_arm_smmu_device_shutdown:              ; @arm_smmu_device_shutdown
	.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	x20, x0
	bl	_platform_get_drvdata
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #12]
Lloh0:
	adrp	x8, _ARM_SMMU_MAX_CBS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARM_SMMU_MAX_CBS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_bitmap_empty
	cbnz	w0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_3:
	mov	x0, x19
	bl	_arm_smmu_rpm_get
Lloh5:
	adrp	x8, _ARM_SMMU_GR0_sCR0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARM_SMMU_GR0_sCR0@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _sCR0_CLIENTPD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _sCR0_CLIENTPD@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_arm_smmu_gr0_write
	mov	x0, x19
	bl	_arm_smmu_rpm_put
	ldr	w0, [x19, #8]
	bl	_pm_runtime_enabled
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w0, [x19, #8]
	bl	_pm_runtime_force_suspend
	b	LBB0_7
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldp	w1, w0, [x19]
	bl	_clk_bulk_disable
LBB0_7:
	ldp	w1, w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_clk_bulk_unprepare
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ARM_SMMU_MAX_CBS,4,2           ; @ARM_SMMU_MAX_CBS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"removing device with active domains!\n"

	.comm	_ARM_SMMU_GR0_sCR0,4,2          ; @ARM_SMMU_GR0_sCR0
	.comm	_sCR0_CLIENTPD,4,2              ; @sCR0_CLIENTPD
	.no_dead_strip	_arm_smmu_device_shutdown
.subsections_via_symbols
