	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadFileMemory                 ## -- Begin function ReadFileMemory
	.p2align	4, 0x90
_ReadFileMemory:                        ## @ReadFileMemory
	.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	%rdx, %r14
	movq	%rsi, %r15
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	%rbx, %rdi
	callq	_ftell
	movq	%rax, (%r15)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	(%r15), %r14
	leaq	1(%r14), %rdi
	callq	_malloc
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	callq	_fread
	xorl	%r12d, %r12d
	cmpq	(%r15), %rax
	sete	%r12b
LBB0_4:
	movq	%rbx, %rdi
	callq	_fclose
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	jmp	LBB0_5
LBB0_1:
	xorl	%r12d, %r12d
LBB0_5:
	movl	%r12d, %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	_ReadFileMemory                 ; -- Begin function ReadFileMemory
	.p2align	2
_ReadFileMemory:                        ; @ReadFileMemory
	.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
	mov	x19, x2
	mov	x21, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, 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, x20
	bl	_ftell
	str	x0, [x21]
Lloh5:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_fseek
	ldr	x23, [x21]
	add	x0, x23, #1
	bl	_malloc
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x22
	mov	w1, #1
	mov	x2, x23
	mov	x3, x20
	bl	_fread
	ldr	x8, [x21]
	cmp	x0, x8
	cset	w21, eq
	b	LBB0_5
LBB0_3:
	mov	w21, #0
	b	LBB0_6
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	x0, x20
	bl	_fclose
	str	x22, [x19]
LBB0_6:
	mov	x0, x21
	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
	.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
