	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk_dte_get_page_table
_rk_dte_get_page_table:                 ## @rk_dte_get_page_table
	.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, %rbx
	movq	%rdi, %r12
	addq	$16, %rdi
	callq	_assert_spin_locked
	movq	%rbx, %rdi
	callq	_rk_iova_dte_index
	movq	%rax, %r14
	movq	(%r12), %r13
	movq	(%r13,%rax,8), %rbx
	movq	%rbx, %rdi
	callq	_rk_dte_is_pt_valid
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	movq	%rbx, %rdi
	callq	_rk_dte_pt_address
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phys_to_virt                   ## TAILCALL
LBB0_1:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movq	_GFP_DMA32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r15
	movq	_dma_dev@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_SPAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rsi
	callq	_dma_map_single
	movl	(%rbx), %edi
	movq	%rax, %rbx
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_dma_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_free_page
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%rbx, %r15
	movq	%rbx, %rdi
	callq	_rk_mk_dte
	movq	%rax, %rbx
	movq	%rax, (%r13,%r14,8)
	movq	_NUM_PT_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rk_table_flush
	shlq	$3, %r14
	addq	8(%r12), %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_rk_table_flush
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_GFP_DMA32,4,2                  ## @GFP_DMA32
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_dma_dev,4,2                    ## @dma_dev
	.comm	_SPAGE_SIZE,4,2                 ## @SPAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA mapping error while allocating page table\n"

	.comm	_NUM_PT_ENTRIES,4,2             ## @NUM_PT_ENTRIES
	.no_dead_strip	_rk_dte_get_page_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk_dte_get_page_table
_rk_dte_get_page_table:                 ; @rk_dte_get_page_table
	.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, x1
	mov	x19, x0
	add	x0, x0, #16
	bl	_assert_spin_locked
	mov	x0, x20
	bl	_rk_iova_dte_index
	mov	x20, x0
	ldr	x23, [x19]
	ldr	x21, [x23, x0, lsl #3]
	mov	x0, x21
	bl	_rk_dte_is_pt_valid
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x21
	bl	_rk_dte_pt_address
	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
	b	_phys_to_virt
LBB0_2:
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GFP_DMA32@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GFP_DMA32@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_get_zeroed_page
	cbz	x0, LBB0_5
; %bb.3:
	mov	x21, x0
Lloh6:
	adrp	x24, _dma_dev@GOTPAGE
Lloh7:
	ldr	x24, [x24, _dma_dev@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh8:
	adrp	x8, _SPAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SPAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x1, x21
	bl	_dma_map_single
	mov	x22, x0
	ldr	w0, [x24]
	mov	x1, x22
	bl	_dma_mapping_error
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w0, [x24]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	bl	_free_page
LBB0_5:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_6:
	mov	x0, x22
	bl	_rk_mk_dte
	mov	x21, x0
	lsl	x20, x20, #3
	str	x0, [x23, x20]
Lloh19:
	adrp	x8, _NUM_PT_ENTRIES@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NUM_PT_ENTRIES@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_rk_table_flush
	ldr	x8, [x19, #8]
	add	x1, x8, x20
	mov	x0, x19
	mov	w2, #1
	bl	_rk_table_flush
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_GFP_DMA32,4,2                  ; @GFP_DMA32
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_dma_dev,4,2                    ; @dma_dev
	.comm	_SPAGE_SIZE,4,2                 ; @SPAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA mapping error while allocating page table\n"

	.comm	_NUM_PT_ENTRIES,4,2             ; @NUM_PT_ENTRIES
	.no_dead_strip	_rk_dte_get_page_table
.subsections_via_symbols
