	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_file                      ## -- Begin function read_file
	.p2align	4, 0x90
_read_file:                             ## @read_file
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	$0, (%rsi)
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_fseek
	testq	%rax, %rax
	jne	LBB0_9
## %bb.3:
	movq	%rbx, %rdi
	callq	_ftell
	movq	%rax, (%r15)
	cmpq	$-1, %rax
	je	LBB0_8
## %bb.4:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_fseek
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:
	movq	(%r15), %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %r14
	movq	(%r15), %rdx
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	cmpq	(%r15), %rax
	je	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_free
LBB0_8:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%rbx, %rdi
	callq	_fclose
	jmp	LBB0_10
LBB0_1:
	xorl	%r14d, %r14d
LBB0_10:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.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	_read_file                      ; -- Begin function read_file
	.p2align	2
_read_file:                             ; @read_file
	.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
	mov	x20, x1
	str	xzr, [x1]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseek
	cbz	x0, LBB0_6
LBB0_2:
	mov	x21, #0
LBB0_3:
	mov	x0, x19
	bl	_fclose
	b	LBB0_5
LBB0_4:
	mov	x21, #0
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
	mov	x0, x19
	bl	_ftell
	str	x0, [x20]
	cmn	x0, #1
	b.eq	LBB0_2
; %bb.7:
Lloh5:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_fseek
	cbnz	x0, LBB0_2
; %bb.8:
	ldr	x0, [x20]
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_3
; %bb.9:
	ldr	x2, [x20]
	mov	x0, x21
	mov	w1, #1
	mov	x3, x19
	bl	_fread
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.10:
	mov	x0, x21
	bl	_free
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

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