	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk_iommu_map
_rk_iommu_map:                          ## @rk_iommu_map
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r13
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	callq	_to_rk_domain
	movq	%rax, %r14
	leaq	8(%rax), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rk_dte_get_page_table
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	(%r14), %r13
	movq	%rbx, %rdi
	callq	_rk_iova_dte_index
	movq	(%r13,%rax,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rk_iova_pte_index
	movq	%rax, %r13
	leaq	(%r15,%rax,8), %r15
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_rk_dte_pt_address
	leaq	(%rax,%r13,8), %rdx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rcx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_rk_iommu_map_iova
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rk_iommu_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk_iommu_map
_rk_iommu_map:                          ; @rk_iommu_map
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	bl	_to_rk_domain
	mov	x24, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x24
	mov	x1, x23
	bl	_rk_dte_get_page_table
	mov	x25, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	ldr	x26, [x24]
	mov	x0, x23
	bl	_rk_iova_dte_index
	ldr	x26, [x26, x0, lsl #3]
	mov	x0, x23
	bl	_rk_iova_pte_index
	lsl	x27, x0, #3
	add	x25, x25, x27
	mov	x0, x26
	bl	_rk_dte_pt_address
	add	x2, x0, x27
	mov	x0, x24
	mov	x1, x25
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x6, x19
	bl	_rk_iommu_map_iova
	mov	x19, x0
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rk_iommu_map
.subsections_via_symbols
