	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_M_ReadFile                     ## -- Begin function M_ReadFile
	.p2align	4, 0x90
_M_ReadFile:                            ## @M_ReadFile
	.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
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_BINARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_open
	movl	%eax, %r12d
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_I_Error
LBB0_2:
	leaq	-48(%rbp), %rsi
	movl	%r12d, %edi
	callq	_fstat
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_I_Error
LBB0_4:
	movl	-48(%rbp), %ebx
	movq	_PU_STATIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_Z_Malloc
	movq	%rax, %r13
	movl	%r12d, %edi
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_read
	movl	%eax, %r14d
	movl	%r12d, %edi
	callq	_close
	cmpl	%ebx, %r14d
	jge	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_I_Error
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't read file %s"

	.comm	_PU_STATIC,4,2                  ## @PU_STATIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_M_ReadFile                     ; -- Begin function M_ReadFile
	.p2align	2
_M_ReadFile:                            ; @M_ReadFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_BINARY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_BINARY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w2, #438
	bl	_open
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_I_Error
LBB0_2:
	add	x1, sp, #8
	mov	x0, x21
	bl	_fstat
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_I_Error
LBB0_4:
	ldr	w22, [sp, #8]
Lloh10:
	adrp	x8, _PU_STATIC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PU_STATIC@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, #0
	bl	_Z_Malloc
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_read
	mov	x24, x0
	mov	x0, x21
	bl	_close
	cmp	w24, w22
	b.ge	LBB0_6
; %bb.5:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_I_Error
LBB0_6:
	str	x23, [x19]
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't read file %s"

	.comm	_PU_STATIC,4,2                  ; @PU_STATIC
.subsections_via_symbols
