	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stl_cd_change
_stl_cd_change:                         ## @stl_cd_change
	.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	%rdi, %rbx
	movl	(%rdi), %r12d
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_tty_port_tty_get
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_stl_getsignals
	movl	%eax, (%rbx)
	movq	_TIOCM_CD@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	%ecx, %edx
	andl	%r12d, %edx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.2:
	testl	%edx, %edx
	jne	LBB0_4
## %bb.3:
	leaq	8(%rbx), %rdi
	callq	_wake_up_interruptible
	movl	(%r13), %ecx
	andl	%ecx, %r12d
	movl	%r12d, %edx
LBB0_4:
	testl	%edx, %edx
	je	LBB0_8
## %bb.5:
	testl	%ecx, (%rbx)
	jne	LBB0_8
## %bb.6:
	movq	_ASYNC_CHECK_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_tty_hangup
LBB0_8:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tty_kref_put                   ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIOCM_CD,4,2                   ## @TIOCM_CD
	.comm	_ASYNC_CHECK_CD,4,2             ## @ASYNC_CHECK_CD
	.no_dead_strip	_stl_cd_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stl_cd_change
_stl_cd_change:                         ; @stl_cd_change
	.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
	mov	x21, x0
	mov	x20, x0
	ldr	w22, [x20], #4
	mov	x0, x20
	bl	_tty_port_tty_get
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	bl	_stl_getsignals
Lloh0:
	adrp	x23, _TIOCM_CD@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TIOCM_CD@GOTPAGEOFF]
	str	w0, [x21]
	ldr	w8, [x23]
	and	w10, w8, w0
	and	w9, w8, w22
	cmp	w10, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_3
; %bb.2:
	add	x0, x21, #8
	bl	_wake_up_interruptible
	ldr	w8, [x23]
	and	w9, w8, w22
LBB0_3:
	cbz	w9, LBB0_7
; %bb.4:
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _ASYNC_CHECK_CD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ASYNC_CHECK_CD@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_tty_hangup
LBB0_7:
	mov	x0, x19
	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_kref_put
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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TIOCM_CD,4,2                   ; @TIOCM_CD
	.comm	_ASYNC_CHECK_CD,4,2             ; @ASYNC_CHECK_CD
	.no_dead_strip	_stl_cd_change
.subsections_via_symbols
