	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fst_openport
_fst_openport:                          ## @fst_openport
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movq	_FST_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.2:
	movq	_DBG_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dbg
	movq	_STOPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_fst_issue_cmd
	movl	$0, (%rbx)
LBB0_3:
	movq	%rbx, %rdi
	callq	_fst_rx_config
	movq	%rbx, %rdi
	callq	_fst_tx_config
	movq	_OPSTS_RTS@GOTPCREL(%rip), %rax
	movq	_OPSTS_DTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_fst_op_raise
	movq	_STARTPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_fst_issue_cmd
	movl	$1, (%rbx)
	movq	8(%rbx), %rax
	movq	40(%rbx), %rdi
	movq	_v24DebouncedSts@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_FST_RDL
	movl	%eax, %r14d
	movq	16(%rbx), %rax
	movq	_X21@GOTPCREL(%rip), %rcx
	movq	_X21D@GOTPCREL(%rip), %rdi
	movq	_IPSTS_INDICATE@GOTPCREL(%rip), %rdx
	movq	%rdx, %rsi
	cmpq	(%rdi), %rax
	je	LBB0_5
## %bb.4:
	movq	_IPSTS_DCD@GOTPCREL(%rip), %rsi
LBB0_5:
	cmpq	(%rcx), %rax
	cmoveq	%rdx, %rsi
	andl	(%rsi), %r14d
	movq	%rbx, %rdi
	callq	_port_to_dev
	movl	%eax, %edi
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	callq	_netif_carrier_on
	jmp	LBB0_8
LBB0_7:
	callq	_netif_carrier_off
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FST_RUNNING,8,3                ## @FST_RUNNING
	.comm	_DBG_OPEN,4,2                   ## @DBG_OPEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open: found port already running\n"

	.comm	_STOPPORT,4,2                   ## @STOPPORT
	.comm	_OPSTS_RTS,4,2                  ## @OPSTS_RTS
	.comm	_OPSTS_DTR,4,2                  ## @OPSTS_DTR
	.comm	_STARTPORT,4,2                  ## @STARTPORT
	.comm	_v24DebouncedSts,8,3            ## @v24DebouncedSts
	.comm	_X21,8,3                        ## @X21
	.comm	_X21D,8,3                       ## @X21D
	.comm	_IPSTS_INDICATE,4,2             ## @IPSTS_INDICATE
	.comm	_IPSTS_DCD,4,2                  ## @IPSTS_DCD
	.no_dead_strip	_fst_openport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fst_openport
_fst_openport:                          ; @fst_openport
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #40]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _FST_RUNNING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FST_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _DBG_OPEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DBG_OPEN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dbg
Lloh8:
	adrp	x8, _STOPPORT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STOPPORT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_fst_issue_cmd
	str	wzr, [x19]
LBB0_3:
	mov	x0, x19
	bl	_fst_rx_config
	mov	x0, x19
	bl	_fst_tx_config
Lloh11:
	adrp	x8, _OPSTS_RTS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OPSTS_RTS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _OPSTS_DTR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _OPSTS_DTR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_fst_op_raise
Lloh17:
	adrp	x8, _STARTPORT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STARTPORT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_fst_issue_cmd
	mov	w8, #1
	str	w8, [x19]
	ldr	x0, [x19, #40]
Lloh20:
	adrp	x8, _v24DebouncedSts@GOTPAGE
Lloh21:
	ldr	x8, [x8, _v24DebouncedSts@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldr	w1, [x8, x9, lsl #2]
	bl	_FST_RDL
	ldr	x8, [x19, #16]
Lloh23:
	adrp	x9, _X21@GOTPAGE
Lloh24:
	ldr	x9, [x9, _X21@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
Lloh26:
	adrp	x10, _X21D@GOTPAGE
Lloh27:
	ldr	x10, [x10, _X21D@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
	cmp	x8, x10
Lloh29:
	adrp	x10, _IPSTS_INDICATE@GOTPAGE
Lloh30:
	ldr	x10, [x10, _IPSTS_INDICATE@GOTPAGEOFF]
	ccmp	x8, x9, #4, ne
Lloh31:
	adrp	x8, _IPSTS_DCD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IPSTS_DCD@GOTPAGEOFF]
	csel	x8, x10, x8, eq
	ldr	w8, [x8]
	and	w20, w8, w0
	mov	x0, x19
	bl	_port_to_dev
	cbz	w20, LBB0_5
; %bb.4:
	bl	_netif_carrier_on
	b	LBB0_6
LBB0_5:
	bl	_netif_carrier_off
LBB0_6:
	stp	xzr, xzr, [x19, #24]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FST_RUNNING,8,3                ; @FST_RUNNING
	.comm	_DBG_OPEN,4,2                   ; @DBG_OPEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open: found port already running\n"

	.comm	_STOPPORT,4,2                   ; @STOPPORT
	.comm	_OPSTS_RTS,4,2                  ; @OPSTS_RTS
	.comm	_OPSTS_DTR,4,2                  ; @OPSTS_DTR
	.comm	_STARTPORT,4,2                  ; @STARTPORT
	.comm	_v24DebouncedSts,8,3            ; @v24DebouncedSts
	.comm	_X21,8,3                        ; @X21
	.comm	_X21D,8,3                       ; @X21D
	.comm	_IPSTS_INDICATE,4,2             ; @IPSTS_INDICATE
	.comm	_IPSTS_DCD,4,2                  ; @IPSTS_DCD
	.no_dead_strip	_fst_openport
.subsections_via_symbols
