	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar_set_wr                      ## -- Begin function ar_set_wr
	.p2align	4, 0x90
_ar_set_wr:                             ## @ar_set_wr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_wr_trail@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_artyp@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ISREG@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	_arfd@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_lseek
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_ftruncate
	testq	%rax, %rax
	jns	LBB0_4
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	callq	_syswarn
	movl	$-1, %ebx
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wr_trail,8,3                   ## @wr_trail
	.comm	_artyp,8,3                      ## @artyp
	.comm	_ISREG,8,3                      ## @ISREG
	.comm	_arfd,4,2                       ## @arfd
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to truncate archive file"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar_set_wr                      ; -- Begin function ar_set_wr
	.p2align	2
_ar_set_wr:                             ; @ar_set_wr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _wr_trail@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wr_trail@GOTPAGEOFF]
Lloh2:
	adrp	x9, _artyp@GOTPAGE
Lloh3:
	ldr	x9, [x9, _artyp@GOTPAGEOFF]
Lloh4:
	str	xzr, [x8]
Lloh5:
	ldr	x8, [x9]
Lloh6:
	adrp	x9, _ISREG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ISREG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh9:
	adrp	x19, _arfd@GOTPAGE
Lloh10:
	ldr	x19, [x19, _arfd@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_lseek
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	x1, x0
	ldr	w0, [x19]
	bl	_ftruncate
	tbnz	x0, #63, LBB0_4
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	bl	_syswarn
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_wr_trail,8,3                   ; @wr_trail
	.comm	_artyp,8,3                      ; @artyp
	.comm	_ISREG,8,3                      ; @ISREG
	.comm	_arfd,4,2                       ; @arfd
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to truncate archive file"

.subsections_via_symbols
