	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_test_loopback
_tg3_test_loopback:                     ## @tg3_test_loopback
	.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	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_ETH_HLEN@GOTPCREL(%rip), %rdx
	movl	(%rdi), %eax
	movl	4(%rdi), %esi
	movl	%eax, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	movl	$9000, %eax                     ## imm = 0x2328
	cmovnel	%ecx, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_TG3_PHYFLG_EEE_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	notl	%eax
	movl	%esi, %r12d
	andl	%esi, %eax
	movl	%eax, 4(%rdi)
	movl	8(%rdi), %edi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_tg3_reset_hw
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	%eax, %ebx
	movq	_TG3_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_TG3_MAC_LOOPB_TEST@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%r15,%rdx,4)
	movl	(%rax), %ecx
	movq	_TG3_PHY_LOOPB_TEST@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%r15,%rdx,4)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movl	%r12d, %r14d
	je	LBB0_44
## %bb.3:
	movl	(%rax), %eax
	movq	_TG3_EXT_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r15,%rcx,4)
	jmp	LBB0_44
LBB0_4:
	movq	_TG3_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_TG3_MAC_LOOPB_TEST@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%r15,%rdx,4)
	movl	(%rax), %ecx
	movq	_TG3_PHY_LOOPB_TEST@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%r15,%rdx,4)
	testl	%r14d, %r14d
	je	LBB0_43
## %bb.5:
	movl	(%rax), %eax
	movq	_TG3_EXT_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r15,%rcx,4)
LBB0_43:
	movl	%r12d, %r14d
	jmp	LBB0_44
LBB0_6:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movq	_ENABLE_RSS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	_TG3_RSS_INDIR_TBL_SIZE@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_10
## %bb.8:
	movq	_MAC_RSS_INDIR_TBL_0@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_tw32
	addl	$4, %ebx
	movl	(%r15), %eax
	addl	(%r14), %eax
	cmpl	%eax, %ebx
	jl	LBB0_9
LBB0_10:
	movq	%r13, %rdi
	callq	_tg3_asic_rev
	movq	_ASIC_REV_5780@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_18
## %bb.11:
	movq	_CPMU_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	jne	LBB0_18
## %bb.12:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_tg3_mac_loopback
	movq	_ETH_FRAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_TG3_STD_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_MAC_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_14:
	movq	_JUMBO_RING_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	-48(%rbp), %esi                 ## 4-byte Folded Reload
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_TG3_JMB_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_MAC_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_17:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_tg3_mac_loopback
LBB0_18:
	movq	_TG3_PHYFLG_PHY_SERDES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	jne	LBB0_42
## %bb.19:
	movq	_USE_PHYLIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	jne	LBB0_42
## %bb.20:
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_tg3_phy_lpbk_set
	movl	$100, %ebx
	movq	_MAC_TX_STATUS@GOTPCREL(%rip), %r12
	movq	_TX_STATUS_LINK_UP@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_tr32
	testl	%eax, (%r15)
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	$1, %edi
	callq	_mdelay
	decl	%ebx
	jne	LBB0_21
LBB0_23:
	movq	_ETH_FRAME_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_25
## %bb.24:
	movq	_TG3_STD_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_PHY_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_25:
	movq	_TSO_CAPABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_28
## %bb.26:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	je	LBB0_28
## %bb.27:
	movq	_TG3_TSO_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_PHY_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_28:
	movq	_JUMBO_RING_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_31
## %bb.29:
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	-48(%rbp), %esi                 ## 4-byte Folded Reload
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:
	movq	_TG3_JMB_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_PHY_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_31:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_40
## %bb.32:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_tg3_phy_lpbk_set
	movl	$40, %edi
	callq	_mdelay
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	je	LBB0_34
## %bb.33:
	movq	_TG3_STD_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_EXT_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_34:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_37
## %bb.35:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:
	movq	_TG3_TSO_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_EXT_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_37:
	movq	_JUMBO_RING_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_40
## %bb.38:
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	addl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_tg3_run_loopback
	testq	%rax, %rax
	je	LBB0_40
## %bb.39:
	movq	_TG3_JMB_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TG3_EXT_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%r15,%rcx,4)
LBB0_40:
	movq	_TG3_PHYFLG_ENABLE_APD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_42
## %bb.41:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_tg3_phy_toggle_apd
LBB0_42:
	movq	_TG3_MAC_LOOPB_TEST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_TG3_PHY_LOOPB_TEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%r15,%rcx,4), %ecx
	orl	(%r15,%rax,4), %ecx
	movq	_TG3_EXT_LOOPB_TEST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	movq	_EIO@GOTPCREL(%rip), %rsi
	subl	(%rsi), %ebx
	orl	(%r15,%rax,4), %ecx
	cmovel	%edx, %ebx
LBB0_44:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	%r14d, %eax
	orl	%eax, 4(%r13)
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_TG3_PHYFLG_EEE_CAP,4,2         ## @TG3_PHYFLG_EEE_CAP
	.comm	_TG3_LOOPBACK_FAILED,4,2        ## @TG3_LOOPBACK_FAILED
	.comm	_TG3_MAC_LOOPB_TEST,8,3         ## @TG3_MAC_LOOPB_TEST
	.comm	_TG3_PHY_LOOPB_TEST,8,3         ## @TG3_PHY_LOOPB_TEST
	.comm	_TG3_EXT_LOOPB_TEST,8,3         ## @TG3_EXT_LOOPB_TEST
	.comm	_ENABLE_RSS,4,2                 ## @ENABLE_RSS
	.comm	_MAC_RSS_INDIR_TBL_0,4,2        ## @MAC_RSS_INDIR_TBL_0
	.comm	_TG3_RSS_INDIR_TBL_SIZE,4,2     ## @TG3_RSS_INDIR_TBL_SIZE
	.comm	_ASIC_REV_5780,8,3              ## @ASIC_REV_5780
	.comm	_CPMU_PRESENT,4,2               ## @CPMU_PRESENT
	.comm	_ETH_FRAME_LEN,4,2              ## @ETH_FRAME_LEN
	.comm	_TG3_STD_LOOPBACK_FAILED,4,2    ## @TG3_STD_LOOPBACK_FAILED
	.comm	_JUMBO_RING_ENABLE,4,2          ## @JUMBO_RING_ENABLE
	.comm	_TG3_JMB_LOOPBACK_FAILED,4,2    ## @TG3_JMB_LOOPBACK_FAILED
	.comm	_TG3_PHYFLG_PHY_SERDES,4,2      ## @TG3_PHYFLG_PHY_SERDES
	.comm	_USE_PHYLIB,4,2                 ## @USE_PHYLIB
	.comm	_MAC_TX_STATUS,4,2              ## @MAC_TX_STATUS
	.comm	_TX_STATUS_LINK_UP,4,2          ## @TX_STATUS_LINK_UP
	.comm	_TSO_CAPABLE,4,2                ## @TSO_CAPABLE
	.comm	_TG3_TSO_LOOPBACK_FAILED,4,2    ## @TG3_TSO_LOOPBACK_FAILED
	.comm	_TG3_PHYFLG_ENABLE_APD,4,2      ## @TG3_PHYFLG_ENABLE_APD
	.no_dead_strip	_tg3_test_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_test_loopback
_tg3_test_loopback:                     ; @tg3_test_loopback
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x26, _ETH_HLEN@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ETH_HLEN@GOTPAGEOFF]
	ldr	w8, [x26]
	ldp	w9, w23, [x0]
	sub	w8, w9, w8
	mov	w10, #9000
	cmp	w9, #0
	csel	w27, w10, w8, eq
Lloh5:
	adrp	x8, _TG3_PHYFLG_EEE_CAP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TG3_PHYFLG_EEE_CAP@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	bic	w8, w23, w24
	str	w8, [x0, #4]
	ldr	w0, [x0, #8]
	bl	_netif_running
	cbz	w0, LBB0_38
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_tg3_reset_hw
	cbnz	w0, LBB0_39
; %bb.2:
Lloh8:
	adrp	x8, _ENABLE_RSS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENABLE_RSS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
Lloh11:
	adrp	x28, _TG3_RSS_INDIR_TBL_SIZE@GOTPAGE
Lloh12:
	ldr	x28, [x28, _TG3_RSS_INDIR_TBL_SIZE@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	x0, #0
	ccmp	w8, #1, #8, ne
	b.lt	LBB0_5
; %bb.3:
Lloh13:
	adrp	x25, _MAC_RSS_INDIR_TBL_0@GOTPAGE
Lloh14:
	ldr	x25, [x25, _MAC_RSS_INDIR_TBL_0@GOTPAGEOFF]
	ldr	w22, [x25]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	w1, #0
	bl	_tw32
	add	w22, w22, #4
	ldr	w8, [x25]
	ldr	w9, [x28]
	add	w8, w9, w8
	cmp	w22, w8
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x19
	bl	_tg3_asic_rev
Lloh15:
	adrp	x8, _ASIC_REV_5780@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ASIC_REV_5780@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
Lloh18:
	adrp	x25, _EIO@GOTPAGE
Lloh19:
	ldr	x25, [x25, _EIO@GOTPAGEOFF]
	b.eq	LBB0_13
; %bb.6:
Lloh20:
	adrp	x8, _CPMU_PRESENT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CPMU_PRESENT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbnz	x0, LBB0_13
; %bb.7:
	mov	x0, x19
	mov	w1, #1
	bl	_tg3_mac_loopback
Lloh23:
	adrp	x8, _ETH_FRAME_LEN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETH_FRAME_LEN@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_run_loopback
	cbz	x0, LBB0_9
; %bb.8:
Lloh26:
	adrp	x8, _TG3_STD_LOOPBACK_FAILED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TG3_STD_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _TG3_MAC_LOOPB_TEST@GOTPAGE
Lloh30:
	ldr	x9, [x9, _TG3_MAC_LOOPB_TEST@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_9:
Lloh32:
	adrp	x8, _JUMBO_RING_ENABLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _JUMBO_RING_ENABLE@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_12
; %bb.10:
	ldr	w8, [x26]
	add	w1, w8, w27
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_run_loopback
	cbz	x0, LBB0_12
; %bb.11:
Lloh35:
	adrp	x8, _TG3_JMB_LOOPBACK_FAILED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _TG3_JMB_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _TG3_MAC_LOOPB_TEST@GOTPAGE
Lloh39:
	ldr	x9, [x9, _TG3_MAC_LOOPB_TEST@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_12:
	mov	x0, x19
	mov	w1, #0
	bl	_tg3_mac_loopback
LBB0_13:
	ldr	w8, [x19, #4]
Lloh41:
	adrp	x9, _TG3_PHYFLG_PHY_SERDES@GOTPAGE
Lloh42:
	ldr	x9, [x9, _TG3_PHYFLG_PHY_SERDES@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_37
; %bb.14:
Lloh44:
	adrp	x8, _USE_PHYLIB@GOTPAGE
Lloh45:
	ldr	x8, [x8, _USE_PHYLIB@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbnz	x0, LBB0_37
; %bb.15:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_tg3_phy_lpbk_set
	mov	w22, #100
Lloh47:
	adrp	x28, _MAC_TX_STATUS@GOTPAGE
Lloh48:
	ldr	x28, [x28, _MAC_TX_STATUS@GOTPAGEOFF]
Lloh49:
	adrp	x25, _TX_STATUS_LINK_UP@GOTPAGE
Lloh50:
	ldr	x25, [x25, _TX_STATUS_LINK_UP@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x28]
	bl	_tr32
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w0, #1
	bl	_mdelay
	subs	w22, w22, #1
	b.ne	LBB0_16
LBB0_18:
Lloh51:
	adrp	x22, _ETH_FRAME_LEN@GOTPAGE
Lloh52:
	ldr	x22, [x22, _ETH_FRAME_LEN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_run_loopback
	cbz	x0, LBB0_20
; %bb.19:
Lloh53:
	adrp	x8, _TG3_STD_LOOPBACK_FAILED@GOTPAGE
Lloh54:
	ldr	x8, [x8, _TG3_STD_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
Lloh56:
	adrp	x9, _TG3_PHY_LOOPB_TEST@GOTPAGE
Lloh57:
	ldr	x9, [x9, _TG3_PHY_LOOPB_TEST@GOTPAGEOFF]
Lloh58:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_20:
Lloh59:
	adrp	x8, _TSO_CAPABLE@GOTPAGE
Lloh60:
	ldr	x8, [x8, _TSO_CAPABLE@GOTPAGEOFF]
Lloh61:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
Lloh62:
	adrp	x25, _EIO@GOTPAGE
Lloh63:
	ldr	x25, [x25, _EIO@GOTPAGEOFF]
	cbz	x0, LBB0_23
; %bb.21:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_tg3_run_loopback
	cbz	x0, LBB0_23
; %bb.22:
Lloh64:
	adrp	x8, _TG3_TSO_LOOPBACK_FAILED@GOTPAGE
Lloh65:
	ldr	x8, [x8, _TG3_TSO_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh66:
	ldr	w8, [x8]
Lloh67:
	adrp	x9, _TG3_PHY_LOOPB_TEST@GOTPAGE
Lloh68:
	ldr	x9, [x9, _TG3_PHY_LOOPB_TEST@GOTPAGEOFF]
Lloh69:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_23:
Lloh70:
	adrp	x28, _JUMBO_RING_ENABLE@GOTPAGE
Lloh71:
	ldr	x28, [x28, _JUMBO_RING_ENABLE@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_26
; %bb.24:
	ldr	w8, [x26]
	add	w1, w8, w27
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_run_loopback
	cbz	x0, LBB0_26
; %bb.25:
Lloh72:
	adrp	x8, _TG3_JMB_LOOPBACK_FAILED@GOTPAGE
Lloh73:
	ldr	x8, [x8, _TG3_JMB_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh74:
	ldr	w8, [x8]
Lloh75:
	adrp	x9, _TG3_PHY_LOOPB_TEST@GOTPAGE
Lloh76:
	ldr	x9, [x9, _TG3_PHY_LOOPB_TEST@GOTPAGEOFF]
Lloh77:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_26:
	cbz	w21, LBB0_35
; %bb.27:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_tg3_phy_lpbk_set
	mov	w0, #40
	bl	_mdelay
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_run_loopback
	cbz	x0, LBB0_29
; %bb.28:
Lloh78:
	adrp	x8, _TG3_STD_LOOPBACK_FAILED@GOTPAGE
Lloh79:
	ldr	x8, [x8, _TG3_STD_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh80:
	ldr	w8, [x8]
Lloh81:
	adrp	x9, _TG3_EXT_LOOPB_TEST@GOTPAGE
Lloh82:
	ldr	x9, [x9, _TG3_EXT_LOOPB_TEST@GOTPAGEOFF]
Lloh83:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_29:
Lloh84:
	adrp	x8, _TSO_CAPABLE@GOTPAGE
Lloh85:
	ldr	x8, [x8, _TSO_CAPABLE@GOTPAGEOFF]
Lloh86:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_32
; %bb.30:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_tg3_run_loopback
	cbz	x0, LBB0_32
; %bb.31:
Lloh87:
	adrp	x8, _TG3_TSO_LOOPBACK_FAILED@GOTPAGE
Lloh88:
	ldr	x8, [x8, _TG3_TSO_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh89:
	ldr	w8, [x8]
Lloh90:
	adrp	x9, _TG3_EXT_LOOPB_TEST@GOTPAGE
Lloh91:
	ldr	x9, [x9, _TG3_EXT_LOOPB_TEST@GOTPAGEOFF]
Lloh92:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_32:
	ldr	w1, [x28]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_35
; %bb.33:
	ldr	w8, [x26]
	add	w1, w8, w27
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_run_loopback
	cbz	x0, LBB0_35
; %bb.34:
Lloh93:
	adrp	x8, _TG3_JMB_LOOPBACK_FAILED@GOTPAGE
Lloh94:
	ldr	x8, [x8, _TG3_JMB_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh95:
	ldr	w8, [x8]
Lloh96:
	adrp	x9, _TG3_EXT_LOOPB_TEST@GOTPAGE
Lloh97:
	ldr	x9, [x9, _TG3_EXT_LOOPB_TEST@GOTPAGEOFF]
Lloh98:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x20, x9]
	orr	w8, w10, w8
	str	w8, [x20, x9]
LBB0_35:
	ldr	w8, [x19, #4]
Lloh99:
	adrp	x9, _TG3_PHYFLG_ENABLE_APD@GOTPAGE
Lloh100:
	ldr	x9, [x9, _TG3_PHYFLG_ENABLE_APD@GOTPAGEOFF]
Lloh101:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_37
; %bb.36:
	mov	x0, x19
	mov	w1, #1
	bl	_tg3_phy_toggle_apd
LBB0_37:
Lloh102:
	adrp	x8, _TG3_MAC_LOOPB_TEST@GOTPAGE
Lloh103:
	ldr	x8, [x8, _TG3_MAC_LOOPB_TEST@GOTPAGEOFF]
Lloh104:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
Lloh105:
	adrp	x9, _TG3_PHY_LOOPB_TEST@GOTPAGE
Lloh106:
	ldr	x9, [x9, _TG3_PHY_LOOPB_TEST@GOTPAGEOFF]
Lloh107:
	ldr	x9, [x9]
	ldr	w9, [x20, x9, lsl #2]
	orr	w8, w9, w8
Lloh108:
	adrp	x9, _TG3_EXT_LOOPB_TEST@GOTPAGE
Lloh109:
	ldr	x9, [x9, _TG3_EXT_LOOPB_TEST@GOTPAGEOFF]
Lloh110:
	ldr	x9, [x9]
	ldr	w9, [x20, x9, lsl #2]
	orr	w8, w8, w9
	ldr	w9, [x25]
	cmp	w8, #0
	csneg	w0, wzr, w9, eq
	b	LBB0_41
LBB0_38:
	neg	w0, w22
LBB0_39:
Lloh111:
	adrp	x8, _TG3_LOOPBACK_FAILED@GOTPAGE
Lloh112:
	ldr	x8, [x8, _TG3_LOOPBACK_FAILED@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh113:
	adrp	x10, _TG3_MAC_LOOPB_TEST@GOTPAGE
Lloh114:
	ldr	x10, [x10, _TG3_MAC_LOOPB_TEST@GOTPAGEOFF]
Lloh115:
	ldr	x10, [x10]
	str	w9, [x20, x10, lsl #2]
	ldr	w9, [x8]
Lloh116:
	adrp	x10, _TG3_PHY_LOOPB_TEST@GOTPAGE
Lloh117:
	ldr	x10, [x10, _TG3_PHY_LOOPB_TEST@GOTPAGEOFF]
Lloh118:
	ldr	x10, [x10]
	str	w9, [x20, x10, lsl #2]
	cbz	w21, LBB0_41
; %bb.40:
	ldr	w8, [x8]
Lloh119:
	adrp	x9, _TG3_EXT_LOOPB_TEST@GOTPAGE
Lloh120:
	ldr	x9, [x9, _TG3_EXT_LOOPB_TEST@GOTPAGEOFF]
Lloh121:
	ldr	x9, [x9]
	str	w8, [x20, x9, lsl #2]
LBB0_41:
	and	w8, w24, w23
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.loh AdrpLdrGotLdr	Lloh105, Lloh106, Lloh107
	.loh AdrpLdrGotLdr	Lloh102, Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpLdrGot	Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh119, Lloh120, Lloh121
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_TG3_PHYFLG_EEE_CAP,4,2         ; @TG3_PHYFLG_EEE_CAP
	.comm	_TG3_LOOPBACK_FAILED,4,2        ; @TG3_LOOPBACK_FAILED
	.comm	_TG3_MAC_LOOPB_TEST,8,3         ; @TG3_MAC_LOOPB_TEST
	.comm	_TG3_PHY_LOOPB_TEST,8,3         ; @TG3_PHY_LOOPB_TEST
	.comm	_TG3_EXT_LOOPB_TEST,8,3         ; @TG3_EXT_LOOPB_TEST
	.comm	_ENABLE_RSS,4,2                 ; @ENABLE_RSS
	.comm	_MAC_RSS_INDIR_TBL_0,4,2        ; @MAC_RSS_INDIR_TBL_0
	.comm	_TG3_RSS_INDIR_TBL_SIZE,4,2     ; @TG3_RSS_INDIR_TBL_SIZE
	.comm	_ASIC_REV_5780,8,3              ; @ASIC_REV_5780
	.comm	_CPMU_PRESENT,4,2               ; @CPMU_PRESENT
	.comm	_ETH_FRAME_LEN,4,2              ; @ETH_FRAME_LEN
	.comm	_TG3_STD_LOOPBACK_FAILED,4,2    ; @TG3_STD_LOOPBACK_FAILED
	.comm	_JUMBO_RING_ENABLE,4,2          ; @JUMBO_RING_ENABLE
	.comm	_TG3_JMB_LOOPBACK_FAILED,4,2    ; @TG3_JMB_LOOPBACK_FAILED
	.comm	_TG3_PHYFLG_PHY_SERDES,4,2      ; @TG3_PHYFLG_PHY_SERDES
	.comm	_USE_PHYLIB,4,2                 ; @USE_PHYLIB
	.comm	_MAC_TX_STATUS,4,2              ; @MAC_TX_STATUS
	.comm	_TX_STATUS_LINK_UP,4,2          ; @TX_STATUS_LINK_UP
	.comm	_TSO_CAPABLE,4,2                ; @TSO_CAPABLE
	.comm	_TG3_TSO_LOOPBACK_FAILED,4,2    ; @TG3_TSO_LOOPBACK_FAILED
	.comm	_TG3_PHYFLG_ENABLE_APD,4,2      ; @TG3_PHYFLG_ENABLE_APD
	.no_dead_strip	_tg3_test_loopback
.subsections_via_symbols
