	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readfile
_readfile:                              ## @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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	-32(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movl	-32(%rbp), %edi
	incl	%edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %rbx
	movl	-32(%rbp), %edx
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r14, %rcx
	callq	_fread
	cmpl	-32(%rbp), %eax
	jne	LBB0_9
## %bb.5:
	cltq
	movb	$0, (%rbx,%rax)
	testq	%r15, %r15
	je	LBB0_11
## %bb.6:
	movl	-32(%rbp), %eax
	movl	%eax, (%r15)
	jmp	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	callq	_free
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%r14, %rdi
	callq	_fclose
LBB0_12:
	movq	%rbx, %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"

	.no_dead_strip	_readfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readfile
_readfile:                              ; @readfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	add	x1, sp, #8
	bl	_stat
	cbz	x0, LBB0_2
LBB0_1:
	mov	x21, #0
	b	LBB0_9
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_1
; %bb.3:
	mov	x19, x0
	ldr	w8, [sp, #8]
	add	w0, w8, #1
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w2, [sp, #8]
	mov	x0, x21
	mov	w1, #1
	mov	x3, x19
	bl	_fread
	ldr	w8, [sp, #8]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.5:
	strb	wzr, [x21, w0, sxtw]
	cbz	x20, LBB0_8
; %bb.6:
	ldr	w8, [sp, #8]
	str	w8, [x20]
	b	LBB0_8
LBB0_7:
	mov	x0, x21
	bl	_free
	mov	x21, #0
LBB0_8:
	mov	x0, x19
	bl	_fclose
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.no_dead_strip	_readfile
.subsections_via_symbols
