	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk_iommu_disable_stall
_rk_iommu_disable_stall:                ## @rk_iommu_disable_stall
	.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, %r12
	callq	_rk_iommu_is_stall_active
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_RK_MMU_CMD_DISABLE_STALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rk_iommu_command
	movq	_RK_MMU_POLL_PERIOD_US@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_RK_MMU_POLL_TIMEOUT_US@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_rk_iommu_is_stall_active@GOTPCREL(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_readx_poll_timeout
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$0, (%r12)
	jle	LBB0_4
## %bb.5:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	_RK_MMU_STATUS@GOTPCREL(%rip), %r14
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %r13d
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movl	(%r14), %esi
	callq	_rk_iommu_read
	movl	%r13d, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_dev_err
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
## %bb.7:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_8
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_4:
	movl	%eax, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RK_MMU_CMD_DISABLE_STALL,4,2   ## @RK_MMU_CMD_DISABLE_STALL
	.comm	_RK_MMU_POLL_PERIOD_US,4,2      ## @RK_MMU_POLL_PERIOD_US
	.comm	_RK_MMU_POLL_TIMEOUT_US,4,2     ## @RK_MMU_POLL_TIMEOUT_US
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disable stall request timed out, status: %#08x\n"

	.comm	_RK_MMU_STATUS,4,2              ## @RK_MMU_STATUS
	.no_dead_strip	_rk_iommu_disable_stall
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk_iommu_disable_stall
_rk_iommu_disable_stall:                ; @rk_iommu_disable_stall
	.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	x19, x0
	bl	_rk_iommu_is_stall_active
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _RK_MMU_CMD_DISABLE_STALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RK_MMU_CMD_DISABLE_STALL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rk_iommu_command
Lloh3:
	adrp	x8, _RK_MMU_POLL_PERIOD_US@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RK_MMU_POLL_PERIOD_US@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x8, _RK_MMU_POLL_TIMEOUT_US@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RK_MMU_POLL_TIMEOUT_US@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
Lloh9:
	adrp	x0, _rk_iommu_is_stall_active@GOTPAGE
Lloh10:
	ldr	x0, [x0, _rk_iommu_is_stall_active@GOTPAGEOFF]
	mov	x1, x19
	mov	w3, #0
	bl	_readx_poll_timeout
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x23, #0
Lloh11:
	adrp	x24, _RK_MMU_STATUS@GOTPAGE
Lloh12:
	ldr	x24, [x24, _RK_MMU_STATUS@GOTPAGEOFF]
Lloh13:
	adrp	x21, l_.str@PAGE
Lloh14:
	add	x21, x21, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x23, lsl #2]
	ldr	w1, [x24]
	bl	_rk_iommu_read
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_dev_err
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.lt	LBB0_4
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	mov	x0, x20
	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	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_RK_MMU_CMD_DISABLE_STALL,4,2   ; @RK_MMU_CMD_DISABLE_STALL
	.comm	_RK_MMU_POLL_PERIOD_US,4,2      ; @RK_MMU_POLL_PERIOD_US
	.comm	_RK_MMU_POLL_TIMEOUT_US,4,2     ; @RK_MMU_POLL_TIMEOUT_US
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disable stall request timed out, status: %#08x\n"

	.comm	_RK_MMU_STATUS,4,2              ; @RK_MMU_STATUS
	.no_dead_strip	_rk_iommu_disable_stall
.subsections_via_symbols
