	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copybytes
_copybytes:                             ## @copybytes
	.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
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	je	LBB0_1
## %bb.3:
	movq	%r9, %r12
	movq	%r8, %r14
	movq	%rcx, %r15
	movl	%edx, %ebx
	movl	%edi, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	movl	(%r12), %ecx
	subl	%ecx, %eax
	cmpl	%eax, %ebx
	cmovll	%ebx, %eax
	testl	%eax, %eax
	jg	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_BUFSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_recv
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%eax, %eax
	je	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, (%r14)
	movl	$0, (%r12)
	jmp	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	cmpl	$-1, %edi
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	%ecx, %rsi
	addq	%r15, %rsi
	movl	%eax, %edx
	callq	_write
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
	movl	$-1, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addl	%eax, (%r12)
	subl	%eax, %ebx
	jne	LBB0_4
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_2
LBB0_13:
	movl	$-1, %eax
	jmp	LBB0_2
LBB0_11:
	movl	$-2, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write"

	.comm	_BUFSIZ,4,2                     ## @BUFSIZ
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.no_dead_strip	_copybytes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copybytes
_copybytes:                             ; @copybytes
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	w2, LBB0_11
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x25, l_.str@PAGE
Lloh1:
	add	x25, x25, l_.str@PAGEOFF
Lloh2:
	adrp	x26, _BUFSIZ@GOTPAGE
Lloh3:
	ldr	x26, [x26, _BUFSIZ@GOTPAGEOFF]
Lloh4:
	adrp	x27, _errno@GOTPAGE
Lloh5:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
Lloh6:
	adrp	x28, _EINTR@GOTPAGE
Lloh7:
	ldr	x28, [x28, _EINTR@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20]
	ldr	w8, [x19]
	sub	w9, w9, w8
	cmp	w22, w9
	csel	w2, w22, w9, lt
	cmp	w2, #0
	b.gt	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x26]
	mov	x0, x24
	mov	x1, x21
	mov	w3, #0
	bl	_recv
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w0, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w0, [x20]
	str	wzr, [x19]
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmn	w23, #1
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, x21, w8, sxtw
	mov	x0, x23
	bl	_write
	mov	x2, x0
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	mov	x1, x25
	bl	_err
	mov	w2, #-1
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	add	w8, w8, w2
	str	w8, [x19]
	subs	w22, w22, w2
	b.ne	LBB0_3
LBB0_11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
	mov	w0, #-1
	b	LBB0_14
LBB0_13:
	mov	w0, #-2
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write"

	.comm	_BUFSIZ,4,2                     ; @BUFSIZ
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.no_dead_strip	_copybytes
.subsections_via_symbols
