	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function auto_tty_status
_auto_tty_status:                       ## @auto_tty_status
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_TTY_IFCONSOLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	leaq	-48(%rbp), %rdx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.1:
	movq	-48(%rbp), %rdi
	callq	_malloc
	movq	%rax, %r15
	leaq	L_.str(%rip), %rdi
	leaq	-48(%rbp), %rdx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.2:
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movb	$0, (%rax)
	movq	%r15, -56(%rbp)
	leaq	L_.str.1(%rip), %r12
	leaq	-56(%rbp), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_strsep
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$0, (%rax)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:
	movq	_TTY_ON@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_8:
	movq	%r15, %rdi
	callq	_free
LBB0_9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTY_IFCONSOLE,4,2              ## @TTY_IFCONSOLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kern.console"

L_.str.1:                               ## @.str.1
	.asciz	","

	.comm	_TTY_ON,4,2                     ## @TTY_ON
	.no_dead_strip	_auto_tty_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function auto_tty_status
_auto_tty_status:                       ; @auto_tty_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _TTY_IFCONSOLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTY_IFCONSOLE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x1, #0
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_malloc
	mov	x21, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x1, x21
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
	mov	x0, x21
	mov	w1, #47
	bl	_strchr
	cbz	x0, LBB0_8
; %bb.3:
	strb	wzr, [x0]
	str	x21, [sp]
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	mov	x1, x22
	bl	_strsep
	cbz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x0]
	cbz	w8, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x20
	bl	_strcmp
	cbnz	x0, LBB0_4
; %bb.7:
Lloh9:
	adrp	x8, _TTY_ON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TTY_ON@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w19, w8, w19
LBB0_8:
	mov	x0, x21
	bl	_free
LBB0_9:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TTY_IFCONSOLE,4,2              ; @TTY_IFCONSOLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kern.console"

l_.str.1:                               ; @.str.1
	.asciz	","

	.comm	_TTY_ON,4,2                     ; @TTY_ON
	.no_dead_strip	_auto_tty_status
.subsections_via_symbols
