	.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	%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	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	leaq	-56(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rsi
	leaq	L_.str.1(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	callq	_emergency
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_13
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_emergency
	movl	$-1, %r14d
	jmp	LBB0_13
LBB0_5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r15
	movq	%r15, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %rbx
	movl	%r12d, %edi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_read
	cmpq	%r15, %rax
	jne	LBB0_8
## %bb.9:
	movl	%r12d, %edi
	callq	_close
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_emergency
	jmp	LBB0_11
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rsi
	leaq	L_.str.3(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_emergency
	movl	%r12d, %edi
	callq	_close
LBB0_11:
	movq	%rbx, %rdi
	callq	_free
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%rbx, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"fstat: %s"

L_.str.2:                               ## @.str.2
	.asciz	"malloc: %s"

L_.str.3:                               ## @.str.3
	.asciz	"read: %s"

L_.str.4:                               ## @.str.4
	.asciz	"close: %s"

	.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:
	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	x22, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x1, sp, #8
	bl	_fstat
	cbz	w0, LBB0_5
; %bb.2:
	mov	x20, x0
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_emergency
	mov	x0, x19
	bl	_close
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_emergency
	mov	w20, #-1
LBB0_4:
	mov	x0, x20
	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
LBB0_5:
	ldr	x24, [sp, #8]
	mov	x0, x24
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.6:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x24
	bl	_read
	cmp	x0, x24
	b.ne	LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_close
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.8:
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_emergency
	mov	x0, x21
	bl	_free
	b	LBB0_4
LBB0_9:
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_emergency
	mov	x0, x19
	bl	_close
	mov	w20, #0
	b	LBB0_4
LBB0_10:
Lloh23:
	adrp	x8, _errno@GOTPAGE
Lloh24:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_emergency
	mov	x0, x19
	bl	_close
	mov	x0, x21
	bl	_free
	mov	w20, #0
	b	LBB0_4
LBB0_11:
	str	x21, [x23]
	str	x24, [x22]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"fstat: %s"

l_.str.2:                               ; @.str.2
	.asciz	"malloc: %s"

l_.str.3:                               ; @.str.3
	.asciz	"read: %s"

l_.str.4:                               ; @.str.4
	.asciz	"close: %s"

	.no_dead_strip	_read_file
.subsections_via_symbols
