	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_AwaitCarrier
_tty_AwaitCarrier:                      ## @tty_AwaitCarrier
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_device2tty
	movq	%rax, %rbx
	movq	24(%rax), %rax
	movq	_CD_NOTREQUIRED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_physical_IsSync
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_CARRIER_OK@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	cmpl	$-1, (%rbx)
	je	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_Online
	testq	%rax, %rax
	jne	LBB0_2
## %bb.6:
	movq	_CARRIER_LOST@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	movq	16(%rbx), %rax
	movq	_TIMER_STOPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	callq	_tty_StartTimer
LBB0_9:
	movq	_CARRIER_PENDING@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_CD_NOTREQUIRED,8,3             ## @CD_NOTREQUIRED
	.comm	_CARRIER_OK,4,2                 ## @CARRIER_OK
	.comm	_TIMER_STOPPED,8,3              ## @TIMER_STOPPED
	.comm	_CARRIER_PENDING,4,2            ## @CARRIER_PENDING
	.comm	_CARRIER_LOST,4,2               ## @CARRIER_LOST
	.no_dead_strip	_tty_AwaitCarrier
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_AwaitCarrier
_tty_AwaitCarrier:                      ; @tty_AwaitCarrier
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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]
	bl	_device2tty
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _CD_NOTREQUIRED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CD_NOTREQUIRED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_physical_IsSync
	cbz	x0, LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _CARRIER_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CARRIER_OK@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x20]
	cmn	w8, #1
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_Online
Lloh5:
	adrp	x8, _CARRIER_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CARRIER_OK@GOTPAGEOFF]
Lloh7:
	adrp	x9, _CARRIER_LOST@GOTPAGE
Lloh8:
	ldr	x9, [x9, _CARRIER_LOST@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_3
LBB0_6:
	ldr	x8, [x20, #16]
Lloh9:
	adrp	x9, _TIMER_STOPPED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TIMER_STOPPED@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	str	xzr, [x20, #8]
	mov	x0, x19
	bl	_tty_StartTimer
LBB0_8:
Lloh12:
	adrp	x8, _CARRIER_PENDING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CARRIER_PENDING@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CD_NOTREQUIRED,8,3             ; @CD_NOTREQUIRED
	.comm	_CARRIER_OK,4,2                 ; @CARRIER_OK
	.comm	_TIMER_STOPPED,8,3              ; @TIMER_STOPPED
	.comm	_CARRIER_PENDING,4,2            ; @CARRIER_PENDING
	.comm	_CARRIER_LOST,4,2               ; @CARRIER_LOST
	.no_dead_strip	_tty_AwaitCarrier
.subsections_via_symbols
