	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stl_cd1400flowctrl
_stl_cd1400flowctrl:                    ## @stl_cd1400flowctrl
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_pr_debug
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.1:
	leaq	28(%rbx), %rdi
	callq	_tty_port_tty_get
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%rax, %r14
	movq	_brd_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movl	4(%rbx), %edi
	movl	24(%rbx), %esi
	callq	_BRDENABLE
	movq	_CAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	andl	$3, %edx
	movq	%rbx, %rdi
	callq	_stl_cd1400setreg
	movq	(%r14), %rax
	movq	_IXOFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.3:
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_stl_cd1400ccrwait
	movq	_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CCR_SENDSCHR1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_stl_cd1400setreg
	incl	20(%rbx)
	movq	%rbx, %rdi
	callq	_stl_cd1400ccrwait
	movq	(%r14), %rax
LBB0_5:
	movq	_CRTSCTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_12
## %bb.6:
	movq	_MCOR1@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_stl_cd1400getreg
	movq	_FIFO_RTSTHRESHOLD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_stl_cd1400setreg
	movq	_MSVR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSVR2_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_stl_cd1400setreg
	leaq	16(%rbx), %rax
	jmp	LBB0_11
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_stl_cd1400ccrwait
	movq	_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CCR_SENDSCHR2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_stl_cd1400setreg
	incl	12(%rbx)
	movq	%rbx, %rdi
	callq	_stl_cd1400ccrwait
	movq	(%r14), %rax
LBB0_9:
	movq	_CRTSCTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_12
## %bb.10:
	movq	_MCOR1@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_stl_cd1400getreg
	andl	$240, %eax
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_stl_cd1400setreg
	movq	_MSVR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_stl_cd1400setreg
	leaq	8(%rbx), %rax
LBB0_11:
	incl	(%rax)
LBB0_12:
	movl	4(%rbx), %edi
	callq	_BRDDISABLE
	movq	_brd_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tty_kref_put                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stl_cd1400flowctrl(portp=%p,state=%x)\n"

	.comm	_brd_lock,4,2                   ## @brd_lock
	.comm	_CAR,4,2                        ## @CAR
	.comm	_IXOFF,4,2                      ## @IXOFF
	.comm	_CCR,4,2                        ## @CCR
	.comm	_CCR_SENDSCHR1,4,2              ## @CCR_SENDSCHR1
	.comm	_CRTSCTS,4,2                    ## @CRTSCTS
	.comm	_MCOR1,4,2                      ## @MCOR1
	.comm	_FIFO_RTSTHRESHOLD,4,2          ## @FIFO_RTSTHRESHOLD
	.comm	_MSVR2,4,2                      ## @MSVR2
	.comm	_MSVR2_RTS,4,2                  ## @MSVR2_RTS
	.comm	_CCR_SENDSCHR2,4,2              ## @CCR_SENDSCHR2
	.no_dead_strip	_stl_cd1400flowctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stl_cd1400flowctrl
_stl_cd1400flowctrl:                    ; @stl_cd1400flowctrl
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	bl	_pr_debug
	cbz	x19, LBB0_7
; %bb.1:
	add	x0, x19, #28
	bl	_tty_port_tty_get
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
Lloh2:
	adrp	x0, _brd_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _brd_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	w0, [x19, #4]
	ldr	w1, [x19, #24]
	bl	_BRDENABLE
Lloh4:
	adrp	x8, _CAR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CAR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w8, [x19]
	and	w2, w8, #0x3
	mov	x0, x19
	bl	_stl_cd1400setreg
	ldr	x8, [x20]
	ldr	w9, [x8]
Lloh7:
	adrp	x10, _IXOFF@GOTPAGE
Lloh8:
	ldr	x10, [x10, _IXOFF@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	and	w9, w10, w9
	cbz	w21, LBB0_8
; %bb.3:
	cbz	w9, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_stl_cd1400ccrwait
Lloh10:
	adrp	x8, _CCR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _CCR_SENDSCHR1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CCR_SENDSCHR1@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_stl_cd1400setreg
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	mov	x0, x19
	bl	_stl_cd1400ccrwait
	ldr	x8, [x20]
LBB0_5:
	ldr	w8, [x8, #4]
Lloh16:
	adrp	x9, _CRTSCTS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CRTSCTS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.6:
Lloh19:
	adrp	x8, _MCOR1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MCOR1@GOTPAGEOFF]
Lloh21:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_stl_cd1400getreg
Lloh22:
	adrp	x8, _FIFO_RTSTHRESHOLD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FIFO_RTSTHRESHOLD@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x21
	bl	_stl_cd1400setreg
Lloh25:
	adrp	x8, _MSVR2@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MSVR2@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _MSVR2_RTS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MSVR2_RTS@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_stl_cd1400setreg
	add	x8, x19, #16
	b	LBB0_12
LBB0_7:
	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
	ret
LBB0_8:
	cbz	w9, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_stl_cd1400ccrwait
Lloh31:
	adrp	x8, _CCR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _CCR_SENDSCHR2@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CCR_SENDSCHR2@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_stl_cd1400setreg
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_stl_cd1400ccrwait
	ldr	x8, [x20]
LBB0_10:
	ldr	w8, [x8, #4]
Lloh37:
	adrp	x9, _CRTSCTS@GOTPAGE
Lloh38:
	ldr	x9, [x9, _CRTSCTS@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.11:
Lloh40:
	adrp	x8, _MCOR1@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MCOR1@GOTPAGEOFF]
Lloh42:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_stl_cd1400getreg
	and	w2, w0, #0xf0
	mov	x0, x19
	mov	x1, x21
	bl	_stl_cd1400setreg
Lloh43:
	adrp	x8, _MSVR2@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MSVR2@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_stl_cd1400setreg
	add	x8, x19, #8
LBB0_12:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_13:
	ldr	w0, [x19, #4]
	bl	_BRDDISABLE
Lloh46:
	adrp	x0, _brd_lock@GOTPAGE
Lloh47:
	ldr	x0, [x0, _brd_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	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	_tty_kref_put
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stl_cd1400flowctrl(portp=%p,state=%x)\n"

	.comm	_brd_lock,4,2                   ; @brd_lock
	.comm	_CAR,4,2                        ; @CAR
	.comm	_IXOFF,4,2                      ; @IXOFF
	.comm	_CCR,4,2                        ; @CCR
	.comm	_CCR_SENDSCHR1,4,2              ; @CCR_SENDSCHR1
	.comm	_CRTSCTS,4,2                    ; @CRTSCTS
	.comm	_MCOR1,4,2                      ; @MCOR1
	.comm	_FIFO_RTSTHRESHOLD,4,2          ; @FIFO_RTSTHRESHOLD
	.comm	_MSVR2,4,2                      ; @MSVR2
	.comm	_MSVR2_RTS,4,2                  ; @MSVR2_RTS
	.comm	_CCR_SENDSCHR2,4,2              ; @CCR_SENDSCHR2
	.no_dead_strip	_stl_cd1400flowctrl
.subsections_via_symbols
