	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_etnaviv_gem_fault              ## -- Begin function etnaviv_gem_fault
	.p2align	4, 0x90
_etnaviv_gem_fault:                     ## @etnaviv_gem_fault
	.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	%rdi, %r14
	movq	8(%rdi), %r12
	movq	8(%r12), %rdi
	callq	_to_etnaviv_bo
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_VM_FAULT_NOPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	callq	_etnaviv_gem_get_pages
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmf_error                      ## TAILCALL
LBB0_2:
	movq	(%r14), %r13
	movq	%r13, %rax
	subq	(%r12), %rax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rax
	movq	(%r15,%rax,8), %rbx
	movq	%rbx, %rdi
	callq	_page_to_pfn
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_page_to_pfn
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%rax, %rcx
	callq	_VERB
	movq	(%r14), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmf_insert_page                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_FAULT_NOPAGE,4,2            ## @VM_FAULT_NOPAGE
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Inserting %p pfn %lx, pa %lx"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_etnaviv_gem_fault              ; -- Begin function etnaviv_gem_fault
	.p2align	2
_etnaviv_gem_fault:                     ; @etnaviv_gem_fault
	.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	x19, x0
	ldr	x20, [x0, #8]
	ldr	x0, [x20, #8]
	bl	_to_etnaviv_bo
	mov	x22, x0
	bl	_mutex_lock_interruptible
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _VM_FAULT_NOPAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_FAULT_NOPAGE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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
	ret
LBB0_2:
	mov	x0, x22
	bl	_etnaviv_gem_get_pages
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x21
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_PTR_ERR
	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	_vmf_error
LBB0_4:
	ldr	x22, [x19]
	ldr	x8, [x20]
	sub	x8, x22, x8
Lloh3:
	adrp	x24, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	x9, [x24]
	lsr	x8, x8, x9
	ldr	x21, [x21, x8, lsl #3]
	mov	x0, x21
	bl	_page_to_pfn
	mov	x23, x0
	mov	x0, x21
	bl	_page_to_pfn
	ldr	x8, [x24]
	lsl	x3, x0, x8
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	bl	_VERB
	ldr	x1, [x19]
	mov	x0, x20
	mov	x2, x21
	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	_vmf_insert_page
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_FAULT_NOPAGE,4,2            ; @VM_FAULT_NOPAGE
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Inserting %p pfn %lx, pa %lx"

.subsections_via_symbols
