	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_linkit                         ## -- Begin function linkit
	.p2align	4, 0x90
_linkit:                                ## @linkit
	.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	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_uflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_Nflag@GOTPCREL(%rip), %r12
	je	LBB0_3
## %bb.1:
	cmpl	$0, (%r12)
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_unlink
LBB0_3:
	movq	_SYMLINK@GOTPCREL(%rip), %r13
	cmpl	%ebx, (%r13)
	jne	LBB0_7
## %bb.4:
	cmpl	$0, (%r12)
	jne	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_symlink
	testq	%rax, %rax
	jns	LBB0_10
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_17
LBB0_7:
	movq	_HARDLINK@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_11
## %bb.8:
	cmpl	$0, (%r12)
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_link
	testl	%eax, %eax
	js	LBB0_12
LBB0_10:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	%ebx, (%r13)
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_vprintf
	movq	_GOOD@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	callq	_panic
	jmp	LBB0_18
LBB0_12:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_16
## %bb.13:
	cmpq	$0, -48(%rbp)
	je	LBB0_16
## %bb.14:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_chflags
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_link
	movl	%eax, %r12d
	movq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_chflags
	testl	%r12d, %r12d
	jns	LBB0_10
LBB0_16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
LBB0_17:
	movl	%ebx, %edi
	movq	%r15, %rdx
	movq	%r14, %rcx
	movq	%rax, %r8
	callq	_fprintf
LBB0_18:
	movq	_FAIL@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_uflag,8,3                      ## @uflag
	.comm	_Nflag,4,2                      ## @Nflag
	.comm	_SYMLINK,4,2                    ## @SYMLINK
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"warning: cannot create symbolic link %s->%s: %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_FAIL,4,2                       ## @FAIL
	.comm	_HARDLINK,4,2                   ## @HARDLINK
L_.str.1:                               ## @.str.1
	.asciz	"warning: cannot create hard link %s->%s: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"linkit: unknown type %d\n"

	.comm	_stdout,4,2                     ## @stdout
L_.str.3:                               ## @.str.3
	.asciz	"Create %s link %s->%s\n"

L_.str.4:                               ## @.str.4
	.asciz	"symbolic"

L_.str.5:                               ## @.str.5
	.asciz	"hard"

	.comm	_GOOD,4,2                       ## @GOOD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_linkit                         ; -- Begin function linkit
	.p2align	2
_linkit:                                ; @linkit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _uflag@GOTPAGE
Lloh1:
	ldr	x8, [x8, _uflag@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x22, _Nflag@GOTPAGE
Lloh4:
	ldr	x22, [x22, _Nflag@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	x8, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_unlink
LBB0_2:
Lloh5:
	adrp	x23, _SYMLINK@GOTPAGE
Lloh6:
	ldr	x23, [x23, _SYMLINK@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, w21
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x22]
	cbnz	w8, LBB0_9
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_symlink
	tbz	x0, #63, LBB0_9
; %bb.5:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w21, [x8]
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_strerror
	mov	x4, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_6:
Lloh15:
	adrp	x8, _HARDLINK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HARDLINK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_10
; %bb.7:
	ldr	w8, [x22]
	cbnz	w8, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_link
	tbnz	w0, #31, LBB0_11
LBB0_9:
Lloh18:
	adrp	x8, _stdout@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w8, [x23]
Lloh21:
	adrp	x9, l_.str.5@PAGE
Lloh22:
	add	x9, x9, l_.str.5@PAGEOFF
Lloh23:
	adrp	x10, l_.str.4@PAGE
Lloh24:
	add	x10, x10, l_.str.4@PAGEOFF
	cmp	w8, w21
	csel	x2, x10, x9, eq
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x20
	mov	x4, x19
	bl	_vprintf
Lloh27:
	adrp	x8, _GOOD@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GOOD@GOTPAGEOFF]
	b	LBB0_18
LBB0_10:
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_panic
	b	LBB0_17
LBB0_11:
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
	cbnz	x0, LBB0_15
; %bb.12:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_15
; %bb.13:
	mov	x0, x19
	mov	x1, #0
	bl	_chflags
	cbnz	w0, LBB0_15
; %bb.14:
	mov	x0, x19
	mov	x1, x20
	bl	_link
	mov	x22, x0
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_chflags
	tbz	w22, #31, LBB0_9
LBB0_15:
Lloh31:
	adrp	x8, _stderr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh33:
	ldr	w21, [x8]
Lloh34:
	adrp	x8, _errno@GOTPAGE
Lloh35:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_strerror
	mov	x4, x0
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_fprintf
LBB0_17:
Lloh39:
	adrp	x8, _FAIL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _FAIL@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_uflag,8,3                      ; @uflag
	.comm	_Nflag,4,2                      ; @Nflag
	.comm	_SYMLINK,4,2                    ; @SYMLINK
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"warning: cannot create symbolic link %s->%s: %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_FAIL,4,2                       ; @FAIL
	.comm	_HARDLINK,4,2                   ; @HARDLINK
l_.str.1:                               ; @.str.1
	.asciz	"warning: cannot create hard link %s->%s: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"linkit: unknown type %d\n"

	.comm	_stdout,4,2                     ; @stdout
l_.str.3:                               ; @.str.3
	.asciz	"Create %s link %s->%s\n"

l_.str.4:                               ; @.str.4
	.asciz	"symbolic"

l_.str.5:                               ; @.str.5
	.asciz	"hard"

	.comm	_GOOD,4,2                       ; @GOOD
.subsections_via_symbols
