	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_editorOpen                     ## -- Begin function editorOpen
	.p2align	4, 0x90
_editorOpen:                            ## @editorOpen
	.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	%rdi, %rbx
	movq	_E@GOTPCREL(%rip), %r12
	movq	$0, 8(%r12)
	movq	(%r12), %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_strdup
	movq	%rax, (%r12)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	movq	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	leaq	-48(%rbp), %r14
	leaq	-56(%rbp), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	decq	%rdx
	movb	$0, (%rcx,%rdx)
	movl	%edx, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%r12), %edi
	movq	-48(%rbp), %rsi
	movl	%eax, %edx
	callq	_editorInsertRow
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_getline
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rcx
	movslq	%eax, %rdx
	movzbl	-1(%rcx,%rdx), %ebx
	cmpb	$13, %bl
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$10, %bl
	je	LBB0_8
	jmp	LBB0_9
LBB0_10:
	movq	-48(%rbp), %rdi
	callq	_free
	movq	%r13, %rdi
	callq	_fclose
	movq	$0, 8(%r12)
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_ENOENT@GOTPCREL(%rip), %rdx
	movl	$1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_2
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	_editorOpen.cold.1
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function editorOpen.cold.1
_editorOpen.cold.1:                     ## @editorOpen.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_E,24,3                         ## @E
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"Opening file"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_editorOpen                     ; -- Begin function editorOpen
	.p2align	2
_editorOpen:                            ; @editorOpen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _E@GOTPAGE
Lloh1:
	ldr	x20, [x20, _E@GOTPAGEOFF]
	str	xzr, [x20, #8]
	ldr	x0, [x20]
	bl	_free
	mov	x0, x19
	bl	_strdup
	str	x0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	stp	xzr, xzr, [sp]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20, #16]
	ldr	x1, [sp, #8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_editorInsertRow
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, sp
	mov	x2, x19
	bl	_getline
	mov	x2, x0
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmn	w2, #1
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	sxtw	x9, w2
	sub	x9, x9, #1
	ldrb	w10, [x8, x9]
	cmp	w10, #13
	ccmp	w10, #10, #4, ne
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	strb	wzr, [x8, x9]
	mov	x2, x9
	b	LBB0_2
LBB0_7:
	ldr	x0, [sp, #8]
	bl	_free
	mov	x0, x19
	bl	_fclose
	mov	w0, #0
	str	xzr, [x20, #8]
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _ENOENT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
	bl	_editorOpen.cold.1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function editorOpen.cold.1
_editorOpen.cold.1:                     ; @editorOpen.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_E,24,3                         ; @E
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"Opening file"

.subsections_via_symbols
