	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usc_loopback_frame
_usc_loopback_frame:                    ## @usc_loopback_frame
	.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, %r12
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_MGSL_MODE_HDLC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rdi)
	callq	_usc_DisableMasterIrqBit
	movq	%r12, %rdi
	callq	_usc_set_sdlc_mode
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_usc_enable_loopback
	movq	_TC0R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_usc_OutReg
	movq	_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_usc_OutReg
	movq	_RTCmd_PurgeRxFifo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_usc_RTCmd
	movq	_ENABLE_UNCONDITIONAL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_usc_EnableReceiver
	movq	_TCLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_usc_OutReg
	movq	_RTCmd_PurgeTxFifo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_usc_RTCmd
	movq	_TXSTATUS_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_usc_UnlatchTxstatusBits
	movq	_DATAREG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	xorl	%edi, %edi
	callq	_outw
	movq	_TCmd_SendFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_usc_TCmd
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_usc_EnableTransmitter
	movl	$999, %ebx                      ## imm = 0x3E7
	movq	_BIT4@GOTPCREL(%rip), %r14
	movq	_BIT3@GOTPCREL(%rip), %r15
	movq	_BIT1@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_RCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_usc_InReg
	movl	(%r14), %edx
	movq	_BIT8@GOTPCREL(%rip), %rcx
	addl	(%rcx), %edx
	addl	(%r15), %edx
	addl	(%r13), %edx
	subl	$1, %ebx
	setb	%cl
	testl	%eax, %edx
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	%cl, %cl
	je	LBB0_1
LBB0_3:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_usc_enable_loopback
	movq	%r12, %rdi
	callq	_usc_EnableMasterIrqBit
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MGSL_MODE_HDLC,8,3             ## @MGSL_MODE_HDLC
	.comm	_TC0R,4,2                       ## @TC0R
	.comm	_CCR,4,2                        ## @CCR
	.comm	_RTCmd_PurgeRxFifo,4,2          ## @RTCmd_PurgeRxFifo
	.comm	_ENABLE_UNCONDITIONAL,4,2       ## @ENABLE_UNCONDITIONAL
	.comm	_TCLR,4,2                       ## @TCLR
	.comm	_RTCmd_PurgeTxFifo,4,2          ## @RTCmd_PurgeTxFifo
	.comm	_TXSTATUS_ALL,4,2               ## @TXSTATUS_ALL
	.comm	_DATAREG,8,3                    ## @DATAREG
	.comm	_TCmd_SendFrame,4,2             ## @TCmd_SendFrame
	.comm	_RCSR,4,2                       ## @RCSR
	.comm	_BIT8,4,2                       ## @BIT8
	.comm	_BIT4,4,2                       ## @BIT4
	.comm	_BIT3,4,2                       ## @BIT3
	.comm	_BIT1,4,2                       ## @BIT1
	.no_dead_strip	_usc_loopback_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usc_loopback_frame
_usc_loopback_frame:                    ; @usc_loopback_frame
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _MGSL_MODE_HDLC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MGSL_MODE_HDLC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x0]
	bl	_usc_DisableMasterIrqBit
	mov	x0, x19
	bl	_usc_set_sdlc_mode
	mov	x0, x19
	mov	w1, #1
	bl	_usc_enable_loopback
Lloh3:
	adrp	x8, _TC0R@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TC0R@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_usc_OutReg
Lloh6:
	adrp	x8, _CCR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #256
	bl	_usc_OutReg
Lloh9:
	adrp	x8, _RTCmd_PurgeRxFifo@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RTCmd_PurgeRxFifo@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_usc_RTCmd
Lloh12:
	adrp	x21, _ENABLE_UNCONDITIONAL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _ENABLE_UNCONDITIONAL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_usc_EnableReceiver
Lloh14:
	adrp	x8, _TCLR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TCLR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	bl	_usc_OutReg
Lloh17:
	adrp	x8, _RTCmd_PurgeTxFifo@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RTCmd_PurgeTxFifo@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_usc_RTCmd
Lloh20:
	adrp	x8, _TXSTATUS_ALL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TXSTATUS_ALL@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_usc_UnlatchTxstatusBits
	ldr	x8, [x19, #8]
Lloh23:
	adrp	x9, _DATAREG@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DATAREG@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_outw
Lloh26:
	adrp	x8, _TCmd_SendFrame@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TCmd_SendFrame@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_usc_TCmd
	ldr	w1, [x21]
	mov	x0, x19
	bl	_usc_EnableTransmitter
	mov	w21, #999
Lloh29:
	adrp	x22, _RCSR@GOTPAGE
Lloh30:
	ldr	x22, [x22, _RCSR@GOTPAGEOFF]
Lloh31:
	adrp	x23, _BIT8@GOTPAGE
Lloh32:
	ldr	x23, [x23, _BIT8@GOTPAGEOFF]
Lloh33:
	adrp	x24, _BIT4@GOTPAGE
Lloh34:
	ldr	x24, [x24, _BIT4@GOTPAGEOFF]
Lloh35:
	adrp	x25, _BIT3@GOTPAGE
Lloh36:
	ldr	x25, [x25, _BIT3@GOTPAGEOFF]
Lloh37:
	adrp	x26, _BIT1@GOTPAGE
Lloh38:
	ldr	x26, [x26, _BIT1@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_usc_InReg
	ldr	w8, [x23]
	ldr	w9, [x24]
	ldr	w10, [x25]
	add	w8, w9, w8
	add	w8, w8, w10
	ldr	w9, [x26]
	add	w8, w8, w9
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w21, #0, #4, eq
	sub	w21, w21, #1
	b.ne	LBB0_1
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_usc_enable_loopback
	mov	x0, x19
	bl	_usc_EnableMasterIrqBit
	str	x20, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.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 AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MGSL_MODE_HDLC,8,3             ; @MGSL_MODE_HDLC
	.comm	_TC0R,4,2                       ; @TC0R
	.comm	_CCR,4,2                        ; @CCR
	.comm	_RTCmd_PurgeRxFifo,4,2          ; @RTCmd_PurgeRxFifo
	.comm	_ENABLE_UNCONDITIONAL,4,2       ; @ENABLE_UNCONDITIONAL
	.comm	_TCLR,4,2                       ; @TCLR
	.comm	_RTCmd_PurgeTxFifo,4,2          ; @RTCmd_PurgeTxFifo
	.comm	_TXSTATUS_ALL,4,2               ; @TXSTATUS_ALL
	.comm	_DATAREG,8,3                    ; @DATAREG
	.comm	_TCmd_SendFrame,4,2             ; @TCmd_SendFrame
	.comm	_RCSR,4,2                       ; @RCSR
	.comm	_BIT8,4,2                       ; @BIT8
	.comm	_BIT4,4,2                       ; @BIT4
	.comm	_BIT3,4,2                       ; @BIT3
	.comm	_BIT1,4,2                       ; @BIT1
	.no_dead_strip	_usc_loopback_frame
.subsections_via_symbols
