	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_test_link
_bnx2_test_link:                        ## @bnx2_test_link
	.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	24(%rdi), %edi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	_BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	cmpq	$0, 16(%rbx)
	jne	LBB0_5
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	%rbx, %rdi
	callq	_bnx2_enable_bmsr1
	movl	8(%rbx), %esi
	leaq	-28(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_bnx2_read_phy
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_bnx2_read_phy
	movq	%rbx, %rdi
	callq	_bnx2_disable_bmsr1
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, -28(%rbp)
	jne	LBB0_5
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_BNX2_PHY_FLAG_REMOTE_PHY_CAP,4,2 ## @BNX2_PHY_FLAG_REMOTE_PHY_CAP
	.comm	_BMSR_LSTATUS,4,2               ## @BMSR_LSTATUS
	.no_dead_strip	_bnx2_test_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_test_link
_bnx2_test_link:                        ; @bnx2_test_link
	.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	w0, [x0, #24]
	bl	_netif_running
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_bh
	mov	x0, x19
	bl	_bnx2_enable_bmsr1
	ldr	w1, [x19, #8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bnx2_read_phy
	ldr	w1, [x19, #8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bnx2_read_phy
	mov	x0, x19
	bl	_bnx2_disable_bmsr1
	mov	x0, x20
	bl	_spin_unlock_bh
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _BMSR_LSTATUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BMSR_LSTATUS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
LBB0_5:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_BNX2_PHY_FLAG_REMOTE_PHY_CAP,4,2 ; @BNX2_PHY_FLAG_REMOTE_PHY_CAP
	.comm	_BMSR_LSTATUS,4,2               ; @BMSR_LSTATUS
	.no_dead_strip	_bnx2_test_link
.subsections_via_symbols
