	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk_iommu_unmap_iova
_rk_iommu_unmap_iova:                   ## @rk_iommu_unmap_iova
	.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	%rsi, %r12
	movq	%rdi, %r15
	movq	_SPAGE_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rcx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %rbx
	jmp	LBB0_3
LBB0_1:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %ebx
LBB0_3:
	movq	%r15, %rdi
	callq	_assert_spin_locked
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.5:
	movl	%ebx, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r13,4), %ebx
	movl	%ebx, %edi
	callq	_rk_pte_is_page_valid
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %edi
	callq	_rk_mk_pte_invalid
	movl	%eax, (%r12,%r13,4)
	incq	%r13
	cmpq	%r14, %r13
	jne	LBB0_6
LBB0_8:
	movq	_SPAGE_SIZE@GOTPCREL(%rip), %r14
	jmp	LBB0_9
LBB0_4:
	xorl	%r13d, %r13d
LBB0_9:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_rk_table_flush
	movl	%r13d, %eax
	imulq	(%r14), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPAGE_SIZE,8,3                 ## @SPAGE_SIZE
	.no_dead_strip	_rk_iommu_unmap_iova
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk_iommu_unmap_iova
_rk_iommu_unmap_iova:                   ; @rk_iommu_unmap_iova
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _SPAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SPAGE_SIZE@GOTPAGEOFF]
	ldr	x8, [x24]
	udiv	x23, x3, x8
	bl	_assert_spin_locked
	cbz	w23, LBB0_4
; %bb.1:
	mov	x21, #0
	and	x25, x23, #0xffffffff
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x22, x21, lsl #2]
	mov	x0, x23
	bl	_rk_pte_is_page_valid
	cbz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_rk_mk_pte_invalid
	str	w0, [x22, x21, lsl #2]
	add	x21, x21, #1
	cmp	x21, x25
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_rk_table_flush
	mov	w8, w21
	ldr	x9, [x24]
	mul	x0, x9, x8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SPAGE_SIZE,8,3                 ; @SPAGE_SIZE
	.no_dead_strip	_rk_iommu_unmap_iova
.subsections_via_symbols
