	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_port_block_til_ready       ## -- Begin function tty_port_block_til_ready
	.p2align	4, 0x90
_tty_port_block_til_ready:              ## @tty_port_block_til_ready
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movq	%r14, %rdi
	callq	_tty_hung_up_p
	movl	(%r15), %ecx
	movq	_ASYNC_CLOSING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	%edx, %eax
	andl	%ecx, %eax
	jne	LBB0_2
## %bb.6:
	movl	(%r12), %eax
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	btl	%edx, %eax
	jae	LBB0_8
LBB0_7:
	movq	_ASYNC_NORMAL_ACTIVE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_33
LBB0_2:
	xorl	%esi, %esi
	testl	%ecx, %edx
	sete	%sil
	movl	20(%r15), %edi
	callq	_wait_event_interruptible
	movq	_ASYNC_HUP_NOTIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.3:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_8:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.9:
	movq	8(%r12), %rax
	movq	_CBAUD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax)
	je	LBB0_7
## %bb.10:
	movq	%r15, %rdi
	callq	_tty_port_raise_dtr_rts
	movl	(%r15), %ecx
	jmp	LBB0_7
LBB0_5:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_33:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r12, %rdi
	callq	_C_CLOCAL
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	4(%r15), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_tty_hung_up_p
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	decl	12(%r15)
LBB0_13:
	incl	8(%r15)
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	leaq	16(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	_CBAUD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	callq	_tty_port_raise_dtr_rts
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_prepare_to_wait
	movq	%r14, %rdi
	callq	_tty_hung_up_p
	movl	(%r15), %ecx
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_18
## %bb.22:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	setne	%r13b
	movq	%r15, %rdi
	callq	_tty_port_carrier_raised
	movl	(%rbx), %ecx
	testl	%eax, %eax
	setne	%al
	testl	%ecx, (%r15)
	jne	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=1
	orb	%al, %r13b
	jne	LBB0_24
LBB0_25:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_26
## %bb.34:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	jmp	LBB0_14
LBB0_18:
	movq	_ASYNC_HUP_NOTIFY@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_21
## %bb.19:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_24:
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_26:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_27:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_28
LBB0_21:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
LBB0_20:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_28:
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_finish_wait
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_tty_hung_up_p
	testq	%rax, %rax
	jne	LBB0_30
## %bb.29:
	incl	12(%r15)
LBB0_30:
	decl	8(%r15)
	testl	%ebx, %ebx
	jne	LBB0_32
## %bb.31:
	movq	_ASYNC_NORMAL_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_32:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_ASYNC_CLOSING,4,2              ## @ASYNC_CLOSING
	.comm	_ASYNC_HUP_NOTIFY,4,2           ## @ASYNC_HUP_NOTIFY
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.comm	_ASYNC_NORMAL_ACTIVE,4,2        ## @ASYNC_NORMAL_ACTIVE
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_CBAUD,4,2                      ## @CBAUD
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_current,4,2                    ## @current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_port_block_til_ready       ; -- Begin function tty_port_block_til_ready
	.p2align	2
_tty_port_block_til_ready:              ; @tty_port_block_til_ready
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
	mov	x0, x20
	bl	_tty_hung_up_p
	ldr	w8, [x19]
Lloh3:
	adrp	x26, _ASYNC_CLOSING@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ASYNC_CLOSING@GOTPAGEOFF]
	ldr	w9, [x26]
	and	w9, w9, w8
	cbnz	x0, LBB0_4
; %bb.1:
	cbnz	w9, LBB0_4
; %bb.2:
	ldr	w9, [x22]
Lloh5:
	adrp	x10, _TTY_IO_ERROR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	lsr	w9, w9, w10
	tbz	w9, #0, LBB0_6
; %bb.3:
	mov	w22, #0
Lloh8:
	adrp	x9, _ASYNC_NORMAL_ACTIVE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ASYNC_NORMAL_ACTIVE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_12
LBB0_4:
	cmp	w9, #0
	cset	w1, eq
	ldr	w0, [x19, #20]
	bl	_wait_event_interruptible
	ldr	w8, [x19]
Lloh11:
	adrp	x9, _ASYNC_HUP_NOTIFY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ASYNC_HUP_NOTIFY@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.5:
Lloh14:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
	ldr	w9, [x20]
Lloh16:
	adrp	x10, _O_NONBLOCK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _O_NONBLOCK@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.7:
	ldr	x9, [x22, #8]
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _CBAUD@GOTPAGE
Lloh20:
	ldr	x10, [x10, _CBAUD@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_tty_port_raise_dtr_rts
	ldr	w8, [x19]
LBB0_9:
	mov	w22, #0
Lloh22:
	adrp	x9, _ASYNC_NORMAL_ACTIVE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ASYNC_NORMAL_ACTIVE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_12
LBB0_10:
Lloh25:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	x0, x22
	bl	_C_CLOCAL
	mov	x24, x0
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_tty_hung_up_p
	cbnz	x0, LBB0_15
; %bb.14:
	ldr	w8, [x19, #12]
	sub	w8, w8, #1
	str	w8, [x19, #12]
LBB0_15:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	add	x23, x19, #16
Lloh27:
	adrp	x27, _CBAUD@GOTPAGE
Lloh28:
	ldr	x27, [x27, _CBAUD@GOTPAGEOFF]
Lloh29:
	adrp	x28, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh30:
	ldr	x28, [x28, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh31:
	adrp	x25, _wait@GOTPAGE
Lloh32:
	ldr	x25, [x25, _wait@GOTPAGEOFF]
Lloh33:
	adrp	x21, _ASYNC_INITIALIZED@GOTPAGE
Lloh34:
	ldr	x21, [x21, _ASYNC_INITIALIZED@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x19
	bl	_tty_port_raise_dtr_rts
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w2, [x28]
	mov	x0, x23
	mov	x1, x25
	bl	_prepare_to_wait
	mov	x0, x20
	bl	_tty_hung_up_p
	ldr	w8, [x19]
	cbnz	x0, LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x19
	bl	_tty_port_carrier_raised
	cmp	x24, #0
	ldr	w9, [x19]
	ldr	w10, [x26]
	ccmp	w0, #0, #0, eq
	cset	w8, ne
	and	w9, w10, w9
	cbnz	w9, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	tbnz	w8, #0, LBB0_26
LBB0_22:                                ;   in Loop: Header=BB0_16 Depth=1
Lloh35:
	adrp	x8, _current@GOTPAGE
Lloh36:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_signal_pending
	cbnz	x0, LBB0_27
; %bb.23:                               ;   in Loop: Header=BB0_16 Depth=1
	bl	_schedule
	b	LBB0_16
LBB0_24:
Lloh38:
	adrp	x9, _ASYNC_HUP_NOTIFY@GOTPAGE
Lloh39:
	ldr	x9, [x9, _ASYNC_HUP_NOTIFY@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	tst	w9, w8
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	b.eq	LBB0_29
; %bb.25:
Lloh41:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_30
LBB0_26:
	mov	w22, #0
	b	LBB0_28
LBB0_27:
Lloh43:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_28:
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_31
LBB0_29:
Lloh46:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_30:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_31:
Lloh48:
	adrp	x1, _wait@GOTPAGE
Lloh49:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	mov	x0, x23
	bl	_finish_wait
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_tty_hung_up_p
	cbnz	x0, LBB0_33
; %bb.32:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
LBB0_33:
	ldr	w8, [x19, #8]
	sub	w8, w8, #1
	str	w8, [x19, #8]
	cbnz	w22, LBB0_35
; %bb.34:
Lloh50:
	adrp	x8, _ASYNC_NORMAL_ACTIVE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ASYNC_NORMAL_ACTIVE@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_35:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_12
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_ASYNC_CLOSING,4,2              ; @ASYNC_CLOSING
	.comm	_ASYNC_HUP_NOTIFY,4,2           ; @ASYNC_HUP_NOTIFY
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.comm	_ASYNC_NORMAL_ACTIVE,4,2        ; @ASYNC_NORMAL_ACTIVE
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_CBAUD,4,2                      ; @CBAUD
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_current,4,2                    ; @current
.subsections_via_symbols
