	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_file
_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
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	%rbx, %rdi
	callq	_ftell
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_rewind
	leal	1(%r15), %edi
	callq	_parson_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_9
LBB0_5:
	movq	%rbx, %rdi
	callq	_fclose
	movq	%r14, %rdi
	callq	_parson_free
	jmp	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	callq	_fclose
LBB0_7:
	xorl	%r14d, %r14d
LBB0_8:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	callq	_fclose
	movb	$0, (%r14,%r15)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.no_dead_strip	_read_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_file
_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
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_fseek
	mov	x0, x19
	bl	_ftell
	tbnz	x0, #63, LBB0_7
; %bb.2:
	mov	x21, x0
	mov	x0, x19
	bl	_rewind
	add	w0, w21, #1
	bl	_parson_malloc
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.3:
	mov	x0, x20
	mov	w1, #1
	mov	x2, x21
	mov	x3, x19
	bl	_fread
	cbz	x0, LBB0_5
; %bb.4:
	mov	x21, x0
	mov	x0, x19
	bl	_ferror
	cbz	x0, LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_fclose
	mov	x0, x20
	bl	_parson_free
LBB0_6:
	mov	x20, #0
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_fclose
	mov	x20, #0
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_fclose
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_fclose
	strb	wzr, [x20, x21]
LBB0_10:
	mov	x0, x20
	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	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.no_dead_strip	_read_file
.subsections_via_symbols
