	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_os_map_memory                  ## -- Begin function os_map_memory
	.p2align	4, 0x90
_os_map_memory:                         ## @os_map_memory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%r9d, %r11d
	movq	%rdx, %r9
	movl	%esi, %r10d
	testl	%r8d, %r8d
	je	LBB0_2
## %bb.1:
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_2:
	movl	16(%rbp), %eax
	testl	%r11d, %r11d
	je	LBB0_4
## %bb.3:
	movq	_PROT_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r11d
LBB0_4:
	orl	%r8d, %r11d
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_PROT_EXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	orl	%eax, %r11d
	movq	_MAP_SHARED@GOTPCREL(%rip), %rdx
	movq	_MAP_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	movq	%rcx, %rsi
	movl	%r11d, %edx
	movl	%eax, %ecx
	movl	%r10d, %r8d
	callq	_mmap64
	movq	_MAP_FAILED@GOTPCREL(%rip), %rdx
	movq	_errno@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	subl	(%rsi), %ecx
	cmpq	(%rdx), %rax
	cmovnel	%edi, %ecx
	movl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_PROT_EXEC,4,2                  ## @PROT_EXEC
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FIXED,4,2                  ## @MAP_FIXED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_os_map_memory                  ; -- Begin function os_map_memory
	.p2align	2
_os_map_memory:                         ; @os_map_memory
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x10, x3
	mov	x8, x2
	mov	x9, x1
Lloh0:
	adrp	x11, _PROT_READ@GOTPAGE
Lloh1:
	ldr	x11, [x11, _PROT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
Lloh3:
	adrp	x12, _PROT_WRITE@GOTPAGE
Lloh4:
	ldr	x12, [x12, _PROT_WRITE@GOTPAGEOFF]
	cmp	w4, #0
	csel	w11, wzr, w11, eq
Lloh5:
	ldr	w12, [x12]
	cmp	w5, #0
	csel	w12, wzr, w12, eq
Lloh6:
	adrp	x13, _PROT_EXEC@GOTPAGE
Lloh7:
	ldr	x13, [x13, _PROT_EXEC@GOTPAGEOFF]
	orr	w11, w12, w11
Lloh8:
	ldr	w12, [x13]
	cmp	w6, #0
	csel	w12, wzr, w12, eq
Lloh9:
	adrp	x13, _MAP_SHARED@GOTPAGE
Lloh10:
	ldr	x13, [x13, _MAP_SHARED@GOTPAGEOFF]
	orr	w2, w11, w12
Lloh11:
	ldr	w11, [x13]
Lloh12:
	adrp	x12, _MAP_FIXED@GOTPAGE
Lloh13:
	ldr	x12, [x12, _MAP_FIXED@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	orr	w3, w12, w11
	mov	x1, x10
	mov	x4, x9
	mov	x5, x8
	bl	_mmap64
Lloh15:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _errno@GOTPAGE
Lloh19:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	x0, x8
	csneg	w0, wzr, w9, ne
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_PROT_EXEC,4,2                  ; @PROT_EXEC
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FIXED,4,2                  ; @MAP_FIXED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
