	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_update_link_down
_bnx2x_update_link_down:                ## @bnx2x_update_link_down
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movslq	(%rdi), %rbx
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_DP
	movq	_LED_MODE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_bnx2x_set_led
	movq	_PHY_PHYSICAL_LINK_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 20(%r14)
	movq	_MAC_TYPE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_LINK_UPDATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	4(%r14), %esi
	movl	%esi, 4(%r14)
	movq	$0, 8(%r14)
	movq	%r12, %rdi
	callq	_bnx2x_update_mng
	movq	_NIG_REG_EGRESS_DRAIN0_MODE@GOTPCREL(%rip), %rax
	shlq	$2, %rbx
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_REG_WR
	movq	%r15, %rdi
	callq	_CHIP_IS_E3
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_NIG_REG_NIG_EMAC0_EN@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_REG_WR
LBB0_2:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_CHIP_IS_E1x
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_CHIP_IS_E2
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movl	(%r12), %edx
	movl	4(%r12), %esi
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_bnx2x_set_bmac_rx
LBB0_5:
	movq	%r15, %rdi
	callq	_CHIP_IS_E3
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_MISC_REG_CPMU_LP_FW_ENABLE_P0@GOTPCREL(%rip), %rax
	movl	(%r12), %ecx
	shll	$2, %ecx
	movslq	%ecx, %rsi
	addq	(%rax), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_REG_WR
	movq	_MISC_REG_CPMU_LP_MASK_ENT_P0@GOTPCREL(%rip), %rax
	movl	(%r12), %ecx
	shll	$2, %ecx
	movslq	%ecx, %rsi
	addq	(%rax), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_REG_WR
	movq	_SHMEM_EEE_LP_ADV_STATUS_MASK@GOTPCREL(%rip), %rax
	movq	_SHMEM_EEE_ACTIVE_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	(%r14), %esi
	movl	%esi, (%r14)
	movq	%r12, %rdi
	callq	_bnx2x_update_mng_eee
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_bnx2x_set_xmac_rxtx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_bnx2x_set_umac_rxtx
LBB0_7:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port %x: Link is down\n"

	.comm	_LED_MODE_OFF,4,2               ## @LED_MODE_OFF
	.comm	_PHY_PHYSICAL_LINK_FLAG,4,2     ## @PHY_PHYSICAL_LINK_FLAG
	.comm	_MAC_TYPE_NONE,4,2              ## @MAC_TYPE_NONE
	.comm	_LINK_UPDATE_MASK,4,2           ## @LINK_UPDATE_MASK
	.comm	_NIG_REG_EGRESS_DRAIN0_MODE,8,3 ## @NIG_REG_EGRESS_DRAIN0_MODE
	.comm	_NIG_REG_NIG_EMAC0_EN,8,3       ## @NIG_REG_NIG_EMAC0_EN
	.comm	_MISC_REG_CPMU_LP_FW_ENABLE_P0,8,3 ## @MISC_REG_CPMU_LP_FW_ENABLE_P0
	.comm	_MISC_REG_CPMU_LP_MASK_ENT_P0,8,3 ## @MISC_REG_CPMU_LP_MASK_ENT_P0
	.comm	_SHMEM_EEE_LP_ADV_STATUS_MASK,4,2 ## @SHMEM_EEE_LP_ADV_STATUS_MASK
	.comm	_SHMEM_EEE_ACTIVE_BIT,4,2       ## @SHMEM_EEE_ACTIVE_BIT
	.no_dead_strip	_bnx2x_update_link_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_update_link_down
_bnx2x_update_link_down:                ; @bnx2x_update_link_down
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldrsw	x22, [x0]
Lloh0:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_DP
Lloh5:
	adrp	x8, _LED_MODE_OFF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LED_MODE_OFF@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_bnx2x_set_led
Lloh8:
	adrp	x8, _PHY_PHYSICAL_LINK_FLAG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PHY_PHYSICAL_LINK_FLAG@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	bic	w8, w9, w8
Lloh11:
	adrp	x9, _MAC_TYPE_NONE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAC_TYPE_NONE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _LINK_UPDATE_MASK@GOTPAGE
Lloh15:
	ldr	x10, [x10, _LINK_UPDATE_MASK@GOTPAGEOFF]
	stp	w9, w8, [x20, #16]
Lloh16:
	ldr	w8, [x10]
	ldr	w9, [x20, #4]
	bic	w1, w9, w8
	str	w1, [x20, #4]
	str	xzr, [x20, #8]
	mov	x0, x19
	bl	_bnx2x_update_mng
Lloh17:
	adrp	x8, _NIG_REG_EGRESS_DRAIN0_MODE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NIG_REG_EGRESS_DRAIN0_MODE@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	lsl	x22, x22, #2
	add	x1, x8, x22
	mov	x0, x21
	mov	w2, #1
	bl	_REG_WR
	mov	x0, x21
	bl	_CHIP_IS_E3
	cbnz	x0, LBB0_2
; %bb.1:
Lloh20:
	adrp	x8, _NIG_REG_NIG_EMAC0_EN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NIG_REG_NIG_EMAC0_EN@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	add	x1, x8, x22
	mov	x0, x21
	mov	w2, #0
	bl	_REG_WR
LBB0_2:
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	mov	x0, x21
	bl	_CHIP_IS_E1x
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_CHIP_IS_E2
	cbz	x0, LBB0_5
LBB0_4:
	ldp	w2, w1, [x19]
	mov	x0, x21
	mov	w3, #0
	bl	_bnx2x_set_bmac_rx
LBB0_5:
	mov	x0, x21
	bl	_CHIP_IS_E3
	cbz	x0, LBB0_7
; %bb.6:
Lloh23:
	adrp	x8, _MISC_REG_CPMU_LP_FW_ENABLE_P0@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MISC_REG_CPMU_LP_FW_ENABLE_P0@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	w9, [x19]
	lsl	w9, w9, #2
	add	x1, x8, w9, sxtw
	mov	x0, x21
	mov	w2, #0
	bl	_REG_WR
Lloh26:
	adrp	x8, _MISC_REG_CPMU_LP_MASK_ENT_P0@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MISC_REG_CPMU_LP_MASK_ENT_P0@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	w9, [x19]
	lsl	w9, w9, #2
	add	x1, x8, w9, sxtw
	mov	x0, x21
	mov	w2, #0
	bl	_REG_WR
Lloh29:
	adrp	x8, _SHMEM_EEE_LP_ADV_STATUS_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SHMEM_EEE_LP_ADV_STATUS_MASK@GOTPAGEOFF]
Lloh31:
	adrp	x9, _SHMEM_EEE_ACTIVE_BIT@GOTPAGE
Lloh32:
	ldr	x9, [x9, _SHMEM_EEE_ACTIVE_BIT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20]
	bic	w1, w9, w8
	str	w1, [x20]
	mov	x0, x19
	bl	_bnx2x_update_mng_eee
	mov	x0, x19
	mov	w1, #0
	bl	_bnx2x_set_xmac_rxtx
	mov	x0, x19
	mov	w1, #0
	bl	_bnx2x_set_umac_rxtx
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh33
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port %x: Link is down\n"

	.comm	_LED_MODE_OFF,4,2               ; @LED_MODE_OFF
	.comm	_PHY_PHYSICAL_LINK_FLAG,4,2     ; @PHY_PHYSICAL_LINK_FLAG
	.comm	_MAC_TYPE_NONE,4,2              ; @MAC_TYPE_NONE
	.comm	_LINK_UPDATE_MASK,4,2           ; @LINK_UPDATE_MASK
	.comm	_NIG_REG_EGRESS_DRAIN0_MODE,8,3 ; @NIG_REG_EGRESS_DRAIN0_MODE
	.comm	_NIG_REG_NIG_EMAC0_EN,8,3       ; @NIG_REG_NIG_EMAC0_EN
	.comm	_MISC_REG_CPMU_LP_FW_ENABLE_P0,8,3 ; @MISC_REG_CPMU_LP_FW_ENABLE_P0
	.comm	_MISC_REG_CPMU_LP_MASK_ENT_P0,8,3 ; @MISC_REG_CPMU_LP_MASK_ENT_P0
	.comm	_SHMEM_EEE_LP_ADV_STATUS_MASK,4,2 ; @SHMEM_EEE_LP_ADV_STATUS_MASK
	.comm	_SHMEM_EEE_ACTIVE_BIT,4,2       ; @SHMEM_EEE_ACTIVE_BIT
	.no_dead_strip	_bnx2x_update_link_down
.subsections_via_symbols
