	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_mdb_add
_mlxsw_sp_port_mdb_add:                 ## @mlxsw_sp_port_mdb_add
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	8(%rdi), %r14
	movq	16(%rdi), %r15
	movq	8(%rsi), %rbx
	movq	%rdx, %rdi
	callq	_switchdev_trans_ph_commit
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_bridge_port_find
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %rbx
	movq	8(%rax), %r14
	movl	4(%r12), %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mlxsw_sp_port_vlan_find_by_bridge
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movl	(%rax), %edi
	callq	_mlxsw_sp_fid_index
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %edx
	callq	___mlxsw_sp_mc_get
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	___mlxsw_sp_mc_alloc
	testq	%rax, %rax
	je	LBB0_13
LBB0_6:
	movl	(%r13), %edi
	movq	%rax, %r15
	movl	4(%rax), %esi
	callq	_set_bit
	cmpl	$0, (%r14)
	je	LBB0_10
## %bb.7:
	cmpq	$0, (%rbx)
	movl	$0, %ecx
	jne	LBB0_1
## %bb.8:
	movq	%r15, %r14
	movl	(%r15), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_mlxsw_sp_port_smid_set
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_1
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mlxsw_sp_port_remove_from_mid
	movl	%ebx, %ecx
	jmp	LBB0_1
LBB0_10:
	xorl	%ecx, %ecx
LBB0_1:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to allocate MC group\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Unable to set SMID\n"

	.no_dead_strip	_mlxsw_sp_port_mdb_add
.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_mdb_add
_mlxsw_sp_port_mdb_add:                 ; @mlxsw_sp_port_mdb_add
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x19, x0
	ldr	x21, [x1, #8]
	ldp	x20, x23, [x0, #8]
	mov	x0, x2
	bl	_switchdev_trans_ph_commit
	cbz	x0, LBB0_3
LBB0_1:
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w0, [x23]
	mov	x1, x21
	bl	_mlxsw_sp_bridge_port_find
	mov	x21, x0
	cbz	x0, LBB0_2
; %bb.4:
	ldr	x24, [x21, #8]
	ldr	w2, [x22, #4]
	mov	x0, x19
	mov	x1, x24
	bl	_mlxsw_sp_port_vlan_find_by_bridge
	cbz	x0, LBB0_1
; %bb.5:
	ldr	w0, [x0]
	bl	_mlxsw_sp_fid_index
	mov	x26, x0
	ldr	w1, [x22]
	mov	x0, x24
	mov	x2, x26
	bl	___mlxsw_sp_mc_get
	mov	x25, x0
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w2, [x22]
	mov	x0, x23
	mov	x1, x24
	mov	x3, x26
	bl	___mlxsw_sp_mc_alloc
	mov	x25, x0
	cbz	x0, LBB0_11
LBB0_7:
	ldr	w0, [x19]
	ldr	w1, [x25, #4]
	bl	_set_bit
	ldr	w8, [x24]
	cbz	w8, LBB0_1
; %bb.8:
	ldr	x8, [x21]
	cbnz	x8, LBB0_1
; %bb.9:
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #1
	bl	_mlxsw_sp_port_smid_set
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.10:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	mov	x0, x19
	mov	x1, x25
	bl	_mlxsw_sp_port_remove_from_mid
	b	LBB0_2
LBB0_11:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to allocate MC group\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Unable to set SMID\n"

	.no_dead_strip	_mlxsw_sp_port_mdb_add
.subsections_via_symbols
