	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_self_test
_be_self_test:                          ## @be_self_test
	.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	%rdx, %r14
	movq	%rsi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	$0, -32(%rbp)
	movq	_BE_FUNCTION_CAPS_SUPER_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	jmp	LBB0_16
LBB0_2:
	movq	_ETHTOOL_TESTS_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_ETH_TEST_FL_OFFLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_9
## %bb.3:
	movq	_BE_MAC_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_be_loopback_test
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_5:
	movq	_BE_PHY_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	4(%r14), %rdx
	movq	%rbx, %rdi
	callq	_be_loopback_test
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_7:
	movq	_BE_ONE_PORT_EXT_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%r14), %rdx
	movq	%rbx, %rdi
	callq	_be_loopback_test
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_9:
	movq	%rbx, %rdi
	callq	_lancer_chip
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	%rbx, %rdi
	callq	_be_test_ddr_dma
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	$1, 12(%r14)
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_12:
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_be_cmd_link_status_query
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movl	$-1, 16(%r14)
	jmp	LBB0_16
LBB0_14:
	cmpq	$0, -32(%rbp)
	jne	LBB0_16
## %bb.15:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movl	$1, 16(%r14)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BE_FUNCTION_CAPS_SUPER_NIC,4,2 ## @BE_FUNCTION_CAPS_SUPER_NIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Self test not supported\n"

	.comm	_ETH_TEST_FL_FAILED,4,2         ## @ETH_TEST_FL_FAILED
	.comm	_ETHTOOL_TESTS_NUM,4,2          ## @ETHTOOL_TESTS_NUM
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ## @ETH_TEST_FL_OFFLINE
	.comm	_BE_MAC_LOOPBACK,4,2            ## @BE_MAC_LOOPBACK
	.comm	_BE_PHY_LOOPBACK,4,2            ## @BE_PHY_LOOPBACK
	.comm	_BE_ONE_PORT_EXT_LOOPBACK,4,2   ## @BE_ONE_PORT_EXT_LOOPBACK
	.no_dead_strip	_be_self_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_self_test
_be_self_test:                          ; @be_self_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x19, x1
	bl	_netdev_priv
	mov	x21, x0
	str	xzr, [sp, #8]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _BE_FUNCTION_CAPS_SUPER_NIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BE_FUNCTION_CAPS_SUPER_NIC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x21, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_16
LBB0_2:
Lloh8:
	adrp	x8, _ETHTOOL_TESTS_NUM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETHTOOL_TESTS_NUM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldr	w8, [x19]
Lloh11:
	adrp	x9, _ETH_TEST_FL_OFFLINE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ETH_TEST_FL_OFFLINE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
Lloh14:
	adrp	x8, _BE_MAC_LOOPBACK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BE_MAC_LOOPBACK@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	bl	_be_loopback_test
	cbz	x0, LBB0_5
; %bb.4:
Lloh17:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_5:
Lloh20:
	adrp	x8, _BE_PHY_LOOPBACK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BE_PHY_LOOPBACK@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, x20, #4
	mov	x0, x21
	bl	_be_loopback_test
	cbz	x0, LBB0_7
; %bb.6:
Lloh23:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_7:
Lloh26:
	adrp	x8, _BE_ONE_PORT_EXT_LOOPBACK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BE_ONE_PORT_EXT_LOOPBACK@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	add	x2, x20, #8
	mov	x0, x21
	bl	_be_loopback_test
	cbz	x0, LBB0_9
; %bb.8:
Lloh29:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_9:
	mov	x0, x21
	bl	_lancer_chip
	cbnz	w0, LBB0_12
; %bb.10:
	mov	x0, x21
	bl	_be_test_ddr_dma
	cbz	x0, LBB0_12
; %bb.11:
	mov	w8, #1
	str	w8, [x20, #12]
Lloh32:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_12:
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, #0
	mov	w3, #0
	bl	_be_cmd_link_status_query
	cbz	w0, LBB0_15
; %bb.13:
Lloh35:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	w8, #-1
LBB0_14:
	str	w8, [x20, #16]
	b	LBB0_16
LBB0_15:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_17
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_17:
Lloh38:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	w8, #1
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_BE_FUNCTION_CAPS_SUPER_NIC,4,2 ; @BE_FUNCTION_CAPS_SUPER_NIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Self test not supported\n"

	.comm	_ETH_TEST_FL_FAILED,4,2         ; @ETH_TEST_FL_FAILED
	.comm	_ETHTOOL_TESTS_NUM,4,2          ; @ETHTOOL_TESTS_NUM
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ; @ETH_TEST_FL_OFFLINE
	.comm	_BE_MAC_LOOPBACK,4,2            ; @BE_MAC_LOOPBACK
	.comm	_BE_PHY_LOOPBACK,4,2            ; @BE_PHY_LOOPBACK
	.comm	_BE_ONE_PORT_EXT_LOOPBACK,4,2   ; @BE_ONE_PORT_EXT_LOOPBACK
	.no_dead_strip	_be_self_test
.subsections_via_symbols
