	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_mmu_map               ## -- Begin function panfrost_mmu_map
	.p2align	4, 0x90
_panfrost_mmu_map:                      ## @panfrost_mmu_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_to_panfrost_device
	movq	%rax, %r15
	movq	_IOMMU_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_IOMMU_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	(%rbx), %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
LBB0_3:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	24(%rbx), %rdi
	movq	16(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_IOMMU_NOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_drm_gem_shmem_get_pages_sgt
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	%eax, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	orl	%r14d, %r13d
	xorl	%eax, %eax
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	cmovel	%eax, %r15d
	orl	%r13d, %r15d
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %ecx
	movq	%r12, %r8
	callq	_mmu_map_sg
	movl	$1, (%rbx)
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_IOMMU_READ,4,2                 ## @IOMMU_READ
	.comm	_IOMMU_WRITE,4,2                ## @IOMMU_WRITE
	.comm	_IOMMU_NOEXEC,4,2               ## @IOMMU_NOEXEC
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_mmu_map               ; -- Begin function panfrost_mmu_map
	.p2align	2
_panfrost_mmu_map:                      ; @panfrost_mmu_map
	.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, x0
	mov	x21, x0
	ldr	w0, [x21, #24]!
	bl	_to_panfrost_device
	mov	x20, x0
Lloh0:
	adrp	x8, _IOMMU_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOMMU_READ@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _IOMMU_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOMMU_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w0, [x19]
	bl	_WARN_ON
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	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
LBB0_2:
	ldr	x24, [x19, #16]
Lloh6:
	adrp	x8, _IOMMU_NOEXEC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IOMMU_NOEXEC@GOTPAGEOFF]
Lloh8:
	ldr	w25, [x8]
	mov	x0, x21
	bl	_drm_gem_shmem_get_pages_sgt
	mov	x21, x0
	bl	_IS_ERR
	bl	_WARN_ON
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	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
	b	_PTR_ERR
LBB0_4:
	orr	w8, w23, w22
	cmp	x24, #0
	csel	w9, wzr, w25, eq
	orr	w3, w8, w9
	ldp	w8, w1, [x19, #4]
Lloh9:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w2, w8, w9
	mov	x0, x20
	mov	x4, x21
	bl	_mmu_map_sg
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IOMMU_READ,4,2                 ; @IOMMU_READ
	.comm	_IOMMU_WRITE,4,2                ; @IOMMU_WRITE
	.comm	_IOMMU_NOEXEC,4,2               ; @IOMMU_NOEXEC
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
.subsections_via_symbols
