	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stli_open
_stli_open:                             ## @stli_open
	.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	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rdi), %ebx
	movl	%ebx, %edi
	callq	_MINOR2BRD
	movq	_stli_nrbrds@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jae	LBB0_1
## %bb.3:
	movq	_stli_brds@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.4:
	movq	_BST_STARTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_1
## %bb.5:
	movl	%ebx, %edi
	callq	_MINOR2PORT
	cmpl	4(%r13), %eax
	ja	LBB0_1
## %bb.6:
	movq	8(%r13), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.7:
	cmpl	$0, (%r15)
	jle	LBB0_1
## %bb.8:
	leaq	4(%r15), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	callq	_tty_port_tty_set
	movq	%r15, 8(%r12)
	incl	8(%r15)
	movl	12(%r15), %ebx
	movq	_ST_INITIALIZING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_test_bit
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%ebx, %edi
	callq	_wait_event_interruptible
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testl	%eax, (%rdi)
	jne	LBB0_15
## %bb.11:
	leaq	12(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_ST_INITIALIZING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_set_bit
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_stli_initopen
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.12:
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rsi
	callq	_clear_bit
LBB0_13:
	movq	_ST_INITIALIZING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_clear_bit
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_wake_up_interruptible
	testl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	js	LBB0_14
LBB0_15:
	movq	%r12, %rsi
	movq	%r14, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tty_port_block_til_ready       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_stli_nrbrds,4,2                ## @stli_nrbrds
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_stli_brds,8,3                  ## @stli_brds
	.comm	_BST_STARTED,4,2                ## @BST_STARTED
	.comm	_ST_INITIALIZING,4,2            ## @ST_INITIALIZING
	.comm	_current,4,2                    ## @current
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.no_dead_strip	_stli_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stli_open
_stli_open:                             ; @stli_open
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	ldr	w21, [x0]
	mov	x0, x21
	bl	_MINOR2BRD
Lloh0:
	adrp	x8, _stli_nrbrds@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stli_nrbrds@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.hs	LBB0_8
; %bb.1:
Lloh3:
	adrp	x8, _stli_brds@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stli_brds@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x22, [x8, w0, uxtw #3]
	cbz	x22, LBB0_8
; %bb.2:
	ldr	w8, [x22]
Lloh6:
	adrp	x9, _BST_STARTED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BST_STARTED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	mov	x0, x21
	bl	_MINOR2PORT
	ldr	w8, [x22, #4]
	cmp	w0, w8
	b.hi	LBB0_8
; %bb.4:
	ldr	x8, [x22, #8]
	ldr	x24, [x8, w0, uxtw #3]
	cbz	x24, LBB0_8
; %bb.5:
	ldr	w8, [x24]
	cmp	w8, #0
	b.le	LBB0_8
; %bb.6:
	add	x21, x24, #4
	mov	x0, x21
	mov	x1, x20
	bl	_tty_port_tty_set
	str	x24, [x20, #8]
	ldr	w8, [x24, #8]
	add	w8, w8, #1
	str	w8, [x24, #8]
	mov	x23, x24
	ldr	w26, [x23, #12]!
Lloh9:
	adrp	x27, _ST_INITIALIZING@GOTPAGE
Lloh10:
	ldr	x27, [x27, _ST_INITIALIZING@GOTPAGEOFF]
	ldr	w0, [x27]
	add	x25, x24, #16
	mov	x1, x25
	bl	_test_bit
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x26
	bl	_wait_event_interruptible
Lloh11:
	adrp	x8, _current@GOTPAGE
Lloh12:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_signal_pending
	cbz	x0, LBB0_11
; %bb.7:
Lloh14:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w8, [x21]
Lloh18:
	adrp	x26, _ASYNC_INITIALIZED@GOTPAGE
Lloh19:
	ldr	x26, [x26, _ASYNC_INITIALIZED@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.12:
	ldr	w0, [x27]
	mov	x1, x25
	bl	_set_bit
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	bl	_stli_initopen
	mov	x22, x0
	tbnz	w0, #31, LBB0_14
; %bb.13:
	ldr	w8, [x26]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
Lloh20:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	add	x1, x20, #4
	bl	_clear_bit
LBB0_14:
	ldr	w0, [x27]
	mov	x1, x25
	bl	_clear_bit
	mov	x0, x23
	bl	_wake_up_interruptible
	tbnz	w22, #31, LBB0_10
LBB0_15:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_tty_port_block_til_ready
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_stli_nrbrds,4,2                ; @stli_nrbrds
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_stli_brds,8,3                  ; @stli_brds
	.comm	_BST_STARTED,4,2                ; @BST_STARTED
	.comm	_ST_INITIALIZING,4,2            ; @ST_INITIALIZING
	.comm	_current,4,2                    ; @current
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.no_dead_strip	_stli_open
.subsections_via_symbols
