	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_lag_join
_mlxsw_sp_port_lag_join:                ## @mlxsw_sp_port_lag_join
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	24(%rdi), %r12
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_mlxsw_sp_lag_index_get
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_mlxsw_sp_lag_get
	movq	%rax, %r15
	cmpl	$0, (%rax)
	je	LBB0_2
LBB0_4:
	movl	-44(%rbp), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_mlxsw_sp_port_lag_index_get
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movl	-44(%rbp), %esi
	movl	-48(%rbp), %edx
	movq	%r14, %rdi
	callq	_mlxsw_sp_lag_col_port_add
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movl	%eax, %ebx
	cmpl	$0, (%r15)
	jne	LBB0_10
## %bb.9:
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_mlxsw_sp_lag_destroy
	jmp	LBB0_10
LBB0_2:
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_mlxsw_sp_lag_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	%r13, 8(%r15)
	jmp	LBB0_4
LBB0_6:
	movl	(%r12), %edi
	movl	-44(%rbp), %esi
	movl	-48(%rbp), %edx
	movl	20(%r14), %ecx
	callq	_mlxsw_core_lag_mapping_set
	movl	-44(%rbp), %eax
	movl	%eax, 16(%r14)
	movl	$1, (%r14)
	incl	(%r15)
	movq	8(%r14), %rdi
	xorl	%ebx, %ebx
	cmpq	$0, (%rdi)
	je	LBB0_10
## %bb.7:
	callq	_mlxsw_sp_port_vlan_router_leave
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mlxsw_sp_port_lag_join
.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_lag_join
_mlxsw_sp_port_lag_join:                ; @mlxsw_sp_port_lag_join
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #24]
	add	x2, sp, #12
	mov	x0, x20
	bl	_mlxsw_sp_lag_index_get
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_mlxsw_sp_lag_get
	mov	x21, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_6
LBB0_2:
	ldr	w1, [sp, #12]
	add	x2, sp, #8
	mov	x0, x20
	bl	_mlxsw_sp_port_lag_index_get
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.3:
	ldp	w2, w1, [sp, #8]
	mov	x0, x19
	bl	_mlxsw_sp_lag_col_port_add
	cbz	w0, LBB0_8
; %bb.4:
	mov	x23, x0
	ldr	w8, [x21]
	cbnz	w8, LBB0_11
; %bb.5:
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_mlxsw_sp_lag_destroy
	b	LBB0_11
LBB0_6:
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_mlxsw_sp_lag_create
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.7:
	str	x22, [x21, #8]
	b	LBB0_2
LBB0_8:
	ldr	w0, [x20]
	ldp	w2, w1, [sp, #8]
	ldr	w3, [x19, #20]
	bl	_mlxsw_core_lag_mapping_set
	ldr	w8, [sp, #12]
	str	w8, [x19, #16]
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_10
; %bb.9:
	bl	_mlxsw_sp_port_vlan_router_leave
LBB0_10:
	mov	w23, #0
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mlxsw_sp_port_lag_join
.subsections_via_symbols
