	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etnaviv_context_map
_etnaviv_context_map:                   ## @etnaviv_context_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, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)
	movq	_SZ_4K@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%rdx, %rdi
	orq	%rsi, %rdi
	orq	%rcx, %rdi
	movq	%r13, %rsi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.2:
	xorl	%r14d, %r14d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r12,%r14), %rsi
	leaq	(%r15,%r14), %r12
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	%r12, %rdx
	movq	%r13, %rcx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%r13, %r14
	cmpq	%r14, %rbx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_3
## %bb.5:
	addq	%r14, %r15
LBB0_6:
	movq	%r15, -48(%rbp)
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str(%rip), %rdi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rsi
	movq	%rbx, %rcx
	movq	%r13, %r8
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_9:
	movl	%eax, %r15d
	movq	%r12, -48(%rbp)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_etnaviv_context_unmap
LBB0_7:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_4K,8,3                      ## @SZ_4K
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unaligned: iova 0x%lx pa %pa size 0x%zx min_pagesz 0x%zx\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_etnaviv_context_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etnaviv_context_map
_etnaviv_context_map:                   ; @etnaviv_context_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x24, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	str	x2, [sp, #8]
Lloh0:
	adrp	x8, _SZ_4K@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SZ_4K@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	orr	x8, x2, x1
	orr	x0, x8, x3
	mov	x1, x22
	bl	_IS_ALIGNED
	cbz	w0, LBB0_7
; %bb.1:
	cbz	x21, LBB0_6
; %bb.2:
	mov	x25, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x19, x25
	add	x27, x20, x25
	ldr	x8, [x23]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x23
	mov	x2, x27
	mov	x3, x22
	mov	x4, x24
	blr	x8
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, x22
	cmp	x21, x25
	b.ne	LBB0_3
; %bb.5:
	add	x20, x20, x25
LBB0_6:
	mov	w26, #0
	str	x20, [sp, #8]
	b	LBB0_9
LBB0_7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x1, x19
	mov	x3, x21
	mov	x4, x22
	bl	_pr_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_9
LBB0_8:
	mov	x26, x0
	str	x27, [sp, #8]
	mov	x0, x23
	mov	x1, x19
	mov	x2, x25
	bl	_etnaviv_context_unmap
LBB0_9:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_4K,8,3                      ; @SZ_4K
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unaligned: iova 0x%lx pa %pa size 0x%zx min_pagesz 0x%zx\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_etnaviv_context_map
.subsections_via_symbols
