	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdlc_mode
_hdlc_mode:                             ## @hdlc_mode
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_CHA@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_irq_disable
	movq	_CHB@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_irq_disable
	movq	%rbx, %rdi
	movl	$255, %esi
	callq	_port_irq_disable
	movl	16(%rbx), %eax
	movq	_HDLC_FLAG_RXC_DPLL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	sete	%r12b
	je	LBB0_3
## %bb.1:
	movq	_HDLC_FLAG_TXC_DPLL@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_3
## %bb.2:
	movb	$23, %r15b
	movb	$1, %al
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movb	$1, %al
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_7
LBB0_3:
	movq	_HDLC_FLAG_RXC_BRG@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_6
## %bb.4:
	movq	_HDLC_FLAG_TXC_BRG@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_6
## %bb.5:
	movb	$23, %r15b
	movb	$1, %al
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_6:
	movq	_HDLC_FLAG_TXC_BRG@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	sete	%dl
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	setne	%dl
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %ecx
	setne	%al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	$16, %eax
	movl	$22, %r15d
	cmovel	%eax, %r15d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_7:
	movq	_BIT0@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	orb	$-126, %al
	cmpq	$0, 48(%rbx)
	movzbl	%al, %eax
	movl	$130, %ecx
	cmovnel	%eax, %ecx
	movq	_SerialSignal_RTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	movq	_BIT2@GOTPCREL(%rip), %r13
	movzbl	(%r13), %edx
	cmovel	%eax, %edx
	orl	%ecx, %edx
	movq	_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movzbl	%dl, %edx
	movq	%rbx, %rdi
	callq	_write_reg
	movl	$-135, %eax
	addl	20(%rbx), %eax
	cmpl	$3, %eax
	ja	LBB0_8
## %bb.9:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_10:
	movq	_BIT3@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	jmp	LBB0_16
LBB0_8:
	movb	$-64, %al
	jmp	LBB0_17
LBB0_12:
	movq	_BIT4@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	jmp	LBB0_16
LBB0_13:
	movq	_BIT4@GOTPCREL(%rip), %rcx
	movb	(%r13), %al
	jmp	LBB0_15
LBB0_14:
	movq	_BIT4@GOTPCREL(%rip), %rcx
	movq	_BIT3@GOTPCREL(%rip), %rax
	movb	(%rax), %al
LBB0_15:
	addb	(%rcx), %al
LBB0_16:
	orb	$-64, %al
LBB0_17:
	movq	_CCR0@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%r14), %rsi
	movzbl	%al, %edx
	movq	%rbx, %rdi
	callq	_write_reg
	movq	_CCR1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movzbl	%r15b, %edx
	movq	%rbx, %rdi
	callq	_write_reg
	movq	_BIT5@GOTPCREL(%rip), %r13
	movzbl	(%r13), %ecx
	xorl	%r15d, %r15d
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	movl	$0, %eax
	cmovnel	%ecx, %eax
	testb	%r12b, %r12b
	cmovel	%r15d, %eax
	cmpb	$0, -48(%rbp)                   ## 1-byte Folded Reload
	cmovnel	%ecx, %eax
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	cmovnel	%ecx, %eax
	movq	_BIT4@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	cmovnel	%r15d, %ecx
	movq	24(%rbx), %rdx
	movq	_HDLC_CRC_32_CCITT@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	movq	_BIT1@GOTPCREL(%rip), %r12
	movzbl	(%r12), %edx
	cmovnel	%r15d, %edx
	orl	%ecx, %edx
	movl	20(%rbx), %ecx
	movq	_HDLC_ENCODING_NRZB@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %ecx
	movq	_BIT0@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	cmovnel	%r15d, %ecx
	orl	%edx, %ecx
	orl	%eax, %ecx
	movq	_CCR2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movzbl	%cl, %edx
	movq	%rbx, %rdi
	callq	_write_reg
	movq	24(%rbx), %rax
	movq	_HDLC_CRC_NONE@GOTPCREL(%rip), %rcx
	movb	(%r12), %dl
	movq	_BIT2@GOTPCREL(%rip), %rsi
	addb	(%rsi), %dl
	cmpq	(%rcx), %rax
	movzbl	%dl, %ecx
	cmovnel	%r15d, %ecx
	movl	32(%rbx), %eax
	movq	_HDLC_PREAMBLE_PATTERN_NONE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	movzbl	(%r13), %eax
	cmovel	%r15d, %eax
	orl	%ecx, %eax
	movl	36(%rbx), %ecx
	cmpl	$132, %ecx
	je	LBB0_21
## %bb.18:
	cmpl	$133, %ecx
	je	LBB0_20
## %bb.19:
	cmpl	$134, %ecx
	jne	LBB0_22
LBB0_20:
	movq	_BIT6@GOTPCREL(%rip), %rcx
	orb	(%rcx), %al
	jmp	LBB0_22
LBB0_21:
	movq	_BIT7@GOTPCREL(%rip), %rcx
	movq	_BIT6@GOTPCREL(%rip), %rdx
	movb	(%rdx), %dl
	addb	(%rcx), %dl
	orb	%al, %dl
	movl	%edx, %eax
LBB0_22:
	movq	_CCR3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%r14), %rsi
	movzbl	%al, %edx
	movq	%rbx, %rdi
	callq	_write_reg
	movl	32(%rbx), %eax
	leal	-1024(,%rax,8), %ecx
                                        ## kill: def $eax killed $eax killed $rax
	addl	$-128, %eax
	movl	$1437236991, %edx               ## imm = 0x55AA7EFF
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %edx
	xorl	%ecx, %ecx
	cmpl	$4, %eax
	cmovael	%ecx, %edx
	movq	_PRE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movzbl	%dl, %edx
	movq	%rbx, %rdi
	callq	_write_reg
	movq	_CCR4@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$80, %edx
	callq	_write_reg
	movq	_HDLC_FLAG_RXC_DPLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	16(%rbx), %eax
	movl	40(%rbx), %ecx
	movl	%ecx, %edx
	shll	$4, %edx
	testl	%eax, %eax
	movq	(%r14), %rsi
	cmovel	%ecx, %edx
	movq	%rbx, %rdi
	callq	_mgslpc_set_rate
	movq	_RLCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_write_reg
	movq	_HDLC_FLAG_AUTO_DCD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	16(%rbx), %eax
	movzbl	(%r13), %ecx
	cmovel	%eax, %ecx
	movq	_XBCH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movzbl	%cl, %edx
	movq	%rbx, %rdi
	callq	_write_reg
	movq	%rbx, %rdi
	callq	_enable_auxclk
	cmpq	$0, 48(%rbx)
	jne	LBB0_24
## %bb.23:
	cmpq	$0, 8(%rbx)
	je	LBB0_25
LBB0_24:
	movq	%rbx, %rdi
	callq	_loopback_enable
LBB0_25:
	movq	_HDLC_FLAG_AUTO_CTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_27
## %bb.26:
	movq	_CHB@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_IRQ_CTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_irq_enable
	movq	_PVR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	_BIT3@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_set_reg_bits
	jmp	LBB0_28
LBB0_27:
	movq	_PVR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	_BIT3@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_clear_reg_bits
LBB0_28:
	movq	_IRQ_RXEOM@GOTPCREL(%rip), %rax
	movq	_IRQ_RXFIFO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	(%rax), %rdx
	movq	_IRQ_ALLSENT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	_IRQ_UNDERRUN@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	(%r14), %rsi
	movq	_IRQ_TXFIFO@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_irq_enable
	movq	(%r14), %rsi
	movq	_CMD_TXRESET@GOTPCREL(%rip), %rax
	movq	_CMD_RXRESET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_issue_command
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_wait_command_complete
	movq	_ISR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_read_reg16
	cmpq	$0, 8(%rbx)
	jne	LBB0_30
## %bb.29:
	movq	_CCR0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	_BIT6@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_clear_reg_bits
LBB0_30:
	movq	%rbx, %rdi
	callq	_tx_set_idle
	movq	%rbx, %rdi
	callq	_tx_stop
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rx_stop                        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_CHA,8,3                        ## @CHA
	.comm	_CHB,8,3                        ## @CHB
	.comm	_HDLC_FLAG_RXC_DPLL,4,2         ## @HDLC_FLAG_RXC_DPLL
	.comm	_HDLC_FLAG_TXC_DPLL,4,2         ## @HDLC_FLAG_TXC_DPLL
	.comm	_HDLC_FLAG_RXC_BRG,4,2          ## @HDLC_FLAG_RXC_BRG
	.comm	_HDLC_FLAG_TXC_BRG,4,2          ## @HDLC_FLAG_TXC_BRG
	.comm	_BIT0,1,0                       ## @BIT0
	.comm	_SerialSignal_RTS,4,2           ## @SerialSignal_RTS
	.comm	_BIT2,1,0                       ## @BIT2
	.comm	_MODE,8,3                       ## @MODE
	.comm	_BIT3,1,0                       ## @BIT3
	.comm	_BIT4,1,0                       ## @BIT4
	.comm	_CCR0,8,3                       ## @CCR0
	.comm	_CCR1,8,3                       ## @CCR1
	.comm	_BIT5,1,0                       ## @BIT5
	.comm	_HDLC_CRC_32_CCITT,8,3          ## @HDLC_CRC_32_CCITT
	.comm	_BIT1,1,0                       ## @BIT1
	.comm	_HDLC_ENCODING_NRZB,4,2         ## @HDLC_ENCODING_NRZB
	.comm	_CCR2,8,3                       ## @CCR2
	.comm	_HDLC_CRC_NONE,8,3              ## @HDLC_CRC_NONE
	.comm	_HDLC_PREAMBLE_PATTERN_NONE,4,2 ## @HDLC_PREAMBLE_PATTERN_NONE
	.comm	_BIT6,1,0                       ## @BIT6
	.comm	_BIT7,1,0                       ## @BIT7
	.comm	_CCR3,8,3                       ## @CCR3
	.comm	_PRE,8,3                        ## @PRE
	.comm	_CCR4,8,3                       ## @CCR4
	.comm	_RLCR,8,3                       ## @RLCR
	.comm	_HDLC_FLAG_AUTO_DCD,4,2         ## @HDLC_FLAG_AUTO_DCD
	.comm	_XBCH,8,3                       ## @XBCH
	.comm	_HDLC_FLAG_AUTO_CTS,4,2         ## @HDLC_FLAG_AUTO_CTS
	.comm	_IRQ_CTS,8,3                    ## @IRQ_CTS
	.comm	_PVR,8,3                        ## @PVR
	.comm	_IRQ_RXEOM,8,3                  ## @IRQ_RXEOM
	.comm	_IRQ_RXFIFO,8,3                 ## @IRQ_RXFIFO
	.comm	_IRQ_ALLSENT,8,3                ## @IRQ_ALLSENT
	.comm	_IRQ_UNDERRUN,8,3               ## @IRQ_UNDERRUN
	.comm	_IRQ_TXFIFO,8,3                 ## @IRQ_TXFIFO
	.comm	_CMD_TXRESET,8,3                ## @CMD_TXRESET
	.comm	_CMD_RXRESET,8,3                ## @CMD_RXRESET
	.comm	_ISR,8,3                        ## @ISR
	.no_dead_strip	_hdlc_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdlc_mode
_hdlc_mode:                             ; @hdlc_mode
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x21, _CHA@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CHA@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	w2, #65535
	bl	_irq_disable
Lloh2:
	adrp	x8, _CHB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CHB@GOTPAGEOFF]
Lloh4:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #65535
	bl	_irq_disable
	mov	x0, x19
	mov	w1, #255
	bl	_port_irq_disable
	ldr	w9, [x19, #16]
Lloh5:
	adrp	x8, _HDLC_FLAG_RXC_DPLL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDLC_FLAG_RXC_DPLL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ands	w8, w8, w9
	cset	w25, eq
	cbz	w8, LBB0_3
; %bb.1:
Lloh8:
	adrp	x10, _HDLC_FLAG_TXC_DPLL@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HDLC_FLAG_TXC_DPLL@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.2:
	mov	w28, #0
	mov	w25, #0
	mov	w22, #0
	mov	w20, #23
	mov	w26, #1
	mov	w27, #1
	b	LBB0_7
LBB0_3:
Lloh11:
	adrp	x10, _HDLC_FLAG_RXC_BRG@GOTPAGE
Lloh12:
	ldr	x10, [x10, _HDLC_FLAG_RXC_BRG@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x10]
Lloh14:
	adrp	x10, _HDLC_FLAG_TXC_BRG@GOTPAGE
Lloh15:
	ldr	x10, [x10, _HDLC_FLAG_TXC_BRG@GOTPAGEOFF]
	tst	w11, w9
	b.eq	LBB0_6
; %bb.4:
	ldr	w11, [x10]
	tst	w11, w9
	b.eq	LBB0_6
; %bb.5:
	mov	w28, #0
	mov	w25, #0
	mov	w27, #0
	mov	w20, #23
	mov	w26, #1
	mov	w22, #1
	b	LBB0_7
LBB0_6:
	mov	w26, #0
	ldr	w10, [x10]
	tst	w10, w9
	cset	w27, eq
	cset	w22, ne
	mov	w9, #22
	mov	w10, #16
	cmp	w8, #0
	csel	w20, w10, w9, eq
	cset	w28, ne
LBB0_7:
	ldr	x8, [x19, #48]
Lloh16:
	adrp	x9, _BIT0@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BIT0@GOTPAGEOFF]
	ldrb	w9, [x9]
	mov	w10, #130
	orr	w9, w9, w10
	cmp	x8, #0
	mov	w8, #-126
	csel	w8, w8, w9, eq
	ldr	w9, [x19]
Lloh18:
	adrp	x10, _SerialSignal_RTS@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SerialSignal_RTS@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
Lloh21:
	adrp	x24, _BIT2@GOTPAGE
Lloh22:
	ldr	x24, [x24, _BIT2@GOTPAGEOFF]
	ldrb	w11, [x24]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w8, w9, w8
	ldr	x9, [x21]
Lloh23:
	adrp	x10, _MODE@GOTPAGE
Lloh24:
	ldr	x10, [x10, _MODE@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	add	x1, x10, x9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_write_reg
	ldr	w8, [x19, #20]
	sub	w8, w8, #135
Lloh26:
	adrp	x23, _BIT4@GOTPAGE
Lloh27:
	ldr	x23, [x23, _BIT4@GOTPAGEOFF]
	cmp	w8, #3
	b.hi	LBB0_10
; %bb.8:
Lloh28:
	adrp	x9, lJTI0_0@PAGE
Lloh29:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
Lloh30:
	adrp	x8, _BIT3@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BIT3@GOTPAGEOFF]
	ldrb	w8, [x8]
	b	LBB0_15
LBB0_10:
	mov	w8, #192
	b	LBB0_16
LBB0_11:
	ldrb	w8, [x23]
	b	LBB0_15
LBB0_12:
	ldrb	w8, [x23]
	ldrb	w9, [x24]
	b	LBB0_14
LBB0_13:
	ldrb	w8, [x23]
Lloh32:
	adrp	x9, _BIT3@GOTPAGE
Lloh33:
	ldr	x9, [x9, _BIT3@GOTPAGEOFF]
	ldrb	w9, [x9]
LBB0_14:
	add	w8, w9, w8
LBB0_15:
	orr	w8, w8, #0xffffffc0
LBB0_16:
	ldr	x9, [x21]
Lloh34:
	adrp	x10, _CCR0@GOTPAGE
Lloh35:
	ldr	x10, [x10, _CCR0@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	add	x1, x10, x9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_write_reg
	ldr	x8, [x21]
Lloh37:
	adrp	x9, _CCR1@GOTPAGE
Lloh38:
	ldr	x9, [x9, _CCR1@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	mov	x2, x20
	bl	_write_reg
	orr	w8, w28, w26
	and	w9, w25, w22
	orr	w8, w8, w9
Lloh40:
	adrp	x20, _BIT5@GOTPAGE
Lloh41:
	ldr	x20, [x20, _BIT5@GOTPAGEOFF]
	ldrb	w9, [x20]
	cmp	w8, #0
	csel	w8, w9, wzr, ne
	ldrb	w9, [x23]
	cmp	w27, #0
	csel	w9, wzr, w9, ne
	orr	w8, w9, w8
	ldr	x9, [x19, #24]
Lloh42:
	adrp	x10, _HDLC_CRC_32_CCITT@GOTPAGE
Lloh43:
	ldr	x10, [x10, _HDLC_CRC_32_CCITT@GOTPAGEOFF]
Lloh44:
	ldr	x10, [x10]
Lloh45:
	adrp	x22, _BIT1@GOTPAGE
Lloh46:
	ldr	x22, [x22, _BIT1@GOTPAGEOFF]
	ldrb	w11, [x22]
	cmp	x9, x10
	csel	w9, w11, wzr, eq
	orr	w8, w8, w9
Lloh47:
	adrp	x9, _HDLC_ENCODING_NRZB@GOTPAGE
Lloh48:
	ldr	x9, [x9, _HDLC_ENCODING_NRZB@GOTPAGEOFF]
	ldr	w10, [x19, #20]
Lloh49:
	ldr	w9, [x9]
Lloh50:
	adrp	x11, _BIT0@GOTPAGE
Lloh51:
	ldr	x11, [x11, _BIT0@GOTPAGEOFF]
	ldrb	w11, [x11]
	cmp	w10, w9
	csel	w9, w11, wzr, eq
	orr	w8, w8, w9
	ldr	x9, [x21]
Lloh52:
	adrp	x10, _CCR2@GOTPAGE
Lloh53:
	ldr	x10, [x10, _CCR2@GOTPAGEOFF]
Lloh54:
	ldr	x10, [x10]
	add	x1, x10, x9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_write_reg
	ldr	x8, [x19, #24]
Lloh55:
	adrp	x9, _HDLC_CRC_NONE@GOTPAGE
Lloh56:
	ldr	x9, [x9, _HDLC_CRC_NONE@GOTPAGEOFF]
Lloh57:
	ldr	x9, [x9]
	ldrb	w10, [x24]
	ldrb	w11, [x22]
	add	w10, w11, w10
	cmp	x8, x9
	csel	w8, w10, wzr, eq
Lloh58:
	adrp	x9, _HDLC_PREAMBLE_PATTERN_NONE@GOTPAGE
Lloh59:
	ldr	x9, [x9, _HDLC_PREAMBLE_PATTERN_NONE@GOTPAGEOFF]
Lloh60:
	ldr	w10, [x9]
	ldrb	w11, [x20]
	ldp	w12, w9, [x19, #32]
	cmp	w12, w10
	csel	w10, wzr, w11, eq
	orr	w8, w10, w8
	cmp	w9, #132
	b.eq	LBB0_20
; %bb.17:
	cmp	w9, #133
	b.eq	LBB0_19
; %bb.18:
	cmp	w9, #134
	b.ne	LBB0_22
LBB0_19:
Lloh61:
	adrp	x9, _BIT6@GOTPAGE
Lloh62:
	ldr	x9, [x9, _BIT6@GOTPAGEOFF]
	ldrb	w9, [x9]
	b	LBB0_21
LBB0_20:
Lloh63:
	adrp	x9, _BIT7@GOTPAGE
Lloh64:
	ldr	x9, [x9, _BIT7@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh65:
	adrp	x10, _BIT6@GOTPAGE
Lloh66:
	ldr	x10, [x10, _BIT6@GOTPAGEOFF]
	ldrb	w10, [x10]
	add	w9, w10, w9
LBB0_21:
	orr	w8, w9, w8
LBB0_22:
	ldr	x9, [x21]
Lloh67:
	adrp	x10, _CCR3@GOTPAGE
Lloh68:
	ldr	x10, [x10, _CCR3@GOTPAGEOFF]
Lloh69:
	ldr	x10, [x10]
	add	x1, x10, x9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_write_reg
	ldr	w8, [x19, #32]
	sub	w8, w8, #128
	lsl	w9, w8, #3
	mov	w10, #32511
	movk	w10, #21930, lsl #16
	lsr	w9, w10, w9
	cmp	w8, #4
	csel	w8, w9, wzr, lo
	ldr	x9, [x21]
Lloh70:
	adrp	x10, _PRE@GOTPAGE
Lloh71:
	ldr	x10, [x10, _PRE@GOTPAGEOFF]
Lloh72:
	ldr	x10, [x10]
	add	x1, x10, x9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_write_reg
	ldr	x8, [x21]
Lloh73:
	adrp	x9, _CCR4@GOTPAGE
Lloh74:
	ldr	x9, [x9, _CCR4@GOTPAGEOFF]
Lloh75:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #80
	bl	_write_reg
	ldr	w8, [x19, #16]
Lloh76:
	adrp	x9, _HDLC_FLAG_RXC_DPLL@GOTPAGE
Lloh77:
	ldr	x9, [x9, _HDLC_FLAG_RXC_DPLL@GOTPAGEOFF]
Lloh78:
	ldr	w9, [x9]
	ldr	x1, [x21]
	ldr	w10, [x19, #40]
	lsl	w11, w10, #4
	tst	w9, w8
	csel	w2, w10, w11, eq
	mov	x0, x19
	bl	_mgslpc_set_rate
	ldr	x8, [x21]
Lloh79:
	adrp	x9, _RLCR@GOTPAGE
Lloh80:
	ldr	x9, [x9, _RLCR@GOTPAGEOFF]
Lloh81:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	mov	w2, #0
	bl	_write_reg
	ldr	w8, [x19, #16]
Lloh82:
	adrp	x9, _HDLC_FLAG_AUTO_DCD@GOTPAGE
Lloh83:
	ldr	x9, [x9, _HDLC_FLAG_AUTO_DCD@GOTPAGEOFF]
Lloh84:
	ldr	w9, [x9]
	ldrb	w10, [x20]
	tst	w9, w8
	csel	w8, wzr, w10, eq
	ldr	x9, [x21]
Lloh85:
	adrp	x10, _XBCH@GOTPAGE
Lloh86:
	ldr	x10, [x10, _XBCH@GOTPAGEOFF]
Lloh87:
	ldr	x10, [x10]
	add	x1, x10, x9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_write_reg
	mov	x0, x19
	bl	_enable_auxclk
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_24
; %bb.23:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_25
LBB0_24:
	mov	x0, x19
	bl	_loopback_enable
LBB0_25:
	ldr	w8, [x19, #16]
Lloh88:
	adrp	x9, _HDLC_FLAG_AUTO_CTS@GOTPAGE
Lloh89:
	ldr	x9, [x9, _HDLC_FLAG_AUTO_CTS@GOTPAGEOFF]
Lloh90:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_27
; %bb.26:
Lloh91:
	adrp	x8, _CHB@GOTPAGE
Lloh92:
	ldr	x8, [x8, _CHB@GOTPAGEOFF]
Lloh93:
	ldr	x1, [x8]
Lloh94:
	adrp	x8, _IRQ_CTS@GOTPAGE
Lloh95:
	ldr	x8, [x8, _IRQ_CTS@GOTPAGEOFF]
Lloh96:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_irq_enable
Lloh97:
	adrp	x8, _PVR@GOTPAGE
Lloh98:
	ldr	x8, [x8, _PVR@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh99:
	ldr	x8, [x8]
	add	x1, x8, x9
Lloh100:
	adrp	x8, _BIT3@GOTPAGE
Lloh101:
	ldr	x8, [x8, _BIT3@GOTPAGEOFF]
	ldrb	w2, [x8]
	mov	x0, x19
	bl	_set_reg_bits
	b	LBB0_28
LBB0_27:
Lloh102:
	adrp	x8, _PVR@GOTPAGE
Lloh103:
	ldr	x8, [x8, _PVR@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh104:
	ldr	x8, [x8]
	add	x1, x8, x9
Lloh105:
	adrp	x8, _BIT3@GOTPAGE
Lloh106:
	ldr	x8, [x8, _BIT3@GOTPAGEOFF]
	ldrb	w2, [x8]
	mov	x0, x19
	bl	_clear_reg_bits
LBB0_28:
Lloh107:
	adrp	x8, _IRQ_RXEOM@GOTPAGE
Lloh108:
	ldr	x8, [x8, _IRQ_RXEOM@GOTPAGEOFF]
	ldr	x1, [x21]
Lloh109:
	ldr	x8, [x8]
Lloh110:
	adrp	x9, _IRQ_RXFIFO@GOTPAGE
Lloh111:
	ldr	x9, [x9, _IRQ_RXFIFO@GOTPAGEOFF]
Lloh112:
	adrp	x10, _IRQ_ALLSENT@GOTPAGE
Lloh113:
	ldr	x10, [x10, _IRQ_ALLSENT@GOTPAGEOFF]
Lloh114:
	ldr	x9, [x9]
Lloh115:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x8, x8, x10
Lloh116:
	adrp	x9, _IRQ_UNDERRUN@GOTPAGE
Lloh117:
	ldr	x9, [x9, _IRQ_UNDERRUN@GOTPAGEOFF]
Lloh118:
	ldr	x9, [x9]
Lloh119:
	adrp	x10, _IRQ_TXFIFO@GOTPAGE
Lloh120:
	ldr	x10, [x10, _IRQ_TXFIFO@GOTPAGEOFF]
Lloh121:
	ldr	x10, [x10]
	add	x8, x8, x9
	add	x2, x8, x10
	mov	x0, x19
	bl	_irq_enable
Lloh122:
	adrp	x8, _CMD_TXRESET@GOTPAGE
Lloh123:
	ldr	x8, [x8, _CMD_TXRESET@GOTPAGEOFF]
	ldr	x1, [x21]
Lloh124:
	ldr	x8, [x8]
Lloh125:
	adrp	x9, _CMD_RXRESET@GOTPAGE
Lloh126:
	ldr	x9, [x9, _CMD_RXRESET@GOTPAGEOFF]
Lloh127:
	ldr	x9, [x9]
	add	x2, x9, x8
	mov	x0, x19
	bl	_issue_command
	ldr	x1, [x21]
	mov	x0, x19
	bl	_wait_command_complete
	ldr	x8, [x21]
Lloh128:
	adrp	x9, _ISR@GOTPAGE
Lloh129:
	ldr	x9, [x9, _ISR@GOTPAGEOFF]
Lloh130:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	bl	_read_reg16
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_30
; %bb.29:
	ldr	x8, [x21]
Lloh131:
	adrp	x9, _CCR0@GOTPAGE
Lloh132:
	ldr	x9, [x9, _CCR0@GOTPAGEOFF]
Lloh133:
	ldr	x9, [x9]
	add	x1, x9, x8
Lloh134:
	adrp	x8, _BIT6@GOTPAGE
Lloh135:
	ldr	x8, [x8, _BIT6@GOTPAGEOFF]
	ldrb	w2, [x8]
	mov	x0, x19
	bl	_clear_reg_bits
LBB0_30:
	mov	x0, x19
	bl	_tx_set_idle
	mov	x0, x19
	bl	_tx_stop
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_rx_stop
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGot	Lloh100, Lloh101
	.loh AdrpLdrGotLdr	Lloh97, Lloh98, Lloh99
	.loh AdrpLdrGotLdr	Lloh94, Lloh95, Lloh96
	.loh AdrpLdrGotLdr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGot	Lloh105, Lloh106
	.loh AdrpLdrGotLdr	Lloh102, Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh128, Lloh129, Lloh130
	.loh AdrpLdrGotLdr	Lloh125, Lloh126, Lloh127
	.loh AdrpLdrGotLdr	Lloh122, Lloh123, Lloh124
	.loh AdrpLdrGotLdr	Lloh119, Lloh120, Lloh121
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh112, Lloh113, Lloh115
	.loh AdrpLdrGotLdr	Lloh110, Lloh111, Lloh114
	.loh AdrpLdrGotLdr	Lloh107, Lloh108, Lloh109
	.loh AdrpLdrGot	Lloh134, Lloh135
	.loh AdrpLdrGotLdr	Lloh131, Lloh132, Lloh133
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
                                        ; -- End function
	.comm	_CHA,8,3                        ; @CHA
	.comm	_CHB,8,3                        ; @CHB
	.comm	_HDLC_FLAG_RXC_DPLL,4,2         ; @HDLC_FLAG_RXC_DPLL
	.comm	_HDLC_FLAG_TXC_DPLL,4,2         ; @HDLC_FLAG_TXC_DPLL
	.comm	_HDLC_FLAG_RXC_BRG,4,2          ; @HDLC_FLAG_RXC_BRG
	.comm	_HDLC_FLAG_TXC_BRG,4,2          ; @HDLC_FLAG_TXC_BRG
	.comm	_BIT0,1,0                       ; @BIT0
	.comm	_SerialSignal_RTS,4,2           ; @SerialSignal_RTS
	.comm	_BIT2,1,0                       ; @BIT2
	.comm	_MODE,8,3                       ; @MODE
	.comm	_BIT3,1,0                       ; @BIT3
	.comm	_BIT4,1,0                       ; @BIT4
	.comm	_CCR0,8,3                       ; @CCR0
	.comm	_CCR1,8,3                       ; @CCR1
	.comm	_BIT5,1,0                       ; @BIT5
	.comm	_HDLC_CRC_32_CCITT,8,3          ; @HDLC_CRC_32_CCITT
	.comm	_BIT1,1,0                       ; @BIT1
	.comm	_HDLC_ENCODING_NRZB,4,2         ; @HDLC_ENCODING_NRZB
	.comm	_CCR2,8,3                       ; @CCR2
	.comm	_HDLC_CRC_NONE,8,3              ; @HDLC_CRC_NONE
	.comm	_HDLC_PREAMBLE_PATTERN_NONE,4,2 ; @HDLC_PREAMBLE_PATTERN_NONE
	.comm	_BIT6,1,0                       ; @BIT6
	.comm	_BIT7,1,0                       ; @BIT7
	.comm	_CCR3,8,3                       ; @CCR3
	.comm	_PRE,8,3                        ; @PRE
	.comm	_CCR4,8,3                       ; @CCR4
	.comm	_RLCR,8,3                       ; @RLCR
	.comm	_HDLC_FLAG_AUTO_DCD,4,2         ; @HDLC_FLAG_AUTO_DCD
	.comm	_XBCH,8,3                       ; @XBCH
	.comm	_HDLC_FLAG_AUTO_CTS,4,2         ; @HDLC_FLAG_AUTO_CTS
	.comm	_IRQ_CTS,8,3                    ; @IRQ_CTS
	.comm	_PVR,8,3                        ; @PVR
	.comm	_IRQ_RXEOM,8,3                  ; @IRQ_RXEOM
	.comm	_IRQ_RXFIFO,8,3                 ; @IRQ_RXFIFO
	.comm	_IRQ_ALLSENT,8,3                ; @IRQ_ALLSENT
	.comm	_IRQ_UNDERRUN,8,3               ; @IRQ_UNDERRUN
	.comm	_IRQ_TXFIFO,8,3                 ; @IRQ_TXFIFO
	.comm	_CMD_TXRESET,8,3                ; @CMD_TXRESET
	.comm	_CMD_RXRESET,8,3                ; @CMD_RXRESET
	.comm	_ISR,8,3                        ; @ISR
	.no_dead_strip	_hdlc_mode
.subsections_via_symbols
