	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_test_ext_loopback
_bnx2x_test_ext_loopback:               ## @bnx2x_test_ext_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_LINK_STATUS_SERDES_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	andl	4(%rdi), %eax
	setg	%r12b
	callq	_BP_NOMCP
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_2:
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r14), %edi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	_UNLOAD_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bnx2x_nic_unload
	movq	_LOAD_LOOPBACK_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bnx2x_nic_load
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_BNX2X_EXT_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_3
LBB0_8:
	movb	%r12b, %r15b
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	callq	_bnx2x_wait_for_link
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_bnx2x_netif_stop
	movq	_BNX2X_EXT_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bnx2x_run_loopback
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DP
LBB0_10:
	movq	%r14, %rdi
	callq	_bnx2x_netif_start
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_LINK_STATUS_SERDES_LINK,4,2    ## @LINK_STATUS_SERDES_LINK
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_BNX2X_EXT_LOOPBACK_FAILED,4,2  ## @BNX2X_EXT_LOOPBACK_FAILED
	.comm	_UNLOAD_NORMAL,4,2              ## @UNLOAD_NORMAL
	.comm	_LOAD_LOOPBACK_EXT,4,2          ## @LOAD_LOOPBACK_EXT
	.comm	_BNX2X_MSG_ETHTOOL,4,2          ## @BNX2X_MSG_ETHTOOL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't perform self-test, nic_load (for external lb) failed\n"

	.comm	_BNX2X_EXT_LOOPBACK,4,2         ## @BNX2X_EXT_LOOPBACK
L_.str.1:                               ## @.str.1
	.asciz	"EXT loopback failed  (res %d)\n"

	.no_dead_strip	_bnx2x_test_ext_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_test_ext_loopback
_bnx2x_test_ext_loopback:               ; @bnx2x_test_ext_loopback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x9, _LINK_STATUS_SERDES_LINK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LINK_STATUS_SERDES_LINK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w20, gt
	bl	_BP_NOMCP
	cbz	x0, LBB0_3
LBB0_1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	ldr	w0, [x19]
	bl	_netif_running
	cbz	w0, LBB0_6
; %bb.4:
Lloh6:
	adrp	x8, _UNLOAD_NORMAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UNLOAD_NORMAL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bnx2x_nic_unload
Lloh9:
	adrp	x8, _LOAD_LOOPBACK_EXT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LOAD_LOOPBACK_EXT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2x_nic_load
	cbz	w0, LBB0_7
; %bb.5:
Lloh12:
	adrp	x8, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
	b	LBB0_1
LBB0_6:
Lloh17:
	adrp	x8, _BNX2X_EXT_LOOPBACK_FAILED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BNX2X_EXT_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	b	LBB0_2
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_bnx2x_wait_for_link
	mov	x0, x19
	mov	w1, #1
	bl	_bnx2x_netif_stop
Lloh20:
	adrp	x8, _BNX2X_EXT_LOOPBACK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BNX2X_EXT_LOOPBACK@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2x_run_loopback
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.8:
Lloh23:
	adrp	x8, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DP
LBB0_9:
	mov	x0, x19
	bl	_bnx2x_netif_start
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_LINK_STATUS_SERDES_LINK,4,2    ; @LINK_STATUS_SERDES_LINK
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_BNX2X_EXT_LOOPBACK_FAILED,4,2  ; @BNX2X_EXT_LOOPBACK_FAILED
	.comm	_UNLOAD_NORMAL,4,2              ; @UNLOAD_NORMAL
	.comm	_LOAD_LOOPBACK_EXT,4,2          ; @LOAD_LOOPBACK_EXT
	.comm	_BNX2X_MSG_ETHTOOL,4,2          ; @BNX2X_MSG_ETHTOOL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't perform self-test, nic_load (for external lb) failed\n"

	.comm	_BNX2X_EXT_LOOPBACK,4,2         ; @BNX2X_EXT_LOOPBACK
l_.str.1:                               ; @.str.1
	.asciz	"EXT loopback failed  (res %d)\n"

	.no_dead_strip	_bnx2x_test_ext_loopback
.subsections_via_symbols
