	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function filesys_link
_filesys_link:                          ## @filesys_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	%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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_vkprintf
	movq	_lf_find@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_filesys_lookup_file
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_filesys_lookup_file
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r14
	movq	(%rax), %r12
	testq	%r12, %r12
	js	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_get_inode_f
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	%rax, %r13
	movq	_lf_creat@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_filesys_lookup_file
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	incl	(%r13)
	movq	%r12, (%rax)
	movl	16(%r14), %ecx
	movl	%ecx, 16(%rax)
	movl	12(%r14), %ecx
	movl	%ecx, 12(%rax)
	movl	8(%r14), %ecx
	movl	%ecx, 8(%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_7:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"filesys_link (%s, %s)\n"

	.comm	_lf_find,4,2                    ## @lf_find
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_lf_creat,4,2                   ## @lf_creat
	.no_dead_strip	_filesys_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function filesys_link
_filesys_link:                          ; @filesys_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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x20
	mov	x3, x19
	bl	_vkprintf
Lloh2:
	adrp	x21, _lf_find@GOTPAGE
Lloh3:
	ldr	x21, [x21, _lf_find@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_filesys_lookup_file
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EEXIST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_filesys_lookup_file
	cbz	x0, LBB0_7
; %bb.3:
	mov	x20, x0
	ldr	x21, [x0]
	tbnz	x21, #63, LBB0_7
; %bb.4:
	mov	x0, x21
	mov	w1, #0
	bl	_get_inode_f
	cbz	x0, LBB0_10
; %bb.5:
	mov	x22, x0
Lloh6:
	adrp	x8, _lf_creat@GOTPAGE
Lloh7:
	ldr	x8, [x8, _lf_creat@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_filesys_lookup_file
	cbz	x0, LBB0_7
; %bb.6:
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x22]
	add	w9, w9, #1
	str	w9, [x22]
	str	x21, [x8]
	ldr	w9, [x20, #16]
	str	w9, [x8, #16]
	ldr	d0, [x20, #8]
	str	d0, [x8, #8]
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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_10:
Lloh11:
	adrp	x8, _EFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"filesys_link (%s, %s)\n"

	.comm	_lf_find,4,2                    ; @lf_find
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_lf_creat,4,2                   ; @lf_creat
	.no_dead_strip	_filesys_link
.subsections_via_symbols
