	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_buf_flush                      ## -- Begin function buf_flush
	.p2align	4, 0x90
_buf_flush:                             ## @buf_flush
	.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
	movl	%edi, %r15d
	movq	_wrlimit@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_wrcnt@GOTPCREL(%rip), %r13
	testq	%rax, %rax
	jle	LBB0_2
## %bb.1:
	cmpq	%rax, (%r13)
	jle	LBB0_2
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_paxwarn
	xorl	%eax, %eax
	callq	_ar_next
	movq	$0, (%r13)
	testq	%rax, %rax
	js	LBB0_14
## %bb.4:
	movq	_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_blksz@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	movq	%rsi, %rax
	addq	%rdi, %rax
	movq	_bufend@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpl	%r15d, %esi
	jg	LBB0_15
## %bb.5:
	xorl	%eax, %eax
	movl	%r15d, %ebx
	subl	%esi, %ebx
	cmovlel	%eax, %ebx
	jmp	LBB0_6
LBB0_2:
	movq	_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_blksz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
LBB0_6:
	movq	_blksz@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ar_write
	cmpl	(%r12), %eax
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	testl	%eax, %eax
	jg	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	$0, (%r13)
	xorl	%eax, %eax
	callq	_ar_next
	testq	%rax, %rax
	js	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movslq	(%r12), %rsi
	movq	%rsi, %rax
	addq	%rdi, %rax
	movq	_bufend@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpl	%r15d, %esi
	jg	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r15d, %eax
	subl	%esi, %eax
	cmovgl	%eax, %ebx
	jmp	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	cltq
	addq	%rax, (%r13)
	addl	%eax, %r14d
	movq	_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testl	%ebx, %ebx
	jle	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_bufend@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%ebx, %eax
	addq	%rdi, %rax
	movq	_bufpt@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%r12), %esi
	subl	%esi, %ebx
	jge	LBB0_7
	jmp	LBB0_15
LBB0_12:
	addl	%eax, %r14d
	movl	%eax, %esi
	addq	%rsi, (%r13)
	movq	_buf@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	%rdi, %rsi
	movq	_bufpt@GOTPCREL(%rip), %rbx
	movq	%rsi, (%rbx)
	subl	%eax, %r15d
	movl	%r15d, %edx
	callq	_memcpy
	movslq	%r15d, %rax
	addq	(%r12), %rax
	movq	%rax, (%rbx)
	movq	_frmt@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.13:
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_15
LBB0_14:
	movq	_exit_val@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movl	$-1, %r14d
	jmp	LBB0_15
LBB0_18:
	xorl	%r14d, %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_bufpt@GOTPCREL(%rip), %rax
	movq	%rdi, (%rax)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_wrlimit,8,3                    ## @wrlimit
	.comm	_wrcnt,8,3                      ## @wrcnt
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"User specified archive volume byte limit reached."

	.comm	_exit_val,4,2                   ## @exit_val
	.comm	_buf,8,3                        ## @buf
	.comm	_blksz,4,2                      ## @blksz
	.comm	_bufend,8,3                     ## @bufend
	.comm	_bufpt,8,3                      ## @bufpt
	.comm	_frmt,8,3                       ## @frmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_buf_flush                      ; -- Begin function buf_flush
	.p2align	2
_buf_flush:                             ; @buf_flush
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
Lloh0:
	adrp	x8, _wrlimit@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wrlimit@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x22, _wrcnt@GOTPAGE
Lloh4:
	ldr	x22, [x22, _wrcnt@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, #1
	ccmp	x9, x8, #4, ge
	b.gt	LBB0_2
; %bb.1:
	mov	w21, #0
Lloh5:
	adrp	x8, _buf@GOTPAGE
Lloh6:
	ldr	x8, [x8, _buf@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x8]
Lloh8:
	adrp	x8, _blksz@GOTPAGE
Lloh9:
	ldr	x8, [x8, _blksz@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	b	LBB0_6
LBB0_2:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	bl	_paxwarn
	bl	_ar_next
	str	xzr, [x22]
	tbnz	x0, #63, LBB0_16
; %bb.3:
Lloh13:
	adrp	x8, _buf@GOTPAGE
Lloh14:
	ldr	x8, [x8, _buf@GOTPAGEOFF]
Lloh15:
	ldr	x0, [x8]
Lloh16:
	adrp	x8, _blksz@GOTPAGE
Lloh17:
	ldr	x8, [x8, _blksz@GOTPAGEOFF]
Lloh18:
	ldrsw	x1, [x8]
	add	x8, x0, x1
Lloh19:
	adrp	x9, _bufend@GOTPAGE
Lloh20:
	ldr	x9, [x9, _bufend@GOTPAGEOFF]
Lloh21:
	str	x8, [x9]
	cmp	w1, w19
	b.le	LBB0_5
LBB0_4:
	mov	w20, #0
	b	LBB0_17
LBB0_5:
	subs	w8, w19, w1
	csel	w21, w8, wzr, gt
LBB0_6:
	mov	w20, #0
Lloh22:
	adrp	x25, _blksz@GOTPAGE
Lloh23:
	ldr	x25, [x25, _blksz@GOTPAGEOFF]
Lloh24:
	adrp	x24, _buf@GOTPAGE
Lloh25:
	ldr	x24, [x24, _buf@GOTPAGEOFF]
Lloh26:
	adrp	x26, _bufend@GOTPAGE
Lloh27:
	ldr	x26, [x26, _bufend@GOTPAGEOFF]
Lloh28:
	adrp	x23, _bufpt@GOTPAGE
Lloh29:
	ldr	x23, [x23, _bufpt@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ar_write
	ldr	w8, [x25]
	cmp	w0, w8
	b.eq	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w0, #1
	b.ge	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	str	xzr, [x22]
	bl	_ar_next
	tbnz	x0, #63, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x24]
	ldrsw	x1, [x25]
	add	x8, x0, x1
	str	x8, [x26]
	cmp	w1, w19
	b.gt	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	subs	w8, w19, w1
	csel	w21, w8, w21, gt
	b	LBB0_7
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22]
	add	x8, x8, w0, sxtw
	str	x8, [x22]
	add	w20, w0, w20
	ldr	x0, [x24]
	cmp	w21, #1
	b.lt	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [x26]
	mov	x2, x21
	bl	_memcpy
	ldr	x0, [x24]
	add	x8, x0, w21, uxtw
	str	x8, [x23]
	ldr	w1, [x25]
	subs	w21, w21, w1
	b.ge	LBB0_7
	b	LBB0_17
LBB0_14:
	add	w20, w0, w20
	mov	w9, w0
	ldr	x8, [x22]
	add	x8, x8, x9
	str	x8, [x22]
	ldr	x8, [x24]
	add	x1, x8, x9
	str	x1, [x23]
	sub	w19, w19, w0
	mov	x0, x8
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x24]
	add	x8, x8, w19, sxtw
	str	x8, [x23]
Lloh30:
	adrp	x8, _frmt@GOTPAGE
Lloh31:
	ldr	x8, [x8, _frmt@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_17
; %bb.15:
	sdiv	w9, w19, w8
	msub	w8, w9, w8, w19
	cbz	w8, LBB0_17
LBB0_16:
Lloh33:
	adrp	x8, _exit_val@GOTPAGE
Lloh34:
	ldr	x8, [x8, _exit_val@GOTPAGEOFF]
	mov	w9, #1
Lloh35:
	str	w9, [x8]
	mov	w20, #-1
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_18:
	str	x0, [x23]
	b	LBB0_17
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_wrlimit,8,3                    ; @wrlimit
	.comm	_wrcnt,8,3                      ; @wrcnt
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"User specified archive volume byte limit reached."

	.comm	_exit_val,4,2                   ; @exit_val
	.comm	_buf,8,3                        ; @buf
	.comm	_blksz,4,2                      ; @blksz
	.comm	_bufend,8,3                     ; @bufend
	.comm	_bufpt,8,3                      ; @bufpt
	.comm	_frmt,8,3                       ; @frmt
.subsections_via_symbols
