	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_mmap                      ## -- Begin function plat_mmap
	.p2align	4, 0x90
_plat_mmap:                             ## @plat_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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r12d
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rsi
	movq	_MAP_ANONYMOUS@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_PROT_EXEC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_2:
	orl	(%rax), %r12d
	orl	(%rsi), %ebx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.3:
	movq	_MAP_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_4:
	orl	%ecx, %ebx
	orl	%edx, %r12d
	movq	_HUGETLB_THRESHOLD@GOTPCREL(%rip), %rcx
	movq	_MAP_HUGETLB@GOTPCREL(%rip), %rdx
	movl	$0, %eax
	cmpq	%r15, (%rcx)
	ja	LBB0_6
## %bb.5:
	movl	(%rdx), %eax
LBB0_6:
	orl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %r13
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r13
	je	LBB0_11
## %bb.7:
	cmpq	%rax, %r13
	jne	LBB0_8
	jmp	LBB0_16
LBB0_11:
	movq	_MAP_HUGETLB@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%ebx, %eax
	je	LBB0_16
## %bb.12:
	cmpb	$0, _plat_mmap.hugetlb_warned(%rip)
	jne	LBB0_14
## %bb.13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movb	$1, _plat_mmap.hugetlb_warned(%rip)
	movl	(%r13), %eax
LBB0_14:
	notl	%eax
	andl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %r13
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r13
	je	LBB0_16
LBB0_8:
	testq	%r14, %r14
	je	LBB0_17
## %bb.9:
	cmpq	%r14, %r13
	je	LBB0_17
## %bb.10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_17
LBB0_16:
	xorl	%r13d, %r13d
LBB0_17:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_plat_mmap.hugetlb_warned,1,2 ## @plat_mmap.hugetlb_warned
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_ANONYMOUS,4,2              ## @MAP_ANONYMOUS
	.comm	_PROT_EXEC,4,2                  ## @PROT_EXEC
	.comm	_MAP_FIXED,4,2                  ## @MAP_FIXED
	.comm	_HUGETLB_THRESHOLD,8,3          ## @HUGETLB_THRESHOLD
	.comm	_MAP_HUGETLB,4,2                ## @MAP_HUGETLB
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"warning: failed to do hugetlb mmap (%p, %zu): %d\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"warning: mmaped to %p, requested %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_mmap                      ; -- Begin function plat_mmap
	.p2align	2
_plat_mmap:                             ; @plat_mmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _MAP_PRIVATE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAP_PRIVATE@GOTPAGEOFF]
Lloh8:
	adrp	x10, _MAP_ANONYMOUS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MAP_ANONYMOUS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh12:
	adrp	x10, _PROT_EXEC@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PROT_EXEC@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w2, #0
	csel	w10, wzr, w10, eq
	orr	w21, w8, w10
Lloh15:
	adrp	x8, _MAP_FIXED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAP_FIXED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w3, #0
	csel	w8, wzr, w8, eq
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _HUGETLB_THRESHOLD@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HUGETLB_THRESHOLD@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
Lloh21:
	adrp	x25, _MAP_HUGETLB@GOTPAGE
Lloh22:
	ldr	x25, [x25, _MAP_HUGETLB@GOTPAGEOFF]
	ldr	w10, [x25]
	cmp	x9, x1
	csel	w9, wzr, w10, hi
	orr	w22, w8, w9
	mov	x2, x21
	mov	x3, x22
	mov	w4, #-1
	mov	w5, #0
	bl	_mmap
Lloh23:
	adrp	x24, _MAP_FAILED@GOTPAGE
Lloh24:
	ldr	x24, [x24, _MAP_FAILED@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x23, x0
	cmp	x23, x8
	b.ne	LBB0_6
	b	LBB0_9
LBB0_2:
	ldr	w8, [x25]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.3:
	adrp	x23, _plat_mmap.hugetlb_warned@PAGE
	ldrb	w9, [x23, _plat_mmap.hugetlb_warned@PAGEOFF]
	tbnz	w9, #0, LBB0_5
; %bb.4:
Lloh25:
	adrp	x8, _stderr@GOTPAGE
Lloh26:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _errno@GOTPAGE
Lloh29:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_fprintf
	mov	w8, #1
	strb	w8, [x23, _plat_mmap.hugetlb_warned@PAGEOFF]
	ldr	w8, [x25]
LBB0_5:
	bic	w3, w22, w8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	w4, #-1
	mov	w5, #0
	bl	_mmap
	mov	x23, x0
	ldr	x8, [x24]
	cmp	x23, x8
	b.eq	LBB0_9
LBB0_6:
	cbz	x19, LBB0_10
; %bb.7:
	cmp	x23, x19
	b.eq	LBB0_10
; %bb.8:
Lloh33:
	adrp	x8, _stderr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x23
	mov	x3, x19
	bl	_fprintf
	b	LBB0_10
LBB0_9:
	mov	x23, #0
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_plat_mmap.hugetlb_warned,1,2 ; @plat_mmap.hugetlb_warned
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_ANONYMOUS,4,2              ; @MAP_ANONYMOUS
	.comm	_PROT_EXEC,4,2                  ; @PROT_EXEC
	.comm	_MAP_FIXED,4,2                  ; @MAP_FIXED
	.comm	_HUGETLB_THRESHOLD,8,3          ; @HUGETLB_THRESHOLD
	.comm	_MAP_HUGETLB,4,2                ; @MAP_HUGETLB
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"warning: failed to do hugetlb mmap (%p, %zu): %d\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"warning: mmaped to %p, requested %p\n"

.subsections_via_symbols
