	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_5706_serdes_timer
_bnx2_5706_serdes_timer:                ## @bnx2_5706_serdes_timer
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	20(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	decq	%rax
	movq	%rax, 32(%rbx)
LBB0_18:
	movq	%r14, %rdi
	callq	_spin_unlock
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_AUTONEG_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%rbx), %eax
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.6:
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	movq	_BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	movl	$23, %esi
	movl	$3841, %edx                     ## imm = 0xF01
	callq	_bnx2_write_phy
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$21, %esi
	callq	_bnx2_read_phy
	testb	$32, -36(%rbp)
	je	LBB0_12
## %bb.9:
	movl	12(%rbx), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rax
	movl	-40(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -40(%rbp)
	movl	12(%rbx), %esi
	movq	%rbx, %rdi
	callq	_bnx2_write_phy
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, 16(%rbx)
	jmp	LBB0_12
LBB0_2:
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	movq	_BNX2_TIMER_INTERVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movl	12(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_12
## %bb.4:
	movq	%rbx, %rdi
	callq	_bnx2_5706_serdes_has_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movl	(%r15), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	_BMCR_SPEED1000@GOTPCREL(%rip), %rax
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
	movl	%edx, -36(%rbp)
	movl	12(%rbx), %esi
	movq	%rbx, %rdi
	callq	_bnx2_write_phy
	movq	_BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	jmp	LBB0_12
LBB0_11:
	movq	_BNX2_TIMER_INTERVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_12:
	movq	_MII_BNX2_MISC_SHADOW@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MISC_SHDW_AN_DBG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_bnx2_write_phy
	movl	(%r12), %esi
	leaq	-36(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_bnx2_read_phy
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_bnx2_read_phy
	movq	_MISC_SHDW_AN_DBG_NOSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-36(%rbp), %eax
	cmpq	$0, (%rbx)
	je	LBB0_16
## %bb.13:
	testl	%eax, %eax
	je	LBB0_18
## %bb.14:
	movq	_BNX2_PHY_FLAG_FORCED_DOWN@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, 16(%rbx)
	jne	LBB0_17
## %bb.15:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bnx2_5706s_force_link_dn
	movl	(%r15), %eax
	orl	%eax, 16(%rbx)
	jmp	LBB0_18
LBB0_16:
	testl	%eax, %eax
	jne	LBB0_18
LBB0_17:
	movq	%rbx, %rdi
	callq	_bnx2_set_link
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_SPEED,4,2              ## @AUTONEG_SPEED
	.comm	_BNX2_TIMER_INTERVAL,8,3        ## @BNX2_TIMER_INTERVAL
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_BMCR_SPEED1000,4,2             ## @BMCR_SPEED1000
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_BNX2_PHY_FLAG_PARALLEL_DETECT,4,2 ## @BNX2_PHY_FLAG_PARALLEL_DETECT
	.comm	_MII_BNX2_MISC_SHADOW,4,2       ## @MII_BNX2_MISC_SHADOW
	.comm	_MISC_SHDW_AN_DBG,4,2           ## @MISC_SHDW_AN_DBG
	.comm	_MISC_SHDW_AN_DBG_NOSYNC,4,2    ## @MISC_SHDW_AN_DBG_NOSYNC
	.comm	_BNX2_PHY_FLAG_FORCED_DOWN,4,2  ## @BNX2_PHY_FLAG_FORCED_DOWN
	.no_dead_strip	_bnx2_5706_serdes_timer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_5706_serdes_timer
_bnx2_5706_serdes_timer:                ; @bnx2_5706_serdes_timer
	.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
	add	x19, x0, #20
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_3
; %bb.1:
	sub	x8, x8, #1
	str	x8, [x20, #32]
LBB0_2:
	mov	x0, x19
	bl	_spin_unlock
	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_3:
	ldr	x9, [x20]
	ldr	w8, [x20, #8]
Lloh0:
	adrp	x10, _AUTONEG_SPEED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AUTONEG_SPEED@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	and	w8, w10, w8
	cbz	x9, LBB0_8
; %bb.4:
	cbz	w8, LBB0_12
; %bb.5:
	ldr	w8, [x20, #16]
Lloh3:
	adrp	x21, _BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.6:
	mov	x0, x20
	mov	w1, #23
	mov	w2, #3841
	bl	_bnx2_write_phy
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #21
	bl	_bnx2_read_phy
	ldrb	w8, [sp, #12]
	tbz	w8, #5, LBB0_13
; %bb.7:
	ldr	w1, [x20, #12]
	add	x2, sp, #8
	mov	x0, x20
	bl	_bnx2_read_phy
Lloh5:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w1, [x20, #12]
	mov	x0, x20
	bl	_bnx2_write_phy
	ldr	w8, [x21]
	ldr	w9, [x20, #16]
	bic	w8, w9, w8
	str	w8, [x20, #16]
	b	LBB0_13
LBB0_8:
	cbz	w8, LBB0_12
; %bb.9:
Lloh8:
	adrp	x8, _BNX2_TIMER_INTERVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BNX2_TIMER_INTERVAL@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x20, #24]
	ldr	w1, [x20, #12]
	add	x2, sp, #12
	mov	x0, x20
	bl	_bnx2_read_phy
	ldr	w8, [sp, #12]
Lloh11:
	adrp	x21, _BMCR_ANENABLE@GOTPAGE
Lloh12:
	ldr	x21, [x21, _BMCR_ANENABLE@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.10:
	mov	x0, x20
	bl	_bnx2_5706_serdes_has_link
	cbz	x0, LBB0_13
; %bb.11:
	ldr	w8, [x21]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh13:
	adrp	x9, _BMCR_SPEED1000@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BMCR_SPEED1000@GOTPAGEOFF]
Lloh15:
	adrp	x10, _BMCR_FULLDPLX@GOTPAGE
Lloh16:
	ldr	x10, [x10, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w2, w8, w10
	str	w2, [sp, #12]
	ldr	w1, [x20, #12]
	mov	x0, x20
	bl	_bnx2_write_phy
Lloh19:
	adrp	x8, _BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	b	LBB0_13
LBB0_12:
Lloh22:
	adrp	x8, _BNX2_TIMER_INTERVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BNX2_TIMER_INTERVAL@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	str	x8, [x20, #24]
LBB0_13:
Lloh25:
	adrp	x21, _MII_BNX2_MISC_SHADOW@GOTPAGE
Lloh26:
	ldr	x21, [x21, _MII_BNX2_MISC_SHADOW@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh27:
	adrp	x8, _MISC_SHDW_AN_DBG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MISC_SHDW_AN_DBG@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_bnx2_write_phy
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_bnx2_read_phy
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_bnx2_read_phy
	ldr	x9, [x20]
	ldr	w8, [sp, #12]
Lloh30:
	adrp	x10, _MISC_SHDW_AN_DBG_NOSYNC@GOTPAGE
Lloh31:
	ldr	x10, [x10, _MISC_SHDW_AN_DBG_NOSYNC@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
	and	w8, w10, w8
	cbz	x9, LBB0_17
; %bb.14:
	cbz	w8, LBB0_2
; %bb.15:
	ldr	w8, [x20, #16]
Lloh33:
	adrp	x21, _BNX2_PHY_FLAG_FORCED_DOWN@GOTPAGE
Lloh34:
	ldr	x21, [x21, _BNX2_PHY_FLAG_FORCED_DOWN@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_18
; %bb.16:
	mov	x0, x20
	mov	w1, #1
	bl	_bnx2_5706s_force_link_dn
	ldr	w8, [x21]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	b	LBB0_2
LBB0_17:
	cbnz	w8, LBB0_2
LBB0_18:
	mov	x0, x20
	bl	_bnx2_set_link
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_SPEED,4,2              ; @AUTONEG_SPEED
	.comm	_BNX2_TIMER_INTERVAL,8,3        ; @BNX2_TIMER_INTERVAL
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_BMCR_SPEED1000,4,2             ; @BMCR_SPEED1000
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_BNX2_PHY_FLAG_PARALLEL_DETECT,4,2 ; @BNX2_PHY_FLAG_PARALLEL_DETECT
	.comm	_MII_BNX2_MISC_SHADOW,4,2       ; @MII_BNX2_MISC_SHADOW
	.comm	_MISC_SHDW_AN_DBG,4,2           ; @MISC_SHDW_AN_DBG
	.comm	_MISC_SHDW_AN_DBG_NOSYNC,4,2    ; @MISC_SHDW_AN_DBG_NOSYNC
	.comm	_BNX2_PHY_FLAG_FORCED_DOWN,4,2  ; @BNX2_PHY_FLAG_FORCED_DOWN
	.no_dead_strip	_bnx2_5706_serdes_timer
.subsections_via_symbols
