	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_link                      ## -- Begin function copy_link
	.p2align	4, 0x90
_copy_link:                             ## @copy_link
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.1:
	movq	_nflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_vflag@GOTPCREL(%rip), %rax
	movl	$1, %ebx
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.3:
	movq	_to@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_printf
	jmp	LBB0_15
LBB0_4:
	movq	(%r14), %rdi
	decl	%ebx
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_readlink
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	cltq
	movb	$0, (%r15,%rax)
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.7:
	movq	_to@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_unlink
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	(%rbx), %rsi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_11
LBB0_9:
	movq	_to@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_symlink
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	jmp	LBB0_11
LBB0_5:
	movq	(%r14), %rsi
	leaq	L_.str.1(%rip), %rdi
LBB0_11:
	callq	_warn
	movl	$1, %ebx
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_pflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.14:
	movl	8(%r14), %edi
	movl	$-1, %esi
	callq	_setfile
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_nflag,8,3                      ## @nflag
	.comm	_vflag,8,3                      ## @vflag
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s not overwritten\n"

	.comm	_to,8,3                         ## @to
L_.str.1:                               ## @.str.1
	.asciz	"readlink: %s"

L_.str.2:                               ## @.str.2
	.asciz	"unlink: %s"

L_.str.3:                               ## @.str.3
	.asciz	"symlink: %s"

	.comm	_pflag,8,3                      ## @pflag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_copy_link                      ; -- Begin function copy_link
	.p2align	2
_copy_link:                             ; @copy_link
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x20, x9, x10
	mov	sp, x20
	cbz	w1, LBB0_4
; %bb.1:
Lloh8:
	adrp	x9, _nflag@GOTPAGE
Lloh9:
	ldr	x9, [x9, _nflag@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cbz	x9, LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _vflag@GOTPAGE
Lloh12:
	ldr	x8, [x8, _vflag@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.3:
Lloh14:
	adrp	x8, _to@GOTPAGE
Lloh15:
	ldr	x8, [x8, _to@GOTPAGEOFF]
Lloh16:
	ldr	x1, [x8]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	b	LBB0_12
LBB0_4:
	ldr	x0, [x19]
	sub	w2, w8, #1
	mov	x1, x20
	bl	_readlink
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.5:
	strb	wzr, [x20, w0, sxtw]
Lloh19:
	adrp	x22, _to@GOTPAGE
Lloh20:
	ldr	x22, [x22, _to@GOTPAGEOFF]
	cbz	w21, LBB0_8
; %bb.6:
	ldr	x0, [x22]
	bl	_unlink
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x1, [x22]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_8:
	ldr	x1, [x22]
	mov	x0, x20
	bl	_symlink
	cbz	x0, LBB0_15
; %bb.9:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	b	LBB0_11
LBB0_10:
	ldr	x1, [x19]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_warn
LBB0_12:
	mov	w0, #1
LBB0_13:
	ldur	x8, [x29, #-40]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.14:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh30:
	adrp	x8, _pflag@GOTPAGE
Lloh31:
	ldr	x8, [x8, _pflag@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.16:
	ldr	w0, [x19, #8]
	mov	w1, #-1
	bl	_setfile
	b	LBB0_13
LBB0_17:
	mov	w0, #0
	b	LBB0_13
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_nflag,8,3                      ; @nflag
	.comm	_vflag,8,3                      ; @vflag
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s not overwritten\n"

	.comm	_to,8,3                         ; @to
l_.str.1:                               ; @.str.1
	.asciz	"readlink: %s"

l_.str.2:                               ; @.str.2
	.asciz	"unlink: %s"

l_.str.3:                               ; @.str.3
	.asciz	"symlink: %s"

	.comm	_pflag,8,3                      ; @pflag
.subsections_via_symbols
