	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_mmap
_do_mmap:                               ## @do_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movl	%esi, %edi
	callq	_PAGE_ROUND_UP
	movl	%eax, %r15d
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_PGOFFSET
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_20
LBB0_3:
	movq	%rbx, %rdi
	callq	_PAGE
	movq	%rax, %rbx
	movq	_MMAP_FIXED@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_7
## %bb.4:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_pt_is_hole
	testl	%eax, %eax
	jne	LBB0_7
LBB0_5:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_pt_find_hole
	movq	%rax, %rbx
	movq	_BAD_PAGE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_7
## %bb.6:
	movq	__ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_20
LBB0_7:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	_MMAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	%r12d, %r13d
	je	LBB0_9
## %bb.8:
	movq	_P_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_9:
	orl	%r14d, %r13d
	movq	_MMAP_ANONYMOUS@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_12
## %bb.10:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	callq	_pt_map_nothing
	testl	%eax, %eax
	js	LBB0_19
LBB0_11:
	movq	_PAGE_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	jmp	LBB0_20
LBB0_12:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_f_get
	testq	%rax, %rax
	je	LBB0_17
## %bb.13:
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	(%rax), %r10
	testq	%r10, %r10
	je	LBB0_18
## %bb.14:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movl	%r12d, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	callq	*%r10
	testl	%eax, %eax
	js	LBB0_19
## %bb.15:
	movq	%r14, %rdi
	callq	_fd_retain
	movl	%eax, %r14d
	movq	_current@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_mem_pt
	movq	(%rax), %rax
	movl	%r14d, 4(%rax)
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_mem_pt
	movq	(%rax), %rax
	movl	%r15d, (%rax)
	jmp	LBB0_11
LBB0_19:
	movslq	%eax, %rbx
	jmp	LBB0_20
LBB0_17:
	movq	__EBADF@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_20
LBB0_18:
	movq	__ENODEV@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_20:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__EINVAL,8,3                    ## @_EINVAL
	.comm	_MMAP_FIXED,4,2                 ## @MMAP_FIXED
	.comm	_current,8,3                    ## @current
	.comm	_BAD_PAGE,8,3                   ## @BAD_PAGE
	.comm	__ENOMEM,8,3                    ## @_ENOMEM
	.comm	_MMAP_SHARED,4,2                ## @MMAP_SHARED
	.comm	_P_SHARED,4,2                   ## @P_SHARED
	.comm	_MMAP_ANONYMOUS,4,2             ## @MMAP_ANONYMOUS
	.comm	__EBADF,8,3                     ## @_EBADF
	.comm	__ENODEV,8,3                    ## @_ENODEV
	.comm	_PAGE_BITS,8,3                  ## @PAGE_BITS
	.no_dead_strip	_do_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_mmap
_do_mmap:                               ; @do_mmap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x5
	mov	x23, x4
	mov	x21, x3
	mov	x24, x2
	mov	x20, x0
	mov	x0, x1
	bl	_PAGE_ROUND_UP
	mov	x22, x0
	cbz	x20, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_PGOFFSET
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, __EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	b	LBB0_17
LBB0_3:
	mov	x0, x20
	bl	_PAGE
	mov	x20, x0
Lloh3:
	adrp	x8, _MMAP_FIXED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMAP_FIXED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_7
; %bb.4:
Lloh6:
	adrp	x8, _current@GOTPAGE
Lloh7:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x20
	mov	x2, x22
	bl	_pt_is_hole
	cbnz	w0, LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _current@GOTPAGE
Lloh10:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_pt_find_hole
	mov	x20, x0
Lloh12:
	adrp	x8, _BAD_PAGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BAD_PAGE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
Lloh15:
	adrp	x8, __ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, __ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x8]
	b	LBB0_17
LBB0_7:
Lloh18:
	adrp	x8, _MMAP_SHARED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MMAP_SHARED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _P_SHARED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _P_SHARED@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w8, w21
	csel	w8, wzr, w9, eq
	orr	w24, w8, w24
Lloh24:
	adrp	x8, _MMAP_ANONYMOUS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MMAP_ANONYMOUS@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.8:
Lloh27:
	adrp	x8, _current@GOTPAGE
Lloh28:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x20
	mov	x2, x22
	mov	x3, x24
	bl	_pt_map_nothing
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_14
LBB0_9:
Lloh30:
	adrp	x8, _PAGE_BITS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PAGE_BITS@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	lsl	x0, x20, x8
	b	LBB0_17
LBB0_10:
	mov	x0, x23
	bl	_f_get
	cbz	x0, LBB0_15
; %bb.11:
	mov	x23, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.12:
Lloh33:
	adrp	x25, _current@GOTPAGE
Lloh34:
	ldr	x25, [x25, _current@GOTPAGEOFF]
	ldr	x9, [x25]
	ldr	w1, [x9]
	mov	x0, x23
	mov	x2, x20
	mov	x3, x22
	mov	x4, x19
	mov	x5, x24
	mov	x6, x21
	blr	x8
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_14
; %bb.13:
	mov	x0, x23
	bl	_fd_retain
	mov	x21, x0
	ldr	x8, [x25]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_mem_pt
	ldr	x8, [x0]
	str	w21, [x8, #4]
	ldr	x8, [x25]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_mem_pt
	ldr	x8, [x0]
	str	w19, [x8]
	b	LBB0_9
LBB0_14:
	sxtw	x0, w0
	b	LBB0_17
LBB0_15:
Lloh35:
	adrp	x8, __EBADF@GOTPAGE
Lloh36:
	ldr	x8, [x8, __EBADF@GOTPAGEOFF]
Lloh37:
	ldr	x0, [x8]
	b	LBB0_17
LBB0_16:
Lloh38:
	adrp	x8, __ENODEV@GOTPAGE
Lloh39:
	ldr	x8, [x8, __ENODEV@GOTPAGEOFF]
Lloh40:
	ldr	x0, [x8]
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	__EINVAL,8,3                    ; @_EINVAL
	.comm	_MMAP_FIXED,4,2                 ; @MMAP_FIXED
	.comm	_current,8,3                    ; @current
	.comm	_BAD_PAGE,8,3                   ; @BAD_PAGE
	.comm	__ENOMEM,8,3                    ; @_ENOMEM
	.comm	_MMAP_SHARED,4,2                ; @MMAP_SHARED
	.comm	_P_SHARED,4,2                   ; @P_SHARED
	.comm	_MMAP_ANONYMOUS,4,2             ; @MMAP_ANONYMOUS
	.comm	__EBADF,8,3                     ; @_EBADF
	.comm	__ENODEV,8,3                    ; @_ENODEV
	.comm	_PAGE_BITS,8,3                  ; @PAGE_BITS
	.no_dead_strip	_do_mmap
.subsections_via_symbols
