	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_edit1                          ## -- Begin function edit1
	.p2align	4, 0x90
_edit1:                                 ## @edit1
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -168(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_msgCount@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_25
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	movq	_SIGINT@GOTPCREL(%rip), %r12
	leaq	-160(%rbp), %r13
	movq	%rdi, -184(%rbp)                ## 8-byte Spill
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	movl	(%r14,%rbx,4), %esi
	testl	%esi, %esi
	je	LBB0_25
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movq	_stdin@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$100, %esi
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_25
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rax
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=2
	cmpb	$9, %cl
	jne	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	incq	%rax
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rax), %ecx
	cmpb	$31, %cl
	jle	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpb	$32, %cl
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$110, %cl
	je	LBB0_24
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$113, %cl
	je	LBB0_25
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -176(%rbp)                ## 8-byte Spill
	movl	(%r14,%rbx,4), %esi
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -176(%rbp)                ## 8-byte Spill
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_message@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movslq	%esi, %r13
	decq	%r13
	shlq	$5, %r13
	leaq	(%rbx,%r13), %r14
	movq	_dot@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	%r14, %rdi
	callq	_touch
	movl	(%r12), %edi
	movq	_SIG_IGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movl	%eax, %r15d
	movq	%r14, -192(%rbp)                ## 8-byte Spill
	movq	%r14, %rdi
	callq	_setinput
	movq	%rbx, -200(%rbp)                ## 8-byte Spill
	movq	(%rbx,%r13), %rsi
	movq	_readonly@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	movl	-168(%rbp), %edx                ## 4-byte Reload
	callq	_run_editor
	testq	%rax, %rax
	movq	-184(%rbp), %r14                ## 8-byte Reload
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r12
	movl	%r15d, -164(%rbp)               ## 4-byte Spill
	movq	_otf@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_fseeko
	movl	(%r15), %edi
	callq	_ftello
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_blockof
	movq	-200(%rbp), %rbx                ## 8-byte Reload
	movl	%eax, 24(%rbx,%r13)
	movl	%r14d, %edi
	movq	%r15, %r14
	callq	_boffsetof
	movl	%eax, 20(%rbx,%r13)
	movq	%r12, %rdi
	callq	_fsize
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	leaq	(%rbx,%r13), %r15
	addq	$8, %r15
	movq	$0, 8(%rbx,%r13)
	movq	_MODIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx,%r13)
	movq	%r12, %rdi
	callq	_rewind
	movq	_EOF@GOTPCREL(%rip), %rbx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=2
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_putc
	cmpl	(%rbx), %eax
	je	LBB0_20
LBB0_16:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_getc
	cmpl	(%rbx), %eax
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	cmpl	$10, %eax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	incq	(%r15)
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_Fclose
	movq	-184(%rbp), %r14                ## 8-byte Reload
	movl	-164(%rbp), %r15d               ## 4-byte Reload
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_SIGINT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	%r15d, %esi
	callq	_signal
	movq	_msgCount@GOTPCREL(%rip), %r15
	movq	-176(%rbp), %rbx                ## 8-byte Reload
	leaq	-160(%rbp), %r13
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	xorl	%eax, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_msgCount,4,2                   ## @msgCount
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Edit message %d [ynq]? "

	.comm	_stdin,4,2                      ## @stdin
	.comm	_message,8,3                    ## @message
	.comm	_dot,8,3                        ## @dot
	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_SIG_IGN,4,2                    ## @SIG_IGN
	.comm	_readonly,4,2                   ## @readonly
	.comm	_otf,4,2                        ## @otf
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_MODIFY,4,2                     ## @MODIFY
	.comm	_EOF,4,2                        ## @EOF
L_.str.1:                               ## @.str.1
	.asciz	"/tmp"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_edit1                          ; -- Begin function edit1
	.p2align	2
_edit1:                                 ; @edit1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x27, _msgCount@GOTPAGE
Lloh4:
	ldr	x27, [x27, _msgCount@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x28, #0
Lloh5:
	adrp	x26, _message@GOTPAGE
Lloh6:
	ldr	x26, [x26, _message@GOTPAGEOFF]
Lloh7:
	adrp	x25, _SIGINT@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SIGINT@GOTPAGEOFF]
Lloh9:
	adrp	x22, _otf@GOTPAGE
Lloh10:
	ldr	x22, [x22, _otf@GOTPAGEOFF]
Lloh11:
	adrp	x21, _EOF@GOTPAGE
Lloh12:
	ldr	x21, [x21, _EOF@GOTPAGEOFF]
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	str	w1, [sp, #4]                    ; 4-byte Folded Spill
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	ldr	w1, [x20, x28, lsl #2]
	cbz	w1, LBB0_24
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	x28, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_printf
Lloh15:
	adrp	x8, _stdin@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	add	x0, sp, #20
	mov	w1, #100
	bl	_fgets
	cbz	x0, LBB0_24
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, sp, #20
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	cmp	w9, #9
	b.ne	LBB0_12
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x8, x8, #1
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x8]
	cmp	w9, #31
	b.le	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	cmp	w9, #32
	b.eq	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	cmp	w9, #110
	b.eq	LBB0_23
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	cmp	w9, #113
	b.eq	LBB0_24
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x20, x28, lsl #2]
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x26]
	sxtw	x9, w1
	sub	x9, x9, #1
	add	x24, x8, x9, lsl #5
Lloh18:
	adrp	x8, _dot@GOTPAGE
Lloh19:
	ldr	x8, [x8, _dot@GOTPAGEOFF]
Lloh20:
	str	x24, [x8]
	mov	x0, x24
	bl	_touch
	mov	x20, x25
	ldr	w0, [x25]
Lloh21:
	adrp	x8, _SIG_IGN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SIG_IGN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_signal
	mov	x23, x0
	mov	x0, x24
	bl	_setinput
	ldr	x1, [x24]
Lloh24:
	adrp	x8, _readonly@GOTPAGE
Lloh25:
	ldr	x8, [x8, _readonly@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	mov	x2, x19
	bl	_run_editor
	cbz	x0, LBB0_22
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	mov	x19, x27
	mov	x27, x26
	ldr	w0, [x22]
Lloh27:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseeko
	ldr	w0, [x22]
	bl	_ftello
	mov	x26, x0
	bl	_blockof
	str	w0, [x24, #24]
	mov	x0, x26
	bl	_boffsetof
	str	w0, [x24, #20]
	mov	x0, x25
	bl	_fsize
	str	x0, [x24]
	str	xzr, [x24, #8]!
Lloh30:
	adrp	x8, _MODIFY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MODIFY@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	ldr	w9, [x24, #8]
	orr	w8, w9, w8
	str	w8, [x24, #8]
	mov	x0, x25
	bl	_rewind
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	ldr	w1, [x22]
	bl	_putc
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_19
LBB0_16:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x25
	bl	_getc
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	cmp	w0, #10
	b.ne	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=2
	ldr	x8, [x24]
	add	x8, x8, #1
	str	x8, [x24]
	b	LBB0_15
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	bl	_ferror
	cbz	x0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
LBB0_21:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	bl	_Fclose
	mov	x26, x27
	mov	x27, x19
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
LBB0_22:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x20
	ldr	w0, [x20]
	mov	x1, x23
	bl	_signal
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
LBB0_23:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x28, x28, #1
	ldrsw	x8, [x27]
	cmp	x28, x8
	b.lt	LBB0_2
LBB0_24:
	ldur	x8, [x29, #-88]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	mov	w0, #0
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_msgCount,4,2                   ; @msgCount
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Edit message %d [ynq]? "

	.comm	_stdin,4,2                      ; @stdin
	.comm	_message,8,3                    ; @message
	.comm	_dot,8,3                        ; @dot
	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_SIG_IGN,4,2                    ; @SIG_IGN
	.comm	_readonly,4,2                   ; @readonly
	.comm	_otf,4,2                        ; @otf
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_MODIFY,4,2                     ; @MODIFY
	.comm	_EOF,4,2                        ; @EOF
l_.str.1:                               ; @.str.1
	.asciz	"/tmp"

.subsections_via_symbols
