	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___archive_write_program_write  ## -- Begin function __archive_write_program_write
	.p2align	4, 0x90
___archive_write_program_write:         ## @__archive_write_program_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	%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
	cmpq	$0, (%rsi)
	movq	_ARCHIVE_OK@GOTPCREL(%rip), %r13
	je	LBB0_6
## %bb.1:
	movq	%rcx, %r15
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.2:
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_child_write
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %ecx
	cmpl	$1, %ecx
	jbe	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cltq
	addq	%rax, %rbx
	subq	%rax, %r15
	jne	LBB0_3
	jmp	LBB0_6
LBB0_4:
	movl	(%r12), %edi
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %ecx
	leaq	L_.str(%rip), %rdx
	callq	_archive_set_error
	movq	_ARCHIVE_FATAL@GOTPCREL(%rip), %r13
LBB0_6:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARCHIVE_OK,4,2                 ## @ARCHIVE_OK
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't write to program: %s"

	.comm	_ARCHIVE_FATAL,4,2              ## @ARCHIVE_FATAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___archive_write_program_write  ; -- Begin function __archive_write_program_write
	.p2align	2
___archive_write_program_write:         ; @__archive_write_program_write
	.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
	ldr	x8, [x1]
	cmp	x8, #0
	ccmp	x3, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x23, _ARCHIVE_OK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ARCHIVE_OK@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh2:
	adrp	x23, _ARCHIVE_OK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ARCHIVE_OK@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_child_write
                                        ; kill: def $w0 killed $w0 def $x0
	add	w8, w0, #1
	cmp	w8, #1
	b.ls	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w0
	add	x21, x21, x8
	subs	x20, x20, x8
	b.ne	LBB0_3
	b	LBB0_6
LBB0_5:
	ldr	w0, [x22]
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w3, [x19, #8]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	bl	_archive_set_error
Lloh9:
	adrp	x23, _ARCHIVE_FATAL@GOTPAGE
Lloh10:
	ldr	x23, [x23, _ARCHIVE_FATAL@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x23]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ARCHIVE_OK,4,2                 ; @ARCHIVE_OK
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't write to program: %s"

	.comm	_ARCHIVE_FATAL,4,2              ; @ARCHIVE_FATAL
.subsections_via_symbols
