	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function etnaviv_gem_mmap_obj
_etnaviv_gem_mmap_obj:                  ## @etnaviv_gem_mmap_obj
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_VM_PFNMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	andl	16(%rsi), %edi
	movq	_VM_MIXEDMAP@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	%edi, 16(%rsi)
	callq	_vm_get_page_prot
	movl	%eax, %ebx
	movl	(%r15), %eax
	movq	_ETNA_BO_WC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_pgprot_writecombine
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_2:
	movq	_ETNA_BO_UNCACHED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	%ebx, %edi
	callq	_pgprot_noncached
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_4:
	movl	4(%r14), %edi
	callq	_fput
	movl	4(%r15), %edi
	callq	_get_file
	movq	$0, 8(%r14)
	movl	4(%r15), %eax
	movl	%eax, 4(%r14)
LBB0_5:
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_PFNMAP,4,2                  ## @VM_PFNMAP
	.comm	_VM_MIXEDMAP,4,2                ## @VM_MIXEDMAP
	.comm	_ETNA_BO_WC,4,2                 ## @ETNA_BO_WC
	.comm	_ETNA_BO_UNCACHED,4,2           ## @ETNA_BO_UNCACHED
	.no_dead_strip	_etnaviv_gem_mmap_obj
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function etnaviv_gem_mmap_obj
_etnaviv_gem_mmap_obj:                  ; @etnaviv_gem_mmap_obj
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _VM_PFNMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_PFNMAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x1, #16]
	bic	w8, w9, w8
Lloh3:
	adrp	x9, _VM_MIXEDMAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VM_MIXEDMAP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w0, w9, w8
	str	w0, [x1, #16]
	bl	_vm_get_page_prot
	mov	x20, x0
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _ETNA_BO_WC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ETNA_BO_WC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_pgprot_writecombine
	mov	x20, x0
	b	LBB0_5
LBB0_2:
Lloh9:
	adrp	x9, _ETNA_BO_UNCACHED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ETNA_BO_UNCACHED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_pgprot_noncached
	mov	x20, x0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #4]
	bl	_fput
	ldr	w0, [x21, #4]
	bl	_get_file
	str	xzr, [x19, #8]
	ldr	w8, [x21, #4]
	str	w8, [x19, #4]
LBB0_5:
	str	w20, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_PFNMAP,4,2                  ; @VM_PFNMAP
	.comm	_VM_MIXEDMAP,4,2                ; @VM_MIXEDMAP
	.comm	_ETNA_BO_WC,4,2                 ; @ETNA_BO_WC
	.comm	_ETNA_BO_UNCACHED,4,2           ; @ETNA_BO_UNCACHED
	.no_dead_strip	_etnaviv_gem_mmap_obj
.subsections_via_symbols
