	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wr_rdfile                      ## -- Begin function wr_rdfile
	.p2align	4, 0x90
_wr_rdfile:                             ## @wr_rdfile
	.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, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	testq	%rbx, %rbx
	jle	LBB0_7
## %bb.1:
	movq	_bufpt@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	_bufend@GOTPCREL(%rip), %r14
	movq	_blksz@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	subl	%ecx, %eax
	jg	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edi
	callq	_buf_flush
	testl	%eax, %eax
	js	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_MIN
	movl	(%r13), %esi
	movl	%r12d, %edi
	movl	%eax, %edx
	callq	_read
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %edx
	movl	(%r13), %ecx
	addl	%eax, %ecx
	movl	%ecx, (%r13)
	subq	%rdx, %rbx
	jg	LBB0_2
LBB0_7:
	testq	%rbx, %rbx
	jne	LBB0_8
## %bb.11:
	leaq	-64(%rbp), %rsi
	movl	%r12d, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_12
## %bb.13:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rax
	cmpq	-64(%rbp), %rax
	je	LBB0_15
## %bb.14:
	movl	(%rcx), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_paxwarn
	jmp	LBB0_15
LBB0_9:
	js	LBB0_10
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_paxwarn
	jmp	LBB0_16
LBB0_4:
	movl	$-1, %eax
	jmp	LBB0_17
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	callq	_syswarn
	jmp	LBB0_16
LBB0_12:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rdx
	movl	$1, %edi
	callq	_syswarn
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, (%rcx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bufend,4,2                     ## @bufend
	.comm	_bufpt,4,2                      ## @bufpt
	.comm	_blksz,4,2                      ## @blksz
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read fault on %s"

L_.str.1:                               ## @.str.1
	.asciz	"File changed size during read %s"

L_.str.2:                               ## @.str.2
	.asciz	"Failed stat on %s"

L_.str.3:                               ## @.str.3
	.asciz	"File %s was modified during copy to archive"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wr_rdfile                      ; -- Begin function wr_rdfile
	.p2align	2
_wr_rdfile:                             ; @wr_rdfile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0, #8]
	cmp	x20, #1
	b.lt	LBB0_6
; %bb.1:
Lloh0:
	adrp	x23, _bufpt@GOTPAGE
Lloh1:
	ldr	x23, [x23, _bufpt@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _bufend@GOTPAGE
Lloh3:
	ldr	x24, [x24, _bufend@GOTPAGEOFF]
Lloh4:
	adrp	x25, _blksz@GOTPAGE
Lloh5:
	ldr	x25, [x25, _blksz@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x24]
	sub	w0, w9, w8
	cmp	w0, #0
	b.gt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x25]
	bl	_buf_flush
	tbnz	w0, #31, LBB0_12
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x20
	bl	_MIN
	mov	x2, x0
	ldr	w1, [x23]
	mov	x0, x22
	bl	_read
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x20, x20, w0, uxtw
	ldr	w8, [x23]
	add	w8, w8, w0
	str	w8, [x23]
	cmp	x20, #0
	b.gt	LBB0_2
LBB0_6:
	cbnz	x20, LBB0_11
; %bb.7:
	add	x1, sp, #8
	mov	x0, x22
	bl	_fstat
	tbnz	x0, #63, LBB0_14
; %bb.8:
	ldr	x8, [x21, #16]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.9:
	ldr	w2, [x21]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_paxwarn
	b	LBB0_15
LBB0_10:
	tbnz	w0, #31, LBB0_13
LBB0_11:
	ldr	w2, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_paxwarn
	b	LBB0_16
LBB0_12:
	mov	w0, #-1
	b	LBB0_17
LBB0_13:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w3, [x21]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	bl	_syswarn
	b	LBB0_16
LBB0_14:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w3, [x21]
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_syswarn
LBB0_15:
	mov	x20, #0
LBB0_16:
	mov	w0, #0
LBB0_17:
	str	x20, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_bufend,4,2                     ; @bufend
	.comm	_bufpt,4,2                      ; @bufpt
	.comm	_blksz,4,2                      ; @blksz
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read fault on %s"

l_.str.1:                               ; @.str.1
	.asciz	"File changed size during read %s"

l_.str.2:                               ; @.str.2
	.asciz	"Failed stat on %s"

l_.str.3:                               ; @.str.3
	.asciz	"File %s was modified during copy to archive"

.subsections_via_symbols
