	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stli_hangup
_stli_hangup:                           ## @stli_hangup
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	movq	(%rbx), %rax
	movq	_stli_nrbrds@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_11
## %bb.2:
	movq	_stli_brds@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %r13
	testq	%r13, %r13
	je	LBB0_11
## %bb.3:
	movq	%rdi, %r12
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 20(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ST_CLOSING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %r15
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_stli_rawclose
LBB0_5:
	movq	_stli_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	8(%r12), %rax
	movq	_HUPCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_stli_mkasysigs
	movq	_ST_CMDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_ST_DOSIGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	movq	_ST_DOFLUSHTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	movq	_ST_DOFLUSHRX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	jmp	LBB0_9
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_A_SETSIGNALSF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	movl	$4, %r8d
	xorl	%r9d, %r9d
	callq	_stli_sendcmd
LBB0_9:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_10:
	movq	_ST_TXBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	_ST_RXSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	_TTY_IO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
	movq	_stli_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tty_port_hangup                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_stli_nrbrds,8,3                ## @stli_nrbrds
	.comm	_stli_brds,8,3                  ## @stli_brds
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_ST_CLOSING,4,2                 ## @ST_CLOSING
	.comm	_stli_lock,4,2                  ## @stli_lock
	.comm	_HUPCL,4,2                      ## @HUPCL
	.comm	_ST_CMDING,4,2                  ## @ST_CMDING
	.comm	_ST_DOSIGS,4,2                  ## @ST_DOSIGS
	.comm	_ST_DOFLUSHTX,4,2               ## @ST_DOFLUSHTX
	.comm	_ST_DOFLUSHRX,4,2               ## @ST_DOFLUSHRX
	.comm	_A_SETSIGNALSF,4,2              ## @A_SETSIGNALSF
	.comm	_ST_TXBUSY,4,2                  ## @ST_TXBUSY
	.comm	_ST_RXSTOP,4,2                  ## @ST_RXSTOP
	.comm	_TTY_IO_ERROR,4,2               ## @TTY_IO_ERROR
	.no_dead_strip	_stli_hangup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stli_hangup
_stli_hangup:                           ; @stli_hangup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x0, #16]
	cbz	x22, LBB0_8
; %bb.1:
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _stli_nrbrds@GOTPAGE
Lloh1:
	ldr	x9, [x9, _stli_nrbrds@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_8
; %bb.2:
Lloh3:
	adrp	x9, _stli_brds@GOTPAGE
Lloh4:
	ldr	x9, [x9, _stli_brds@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x23, [x9, x8, lsl #3]
	cbz	x23, LBB0_8
; %bb.3:
	mov	x19, x0
	add	x20, x22, #16
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh6:
	adrp	x8, _ASYNC_INITIALIZED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ASYNC_INITIALIZED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x22, #20]
	bic	w8, w9, w8
	str	w8, [x22, #20]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh9:
	adrp	x8, _ST_CLOSING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ST_CLOSING@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x21, x22, #8
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	mov	w3, #0
	bl	_stli_rawclose
LBB0_5:
Lloh12:
	adrp	x0, _stli_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _stli_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _HUPCL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HUPCL@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.6:
	add	x24, x22, #12
	mov	x0, x24
	mov	w1, #0
	mov	w2, #0
	bl	_stli_mkasysigs
Lloh17:
	adrp	x8, _ST_CMDING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ST_CMDING@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.7:
Lloh20:
	adrp	x8, _ST_DOSIGS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ST_DOSIGS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
Lloh23:
	adrp	x8, _ST_DOFLUSHTX@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ST_DOFLUSHTX@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
Lloh26:
	adrp	x8, _ST_DOFLUSHRX@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ST_DOFLUSHRX@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
	b	LBB0_10
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh29:
	adrp	x8, _A_SETSIGNALSF@GOTPAGE
Lloh30:
	ldr	x8, [x8, _A_SETSIGNALSF@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x22
	mov	x3, x24
	mov	w4, #4
	mov	w5, #0
	bl	_stli_sendcmd
LBB0_10:
Lloh32:
	adrp	x8, _ST_TXBUSY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ST_TXBUSY@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
Lloh35:
	adrp	x8, _ST_RXSTOP@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ST_RXSTOP@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
Lloh38:
	adrp	x8, _TTY_IO_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TTY_IO_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
Lloh41:
	adrp	x0, _stli_lock@GOTPAGE
Lloh42:
	ldr	x0, [x0, _stli_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_tty_port_hangup
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_stli_nrbrds,8,3                ; @stli_nrbrds
	.comm	_stli_brds,8,3                  ; @stli_brds
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_ST_CLOSING,4,2                 ; @ST_CLOSING
	.comm	_stli_lock,4,2                  ; @stli_lock
	.comm	_HUPCL,4,2                      ; @HUPCL
	.comm	_ST_CMDING,4,2                  ; @ST_CMDING
	.comm	_ST_DOSIGS,4,2                  ; @ST_DOSIGS
	.comm	_ST_DOFLUSHTX,4,2               ; @ST_DOFLUSHTX
	.comm	_ST_DOFLUSHRX,4,2               ; @ST_DOFLUSHRX
	.comm	_A_SETSIGNALSF,4,2              ; @A_SETSIGNALSF
	.comm	_ST_TXBUSY,4,2                  ; @ST_TXBUSY
	.comm	_ST_RXSTOP,4,2                  ; @ST_RXSTOP
	.comm	_TTY_IO_ERROR,4,2               ; @TTY_IO_ERROR
	.no_dead_strip	_stli_hangup
.subsections_via_symbols
