	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mk_link
_mk_link:                               ## @mk_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	-88(%rbp), %rsi
	movq	%rdx, %rdi
	callq	_lstat
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	_errno@GOTPCREL(%rip), %r15
	movq	_nodirs@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r15), %ebx
	cmpl	$0, (%r14)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	16(%r13), %edx
	movl	20(%r13), %esi
	movq	%r12, %rdi
	callq	_chk_path
	testq	%rax, %rax
	je	LBB0_11
LBB0_15:
	movl	$1, %eax
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.16:
	leaq	L_.str.2(%rip), %rdx
	movl	$1, %edi
	movl	%ebx, %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %r8
	xorl	%eax, %eax
	callq	_syswarn
LBB0_17:
	movl	$-1, %eax
	jmp	LBB0_18
LBB0_1:
	movq	_kflag@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	jne	LBB0_18
## %bb.2:
	movq	(%r13), %rax
	cmpq	-88(%rbp), %rax
	jne	LBB0_5
## %bb.3:
	movq	8(%r13), %rax
	cmpq	-80(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_paxwarn
	jmp	LBB0_17
LBB0_12:
	xorl	%eax, %eax
LBB0_18:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-64(%rbp), %edi
	callq	_S_ISDIR
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	callq	_rmdir
	testq	%rax, %rax
	jns	LBB0_10
	jmp	LBB0_7
LBB0_8:
	callq	_unlink
	testq	%rax, %rax
	jns	LBB0_10
## %bb.9:
	movl	$1, %eax
	testl	%ebx, %ebx
	jne	LBB0_18
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %edi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_syswarn
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_kflag,8,3                      ## @kflag
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to link file %s to itself"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"Unable to remove %s"

	.comm	_nodirs,4,2                     ## @nodirs
L_.str.2:                               ## @.str.2
	.asciz	"Could not link to %s from %s"

	.no_dead_strip	_mk_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mk_link
_mk_link:                               ; @mk_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	add	x1, sp, #16
	mov	x0, x2
	bl	_lstat
	cbz	x0, LBB0_7
LBB0_1:
Lloh0:
	adrp	x24, _errno@GOTPAGE
Lloh1:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x25, _nodirs@GOTPAGE
Lloh3:
	ldr	x25, [x25, _nodirs@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_link
	cbz	x0, LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w23, [x24]
	ldr	w8, [x25]
	cbnz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w2, w1, [x22, #16]
	mov	x0, x19
	bl	_chk_path
	cbz	x0, LBB0_2
LBB0_5:
	cbz	w21, LBB0_9
LBB0_6:
	mov	w0, #1
	b	LBB0_12
LBB0_7:
Lloh4:
	adrp	x8, _kflag@GOTPAGE
Lloh5:
	ldr	x8, [x8, _kflag@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	str	x19, [sp]
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x1, x23
	mov	x3, x20
LBB0_10:
	bl	_syswarn
LBB0_11:
	mov	w0, #-1
LBB0_12:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	ldr	x8, [x22]
	ldr	x9, [sp, #16]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.14:
	ldr	x8, [x22, #8]
	ldr	x9, [sp, #24]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_paxwarn
	b	LBB0_11
LBB0_16:
	ldr	w0, [sp, #40]
	bl	_S_ISDIR
	cbz	x0, LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_rmdir
	tbz	x0, #63, LBB0_1
LBB0_18:
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x3, x19
	b	LBB0_10
LBB0_19:
	mov	x0, x19
	bl	_unlink
	tbz	x0, #63, LBB0_1
; %bb.20:
	cbnz	w21, LBB0_6
	b	LBB0_18
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_kflag,8,3                      ; @kflag
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to link file %s to itself"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"Unable to remove %s"

	.comm	_nodirs,4,2                     ; @nodirs
l_.str.2:                               ; @.str.2
	.asciz	"Could not link to %s from %s"

	.no_dead_strip	_mk_link
.subsections_via_symbols
