	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_Timeout
_tty_Timeout:                           ## @tty_Timeout
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	32(%rdi), %edi
	callq	_device2tty
	movq	%rax, %r12
	leaq	16(%rax), %r14
	movq	%r14, %rdi
	callq	_timer_Stop
	movq	_SECTICKS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movq	%r14, %rdi
	callq	_timer_Start
	movl	(%r12), %ebx
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	js	LBB0_5
## %bb.1:
	movq	_TIOCMGET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_2
## %bb.6:
	cmpl	$-1, %ebx
	je	LBB0_7
LBB0_15:
	movl	(%r12), %eax
	xorl	%eax, %ebx
	movq	_TIOCM_CD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ebx
	je	LBB0_18
## %bb.16:
	movq	_LogDEBUG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	8(%r15), %edx
	testl	%eax, %ecx
	je	LBB0_17
## %bb.21:
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_Printf                     ## TAILCALL
LBB0_5:
	movl	$0, (%r12)
	cmpl	$-1, %ebx
	jne	LBB0_15
LBB0_7:
	movq	%r12, %rdi
	callq	_Online
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %edx
	movq	16(%r15), %rcx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_2:
	movq	24(%r15), %rax
	movq	_CD_DEFAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
LBB0_4:
	movq	%r14, %rdi
	callq	_timer_Stop
	movq	_TIOCM_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%r15), %r15d
	movq	%r12, %rdi
	callq	_Online
	testq	%rax, %rax
	leaq	L_.str.10(%rip), %rax
	leaq	L_.str.9(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.8(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_Printf                     ## TAILCALL
LBB0_17:
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	_LogPHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %edx
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movl	12(%r15), %edi
	movq	_CLOSE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_datalink_Down
	jmp	LBB0_14
LBB0_10:
	movq	8(%r12), %r8
	movq	24(%r12), %r9
	incq	%r8
	movq	%r8, 8(%r12)
	cmpq	%r9, %r8
	jge	LBB0_11
## %bb.19:
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %edx
	movq	16(%r15), %rcx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movl	$-1, (%r12)
	jmp	LBB0_20
LBB0_11:
	movq	32(%r12), %rax
	movq	_CD_REQUIRED@GOTPCREL(%rip), %rsi
	movq	_LogPHASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	8(%r15), %edx
	movq	16(%r15), %rcx
	cmpq	(%rsi), %rax
	jne	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_log_Printf
	movq	_TIOCM_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
LBB0_14:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_timer_Stop                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SECTICKS,4,2                   ## @SECTICKS
	.comm	_TIOCMGET,4,2                   ## @TIOCMGET
	.comm	_CD_DEFAULT,8,3                 ## @CD_DEFAULT
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Carrier ioctl not supported, using ``set cd off''\n"

	.comm	_TIOCM_CD,4,2                   ## @TIOCM_CD
	.comm	_LogPHASE,4,2                   ## @LogPHASE
L_.str.1:                               ## @.str.1
	.asciz	"%s: %s: CD detected\n"

	.comm	_CD_REQUIRED,8,3                ## @CD_REQUIRED
L_.str.2:                               ## @.str.2
	.asciz	"%s: %s: Required CD not detected\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s: %s doesn't support CD\n"

	.comm	_LogDEBUG,4,2                   ## @LogDEBUG
L_.str.4:                               ## @.str.4
	.asciz	"%s: %s: Still no carrier (%d/%d)\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s: offline -> online\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s: online -> offline\n"

L_.str.7:                               ## @.str.7
	.asciz	"%s: Carrier lost\n"

	.comm	_CLOSE_NORMAL,4,2               ## @CLOSE_NORMAL
L_.str.8:                               ## @.str.8
	.asciz	"%s: Still %sline\n"

L_.str.9:                               ## @.str.9
	.asciz	"on"

L_.str.10:                              ## @.str.10
	.asciz	"off"

	.no_dead_strip	_tty_Timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_Timeout
_tty_Timeout:                           ; @tty_Timeout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x0
	ldr	w0, [x0, #32]
	bl	_device2tty
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_timer_Stop
Lloh0:
	adrp	x8, _SECTICKS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SECTICKS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	mov	x0, x19
	bl	_timer_Start
	ldr	w22, [x20]
	ldr	x0, [x21]
	tbnz	x0, #63, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _TIOCMGET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIOCMGET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_ioctl
	tbnz	x0, #63, LBB0_9
; %bb.2:
	cmn	w22, #1
	b.eq	LBB0_7
LBB0_3:
	ldr	w8, [x20]
	eor	w10, w8, w22
Lloh6:
	adrp	x9, _TIOCM_CD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TIOCM_CD@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.4:
Lloh9:
	adrp	x10, _LogDEBUG@GOTPAGE
Lloh10:
	ldr	x10, [x10, _LogDEBUG@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x10]
	ldr	w2, [x21, #8]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.5:
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_log_Printf
LBB0_6:
	str	wzr, [x20]
	cmn	w22, #1
	b.ne	LBB0_3
LBB0_7:
	mov	x0, x20
	bl	_Online
	cbz	x0, LBB0_17
; %bb.8:
Lloh14:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w2, [x21, #8]
	ldr	x8, [x21, #16]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_9:
	ldr	x8, [x21, #24]
Lloh19:
	adrp	x9, _CD_DEFAULT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CD_DEFAULT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
Lloh22:
	adrp	x8, _LogWARN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w2, [x21, #8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_Printf
LBB0_11:
	mov	x0, x19
	bl	_timer_Stop
Lloh27:
	adrp	x8, _TIOCM_CD@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TIOCM_CD@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
LBB0_12:
	str	w8, [x20]
	b	LBB0_15
LBB0_13:
Lloh30:
	adrp	x8, _LogDEBUG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _LogDEBUG@GOTPAGEOFF]
Lloh32:
	ldr	w19, [x8]
	ldr	w21, [x21, #8]
	mov	x0, x20
	bl	_Online
Lloh33:
	adrp	x8, l_.str.9@PAGE
Lloh34:
	add	x8, x8, l_.str.9@PAGEOFF
Lloh35:
	adrp	x9, l_.str.10@PAGE
Lloh36:
	add	x9, x9, l_.str.10@PAGEOFF
	cmp	x0, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh37:
	adrp	x1, l_.str.8@PAGE
Lloh38:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x2, x21
LBB0_14:
	bl	_log_Printf
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_log_Printf
Lloh41:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	ldr	w2, [x21, #8]
Lloh44:
	adrp	x1, l_.str.7@PAGE
Lloh45:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_log_Printf
	ldr	w0, [x21, #12]
Lloh46:
	adrp	x8, _CLOSE_NORMAL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _CLOSE_NORMAL@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	bl	_datalink_Down
	b	LBB0_22
LBB0_17:
	ldr	x8, [x20, #8]
	add	x8, x8, #1
	str	x8, [x20, #8]
	ldr	x9, [x20, #24]
	cmp	x8, x9
	b.ge	LBB0_19
; %bb.18:
Lloh49:
	adrp	x10, _LogDEBUG@GOTPAGE
Lloh50:
	ldr	x10, [x10, _LogDEBUG@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x10]
	ldr	w2, [x21, #8]
	ldr	x10, [x21, #16]
	stp	x8, x9, [sp, #8]
	str	x10, [sp]
Lloh52:
	adrp	x1, l_.str.4@PAGE
Lloh53:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_log_Printf
	mov	w8, #-1
	b	LBB0_12
LBB0_19:
	ldr	x9, [x20, #32]
Lloh54:
	adrp	x8, _CD_REQUIRED@GOTPAGE
Lloh55:
	ldr	x8, [x8, _CD_REQUIRED@GOTPAGEOFF]
Lloh56:
	ldr	x10, [x8]
Lloh57:
	adrp	x8, _LogPHASE@GOTPAGE
Lloh58:
	ldr	x8, [x8, _LogPHASE@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
	ldr	w2, [x21, #8]
	ldr	x8, [x21, #16]
	cmp	x9, x10
	b.ne	LBB0_21
; %bb.20:
	str	x8, [sp]
Lloh60:
	adrp	x1, l_.str.2@PAGE
Lloh61:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_log_Printf
	b	LBB0_22
LBB0_21:
	str	x8, [sp]
Lloh62:
	adrp	x1, l_.str.3@PAGE
Lloh63:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_log_Printf
Lloh64:
	adrp	x8, _TIOCM_CD@GOTPAGE
Lloh65:
	ldr	x8, [x8, _TIOCM_CD@GOTPAGEOFF]
Lloh66:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_timer_Stop
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpAdd	Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_SECTICKS,4,2                   ; @SECTICKS
	.comm	_TIOCMGET,4,2                   ; @TIOCMGET
	.comm	_CD_DEFAULT,8,3                 ; @CD_DEFAULT
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Carrier ioctl not supported, using ``set cd off''\n"

	.comm	_TIOCM_CD,4,2                   ; @TIOCM_CD
	.comm	_LogPHASE,4,2                   ; @LogPHASE
l_.str.1:                               ; @.str.1
	.asciz	"%s: %s: CD detected\n"

	.comm	_CD_REQUIRED,8,3                ; @CD_REQUIRED
l_.str.2:                               ; @.str.2
	.asciz	"%s: %s: Required CD not detected\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s: %s doesn't support CD\n"

	.comm	_LogDEBUG,4,2                   ; @LogDEBUG
l_.str.4:                               ; @.str.4
	.asciz	"%s: %s: Still no carrier (%d/%d)\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s: offline -> online\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s: online -> offline\n"

l_.str.7:                               ; @.str.7
	.asciz	"%s: Carrier lost\n"

	.comm	_CLOSE_NORMAL,4,2               ; @CLOSE_NORMAL
l_.str.8:                               ; @.str.8
	.asciz	"%s: Still %sline\n"

l_.str.9:                               ; @.str.9
	.asciz	"on"

l_.str.10:                              ; @.str.10
	.asciz	"off"

	.no_dead_strip	_tty_Timeout
.subsections_via_symbols
