	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_Offline
_tty_Offline:                           ## @tty_Offline
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	12(%rdi), %edi
	callq	_device2tty
	cmpq	$0, (%r14)
	js	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_timer_Stop
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_Online
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%r14), %rdi
	leaq	-24(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_tcgetattr
	movq	_B0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cfsetspeed
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	movq	_TCSANOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	callq	_tcsetattr
	cmpl	$-1, %eax
	jne	LBB0_5
LBB0_4:
	movq	_LogWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_log_Printf
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_B0,4,2                         ## @B0
	.comm	_TCSANOW,4,2                    ## @TCSANOW
	.comm	_LogWARN,4,2                    ## @LogWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Unable to set physical to speed 0\n"

	.no_dead_strip	_tty_Offline
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_Offline
_tty_Offline:                           ; @tty_Offline
	.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	x19, x0
	ldr	w0, [x0, #12]
	bl	_device2tty
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_5
; %bb.1:
	mov	x20, x0
	add	x0, x0, #4
	bl	_timer_Stop
Lloh0:
	adrp	x8, _TIOCM_DTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TIOCM_DTR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	bl	_Online
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x19]
	add	x1, sp, #8
	bl	_tcgetattr
Lloh3:
	adrp	x8, _B0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B0@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_cfsetspeed
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.3:
	ldr	x0, [x19]
Lloh6:
	adrp	x8, _TCSANOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TCSANOW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_tcsetattr
	cmn	w0, #1
	b.ne	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _LogWARN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LogWARN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w2, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_Printf
LBB0_5:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_B0,4,2                         ; @B0
	.comm	_TCSANOW,4,2                    ; @TCSANOW
	.comm	_LogWARN,4,2                    ; @LogWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Unable to set physical to speed 0\n"

	.no_dead_strip	_tty_Offline
.subsections_via_symbols
