	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttypath                        ## -- Begin function ttypath
	.p2align	4, 0x90
_ttypath:                               ## @ttypath
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_ttyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_ttyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_ttyname
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_3
LBB0_4:
	leaq	-16(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_3
## %bb.5:
	movq	_S_IWOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-16(%rbp), %esi
	callq	_bitset
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	xorl	%eax, %eax
	callq	_getlogin
	testq	%rax, %rax
	cmoveq	%rax, %rbx
	jmp	LBB0_7
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_S_IWOTH,4,2                    ## @S_IWOTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttypath                        ; -- Begin function ttypath
	.p2align	2
_ttypath:                               ; @ttypath
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	w0, #2
	bl	_ttyname
	mov	x19, x0
	cbnz	x0, LBB0_3
; %bb.1:
	mov	w0, #1
	bl	_ttyname
	mov	x19, x0
	cbnz	x0, LBB0_3
; %bb.2:
	bl	_ttyname
	mov	x19, x0
	cbz	x0, LBB0_7
LBB0_3:
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
	tbnz	x0, #63, LBB0_6
; %bb.4:
Lloh0:
	adrp	x8, _S_IWOTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S_IWOTH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [sp, #8]
	bl	_bitset
	cbz	w0, LBB0_6
; %bb.5:
	bl	_getlogin
	cmp	x0, #0
	csel	x0, xzr, x19, eq
	b	LBB0_8
LBB0_6:
	mov	x0, #0
LBB0_7:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_S_IWOTH,4,2                    ; @S_IWOTH
.subsections_via_symbols
