	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mspec_mmap
_mspec_mmap:                            ## @mspec_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	%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
	cmpq	$0, (%rsi)
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %rbx
	movl	8(%rsi), %eax
	movq	_VM_SHARED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.4:
	movq	_VM_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.6:
	movl	%edx, %r14d
	movl	12(%rbx), %eax
	subl	16(%rbx), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	leal	24(,%rax,8), %r12d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_7
## %bb.8:
	movl	%r12d, %edi
	callq	_vmalloc
	movq	%rax, %r15
	movq	_VMD_VMALLOCED@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testq	%r15, %r15
	je	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movl	16(%rbx), %eax
	movl	%eax, (%r15)
	movl	12(%rbx), %eax
	movl	%eax, 4(%r15)
	movl	%r13d, 8(%r15)
	movl	%r14d, 12(%r15)
	leaq	20(%r15), %rdi
	callq	_spin_lock_init
	movl	$1, %edi
	callq	_ATOMIC_INIT
	movl	%eax, 16(%r15)
	movq	%r15, 40(%rbx)
	movq	_VM_IO@GOTPCREL(%rip), %rax
	movq	_VM_RESERVED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_VM_PFNMAP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, 8(%rbx)
	movslq	12(%r15), %rax
	movq	_MSPEC_FETCHOP@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_13
## %bb.12:
	movq	_MSPEC_UNCACHED@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_14
LBB0_13:
	movl	32(%rbx), %edi
	callq	_pgprot_noncached
	movl	%eax, 32(%rbx)
LBB0_14:
	movq	_mspec_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_5:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_kmalloc
	movq	%rax, %r15
	xorl	%r13d, %r13d
	testq	%r15, %r15
	jne	LBB0_11
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VM_SHARED,4,2                  ## @VM_SHARED
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_VMD_VMALLOCED,4,2              ## @VMD_VMALLOCED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VM_IO,4,2                      ## @VM_IO
	.comm	_VM_RESERVED,4,2                ## @VM_RESERVED
	.comm	_VM_PFNMAP,4,2                  ## @VM_PFNMAP
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.comm	_MSPEC_FETCHOP,8,3              ## @MSPEC_FETCHOP
	.comm	_MSPEC_UNCACHED,8,3             ## @MSPEC_UNCACHED
	.comm	_mspec_vm_ops,4,2               ## @mspec_vm_ops
	.no_dead_strip	_mspec_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mspec_mmap
_mspec_mmap:                            ; @mspec_mmap
	.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
	ldr	x8, [x1]
	cbz	x8, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
	mov	x19, x1
	ldr	w8, [x1, #8]
Lloh2:
	adrp	x9, _VM_SHARED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _VM_SHARED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.5:
Lloh5:
	adrp	x9, _VM_WRITE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VM_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.6:
	mov	x20, x2
	ldp	w8, w9, [x19, #12]
	sub	w8, w8, w9
Lloh8:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	asr	w8, w8, w9
	lsl	w8, w8, #3
	add	w22, w8, #24
Lloh11:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_12
; %bb.7:
	mov	x0, x22
	bl	_vmalloc
	mov	x21, x0
Lloh14:
	adrp	x8, _VMD_VMALLOCED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VMD_VMALLOCED@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
	cbz	x21, LBB0_13
LBB0_8:
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	ldur	d0, [x19, #12]
	rev64.2s	v0, v0
	str	d0, [x21]
	stp	w23, w20, [x21, #8]
	add	x0, x21, #20
	bl	_spin_lock_init
	mov	w0, #1
	bl	_ATOMIC_INIT
	str	w0, [x21, #16]
	str	x21, [x19, #40]
Lloh17:
	adrp	x8, _VM_IO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VM_IO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _VM_RESERVED@GOTPAGE
Lloh21:
	ldr	x9, [x9, _VM_RESERVED@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _VM_PFNMAP@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VM_PFNMAP@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh26:
	adrp	x9, _VM_DONTEXPAND@GOTPAGE
Lloh27:
	ldr	x9, [x9, _VM_DONTEXPAND@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x19, #8]
	orr	w8, w8, w9
	str	w8, [x19, #8]
	ldrsw	x8, [x21, #12]
Lloh29:
	adrp	x9, _MSPEC_FETCHOP@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MSPEC_FETCHOP@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
Lloh32:
	adrp	x10, _MSPEC_UNCACHED@GOTPAGE
Lloh33:
	ldr	x10, [x10, _MSPEC_UNCACHED@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x10, x8, #4, ne
	b.ne	LBB0_10
; %bb.9:
	ldr	w0, [x19, #32]
	bl	_pgprot_noncached
	str	w0, [x19, #32]
LBB0_10:
	mov	w0, #0
Lloh35:
	adrp	x8, _mspec_vm_ops@GOTPAGE
Lloh36:
	ldr	x8, [x8, _mspec_vm_ops@GOTPAGEOFF]
	str	x8, [x19, #24]
	b	LBB0_3
LBB0_11:
Lloh37:
	adrp	x8, _EPERM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_2
LBB0_12:
Lloh39:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_kmalloc
	mov	x21, x0
	mov	w23, #0
	cbnz	x21, LBB0_8
LBB0_13:
Lloh42:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VM_SHARED,4,2                  ; @VM_SHARED
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_VMD_VMALLOCED,4,2              ; @VMD_VMALLOCED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VM_IO,4,2                      ; @VM_IO
	.comm	_VM_RESERVED,4,2                ; @VM_RESERVED
	.comm	_VM_PFNMAP,4,2                  ; @VM_PFNMAP
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.comm	_MSPEC_FETCHOP,8,3              ; @MSPEC_FETCHOP
	.comm	_MSPEC_UNCACHED,8,3             ; @MSPEC_UNCACHED
	.comm	_mspec_vm_ops,4,2               ; @mspec_vm_ops
	.no_dead_strip	_mspec_mmap
.subsections_via_symbols
