	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_mmu_unmap             ## -- Begin function panfrost_mmu_unmap
	.p2align	4, 0x90
_panfrost_mmu_unmap:                    ## @panfrost_mmu_unmap
	.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, %r15
	movl	32(%rdi), %edi
	callq	_to_panfrost_device
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r15), %rax
	movq	8(%rax), %r13
	movq	8(%r15), %rbx
	movq	16(%r15), %r12
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	%r14d, %ecx
	shlq	%cl, %r12
	xorl	%edi, %edi
	cmpl	$0, (%r15)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movl	%r14d, %ecx
	shlq	%cl, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r15), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rcx
	movq	%r12, %r8
	callq	_dev_dbg
	testq	%r12, %r12
	je	LBB0_6
## %bb.2:
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%r14, %rbx
	addq	%r14, %r15
	cmpq	%r15, %r12
	jbe	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rsi
	subq	%r15, %rsi
	movq	%rbx, %rdi
	callq	_get_pgsize
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	*8(%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	*(%r13)
	xorl	%edi, %edi
	cmpq	%r14, %rax
	setne	%dil
	callq	_WARN_ON
	jmp	LBB0_5
LBB0_6:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rdx
	movq	24(%rbx), %rsi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rcx
	callq	_panfrost_mmu_flush_range
	movl	$0, (%rbx)
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unmap: as=%d, iova=%llx, len=%zx"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_mmu_unmap             ; -- Begin function panfrost_mmu_unmap
	.p2align	2
_panfrost_mmu_unmap:                    ; @panfrost_mmu_unmap
	.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
	ldr	w0, [x0, #32]
	bl	_to_panfrost_device
	mov	x20, x0
	ldp	x22, x8, [x19, #16]
	ldr	x21, [x8, #8]
Lloh0:
	adrp	x25, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	x23, [x25]
	ldr	x24, [x19, #8]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_7
; %bb.1:
	lsl	x22, x22, x23
	lsl	x23, x24, x23
	ldr	w0, [x20]
	ldr	x8, [x19, #24]
	ldr	w2, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x23
	mov	x4, x22
	bl	_dev_dbg
	cbz	x22, LBB0_6
; %bb.2:
	mov	x26, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x24, x23
	add	x26, x24, x26
	cmp	x22, x26
	b.ls	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x1, x22, x26
	mov	x0, x23
	bl	_get_pgsize
	mov	x24, x0
	ldr	x8, [x21, #8]
	mov	x0, x21
	mov	x1, x23
	blr	x8
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	mov	x3, #0
	blr	x8
	cmp	x0, x24
	cset	w0, ne
	bl	_WARN_ON
	b	LBB0_3
LBB0_6:
	ldr	x1, [x19, #24]
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	lsl	x2, x8, x9
	mov	x0, x20
	mov	x3, x22
	bl	_panfrost_mmu_flush_range
	str	wzr, [x19]
LBB0_7:
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unmap: as=%d, iova=%llx, len=%zx"

.subsections_via_symbols
