	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MappedMemoryLoad               ## -- Begin function MappedMemoryLoad
	.p2align	4, 0x90
_MappedMemoryLoad:                      ## @MappedMemoryLoad
	.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
	movl	$-1, %ebx
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r14
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r15
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	%r15, %rdi
	callq	_ftell
	movq	%rax, %r12
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	%r12, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_fread
	movq	%r15, %rdi
	callq	_fclose
	testq	%r12, %r12
	je	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r14,%rbx), %rdi
	movl	(%r13,%rbx,4), %esi
	callq	_MappedMemoryWriteByte
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_6
LBB0_7:
	movq	%r13, %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	%r15, %rdi
	callq	_fclose
	movl	$-2, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MappedMemoryLoad               ; -- Begin function MappedMemoryLoad
	.p2align	2
_MappedMemoryLoad:                      ; @MappedMemoryLoad
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.2:
	mov	x22, x0
Lloh2:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseek
	mov	x0, x22
	bl	_ftell
	mov	x20, x0
Lloh5:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #0
	bl	_fseek
	mov	x0, x20
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
	mov	w1, #1
	mov	x2, x20
	mov	x3, x22
	bl	_fread
	mov	x0, x22
	bl	_fclose
	cbz	x20, LBB0_6
; %bb.4:
	mov	x22, x21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22], #4
	mov	x0, x19
	bl	_MappedMemoryWriteByte
	add	x19, x19, #1
	subs	x20, x20, #1
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x21
	bl	_free
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	w0, #-1
	b	LBB0_9
LBB0_8:
	mov	x0, x22
	bl	_fclose
	mov	w0, #-2
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
.subsections_via_symbols
