	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function block_til_ready
_block_til_ready:                       ## @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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_current@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -88(%rbp)
	movl	$0, -80(%rbp)
	movq	24(%rdx), %r12
	movq	%rsi, %rdi
	callq	_tty_hung_up_p
	movl	(%rbx), %ecx
	movq	_ASYNC_CLOSING@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	testl	%ecx, %edx
	jne	LBB0_6
	jmp	LBB0_7
LBB0_1:
	testl	%ecx, %edx
	je	LBB0_2
LBB0_6:
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_interruptible_sleep_on
LBB0_7:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_8:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %eax
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	btl	%edx, %eax
	jae	LBB0_9
LBB0_4:
	movq	_ASYNC_NORMAL_ACTIVE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_9:
	movq	8(%r15), %rax
	movq	_CLOCAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	leaq	12(%rbx), %rdi
	leaq	-88(%rbp), %rsi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_add_wait_queue
	callq	_local_irq_save
	movq	%r14, %rdi
	callq	_tty_hung_up_p
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	decl	(%r12)
LBB0_11:
	callq	_local_irq_restore
	incl	8(%rbx)
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	callq	_local_irq_save
	movq	8(%r15), %rax
	movq	_CBAUD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_SER_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SER_DTR@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_rtsdtr_ctrl
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	callq	_local_irq_restore
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	%r14, %rdi
	callq	_tty_hung_up_p
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rbx), %eax
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.23:                              ##   in Loop: Header=BB0_12 Depth=1
	testl	%eax, (%r13)
	movq	_current@GOTPCREL(%rip), %rcx
	jne	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.25:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_SER_DCD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ciab@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_18
LBB0_26:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rcx), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_27
## %bb.28:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	jmp	LBB0_12
LBB0_16:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_27:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_18:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___set_current_state
	leaq	-88(%rbp), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_remove_wait_queue
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_20
## %bb.19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
LBB0_20:
	decl	8(%rbx)
	testl	%r12d, %r12d
	jne	LBB0_8
## %bb.21:
	movq	_ASYNC_NORMAL_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_ASYNC_CLOSING,4,2              ## @ASYNC_CLOSING
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.comm	_ASYNC_NORMAL_ACTIVE,4,2        ## @ASYNC_NORMAL_ACTIVE
	.comm	_CLOCAL,4,2                     ## @CLOCAL
	.comm	_CBAUD,4,2                      ## @CBAUD
	.comm	_SER_DTR,4,2                    ## @SER_DTR
	.comm	_SER_RTS,4,2                    ## @SER_RTS
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_ciab,4,2                       ## @ciab
	.comm	_SER_DCD,4,2                    ## @SER_DCD
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.comm	_ASYNC_HUP_NOTIFY,4,2           ## @ASYNC_HUP_NOTIFY
	.comm	_wait,16,3                      ## @wait
	.no_dead_strip	_block_til_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function block_til_ready
_block_til_ready:                       ; @block_til_ready
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x25, _current@GOTPAGE
Lloh1:
	ldr	x25, [x25, _current@GOTPAGEOFF]
	ldrsw	x8, [x25]
	str	x8, [sp, #16]
	str	wzr, [sp, #24]
	ldr	x24, [x2, #24]
	mov	x0, x1
	bl	_tty_hung_up_p
	ldr	w8, [x19]
Lloh2:
	adrp	x26, _ASYNC_CLOSING@GOTPAGE
Lloh3:
	ldr	x26, [x26, _ASYNC_CLOSING@GOTPAGEOFF]
	ldr	w9, [x26]
	and	w9, w9, w8
	cbz	x0, LBB0_2
; %bb.1:
	cbnz	w9, LBB0_3
	b	LBB0_4
LBB0_2:
	cbz	w9, LBB0_6
LBB0_3:
	add	x0, x19, #16
	bl	_interruptible_sleep_on
LBB0_4:
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	ldr	w9, [x20]
Lloh7:
	adrp	x10, _O_NONBLOCK@GOTPAGE
Lloh8:
	ldr	x10, [x10, _O_NONBLOCK@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_8
; %bb.7:
	ldr	w9, [x21]
Lloh10:
	adrp	x10, _TTY_IO_ERROR@GOTPAGE
Lloh11:
	ldr	x10, [x10, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	lsr	w9, w9, w10
	tbz	w9, #0, LBB0_10
LBB0_8:
	mov	w20, #0
Lloh13:
	adrp	x9, _ASYNC_NORMAL_ACTIVE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ASYNC_NORMAL_ACTIVE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
LBB0_9:
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_5
LBB0_10:
	ldr	x8, [x21, #8]
	ldr	w22, [x8]
Lloh16:
	adrp	x8, _CLOCAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CLOCAL@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	add	x0, x19, #12
	add	x1, sp, #16
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_add_wait_queue
	bl	_local_irq_save
	mov	x0, x20
	bl	_tty_hung_up_p
	str	x0, [sp]                        ; 8-byte Folded Spill
	cbnz	x0, LBB0_12
; %bb.11:
	ldr	w8, [x24]
	sub	w8, w8, #1
	str	w8, [x24]
LBB0_12:
	and	w27, w23, w22
	bl	_local_irq_restore
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
Lloh19:
	adrp	x28, _CBAUD@GOTPAGE
Lloh20:
	ldr	x28, [x28, _CBAUD@GOTPAGEOFF]
Lloh21:
	adrp	x22, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh22:
	ldr	x22, [x22, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh23:
	adrp	x23, _ASYNC_INITIALIZED@GOTPAGE
Lloh24:
	ldr	x23, [x23, _ASYNC_INITIALIZED@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	bl	_local_irq_save
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
Lloh25:
	adrp	x8, _SER_DTR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SER_DTR@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _SER_RTS@GOTPAGE
Lloh29:
	ldr	x9, [x9, _SER_RTS@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_rtsdtr_ctrl
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
	bl	_local_irq_restore
	ldr	w0, [x22]
	bl	_set_current_state
	mov	x0, x20
	bl	_tty_hung_up_p
	cbnz	x0, LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	cbnz	w27, LBB0_29
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=1
Lloh31:
	adrp	x8, _ciab@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ciab@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _SER_DCD@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SER_DCD@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_29
LBB0_20:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x25]
	bl	_signal_pending
	cbnz	x0, LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_13 Depth=1
	bl	_schedule
	b	LBB0_13
LBB0_22:
Lloh37:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_24
LBB0_23:
Lloh39:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_25:
	ldp	x22, x21, [sp]                  ; 16-byte Folded Reload
Lloh41:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh42:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	___set_current_state
	add	x1, sp, #16
	mov	x0, x21
	bl	_remove_wait_queue
	cbnz	x22, LBB0_27
; %bb.26:
	ldr	w8, [x24]
	add	w8, w8, #1
	str	w8, [x24]
LBB0_27:
	ldr	w8, [x19, #8]
	sub	w8, w8, #1
	str	w8, [x19, #8]
	cbnz	w20, LBB0_5
; %bb.28:
Lloh44:
	adrp	x8, _ASYNC_NORMAL_ACTIVE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ASYNC_NORMAL_ACTIVE@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	ldr	w9, [x19]
	b	LBB0_9
LBB0_29:
	mov	w20, #0
	b	LBB0_25
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_ASYNC_CLOSING,4,2              ; @ASYNC_CLOSING
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.comm	_ASYNC_NORMAL_ACTIVE,4,2        ; @ASYNC_NORMAL_ACTIVE
	.comm	_CLOCAL,4,2                     ; @CLOCAL
	.comm	_CBAUD,4,2                      ; @CBAUD
	.comm	_SER_DTR,4,2                    ; @SER_DTR
	.comm	_SER_RTS,4,2                    ; @SER_RTS
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_ciab,4,2                       ; @ciab
	.comm	_SER_DCD,4,2                    ; @SER_DCD
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.comm	_ASYNC_HUP_NOTIFY,4,2           ; @ASYNC_HUP_NOTIFY
	.comm	_wait,16,3                      ; @wait
	.no_dead_strip	_block_til_ready
.subsections_via_symbols
