	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_stream
_copy_stream:                           ## @copy_stream
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	_HASHBYTES@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movq	_copy_stream.buf(%rip), %r12
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_fileno
	leaq	-80(%rbp), %r13
	movl	%eax, %edi
	movq	%r13, %rsi
	callq	_fstat
	xorl	%ebx, %ebx
	testq	%rax, %rax
	cmovsq	%rbx, %r13
	leaq	_copy_stream.bufsize(%rip), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_alloc_buffer
	movq	%rax, _copy_stream.buf(%rip)
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_fileno
	movq	_copy_stream.buf(%rip), %rsi
	movq	_copy_stream.bufsize(%rip), %rdx
	movl	%eax, %edi
	callq	_read
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_2
## %bb.10:
	xorl	%ebx, %ebx
	movq	_hash@GOTPCREL(%rip), %r12
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_fileno
	movq	_copy_stream.buf(%rip), %rsi
	movq	_copy_stream.bufsize(%rip), %rdx
	movl	%eax, %edi
	callq	_read
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_3
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_fileno
	movq	_copy_stream.buf(%rip), %rsi
	movl	%eax, %edi
	movl	%r13d, %edx
	callq	_sec_write
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	addl	%eax, %ebx
	cmpq	$0, (%r12)
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r15d, %ebx
	jle	LBB0_11
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	$35, %edi
	callq	_putchar
	addl	(%r14), %r15d
	cmpq	$0, (%r12)
	jne	LBB0_15
	jmp	LBB0_11
LBB0_2:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_sec_fflush
	testl	%r13d, %r13d
	js	LBB0_4
## %bb.5:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jns	LBB0_9
	jmp	LBB0_6
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_sec_fflush
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_warn
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jns	LBB0_9
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EPIPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
LBB0_8:
	movl	$-1, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_copy_stream.bufsize,8,3 ## @copy_stream.bufsize
.zerofill __DATA,__bss,_copy_stream.buf,8,3 ## @copy_stream.buf
	.comm	_HASHBYTES,4,2                  ## @HASHBYTES
	.comm	_hash,8,3                       ## @hash
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"local"

	.comm	_errno,8,3                      ## @errno
	.comm	_EPIPE,8,3                      ## @EPIPE
L_.str.1:                               ## @.str.1
	.asciz	"netout"

	.comm	_BLOCKSIZE,8,3                  ## @BLOCKSIZE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MS_ASYNC,4,2                   ## @MS_ASYNC
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.no_dead_strip	_copy_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_stream
_copy_stream:                           ; @copy_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _HASHBYTES@GOTPAGE
Lloh1:
	ldr	x24, [x24, _HASHBYTES@GOTPAGEOFF]
	ldr	w25, [x24]
	adrp	x26, _copy_stream.buf@PAGE
	ldr	x21, [x26, _copy_stream.buf@PAGEOFF]
	bl	_fileno
	mov	x22, sp
	mov	x1, sp
	bl	_fstat
	bic	x2, x22, x0, asr #63
Lloh2:
	adrp	x1, _copy_stream.bufsize@PAGE
Lloh3:
	add	x1, x1, _copy_stream.bufsize@PAGEOFF
	mov	x0, x21
	bl	_alloc_buffer
	str	x0, [x26, _copy_stream.buf@PAGEOFF]
	cbz	x0, LBB0_15
; %bb.1:
	mov	x0, x20
	bl	_fileno
	ldr	x1, [x26, _copy_stream.buf@PAGEOFF]
	adrp	x27, _copy_stream.bufsize@PAGE
	ldr	x2, [x27, _copy_stream.bufsize@PAGEOFF]
	bl	_read
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.2:
	mov	w21, #0
Lloh4:
	adrp	x28, _hash@GOTPAGE
Lloh5:
	ldr	x28, [x28, _hash@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_fileno
	ldr	x1, [x26, _copy_stream.buf@PAGEOFF]
	ldr	x2, [x27, _copy_stream.bufsize@PAGEOFF]
	bl	_read
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	x0, x19
	bl	_fileno
	ldr	x1, [x26, _copy_stream.buf@PAGEOFF]
	mov	x2, x23
	bl	_sec_write
	mov	x22, x0
	tbnz	w22, #31, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, w22
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x28]
	cmp	x8, #0
	ccmp	w21, w25, #4, ne
	b.le	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	w0, #35
	bl	_putchar
	ldr	w8, [x24]
	add	w25, w8, w25
	b	LBB0_6
LBB0_8:
	mov	w21, #0
	mov	w22, #0
LBB0_9:
	mov	x0, x19
	bl	_sec_fflush
	tbnz	w23, #31, LBB0_12
; %bb.10:
	tbz	w22, #31, LBB0_16
	b	LBB0_13
LBB0_11:
	mov	x0, x19
	bl	_sec_fflush
	b	LBB0_13
LBB0_12:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	tbz	w22, #31, LBB0_16
LBB0_13:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _EPIPE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EPIPE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.14:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
LBB0_15:
	mov	w21, #-1
LBB0_16:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_copy_stream.bufsize,8,3 ; @copy_stream.bufsize
.zerofill __DATA,__bss,_copy_stream.buf,8,3 ; @copy_stream.buf
	.comm	_HASHBYTES,4,2                  ; @HASHBYTES
	.comm	_hash,8,3                       ; @hash
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"local"

	.comm	_errno,8,3                      ; @errno
	.comm	_EPIPE,8,3                      ; @EPIPE
l_.str.1:                               ; @.str.1
	.asciz	"netout"

	.comm	_BLOCKSIZE,8,3                  ; @BLOCKSIZE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MS_ASYNC,4,2                   ; @MS_ASYNC
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.no_dead_strip	_copy_stream
.subsections_via_symbols
