	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_upload_archive             ## -- Begin function cmd_upload_archive
	.p2align	4, 0x90
_cmd_upload_archive:                    ## @cmd_upload_archive
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -104(%rbp)
	cmpl	$2, %edi
	jne	LBB0_3
## %bb.1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_upload_archive_usage@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_usage
LBB0_3:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rbx)
	movq	$-1, -96(%rbp)
	movl	$1, -88(%rbp)
	leaq	-104(%rbp), %rdi
	callq	_start_command
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_packet_write_fmt
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_die
LBB0_5:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_packet_write_fmt
	movl	$1, %edi
	callq	_packet_flush
	movq	_POLLIN@GOTPCREL(%rip), %rbx
	leaq	-80(%rbp), %r15
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_EINTR@GOTPCREL(%rip), %r13
	leaq	L_.str.5(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-96(%rbp), %eax
	movl	-92(%rbp), %ecx
	movl	%eax, -80(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -76(%rbp)
	movl	%ecx, -68(%rbp)
	movl	%eax, -64(%rbp)
	movq	%r15, %rdi
	movl	$2, %esi
	movl	$-1, %edx
	callq	_poll
	testq	%rax, %rax
	js	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %eax
	testl	%eax, -60(%rbp)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-68(%rbp), %edi
	movl	$2, %esi
	callq	_process_input
	testq	%rax, %rax
	jne	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %eax
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, -72(%rbp)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-80(%rbp), %edi
	movl	$1, %esi
	callq	_process_input
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %eax
	cmpl	(%r13), %eax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_error_errno
	movl	$1, %edi
	callq	_sleep
	jmp	LBB0_6
LBB0_14:
	leaq	-104(%rbp), %rdi
	callq	_finish_command
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_deadchild@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdi
	callq	_error_clnt
LBB0_16:
	movl	$1, %edi
	callq	_packet_flush
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-h"

	.comm	_upload_archive_usage,4,2       ## @upload_archive_usage
L_.str.1:                               ## @.str.1
	.asciz	"upload-archive--writer"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"NACK unable to spawn subprocess\n"

L_.str.3:                               ## @.str.3
	.asciz	"upload-archive: %s"

L_.str.4:                               ## @.str.4
	.asciz	"ACK\n"

	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_EINTR,4,2                      ## @EINTR
L_.str.5:                               ## @.str.5
	.asciz	"poll failed resuming"

L_.str.6:                               ## @.str.6
	.asciz	"%s"

	.comm	_deadchild,4,2                  ## @deadchild
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_upload_archive             ; -- Begin function cmd_upload_archive
	.p2align	2
_cmd_upload_archive:                    ; @cmd_upload_archive
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	x1, [sp, #8]
	cmp	w0, #2
	b.ne	LBB0_3
; %bb.1:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _upload_archive_usage@GOTPAGE
Lloh6:
	ldr	x8, [x8, _upload_archive_usage@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_usage
LBB0_3:
Lloh8:
	adrp	x8, l_.str.1@PAGE
Lloh9:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x19]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [sp, #16]
	mov	w8, #1
	str	w8, [sp, #24]
	add	x0, sp, #8
	bl	_start_command
Lloh10:
	adrp	x20, _errno@GOTPAGE
Lloh11:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w19, [x20]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_packet_write_fmt
	mov	x0, x19
	bl	_strerror
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_die
LBB0_5:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_packet_write_fmt
	mov	w0, #1
	bl	_packet_flush
Lloh18:
	adrp	x21, _POLLIN@GOTPAGE
Lloh19:
	ldr	x21, [x21, _POLLIN@GOTPAGEOFF]
Lloh20:
	adrp	x22, _EINTR@GOTPAGE
Lloh21:
	ldr	x22, [x22, _EINTR@GOTPAGEOFF]
Lloh22:
	adrp	x19, l_.str.5@PAGE
Lloh23:
	add	x19, x19, l_.str.5@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	ldp	w9, w10, [sp, #16]
	stp	w9, w8, [sp, #32]
	stp	w10, w8, [sp, #44]
	add	x0, sp, #32
	mov	w1, #2
	mov	w2, #-1
	bl	_poll
	tbnz	x0, #63, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [sp, #52]
	ldr	w8, [x21]
	tst	w8, w9
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #44]
	mov	w1, #2
	bl	_process_input
	cbnz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21]
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [sp, #40]
	tst	w8, w9
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #32]
	mov	w1, #1
	bl	_process_input
	cbnz	x0, LBB0_6
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x22]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_error_errno
	mov	w0, #1
	bl	_sleep
	b	LBB0_6
LBB0_14:
	add	x0, sp, #8
	bl	_finish_command
	cbz	x0, LBB0_16
; %bb.15:
Lloh24:
	adrp	x8, _deadchild@GOTPAGE
Lloh25:
	ldr	x8, [x8, _deadchild@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x0, l_.str.6@PAGE
Lloh28:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_error_clnt
LBB0_16:
	mov	w0, #1
	bl	_packet_flush
	ldur	x8, [x29, #-40]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-h"

	.comm	_upload_archive_usage,4,2       ; @upload_archive_usage
l_.str.1:                               ; @.str.1
	.asciz	"upload-archive--writer"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"NACK unable to spawn subprocess\n"

l_.str.3:                               ; @.str.3
	.asciz	"upload-archive: %s"

l_.str.4:                               ; @.str.4
	.asciz	"ACK\n"

	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_EINTR,4,2                      ; @EINTR
l_.str.5:                               ; @.str.5
	.asciz	"poll failed resuming"

l_.str.6:                               ; @.str.6
	.asciz	"%s"

	.comm	_deadchild,4,2                  ; @deadchild
.subsections_via_symbols
