	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function savelog
_savelog:                               ## @savelog
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_link
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_err
LBB0_3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_fopen
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_err
LBB0_5:
	movq	%rbx, %rdi
	callq	_getc
	movq	_EOF@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_6
LBB0_10:
	movq	%rbx, %rdi
	callq	_ferror
	testq	%rax, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_12
## %bb.11:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_err
LBB0_12:
	movq	%rbx, %rdi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_err
LBB0_14:
	movq	%r12, %rdi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str.4(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_getc
	cmpl	(%r14), %eax
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_putc
	cmpl	(%r14), %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, %edi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_err
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

L_.str.1:                               ## @.str.1
	.asciz	"can't fopen %s for reading"

L_.str.2:                               ## @.str.2
	.asciz	"w"

L_.str.3:                               ## @.str.3
	.asciz	"can't fopen %s for writing"

	.comm	_EOF,4,2                        ## @EOF
L_.str.4:                               ## @.str.4
	.asciz	"error writing to %s"

L_.str.5:                               ## @.str.5
	.asciz	"error reading from %s"

L_.str.6:                               ## @.str.6
	.asciz	"can't fclose %s"

	.no_dead_strip	_savelog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function savelog
_savelog:                               ; @savelog
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_link
	cbz	w0, LBB0_12
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fopen
	mov	x21, x0
	cbnz	x0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_3:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fopen
	mov	x22, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_err
LBB0_5:
	mov	x0, x21
	bl	_getc
Lloh8:
	adrp	x24, _EOF@GOTPAGE
Lloh9:
	ldr	x24, [x24, _EOF@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_13
LBB0_6:
	mov	x0, x21
	bl	_ferror
	cbz	x0, LBB0_8
; %bb.7:
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_8:
	mov	x0, x21
	bl	_fclose
	cbz	x0, LBB0_10
; %bb.9:
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_err
LBB0_10:
	mov	x0, x22
	bl	_fclose
	cbz	x0, LBB0_12
; %bb.11:
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_err
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh16:
	adrp	x23, l_.str.4@PAGE
Lloh17:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x21
	bl	_getc
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_6
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x1, x22
	bl	_putc
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w0, #1
	mov	x1, x23
	mov	x2, x20
	bl	_err
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

l_.str.1:                               ; @.str.1
	.asciz	"can't fopen %s for reading"

l_.str.2:                               ; @.str.2
	.asciz	"w"

l_.str.3:                               ; @.str.3
	.asciz	"can't fopen %s for writing"

	.comm	_EOF,4,2                        ; @EOF
l_.str.4:                               ; @.str.4
	.asciz	"error writing to %s"

l_.str.5:                               ; @.str.5
	.asciz	"error reading from %s"

l_.str.6:                               ; @.str.6
	.asciz	"can't fclose %s"

	.no_dead_strip	_savelog
.subsections_via_symbols
