	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save1                          ## -- Begin function save1
	.p2align	4, 0x90
_save1:                                 ## @save1
	.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	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movq	_msgCount@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	8(,%rax,4), %edi
	callq	_salloc
	movq	%rax, %r12
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_snarf
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movq	%rax, %r15
	cmpl	$0, -44(%rbp)
	je	LBB0_12
LBB0_2:
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_getmsglist
	testq	%rax, %rax
	js	LBB0_21
LBB0_3:
	movq	%r15, %rdi
	callq	_expand
	testq	%rax, %rax
	je	LBB0_21
## %bb.4:
	movq	%rax, %r13
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_fflush
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_access
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rbx
	cmovnsq	%rax, %rbx
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	callq	_Fopen
	testq	%rax, %rax
	je	LBB0_18
## %bb.5:
	movq	%rax, %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	xorl	%r15d, %r15d
	addq	$4, %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %eax
	addq	$4, %r15
	addq	$4, %r12
	testl	%eax, %eax
	je	LBB0_14
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rcx
	sarq	$2, %rcx
	movq	_msgCount@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdx
	cmpq	%rdx, %rcx
	jge	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_message@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	leaq	(%rcx,%rax,4), %rbx
	addq	$-4, %rbx
	movq	%rbx, %rdi
	callq	_touch
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_sendmessage
	testq	%rax, %rax
	js	LBB0_19
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_MSAVED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	jmp	LBB0_7
LBB0_12:
	movq	_MMNORM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_first
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movl	$0, 4(%r12)
	cmpl	$0, -44(%rbp)
	jne	LBB0_2
	jmp	LBB0_3
LBB0_14:
	movq	%r14, %rdi
	callq	_fflush
	movq	%r14, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_warn
LBB0_16:
	movq	%r14, %rdi
	callq	_Fclose
	leaq	L_.str.6(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_printf
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_17:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_printf
	jmp	LBB0_21
LBB0_18:
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_20
LBB0_19:
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	callq	_warnx
	movq	%r14, %rdi
	callq	_Fclose
LBB0_20:
	movl	$1, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_msgCount,4,2                   ## @msgCount
	.comm	_MMNORM,4,2                     ## @MMNORM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No messages to %s.\n"

L_.str.1:                               ## @.str.1
	.asciz	"\"%s\" "

	.comm	_stdout,8,3                     ## @stdout
L_.str.2:                               ## @.str.2
	.asciz	"[Appended]"

L_.str.3:                               ## @.str.3
	.asciz	"[New file]"

L_.str.4:                               ## @.str.4
	.asciz	"a"

	.comm	_message,8,3                    ## @message
L_.str.5:                               ## @.str.5
	.asciz	"%s"

	.comm	_MSAVED,4,2                     ## @MSAVED
L_.str.6:                               ## @.str.6
	.asciz	"%s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save1                          ; -- Begin function save1
	.p2align	2
_save1:                                 ; @save1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x25, _msgCount@GOTPAGE
Lloh1:
	ldr	x25, [x25, _msgCount@GOTPAGEOFF]
	ldr	w8, [x25]
	lsl	w8, w8, #2
	add	w0, w8, #8
	bl	_salloc
	mov	x24, x0
	add	x1, sp, #28
	mov	x0, x21
	bl	_snarf
	cbz	x0, LBB0_20
; %bb.1:
	mov	x23, x0
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_12
LBB0_2:
	mov	x0, x21
	mov	x1, x24
	mov	w2, #0
	bl	_getmsglist
	tbnz	x0, #63, LBB0_20
LBB0_3:
	mov	x0, x23
	bl	_expand
	cbz	x0, LBB0_20
; %bb.4:
	mov	x21, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_printf
Lloh4:
	adrp	x8, _stdout@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh6:
	ldr	x0, [x8]
	bl	_fflush
	mov	x0, x21
	mov	w1, #0
	bl	_access
Lloh7:
	adrp	x8, l_.str.3@PAGE
Lloh8:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh9:
	adrp	x9, l_.str.2@PAGE
Lloh10:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x0, #0
	csel	x22, x9, x8, ge
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_Fopen
	cbz	x0, LBB0_18
; %bb.5:
	mov	x23, x0
	str	x22, [sp, #16]                  ; 8-byte Folded Spill
	ldr	w8, [x24]
	cbz	w8, LBB0_14
; %bb.6:
	mov	x26, #0
	add	x27, x24, #4
Lloh13:
	adrp	x28, _message@GOTPAGE
Lloh14:
	ldr	x28, [x28, _message@GOTPAGEOFF]
Lloh15:
	adrp	x22, _MSAVED@GOTPAGE
Lloh16:
	ldr	x22, [x22, _MSAVED@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x27], #4
	add	x26, x26, #4
	cbz	w8, LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x9, [x25]
	cmp	x9, x26, asr #2
	b.le	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x28]
	sub	w8, w8, #1
	add	x24, x9, w8, sxtw #2
	mov	x0, x24
	bl	_touch
	mov	x0, x24
	mov	x1, x23
	mov	x2, x19
	mov	x3, #0
	bl	_sendmessage
	tbnz	x0, #63, LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cbz	w20, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22]
	ldr	w9, [x24]
	orr	w8, w9, w8
	str	w8, [x24]
	b	LBB0_7
LBB0_12:
Lloh17:
	adrp	x8, _MMNORM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMNORM@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_first
	str	w0, [x24]
	cbz	w0, LBB0_17
; %bb.13:
	str	wzr, [x24, #4]
	ldr	w8, [sp, #28]
	cbnz	w8, LBB0_2
	b	LBB0_3
LBB0_14:
	mov	x0, x23
	bl	_fflush
	mov	x0, x23
	bl	_ferror
	cbz	x0, LBB0_16
; %bb.15:
	str	x21, [sp]
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_warn
LBB0_16:
	mov	x0, x23
	bl	_Fclose
Lloh22:
	adrp	x0, l_.str.6@PAGE
Lloh23:
	add	x0, x0, l_.str.6@PAGEOFF
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_printf
	mov	w0, #0
	b	LBB0_21
LBB0_17:
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_printf
	b	LBB0_20
LBB0_18:
	bl	_warn
	b	LBB0_20
LBB0_19:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x21
	bl	_warnx
	mov	x0, x23
	bl	_Fclose
LBB0_20:
	mov	w0, #1
LBB0_21:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_msgCount,4,2                   ; @msgCount
	.comm	_MMNORM,4,2                     ; @MMNORM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No messages to %s.\n"

l_.str.1:                               ; @.str.1
	.asciz	"\"%s\" "

	.comm	_stdout,8,3                     ; @stdout
l_.str.2:                               ; @.str.2
	.asciz	"[Appended]"

l_.str.3:                               ; @.str.3
	.asciz	"[New file]"

l_.str.4:                               ; @.str.4
	.asciz	"a"

	.comm	_message,8,3                    ; @message
l_.str.5:                               ; @.str.5
	.asciz	"%s"

	.comm	_MSAVED,4,2                     ; @MSAVED
l_.str.6:                               ; @.str.6
	.asciz	"%s\n"

.subsections_via_symbols
