	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_test_loopback
_bnx2_test_loopback:                    ## @bnx2_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_BNX2_DRV_MSG_CODE_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2_reset_nic
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bnx2_init_phy
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	movq	_BNX2_MAC_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2_run_loopback
	xorl	%r14d, %r14d
	movl	$0, %r15d
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_BNX2_MAC_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_4:
	movq	_BNX2_PHY_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2_run_loopback
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_BNX2_PHY_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	orl	%r15d, %r14d
	jmp	LBB0_7
LBB0_1:
	movq	_BNX2_LOOPBACK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_LOOPBACK_FAILED,4,2       ## @BNX2_LOOPBACK_FAILED
	.comm	_BNX2_DRV_MSG_CODE_RESET,4,2    ## @BNX2_DRV_MSG_CODE_RESET
	.comm	_BNX2_MAC_LOOPBACK,4,2          ## @BNX2_MAC_LOOPBACK
	.comm	_BNX2_MAC_LOOPBACK_FAILED,4,2   ## @BNX2_MAC_LOOPBACK_FAILED
	.comm	_BNX2_PHY_LOOPBACK,4,2          ## @BNX2_PHY_LOOPBACK
	.comm	_BNX2_PHY_LOOPBACK_FAILED,4,2   ## @BNX2_PHY_LOOPBACK_FAILED
	.no_dead_strip	_bnx2_test_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_test_loopback
_bnx2_test_loopback:                    ; @bnx2_test_loopback
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	w0, [x0, #4]
	bl	_netif_running
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _BNX2_DRV_MSG_CODE_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNX2_DRV_MSG_CODE_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2_reset_nic
	mov	x0, x19
	bl	_spin_lock_bh
	mov	x0, x19
	mov	w1, #1
	bl	_bnx2_init_phy
	mov	x0, x19
	bl	_spin_unlock_bh
Lloh3:
	adrp	x8, _BNX2_MAC_LOOPBACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BNX2_MAC_LOOPBACK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2_run_loopback
Lloh6:
	adrp	x8, _BNX2_MAC_LOOPBACK_FAILED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BNX2_MAC_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, wzr, w8, eq
Lloh9:
	adrp	x8, _BNX2_PHY_LOOPBACK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BNX2_PHY_LOOPBACK@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2_run_loopback
Lloh12:
	adrp	x8, _BNX2_PHY_LOOPBACK_FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BNX2_PHY_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w0, w8, w20
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _BNX2_LOOPBACK_FAILED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BNX2_LOOPBACK_FAILED@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_LOOPBACK_FAILED,4,2       ; @BNX2_LOOPBACK_FAILED
	.comm	_BNX2_DRV_MSG_CODE_RESET,4,2    ; @BNX2_DRV_MSG_CODE_RESET
	.comm	_BNX2_MAC_LOOPBACK,4,2          ; @BNX2_MAC_LOOPBACK
	.comm	_BNX2_MAC_LOOPBACK_FAILED,4,2   ; @BNX2_MAC_LOOPBACK_FAILED
	.comm	_BNX2_PHY_LOOPBACK,4,2          ; @BNX2_PHY_LOOPBACK
	.comm	_BNX2_PHY_LOOPBACK_FAILED,4,2   ; @BNX2_PHY_LOOPBACK_FAILED
	.no_dead_strip	_bnx2_test_loopback
.subsections_via_symbols
