	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_nway_reset
_bnx2_nway_reset:                       ## @bnx2_nway_reset
	.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
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_AUTONEG_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.5:
	leaq	12(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movl	4(%r15), %eax
	movq	_BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movl	36(%r15), %esi
	movq	%r15, %rdi
	callq	_bnx2_setup_remote_phy
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movl	%ebx, %eax
	jmp	LBB0_10
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_BNX2_PHY_FLAG_SERDES@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movl	16(%r15), %esi
	movq	_BMCR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_bnx2_write_phy
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movl	$20, %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	_BNX2_SERDES_AN_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rsi, 24(%r15)
	movl	$1, 8(%r15)
	movq	%r15, %rdi
	addq	$32, %rdi
	movq	_jiffies@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	callq	_mod_timer
LBB0_9:
	movl	16(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_bnx2_read_phy
	movq	_BMCR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movq	_BMCR_ANRESTART@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	16(%r15), %esi
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_bnx2_write_phy
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AUTONEG_SPEED,4,2              ## @AUTONEG_SPEED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BNX2_PHY_FLAG_REMOTE_PHY_CAP,4,2 ## @BNX2_PHY_FLAG_REMOTE_PHY_CAP
	.comm	_BNX2_PHY_FLAG_SERDES,4,2       ## @BNX2_PHY_FLAG_SERDES
	.comm	_BMCR_LOOPBACK,4,2              ## @BMCR_LOOPBACK
	.comm	_BNX2_SERDES_AN_TIMEOUT,8,3     ## @BNX2_SERDES_AN_TIMEOUT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_BMCR_ANRESTART,4,2             ## @BMCR_ANRESTART
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.no_dead_strip	_bnx2_nway_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_nway_reset
_bnx2_nway_reset:                       ; @bnx2_nway_reset
	.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, x0
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_netif_running
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _AUTONEG_SPEED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_SPEED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	add	x20, x19, #12
	mov	x0, x20
	bl	_spin_lock_bh
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	ldr	w1, [x19, #36]
	mov	x0, x19
	bl	_bnx2_setup_remote_phy
	mov	x19, x0
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	x0, x19
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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_8:
Lloh10:
	adrp	x9, _BNX2_PHY_FLAG_SERDES@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BNX2_PHY_FLAG_SERDES@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x21, _BMCR_LOOPBACK@GOTPAGE
Lloh14:
	ldr	x21, [x21, _BMCR_LOOPBACK@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldr	w1, [x19, #16]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_bnx2_write_phy
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	w0, #20
	bl	_msleep
	mov	x0, x20
	bl	_spin_lock_bh
Lloh15:
	adrp	x8, _BNX2_SERDES_AN_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BNX2_SERDES_AN_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	mov	w9, #1
	str	w9, [x19, #8]
	add	x0, x19, #32
Lloh18:
	adrp	x9, _jiffies@GOTPAGE
Lloh19:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_mod_timer
LBB0_10:
	ldr	w1, [x19, #16]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bnx2_read_phy
	ldr	w8, [x21]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w1, [x19, #16]
Lloh21:
	adrp	x9, _BMCR_ANRESTART@GOTPAGE
Lloh22:
	ldr	x9, [x9, _BMCR_ANRESTART@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _BMCR_ANENABLE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_bnx2_write_phy
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AUTONEG_SPEED,4,2              ; @AUTONEG_SPEED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BNX2_PHY_FLAG_REMOTE_PHY_CAP,4,2 ; @BNX2_PHY_FLAG_REMOTE_PHY_CAP
	.comm	_BNX2_PHY_FLAG_SERDES,4,2       ; @BNX2_PHY_FLAG_SERDES
	.comm	_BMCR_LOOPBACK,4,2              ; @BMCR_LOOPBACK
	.comm	_BNX2_SERDES_AN_TIMEOUT,8,3     ; @BNX2_SERDES_AN_TIMEOUT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_BMCR_ANRESTART,4,2             ; @BMCR_ANRESTART
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.no_dead_strip	_bnx2_nway_reset
.subsections_via_symbols
