	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_handle_update_svid_cmd
_bnx2x_handle_update_svid_cmd:          ## @bnx2x_handle_update_svid_cmd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	4(%rbx), %rax
	movq	%rax, -32(%rbp)
	movq	_BNX2X_F_CMD_SWITCH_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_RAMROD_COMP_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	___set_bit
	movq	_RAMROD_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	___set_bit
	movq	%rbx, %rdi
	callq	_IS_MF_UFP
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_IS_MF_BD
	testq	%rax, %rax
	je	LBB0_7
LBB0_2:
	movq	%rbx, %rdi
	callq	_BP_ABS_FUNC
	movq	_func_mf_config@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	(%rcx,%rax,4), %esi
	movq	%rbx, %rdi
	callq	_MF_CFG_RD
	movq	_FUNC_MF_CFG_E1HOV_TAG_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_FUNC_MF_CFG_E1HOV_TAG_DEFAULT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.6:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_BNX2X_ERR
	jmp	LBB0_7
LBB0_3:
	movl	%eax, (%rbx)
	movq	_NIG_REG_LLH0_FUNC_VLAN_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_BP_PORT
	shll	$3, %eax
	movslq	%eax, %rsi
	addq	%r14, %rsi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_REG_WR
	movq	_BNX2X_F_UPDATE_SD_VLAN_TAG_CHNG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-20(%rbp), %rsi
	callq	___set_bit
	movl	(%rbx), %eax
	movl	%eax, -24(%rbp)
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_bnx2x_func_state_change
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	_BNX2X_MSG_MCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_DP
	movq	_DRV_MSG_CODE_OEM_UPDATE_SVID_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_BNX2X_ERR
LBB0_7:
	movq	_DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bnx2x_fw_command
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2X_F_CMD_SWITCH_UPDATE,4,2  ## @BNX2X_F_CMD_SWITCH_UPDATE
	.comm	_RAMROD_COMP_WAIT,4,2           ## @RAMROD_COMP_WAIT
	.comm	_RAMROD_RETRY,4,2               ## @RAMROD_RETRY
	.comm	_func_mf_config,8,3             ## @func_mf_config
	.comm	_FUNC_MF_CFG_E1HOV_TAG_MASK,4,2 ## @FUNC_MF_CFG_E1HOV_TAG_MASK
	.comm	_FUNC_MF_CFG_E1HOV_TAG_DEFAULT,4,2 ## @FUNC_MF_CFG_E1HOV_TAG_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got an SVID event, but no tag is configured in shmem\n"

	.comm	_NIG_REG_LLH0_FUNC_VLAN_ID,8,3  ## @NIG_REG_LLH0_FUNC_VLAN_ID
	.comm	_BNX2X_F_UPDATE_SD_VLAN_TAG_CHNG,4,2 ## @BNX2X_F_UPDATE_SD_VLAN_TAG_CHNG
L_.str.1:                               ## @.str.1
	.asciz	"Failed to configure FW of S-tag Change to %02x\n"

	.comm	_BNX2X_MSG_MCP,4,2              ## @BNX2X_MSG_MCP
L_.str.2:                               ## @.str.2
	.asciz	"Configured S-tag %02x\n"

	.comm	_DRV_MSG_CODE_OEM_UPDATE_SVID_OK,4,2 ## @DRV_MSG_CODE_OEM_UPDATE_SVID_OK
	.comm	_DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE,4,2 ## @DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE
	.no_dead_strip	_bnx2x_handle_update_svid_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_handle_update_svid_cmd
_bnx2x_handle_update_svid_cmd:          ; @bnx2x_handle_update_svid_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	add	x8, x19, #4
Lloh0:
	adrp	x9, _BNX2X_F_CMD_SWITCH_UPDATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BNX2X_F_CMD_SWITCH_UPDATE@GOTPAGEOFF]
	str	x8, [sp, #16]
Lloh2:
	ldr	w8, [x9]
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _RAMROD_COMP_WAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RAMROD_COMP_WAIT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	___set_bit
Lloh6:
	adrp	x8, _RAMROD_RETRY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RAMROD_RETRY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	___set_bit
	mov	x0, x19
	bl	_IS_MF_UFP
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_IS_MF_BD
	cbz	x0, LBB0_8
LBB0_2:
	mov	x0, x19
	bl	_BP_ABS_FUNC
Lloh9:
	adrp	x8, _func_mf_config@GOTPAGE
Lloh10:
	ldr	x8, [x8, _func_mf_config@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w1, [x8, w0, sxtw #2]
	mov	x0, x19
	bl	_MF_CFG_RD
Lloh12:
	adrp	x8, _FUNC_MF_CFG_E1HOV_TAG_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FUNC_MF_CFG_E1HOV_TAG_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh15:
	adrp	x9, _FUNC_MF_CFG_E1HOV_TAG_DEFAULT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FUNC_MF_CFG_E1HOV_TAG_DEFAULT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_4:
	str	w8, [x19]
Lloh20:
	adrp	x8, _NIG_REG_LLH0_FUNC_VLAN_ID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NIG_REG_LLH0_FUNC_VLAN_ID@GOTPAGEOFF]
Lloh22:
	ldr	x20, [x8]
	mov	x0, x19
	bl	_BP_PORT
	lsl	w8, w0, #3
	add	x1, x20, w8, sxtw
	ldr	w2, [x19]
	mov	x0, x19
	bl	_REG_WR
Lloh23:
	adrp	x8, _BNX2X_F_UPDATE_SD_VLAN_TAG_CHNG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BNX2X_F_UPDATE_SD_VLAN_TAG_CHNG@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	add	x8, sp, #8
	add	x1, x8, #20
	bl	___set_bit
	ldr	w8, [x19]
	str	w8, [sp, #24]
	add	x1, sp, #8
	mov	x0, x19
	bl	_bnx2x_func_state_change
	tbnz	x0, #63, LBB0_6
; %bb.5:
Lloh26:
	adrp	x8, _BNX2X_MSG_MCP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BNX2X_MSG_MCP@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DP
Lloh31:
	adrp	x8, _DRV_MSG_CODE_OEM_UPDATE_SVID_OK@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DRV_MSG_CODE_OEM_UPDATE_SVID_OK@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_BNX2X_ERR
LBB0_8:
Lloh35:
	adrp	x8, _DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bnx2x_fw_command
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2X_F_CMD_SWITCH_UPDATE,4,2  ; @BNX2X_F_CMD_SWITCH_UPDATE
	.comm	_RAMROD_COMP_WAIT,4,2           ; @RAMROD_COMP_WAIT
	.comm	_RAMROD_RETRY,4,2               ; @RAMROD_RETRY
	.comm	_func_mf_config,8,3             ; @func_mf_config
	.comm	_FUNC_MF_CFG_E1HOV_TAG_MASK,4,2 ; @FUNC_MF_CFG_E1HOV_TAG_MASK
	.comm	_FUNC_MF_CFG_E1HOV_TAG_DEFAULT,4,2 ; @FUNC_MF_CFG_E1HOV_TAG_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got an SVID event, but no tag is configured in shmem\n"

	.comm	_NIG_REG_LLH0_FUNC_VLAN_ID,8,3  ; @NIG_REG_LLH0_FUNC_VLAN_ID
	.comm	_BNX2X_F_UPDATE_SD_VLAN_TAG_CHNG,4,2 ; @BNX2X_F_UPDATE_SD_VLAN_TAG_CHNG
l_.str.1:                               ; @.str.1
	.asciz	"Failed to configure FW of S-tag Change to %02x\n"

	.comm	_BNX2X_MSG_MCP,4,2              ; @BNX2X_MSG_MCP
l_.str.2:                               ; @.str.2
	.asciz	"Configured S-tag %02x\n"

	.comm	_DRV_MSG_CODE_OEM_UPDATE_SVID_OK,4,2 ; @DRV_MSG_CODE_OEM_UPDATE_SVID_OK
	.comm	_DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE,4,2 ; @DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE
	.no_dead_strip	_bnx2x_handle_update_svid_cmd
.subsections_via_symbols
