	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar_write                       ## -- Begin function ar_write
	.p2align	4, 0x90
_ar_write:                              ## @ar_write
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_lstrval@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	testl	%r14d, %r14d
	jle	LBB0_42
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %rsi
	movq	_arfd@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	%ebx, %edx
	callq	_write
	cmpl	%ebx, %eax
	jne	LBB0_3
## %bb.2:
	movq	_wr_trail@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_io_ok@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movl	%ebx, %r14d
	jmp	LBB0_42
LBB0_3:
	movl	%eax, %r14d
	sarl	$31, %eax
	andl	%r14d, %eax
	movl	%eax, (%r15)
	movq	_artyp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-131(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_10
## %bb.4:
	cmpl	$128, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_13
## %bb.6:
	testl	%r14d, %r14d
	jle	LBB0_20
## %bb.7:
	movq	_BLKMULT@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rcx)
	testl	%edx, %edx
	je	LBB0_15
## %bb.8:
	movl	(%r12), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_lseek
	testl	%eax, %eax
	js	LBB0_15
## %bb.9:
	subl	%r14d, %eax
	movl	(%r12), %edi
	movl	%eax, %esi
	callq	_ftruncate
	testl	%eax, %eax
	jns	LBB0_26
	jmp	LBB0_15
LBB0_10:
	testl	%r14d, %r14d
	jns	LBB0_14
## %bb.11:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EACCES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.12:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_paxwarn
	movl	$0, (%r15)
	jmp	LBB0_42
LBB0_13:
	testl	%r14d, %r14d
	js	LBB0_29
LBB0_14:
	testl	%r14d, %r14d
	je	LBB0_27
LBB0_15:
	movq	_wr_trail@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_28
LBB0_17:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_26
## %bb.18:
	movq	_EIO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_26
## %bb.19:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_29
LBB0_26:
	movl	$0, (%r15)
	jmp	LBB0_27
LBB0_20:
	testl	%r14d, %r14d
	js	LBB0_22
LBB0_27:
	xorl	%r14d, %r14d
LBB0_28:
	movq	_io_ok@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_29:
	testl	%r14d, %r14d
	jg	LBB0_34
## %bb.30:
	movq	_wr_trail@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_34
## %bb.31:
	leaq	L_.str.1(%rip), %rsi
LBB0_32:
	movl	$1, %edi
LBB0_33:
	xorl	%eax, %eax
	callq	_paxwarn
	jmp	LBB0_42
LBB0_34:
	testl	%r14d, %r14d
	je	LBB0_39
## %bb.35:
	js	LBB0_41
## %bb.36:
	movq	_frmt@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_40
## %bb.37:
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_40
## %bb.38:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_32
LBB0_39:
	movq	_arvol@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_paxwarn
	jmp	LBB0_42
LBB0_40:
	leaq	L_.str.4(%rip), %rsi
	xorl	%edi, %edi
	jmp	LBB0_33
LBB0_41:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_arvol@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %edi
	callq	_syswarn
LBB0_42:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_26
## %bb.23:
	movq	_EFBIG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_26
## %bb.24:
	movq	_EDQUOT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_29
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_lstrval,4,2                    ## @lstrval
	.comm	_arfd,4,2                       ## @arfd
	.comm	_wr_trail,4,2                   ## @wr_trail
	.comm	_io_ok,4,2                      ## @io_ok
	.comm	_artyp,4,2                      ## @artyp
	.comm	_BLKMULT,4,2                    ## @BLKMULT
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_EFBIG,4,2                      ## @EFBIG
	.comm	_EDQUOT,4,2                     ## @EDQUOT
	.comm	_EACCES,4,2                     ## @EACCES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Write failed, archive is write protected."

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"Unable to append, trailer re-write failed. Quitting."

L_.str.2:                               ## @.str.2
	.asciz	"End of archive volume %d reached"

	.comm	_arvol,4,2                      ## @arvol
L_.str.3:                               ## @.str.3
	.asciz	"Failed write to archive volume: %d"

	.comm	_frmt,8,3                       ## @frmt
L_.str.4:                               ## @.str.4
	.asciz	"WARNING: partial archive write. Archive MAY BE FLAWED"

L_.str.5:                               ## @.str.5
	.asciz	"WARNING: partial archive write. Archive IS FLAWED"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar_write                       ; -- Begin function ar_write
	.p2align	2
_ar_write:                              ; @ar_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x21, _lstrval@GOTPAGE
Lloh1:
	ldr	x21, [x21, _lstrval@GOTPAGEOFF]
	ldr	w19, [x21]
	cmp	w19, #1
	b.lt	LBB0_31
; %bb.1:
	mov	x20, x1
	mov	x1, x0
Lloh2:
	adrp	x22, _arfd@GOTPAGE
Lloh3:
	ldr	x22, [x22, _arfd@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x2, x20
	bl	_write
	cmp	w0, w20
	b.ne	LBB0_3
; %bb.2:
Lloh4:
	adrp	x8, _wr_trail@GOTPAGE
Lloh5:
	ldr	x8, [x8, _wr_trail@GOTPAGEOFF]
	mov	w9, #1
Lloh6:
	str	w9, [x8]
Lloh7:
	adrp	x8, _io_ok@GOTPAGE
Lloh8:
	ldr	x8, [x8, _io_ok@GOTPAGEOFF]
Lloh9:
	str	w9, [x8]
	mov	x19, x20
	b	LBB0_31
LBB0_3:
	mov	x19, x0
	cmp	w0, #0
	csel	w8, w0, wzr, lt
Lloh10:
	adrp	x9, _artyp@GOTPAGE
Lloh11:
	ldr	x9, [x9, _artyp@GOTPAGEOFF]
	str	w8, [x21]
Lloh12:
	ldr	w8, [x9]
	sub	w9, w8, #131
Lloh13:
	adrp	x20, _wr_trail@GOTPAGE
Lloh14:
	ldr	x20, [x20, _wr_trail@GOTPAGEOFF]
	cmp	w9, #2
	b.lo	LBB0_10
; %bb.4:
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.5:
	cmp	w8, #129
	b.ne	LBB0_13
; %bb.6:
	cmp	w19, #1
	b.lt	LBB0_33
; %bb.7:
Lloh15:
	adrp	x8, _BLKMULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BLKMULT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	sdiv	w9, w19, w8
	msub	w8, w9, w8, w19
	cbz	w8, LBB0_15
; %bb.8:
	ldr	w0, [x22]
Lloh18:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_lseek
	tbnz	w0, #31, LBB0_15
; %bb.9:
	sub	w1, w0, w19
	ldr	w0, [x22]
	bl	_ftruncate
	tbz	w0, #31, LBB0_37
	b	LBB0_15
LBB0_10:
	tbz	w19, #31, LBB0_14
; %bb.11:
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _EACCES@GOTPAGE
Lloh25:
	ldr	x9, [x9, _EACCES@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_27
; %bb.12:
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	bl	_paxwarn
	mov	w19, #0
	str	wzr, [x21]
	b	LBB0_31
LBB0_13:
	tbnz	w19, #31, LBB0_17
LBB0_14:
	cbz	w19, LBB0_16
LBB0_15:
	mov	w8, #1
	str	w8, [x20]
LBB0_16:
Lloh29:
	adrp	x8, _io_ok@GOTPAGE
Lloh30:
	ldr	x8, [x8, _io_ok@GOTPAGEOFF]
	mov	w9, #1
Lloh31:
	str	w9, [x8]
LBB0_17:
	cmp	w19, #0
	b.gt	LBB0_21
; %bb.18:
	ldr	w8, [x20]
	cbnz	w8, LBB0_21
; %bb.19:
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_20:
	mov	w0, #1
	b	LBB0_30
LBB0_21:
	cbz	w19, LBB0_26
; %bb.22:
	tbnz	w19, #31, LBB0_32
; %bb.23:
Lloh34:
	adrp	x8, _frmt@GOTPAGE
Lloh35:
	ldr	x8, [x8, _frmt@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_28
; %bb.24:
	sdiv	w9, w19, w8
	msub	w8, w9, w8, w19
	cbz	w8, LBB0_28
; %bb.25:
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_20
LBB0_26:
Lloh39:
	adrp	x8, _arvol@GOTPAGE
Lloh40:
	ldr	x8, [x8, _arvol@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh42:
	adrp	x1, l_.str.2@PAGE
Lloh43:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_29
LBB0_27:
Lloh44:
	adrp	x9, _ENOSPC@GOTPAGE
Lloh45:
	ldr	x9, [x9, _ENOSPC@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
Lloh47:
	adrp	x10, _EIO@GOTPAGE
Lloh48:
	ldr	x10, [x10, _EIO@GOTPAGEOFF]
Lloh49:
	ldr	w10, [x10]
Lloh50:
	adrp	x11, _ENXIO@GOTPAGE
Lloh51:
	ldr	x11, [x11, _ENXIO@GOTPAGEOFF]
	b	LBB0_36
LBB0_28:
Lloh52:
	adrp	x1, l_.str.4@PAGE
Lloh53:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_29:
	mov	w0, #0
LBB0_30:
	bl	_paxwarn
LBB0_31:
	mov	x0, 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
	add	sp, sp, #64
	ret
LBB0_32:
Lloh54:
	adrp	x8, _errno@GOTPAGE
Lloh55:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
Lloh57:
	adrp	x8, _arvol@GOTPAGE
Lloh58:
	ldr	x8, [x8, _arvol@GOTPAGEOFF]
Lloh59:
	ldr	w3, [x8]
Lloh60:
	adrp	x2, l_.str.3@PAGE
Lloh61:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_syswarn
	b	LBB0_31
LBB0_33:
	tbnz	w19, #31, LBB0_35
; %bb.34:
	mov	w19, #0
	b	LBB0_16
LBB0_35:
Lloh62:
	adrp	x8, _errno@GOTPAGE
Lloh63:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh64:
	ldr	w8, [x8]
Lloh65:
	adrp	x9, _ENOSPC@GOTPAGE
Lloh66:
	ldr	x9, [x9, _ENOSPC@GOTPAGEOFF]
Lloh67:
	ldr	w9, [x9]
Lloh68:
	adrp	x10, _EFBIG@GOTPAGE
Lloh69:
	ldr	x10, [x10, _EFBIG@GOTPAGEOFF]
Lloh70:
	ldr	w10, [x10]
Lloh71:
	adrp	x11, _EDQUOT@GOTPAGE
Lloh72:
	ldr	x11, [x11, _EDQUOT@GOTPAGEOFF]
LBB0_36:
	ldr	w11, [x11]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	b.ne	LBB0_17
LBB0_37:
	mov	w19, #0
	str	wzr, [x21]
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_lstrval,4,2                    ; @lstrval
	.comm	_arfd,4,2                       ; @arfd
	.comm	_wr_trail,4,2                   ; @wr_trail
	.comm	_io_ok,4,2                      ; @io_ok
	.comm	_artyp,4,2                      ; @artyp
	.comm	_BLKMULT,4,2                    ; @BLKMULT
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_EFBIG,4,2                      ; @EFBIG
	.comm	_EDQUOT,4,2                     ; @EDQUOT
	.comm	_EACCES,4,2                     ; @EACCES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Write failed, archive is write protected."

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"Unable to append, trailer re-write failed. Quitting."

l_.str.2:                               ; @.str.2
	.asciz	"End of archive volume %d reached"

	.comm	_arvol,4,2                      ; @arvol
l_.str.3:                               ; @.str.3
	.asciz	"Failed write to archive volume: %d"

	.comm	_frmt,8,3                       ; @frmt
l_.str.4:                               ; @.str.4
	.asciz	"WARNING: partial archive write. Archive MAY BE FLAWED"

l_.str.5:                               ; @.str.5
	.asciz	"WARNING: partial archive write. Archive IS FLAWED"

.subsections_via_symbols
