	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_fd                        ## -- Begin function copy_fd
	.p2align	4, 0x90
_copy_fd:                               ## @copy_fd
	.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
	movl	$8200, %eax                     ## imm = 0x2008
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-8240(%rbp), %rsi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_xread
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_COPY_READ_ERROR@GOTPCREL(%rip), %r12
	leaq	-8240(%rbp), %rbx
	movq	_COPY_WRITE_ERROR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rax, %rax
	js	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_write_in_full
	testq	%rax, %rax
	js	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_xread
	testq	%rax, %rax
	jne	LBB0_2
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movq	%r13, %r12
LBB0_5:
	movl	(%r12), %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$8200, %rsp                     ## imm = 0x2008
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_COPY_READ_ERROR,4,2            ## @COPY_READ_ERROR
	.comm	_COPY_WRITE_ERROR,4,2           ## @COPY_WRITE_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_fd                        ; -- Begin function copy_fd
	.p2align	2
_copy_fd:                               ; @copy_fd
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -56
	.cfi_offset w28, -64
	mov	w9, #8208
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #16
	mov	x19, x1
	mov	x20, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	add	x1, sp, #8
	mov	w2, #8192
	bl	_xread
	cbz	x0, LBB0_5
; %bb.1:
	mov	x2, x0
Lloh5:
	adrp	x21, _COPY_READ_ERROR@GOTPAGE
Lloh6:
	ldr	x21, [x21, _COPY_READ_ERROR@GOTPAGEOFF]
Lloh7:
	adrp	x22, _COPY_WRITE_ERROR@GOTPAGE
Lloh8:
	ldr	x22, [x22, _COPY_WRITE_ERROR@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	tbnz	x2, #63, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_write_in_full
	tbnz	x0, #63, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #8192
	bl	_xread
	mov	x2, x0
	cbnz	x0, LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	mov	x21, x22
LBB0_7:
	ldr	w0, [x21]
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #16
	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	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_COPY_READ_ERROR,4,2            ; @COPY_READ_ERROR
	.comm	_COPY_WRITE_ERROR,4,2           ; @COPY_WRITE_ERROR
.subsections_via_symbols
