	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vgem_prime_mmap
_vgem_prime_mmap:                       ## @vgem_prime_mmap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rsi), %rax
	subq	8(%rsi), %rax
	cmpq	%rax, (%rdi)
	jge	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_4
## %bb.5:
	movq	%rsi, %rbx
	callq	_call_mmap
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	24(%rbx), %edi
	callq	_fput
	movl	8(%r14), %edi
	callq	_get_file
	movl	%eax, 24(%rbx)
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rax
	movq	_VM_DONTDUMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	orl	16(%rbx), %edi
	movl	%edi, 16(%rbx)
	callq	_vm_get_page_prot
	movl	%eax, %edi
	callq	_pgprot_writecombine
	movl	%eax, 20(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ## @VM_DONTDUMP
	.no_dead_strip	_vgem_prime_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vgem_prime_mmap
_vgem_prime_mmap:                       ; @vgem_prime_mmap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	ldp	x9, x10, [x1]
	sub	x9, x9, x10
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x20, x0
	ldr	w0, [x0, #8]
	cbz	w0, LBB0_5
; %bb.3:
	mov	x19, x1
	bl	_call_mmap
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	w0, [x19, #24]
	bl	_fput
	ldr	w0, [x20, #8]
	bl	_get_file
	str	w0, [x19, #24]
Lloh2:
	adrp	x8, _VM_DONTEXPAND@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VM_DONTEXPAND@GOTPAGEOFF]
Lloh4:
	adrp	x9, _VM_DONTDUMP@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VM_DONTDUMP@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #16]
	orr	w0, w8, w9
	str	w0, [x19, #16]
	bl	_vm_get_page_prot
	bl	_pgprot_writecombine
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #20]
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ; @VM_DONTDUMP
	.no_dead_strip	_vgem_prime_mmap
.subsections_via_symbols
