	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_stp_set
_mlxsw_sp_port_stp_set:                 ## @mlxsw_sp_port_stp_set
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_MLXSW_REG_SPMS_STATE_DISCARDING@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MLXSW_REG_SPMS_STATE_FORWARDING@GOTPCREL(%rip), %rax
LBB0_3:
	movq	8(%r15), %r13
	movl	(%rax), %r14d
	movq	_MLXSW_REG_SPMS_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r12
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_mlxsw_reg_spms_pack
	movq	_VLAN_N_VID@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_mlxsw_reg_spms_vid_pack
	incq	%rbx
	cmpq	(%r15), %rbx
	jl	LBB0_8
LBB0_9:
	movl	(%r13), %ebx
	movq	_spms@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_mlxsw_reg_write
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_kfree
	movl	%ebx, %eax
	jmp	LBB0_5
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_SPMS_STATE_FORWARDING,4,2 ## @MLXSW_REG_SPMS_STATE_FORWARDING
	.comm	_MLXSW_REG_SPMS_STATE_DISCARDING,4,2 ## @MLXSW_REG_SPMS_STATE_DISCARDING
	.comm	_MLXSW_REG_SPMS_LEN,4,2         ## @MLXSW_REG_SPMS_LEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VLAN_N_VID,8,3                 ## @VLAN_N_VID
	.comm	_spms,4,2                       ## @spms
	.no_dead_strip	_mlxsw_sp_port_stp_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_port_stp_set
_mlxsw_sp_port_stp_set:                 ; @mlxsw_sp_port_stp_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
Lloh0:
	adrp	x8, _MLXSW_REG_SPMS_STATE_FORWARDING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLXSW_REG_SPMS_STATE_FORWARDING@GOTPAGEOFF]
	ldr	x22, [x0, #8]
Lloh2:
	adrp	x9, _MLXSW_REG_SPMS_STATE_DISCARDING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLXSW_REG_SPMS_STATE_DISCARDING@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w20, [x8]
Lloh4:
	adrp	x8, _MLXSW_REG_SPMS_LEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MLXSW_REG_SPMS_LEN@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w1, [x21]
	bl	_mlxsw_reg_spms_pack
Lloh10:
	adrp	x23, _VLAN_N_VID@GOTPAGE
Lloh11:
	ldr	x23, [x23, _VLAN_N_VID@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_mlxsw_reg_spms_vid_pack
	add	x21, x21, #1
	ldr	x8, [x23]
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_4:
	ldr	w20, [x22]
Lloh12:
	adrp	x8, _spms@GOTPAGE
Lloh13:
	ldr	x8, [x8, _spms@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x20
	mov	x2, x19
	bl	_mlxsw_reg_write
	mov	x20, x0
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_SPMS_STATE_FORWARDING,4,2 ; @MLXSW_REG_SPMS_STATE_FORWARDING
	.comm	_MLXSW_REG_SPMS_STATE_DISCARDING,4,2 ; @MLXSW_REG_SPMS_STATE_DISCARDING
	.comm	_MLXSW_REG_SPMS_LEN,4,2         ; @MLXSW_REG_SPMS_LEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VLAN_N_VID,8,3                 ; @VLAN_N_VID
	.comm	_spms,4,2                       ; @spms
	.no_dead_strip	_mlxsw_sp_port_stp_set
.subsections_via_symbols
