	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_link
_do_link:                               ## @do_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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	testq	%r12, %r12
	je	LBB0_13
## %bb.1:
	movq	_safecopy@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.2:
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r15, %rcx
	callq	_snprintf
	movq	%r13, %rdi
	callq	_quiet_mktemp
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	callq	_err
LBB0_4:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_link
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	_S_IFDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_rmdir
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_unlink
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdx
	callq	_err
LBB0_8:
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_printf
LBB0_10:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_rename
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_unlink
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.12:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_printf
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	movq	%r15, %rsi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_link                           ## TAILCALL
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_safecopy,8,3                   ## @safecopy
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s.inst.XXXXXX"

	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
L_.str.1:                               ## @.str.1
	.asciz	"%s: mktemp"

	.comm	_S_IFDIR,4,2                    ## @S_IFDIR
L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_verbose,8,3                    ## @verbose
L_.str.3:                               ## @.str.3
	.asciz	"install: link %s -> %s\n"

	.comm	_NOCHANGEBITS,4,2               ## @NOCHANGEBITS
	.no_dead_strip	_do_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_link
_do_link:                               ; @do_link
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	cbz	x2, LBB0_13
; %bb.1:
Lloh8:
	adrp	x8, _safecopy@GOTPAGE
Lloh9:
	ldr	x8, [x8, _safecopy@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.2:
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x3, x19
	bl	_snprintf
	mov	x0, x21
	bl	_quiet_mktemp
	cbnz	x0, LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_err
LBB0_4:
	mov	x0, x20
	mov	x1, x21
	bl	_link
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.5:
	ldr	w8, [x22]
Lloh18:
	adrp	x9, _S_IFDIR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _S_IFDIR@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_rmdir
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_unlink
Lloh21:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_err
LBB0_8:
Lloh26:
	adrp	x8, _verbose@GOTPAGE
Lloh27:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_printf
LBB0_10:
	mov	x0, x21
	mov	x1, x19
	bl	_rename
	mov	x23, x0
	mov	x0, x21
	bl	_unlink
LBB0_11:
	ldur	x8, [x29, #-56]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.12:
	mov	x0, x23
	sub	sp, x29, #48
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh34:
	adrp	x8, _verbose@GOTPAGE
Lloh35:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.14:
Lloh37:
	adrp	x0, l_.str.3@PAGE
Lloh38:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_printf
LBB0_15:
	ldur	x8, [x29, #-56]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x20
	mov	x1, x19
	sub	sp, x29, #48
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_link
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_safecopy,8,3                   ; @safecopy
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s.inst.XXXXXX"

	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
l_.str.1:                               ; @.str.1
	.asciz	"%s: mktemp"

	.comm	_S_IFDIR,4,2                    ; @S_IFDIR
l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_verbose,8,3                    ; @verbose
l_.str.3:                               ; @.str.3
	.asciz	"install: link %s -> %s\n"

	.comm	_NOCHANGEBITS,4,2               ; @NOCHANGEBITS
	.no_dead_strip	_do_link
.subsections_via_symbols
