	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gru_file_mmap
_gru_file_mmap:                         ## @gru_file_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %eax
	movq	_VM_SHARED@GOTPCREL(%rip), %rcx
	movq	_VM_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%eax, %ecx
	notl	%ecx
	testl	%ecx, %edx
	jne	LBB0_1
## %bb.3:
	movq	%rsi, %r15
	movq	_GRU_GSEG_PAGESIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	decl	%ecx
	testl	%ecx, 4(%rsi)
	jne	LBB0_5
## %bb.4:
	testl	%ecx, 8(%r15)
	je	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rdi, %r14
	movq	_VM_IO@GOTPCREL(%rip), %rcx
	movq	_VM_PFNMAP@GOTPCREL(%rip), %rdx
	movq	_VM_LOCKED@GOTPCREL(%rip), %rsi
	movq	_VM_DONTCOPY@GOTPCREL(%rip), %rdi
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rbx
	movq	_VM_DONTDUMP@GOTPCREL(%rip), %r8
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	orl	(%rdi), %eax
	orl	(%rbx), %eax
	orl	(%r8), %eax
	movl	%eax, (%r15)
	movq	_PAGE_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	_gru_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r15)
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_gru_alloc_vma_data
	movl	%eax, 12(%r15)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_grudev@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	4(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movq	%r15, %r8
	movl	%eax, %r9d
	callq	_gru_dbg
	jmp	LBB0_9
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_SHARED,4,2                  ## @VM_SHARED
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_GRU_GSEG_PAGESIZE,4,2          ## @GRU_GSEG_PAGESIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VM_IO,4,2                      ## @VM_IO
	.comm	_VM_PFNMAP,4,2                  ## @VM_PFNMAP
	.comm	_VM_LOCKED,4,2                  ## @VM_LOCKED
	.comm	_VM_DONTCOPY,4,2                ## @VM_DONTCOPY
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ## @VM_DONTDUMP
	.comm	_PAGE_SHARED,4,2                ## @PAGE_SHARED
	.comm	_gru_vm_ops,4,2                 ## @gru_vm_ops
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_grudev,4,2                     ## @grudev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file %p, vaddr 0x%lx, vma %p, vdata %p\n"

	.no_dead_strip	_gru_file_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gru_file_mmap
_gru_file_mmap:                         ; @gru_file_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	w8, [x1]
Lloh0:
	adrp	x9, _VM_SHARED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VM_SHARED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _VM_WRITE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _VM_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bics	wzr, w9, w8
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	w10, [x1, #4]
Lloh6:
	adrp	x9, _GRU_GSEG_PAGESIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GRU_GSEG_PAGESIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sub	w9, w9, #1
	tst	w9, w10
	b.ne	LBB0_3
; %bb.2:
	ldr	w10, [x19, #8]
	tst	w10, w9
	b.eq	LBB0_7
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _EPERM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x20, x0
Lloh13:
	adrp	x9, _VM_IO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _VM_IO@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _VM_PFNMAP@GOTPAGE
Lloh17:
	ldr	x10, [x10, _VM_PFNMAP@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
Lloh19:
	adrp	x11, _VM_LOCKED@GOTPAGE
Lloh20:
	ldr	x11, [x11, _VM_LOCKED@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
Lloh22:
	adrp	x12, _VM_DONTCOPY@GOTPAGE
Lloh23:
	ldr	x12, [x12, _VM_DONTCOPY@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
Lloh25:
	adrp	x13, _VM_DONTEXPAND@GOTPAGE
Lloh26:
	ldr	x13, [x13, _VM_DONTEXPAND@GOTPAGEOFF]
Lloh27:
	ldr	w13, [x13]
Lloh28:
	adrp	x14, _VM_DONTDUMP@GOTPAGE
Lloh29:
	ldr	x14, [x14, _VM_DONTDUMP@GOTPAGEOFF]
Lloh30:
	ldr	w14, [x14]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w8, w8, w12
	orr	w8, w8, w13
	orr	w8, w8, w14
Lloh31:
	adrp	x9, _PAGE_SHARED@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PAGE_SHARED@GOTPAGEOFF]
	str	w8, [x19]
Lloh33:
	ldr	w8, [x9]
	str	w8, [x19, #24]
Lloh34:
	adrp	x8, _gru_vm_ops@GOTPAGE
Lloh35:
	ldr	x8, [x8, _gru_vm_ops@GOTPAGEOFF]
	str	x8, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_gru_alloc_vma_data
	str	w0, [x19, #12]
	cbz	w0, LBB0_9
; %bb.8:
	mov	x5, x0
Lloh36:
	adrp	x8, _grudev@GOTPAGE
Lloh37:
	ldr	x8, [x8, _grudev@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	ldr	w3, [x19, #4]
Lloh39:
	adrp	x1, l_.str@PAGE
Lloh40:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x4, x19
	bl	_gru_dbg
	mov	w0, #0
	b	LBB0_6
LBB0_9:
Lloh41:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_SHARED,4,2                  ; @VM_SHARED
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_GRU_GSEG_PAGESIZE,4,2          ; @GRU_GSEG_PAGESIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VM_IO,4,2                      ; @VM_IO
	.comm	_VM_PFNMAP,4,2                  ; @VM_PFNMAP
	.comm	_VM_LOCKED,4,2                  ; @VM_LOCKED
	.comm	_VM_DONTCOPY,4,2                ; @VM_DONTCOPY
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ; @VM_DONTDUMP
	.comm	_PAGE_SHARED,4,2                ; @PAGE_SHARED
	.comm	_gru_vm_ops,4,2                 ; @gru_vm_ops
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_grudev,4,2                     ; @grudev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file %p, vaddr 0x%lx, vma %p, vdata %p\n"

	.no_dead_strip	_gru_file_mmap
.subsections_via_symbols
