	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_rename
_tty_rename:                            ## @tty_rename
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	addl	$2, %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_argv0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	movq	%r14, %rdi
	callq	_ls_tty
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_tty_read
	movl	$-1, %r12d
	testq	%rax, %rax
	js	LBB0_12
## %bb.1:
	leaq	L_.str.2(%rip), %r13
	leaq	L_.str.3(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_tty_prnt
	movq	%r14, %rdi
	callq	_ls_tty
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_tty_read
	testq	%rax, %rax
	js	LBB0_4
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	leaq	L_.str.5(%rip), %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_strlen
	leaq	L_.str.6(%rip), %rdi
	movq	_PAXPATHLEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_3
## %bb.6:
	movb	(%rbx), %al
	cmpb	$46, %al
	je	LBB0_9
## %bb.7:
	testb	%al, %al
	jne	LBB0_11
## %bb.8:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_tty_prnt
	movl	$1, %r12d
	jmp	LBB0_12
LBB0_4:
	movl	$-1, %r12d
	jmp	LBB0_12
LBB0_9:
	cmpb	$0, 1(%rbx)
	je	LBB0_10
LBB0_11:
	leaq	L_.str.9(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_tty_prnt
	movq	(%r14), %rdi
	movq	8(%r14), %rsi
	movq	%rbx, %rdx
	callq	_add_name
	movl	%eax, %r12d
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movl	$7, %edx
	callq	_l_strncpy
	movq	%rax, 8(%r14)
	movq	(%r14), %rcx
	movb	$0, (%rcx,%rax)
	sarl	$31, %r12d
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.8(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_tty_prnt
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PAXPATHLEN,4,2                 ## @PAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\nATTENTION: %s interactive file rename operation.\n"

	.comm	_argv0,8,3                      ## @argv0
L_.str.1:                               ## @.str.1
	.asciz	"Input new name, or a \".\" to keep the old name, "

L_.str.2:                               ## @.str.2
	.asciz	"or a \"return\" to skip this file.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Input > "

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

L_.str.5:                               ## @.str.5
	.asciz	"Try again, illegal file name: ..\n"

L_.str.6:                               ## @.str.6
	.asciz	"Try again, file name too long\n"

L_.str.7:                               ## @.str.7
	.asciz	"Skipping file.\n"

L_.str.8:                               ## @.str.8
	.asciz	"Processing continues, name unchanged.\n"

L_.str.9:                               ## @.str.9
	.asciz	"Processing continues, name changed to: %s\n"

	.no_dead_strip	_tty_rename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_rename
_tty_rename:                            ; @tty_rename
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	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, #-88]
Lloh3:
	adrp	x26, _PAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x26, [x26, _PAXPATHLEN@GOTPAGEOFF]
	ldr	w8, [x26]
	add	w21, w8, #2
	mov	x9, x21
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh7:
	adrp	x8, _argv0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _argv0@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [sp, #-16]!
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tty_prnt
	add	sp, sp, #16
	mov	x0, x19
	bl	_ls_tty
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_tty_prnt
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tty_prnt
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tty_prnt
	mov	x0, x20
	mov	x1, x21
	bl	_tty_read
	tbnz	x0, #63, LBB0_9
; %bb.1:
Lloh18:
	adrp	x22, l_.str.4@PAGE
Lloh19:
	add	x22, x22, l_.str.4@PAGEOFF
Lloh20:
	adrp	x27, l_.str.5@PAGE
Lloh21:
	add	x27, x27, l_.str.5@PAGEOFF
Lloh22:
	adrp	x23, l_.str.1@PAGE
Lloh23:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh24:
	adrp	x24, l_.str.2@PAGE
Lloh25:
	add	x24, x24, l_.str.2@PAGEOFF
Lloh26:
	adrp	x25, l_.str.3@PAGE
Lloh27:
	add	x25, x25, l_.str.3@PAGEOFF
Lloh28:
	adrp	x28, l_.str.6@PAGE
Lloh29:
	add	x28, x28, l_.str.6@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x27
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_tty_prnt
	mov	x0, x19
	bl	_ls_tty
	mov	x0, x23
	bl	_tty_prnt
	mov	x0, x24
	bl	_tty_prnt
	mov	x0, x25
	bl	_tty_prnt
	mov	x0, x20
	mov	x1, x21
	bl	_tty_read
	tbnz	x0, #63, LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_strlen
	mov	x8, x0
	ldr	w9, [x26]
	mov	x0, x28
	cmp	w8, w9
	b.gt	LBB0_3
; %bb.6:
	ldrb	w8, [x20]
	cmp	w8, #46
	b.eq	LBB0_12
; %bb.7:
	cbnz	w8, LBB0_13
; %bb.8:
Lloh30:
	adrp	x0, l_.str.7@PAGE
Lloh31:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_tty_prnt
	mov	w0, #1
	b	LBB0_10
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldur	x8, [x29, #-88]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.11:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldrb	w8, [x20, #1]
	cbz	w8, LBB0_14
LBB0_13:
	str	x20, [sp, #-16]!
Lloh35:
	adrp	x0, l_.str.9@PAGE
Lloh36:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_tty_prnt
	add	sp, sp, #16
	ldp	x0, x1, [x19]
	mov	x2, x20
	bl	_add_name
	mov	x21, x0
	ldr	x0, [x19]
	mov	x1, x20
	mov	w2, #7
	bl	_l_strncpy
	str	x0, [x19, #8]
	ldr	x8, [x19]
	strb	wzr, [x8, x0]
	asr	w0, w21, #31
	b	LBB0_10
LBB0_14:
Lloh37:
	adrp	x0, l_.str.8@PAGE
Lloh38:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_tty_prnt
	mov	w0, #0
	b	LBB0_10
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_PAXPATHLEN,4,2                 ; @PAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\nATTENTION: %s interactive file rename operation.\n"

	.comm	_argv0,8,3                      ; @argv0
l_.str.1:                               ; @.str.1
	.asciz	"Input new name, or a \".\" to keep the old name, "

l_.str.2:                               ; @.str.2
	.asciz	"or a \"return\" to skip this file.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Input > "

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

l_.str.5:                               ; @.str.5
	.asciz	"Try again, illegal file name: ..\n"

l_.str.6:                               ; @.str.6
	.asciz	"Try again, file name too long\n"

l_.str.7:                               ; @.str.7
	.asciz	"Skipping file.\n"

l_.str.8:                               ; @.str.8
	.asciz	"Processing continues, name unchanged.\n"

l_.str.9:                               ; @.str.9
	.asciz	"Processing continues, name changed to: %s\n"

	.no_dead_strip	_tty_rename
.subsections_via_symbols
