	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_port_close_end             ## -- Begin function tty_port_close_end
	.p2align	4, 0x90
_tty_port_close_end:                    ## @tty_port_close_end
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_tty_ldisc_flush
	movq	8(%r15), %rax
	movq	_HUPCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_tty_port_lower_dtr_rts
LBB0_2:
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	$0, (%r15)
	cmpq	$0, 24(%rbx)
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_jiffies_to_msecs
	movl	%eax, %edi
	callq	_msleep_interruptible
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	leaq	12(%rbx), %rdi
	callq	_wake_up_interruptible
LBB0_6:
	movq	_ASYNC_NORMAL_ACTIVE@GOTPCREL(%rip), %rax
	movq	_ASYNC_CLOSING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%rbx)
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_wake_up_interruptible
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HUPCL,4,2                      ## @HUPCL
	.comm	_ASYNC_NORMAL_ACTIVE,4,2        ## @ASYNC_NORMAL_ACTIVE
	.comm	_ASYNC_CLOSING,4,2              ## @ASYNC_CLOSING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_port_close_end             ; -- Begin function tty_port_close_end
	.p2align	2
_tty_port_close_end:                    ; @tty_port_close_end
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_tty_ldisc_flush
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _HUPCL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HUPCL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_tty_port_lower_dtr_rts
LBB0_2:
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	str	xzr, [x21]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_jiffies_to_msecs
	bl	_msleep_interruptible
LBB0_5:
	mov	x0, x20
	bl	_spin_lock_irqsave
	add	x0, x19, #12
	bl	_wake_up_interruptible
LBB0_6:
Lloh3:
	adrp	x8, _ASYNC_NORMAL_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ASYNC_NORMAL_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ASYNC_CLOSING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ASYNC_CLOSING@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19], #8
	mov	x0, x19
	bl	_wake_up_interruptible
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HUPCL,4,2                      ; @HUPCL
	.comm	_ASYNC_NORMAL_ACTIVE,4,2        ; @ASYNC_NORMAL_ACTIVE
	.comm	_ASYNC_CLOSING,4,2              ; @ASYNC_CLOSING
.subsections_via_symbols
