	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tx_start
_tx_start:                              ## @tx_start
	.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	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	cmpq	$0, 56(%rbx)
	jne	LBB0_3
	jmp	LBB0_10
LBB0_1:
	movq	_TCR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_rd_reg16
	movq	_BIT1@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ecx
	orl	%eax, %ecx
	movq	_BIT2@GOTPCREL(%rip), %rax
	movzwl	(%rax), %edx
	xorl	$65535, %edx                    ## imm = 0xFFFF
	andl	%ecx, %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_wr_reg16
	movl	$1, (%rbx)
	cmpq	$0, 56(%rbx)
	je	LBB0_10
LBB0_3:
	movl	$0, 4(%rbx)
	movq	40(%rbx), %rax
	movq	_MGSL_MODE_ASYNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.8:
	movq	_IRQ_TXDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_slgt_irq_off
	movq	_IRQ_TXIDLE@GOTPCREL(%rip), %r14
	movzwl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_slgt_irq_on
	movq	_SSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	(%r14), %edx
	jmp	LBB0_9
LBB0_4:
	movq	_HDLC_FLAG_AUTO_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 48(%rbx)
	je	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_get_signals
	movl	8(%rbx), %eax
	movq	_SerialSignal_RTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_7
## %bb.6:
	orl	%eax, %ecx
	movl	%ecx, 8(%rbx)
	movq	%rbx, %rdi
	callq	_set_signals
	movl	$1, 4(%rbx)
LBB0_7:
	movq	_IRQ_TXDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_slgt_irq_off
	movq	_IRQ_TXUNDER@GOTPCREL(%rip), %r14
	movq	_IRQ_TXIDLE@GOTPCREL(%rip), %r15
	movzwl	(%r15), %eax
	addw	(%r14), %ax
	movzwl	%ax, %esi
	movq	%rbx, %rdi
	callq	_slgt_irq_on
	movq	_SSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	(%r14), %eax
	addw	(%r15), %ax
	movzwl	%ax, %edx
LBB0_9:
	movq	%rbx, %rdi
	callq	_wr_reg16
	movq	_TDDAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %rdx
	movq	%rbx, %rdi
	callq	_wr_reg32
	movq	_TDCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BIT2@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	movq	_BIT0@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_wr_reg32
	movl	$1, 24(%rbx)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TCR,4,2                        ## @TCR
	.comm	_BIT1,4,2                       ## @BIT1
	.comm	_BIT2,4,2                       ## @BIT2
	.comm	_MGSL_MODE_ASYNC,8,3            ## @MGSL_MODE_ASYNC
	.comm	_HDLC_FLAG_AUTO_RTS,4,2         ## @HDLC_FLAG_AUTO_RTS
	.comm	_SerialSignal_RTS,4,2           ## @SerialSignal_RTS
	.comm	_IRQ_TXDATA,4,2                 ## @IRQ_TXDATA
	.comm	_IRQ_TXUNDER,2,1                ## @IRQ_TXUNDER
	.comm	_IRQ_TXIDLE,2,1                 ## @IRQ_TXIDLE
	.comm	_SSR,4,2                        ## @SSR
	.comm	_TDDAR,4,2                      ## @TDDAR
	.comm	_TDCSR,4,2                      ## @TDCSR
	.comm	_BIT0,8,3                       ## @BIT0
	.no_dead_strip	_tx_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tx_start
_tx_start:                              ; @tx_start
	.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	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_3
	b	LBB0_10
LBB0_2:
Lloh0:
	adrp	x8, _TCR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TCR@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_rd_reg16
Lloh3:
	adrp	x8, _BIT1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BIT1@GOTPAGEOFF]
	ldrh	w8, [x8]
	orr	w8, w8, w0
Lloh5:
	adrp	x9, _BIT2@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BIT2@GOTPAGEOFF]
	ldrh	w9, [x9]
	eor	w9, w9, #0xffff
	and	w2, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_wr_reg16
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_10
LBB0_3:
	str	wzr, [x19, #4]
	ldr	x8, [x19, #40]
Lloh7:
	adrp	x9, _MGSL_MODE_ASYNC@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MGSL_MODE_ASYNC@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _IRQ_TXDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IRQ_TXDATA@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_slgt_irq_off
Lloh13:
	adrp	x20, _IRQ_TXIDLE@GOTPAGE
Lloh14:
	ldr	x20, [x20, _IRQ_TXIDLE@GOTPAGEOFF]
	ldrh	w1, [x20]
	mov	x0, x19
	bl	_slgt_irq_on
Lloh15:
	adrp	x8, _SSR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SSR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldrh	w2, [x20]
	b	LBB0_9
LBB0_5:
	ldr	w8, [x19, #48]
Lloh18:
	adrp	x9, _HDLC_FLAG_AUTO_RTS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HDLC_FLAG_AUTO_RTS@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_get_signals
	ldr	w8, [x19, #8]
Lloh21:
	adrp	x9, _SerialSignal_RTS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SerialSignal_RTS@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.7:
	orr	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_set_signals
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_8:
Lloh24:
	adrp	x8, _IRQ_TXDATA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IRQ_TXDATA@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_slgt_irq_off
Lloh27:
	adrp	x20, _IRQ_TXUNDER@GOTPAGE
Lloh28:
	ldr	x20, [x20, _IRQ_TXUNDER@GOTPAGEOFF]
	ldrh	w8, [x20]
Lloh29:
	adrp	x21, _IRQ_TXIDLE@GOTPAGE
Lloh30:
	ldr	x21, [x21, _IRQ_TXIDLE@GOTPAGEOFF]
	ldrh	w9, [x21]
	add	w8, w9, w8
	and	w1, w8, #0xffff
	mov	x0, x19
	bl	_slgt_irq_on
Lloh31:
	adrp	x8, _SSR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SSR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldrh	w8, [x21]
	ldrh	w9, [x20]
	add	w8, w9, w8
	and	w2, w8, #0xffff
LBB0_9:
	mov	x0, x19
	bl	_wr_reg16
Lloh34:
	adrp	x8, _TDDAR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _TDDAR@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #16]
	ldr	x2, [x8, x9, lsl #3]
	mov	x0, x19
	bl	_wr_reg32
Lloh37:
	adrp	x8, _TDCSR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TDCSR@GOTPAGEOFF]
Lloh39:
	adrp	x9, _BIT2@GOTPAGE
Lloh40:
	ldr	x9, [x9, _BIT2@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	ldrsw	x8, [x9]
Lloh43:
	adrp	x9, _BIT0@GOTPAGE
Lloh44:
	ldr	x9, [x9, _BIT0@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	add	x2, x9, x8
	mov	x0, x19
	bl	_wr_reg32
	mov	w8, #1
	str	w8, [x19, #24]
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh41
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_TCR,4,2                        ; @TCR
	.comm	_BIT1,4,2                       ; @BIT1
	.comm	_BIT2,4,2                       ; @BIT2
	.comm	_MGSL_MODE_ASYNC,8,3            ; @MGSL_MODE_ASYNC
	.comm	_HDLC_FLAG_AUTO_RTS,4,2         ; @HDLC_FLAG_AUTO_RTS
	.comm	_SerialSignal_RTS,4,2           ; @SerialSignal_RTS
	.comm	_IRQ_TXDATA,4,2                 ; @IRQ_TXDATA
	.comm	_IRQ_TXUNDER,2,1                ; @IRQ_TXUNDER
	.comm	_IRQ_TXIDLE,2,1                 ; @IRQ_TXIDLE
	.comm	_SSR,4,2                        ; @SSR
	.comm	_TDDAR,4,2                      ; @TDDAR
	.comm	_TDCSR,4,2                      ; @TDCSR
	.comm	_BIT0,8,3                       ; @BIT0
	.no_dead_strip	_tx_start
.subsections_via_symbols
