	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_dsaf_add_mac_mc_port       ## -- Begin function hns_dsaf_add_mac_mc_port
	.p2align	4, 0x90
_hns_dsaf_add_mac_mc_port:              ## @hns_dsaf_add_mac_mc_port
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_hns_dsaf_dev_priv
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r15
	movq	_ETH_ALEN@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	12(%rbx), %edi
	callq	_MAC_IS_ALL_ZEROS
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	4(%r14), %edi
	movl	12(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_3:
	movl	12(%rbx), %esi
	movq	%r12, %rdi
	callq	_ether_addr_copy
	movl	8(%r14), %edi
	callq	_AE_IS_VER1
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_5:
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	(%rbx), %esi
	movl	12(%rbx), %ecx
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_hns_dsaf_setup_mc_mask
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_hns_dsaf_mc_mask_bit_clear
	leaq	-120(%rbp), %rsi
	movq	%r14, %rdi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	movl	$255, %ecx
	movq	%r13, %r8
	callq	_hns_dsaf_set_mac_key
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
LBB0_6:
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	leaq	-56(%rbp), %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %r8
	callq	_hns_dsaf_set_mac_key
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_hns_dsaf_find_soft_mac_entry
	movq	_DSAF_INVALID_ENTRY_IDX@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_hns_dsaf_find_empty_mac_entry
	movq	%rax, %r12
	cmpq	(%r13), %rax
	jne	LBB0_10
## %bb.8:
	movl	(%r14), %edx
	movl	4(%r14), %edi
	movl	-56(%rbp), %r8d
	movl	-52(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_2
LBB0_9:
	movq	%rax, %r12
	leaq	-72(%rbp), %rdx
	leaq	-112(%rbp), %rcx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_hns_dsaf_tcam_mc_get
LBB0_10:
	movl	8(%rbx), %ecx
	movq	_DSAF_SERVICE_NW_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jl	LBB0_13
## %bb.11:
	movq	_DSAF_BASE_INNER_PORT_NUM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %ecx
	jge	LBB0_12
## %bb.16:
	movl	(%r14), %edx
	movl	4(%r14), %edi
	movl	-56(%rbp), %r9d
	movl	-52(%rbp), %r8d
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_2
LBB0_12:
	addl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
LBB0_13:
	movq	-96(%rbp), %rax
	leal	31(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	movl	%edx, %esi
	sarl	$5, %esi
	movslq	%esi, %rsi
	movl	(%rax,%rsi,4), %edi
	andl	$-32, %edx
	subl	%edx, %ecx
	movl	%ecx, %esi
	movl	$1, %edx
	callq	_dsaf_set_bit
	movq	$0, -104(%rbp)
	movl	$1, -112(%rbp)
	movl	(%r14), %edx
	movl	4(%r14), %edi
	movl	-56(%rbp), %r8d
	movl	-52(%rbp), %ecx
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %r9
	callq	_dev_dbg
	movq	-56(%rbp), %rax
	movq	%rax, -72(%rbp)
	leaq	-72(%rbp), %rdx
	leaq	-112(%rbp), %r8
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_hns_dsaf_tcam_mc_cfg
	movq	%r12, %rax
	shlq	$4, %rax
	movq	%r12, 8(%r15,%rax)
	movl	-52(%rbp), %ecx
	movl	%ecx, 4(%r15,%rax)
	movl	-56(%rbp), %ecx
	movl	%ecx, (%r15,%rax)
	xorl	%ebx, %ebx
LBB0_14:
	movq	-88(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.15:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ## @DSAF_INVALID_ENTRY_IDX
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_entry failed,addr %pM!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"set_uc_entry failed, %s Mac key(%#x:%#x)\n"

	.comm	_DSAF_SERVICE_NW_NUM,4,2        ## @DSAF_SERVICE_NW_NUM
	.comm	_DSAF_BASE_INNER_PORT_NUM,4,2   ## @DSAF_BASE_INNER_PORT_NUM
L_.str.2:                               ## @.str.2
	.asciz	"%s,pnum(%d)error,key(%#x:%#x)\n"

L_.str.3:                               ## @.str.3
	.asciz	"set_uc_entry, %s Mac key(%#x:%#x) entry_index%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_dsaf_add_mac_mc_port       ; -- Begin function hns_dsaf_add_mac_mc_port
	.p2align	2
_hns_dsaf_add_mac_mc_port:              ; @hns_dsaf_add_mac_mc_port
	.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
	sub	sp, sp, #64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_hns_dsaf_dev_priv
	mov	x24, sp
	ldr	x25, [x0]
Lloh3:
	adrp	x21, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w0, [x20, #12]
	bl	_MAC_IS_ALL_ZEROS
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #4]
	ldr	w2, [x20, #12]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_3:
	ldr	w1, [x20, #12]
	mov	x0, x22
	bl	_ether_addr_copy
	ldr	w0, [x19, #8]
	bl	_AE_IS_VER1
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, #0
	b	LBB0_6
LBB0_5:
	mov	x26, sp
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh12:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh13:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	ldr	w1, [x20]
	ldr	w3, [x20, #12]
	mov	x0, x19
	mov	x2, x23
	bl	_hns_dsaf_setup_mc_mask
	mov	x0, x22
	mov	x1, x23
	bl	_hns_dsaf_mc_mask_bit_clear
	sub	x21, x29, #88
	sub	x1, x29, #88
	mov	x0, x19
	mov	w2, #0
	mov	w3, #255
	mov	x4, x23
	bl	_hns_dsaf_set_mac_key
	mov	sp, x26
LBB0_6:
	ldp	w3, w2, [x20]
	sub	x1, x29, #80
	mov	x0, x19
	mov	x4, x22
	bl	_hns_dsaf_set_mac_key
	sub	x0, x29, #112
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	sub	x1, x29, #80
	mov	x0, x19
	bl	_hns_dsaf_find_soft_mac_entry
Lloh14:
	adrp	x23, _DSAF_INVALID_ENTRY_IDX@GOTPAGE
Lloh15:
	ldr	x23, [x23, _DSAF_INVALID_ENTRY_IDX@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_hns_dsaf_find_empty_mac_entry
	mov	x22, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.8:
	ldp	w2, w0, [x19]
	ldp	w9, w8, [x29, #-80]
	stp	x8, x9, [sp, #-16]!
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	add	sp, sp, #16
	b	LBB0_2
LBB0_9:
	mov	x22, x0
	sub	x2, x29, #120
	sub	x3, x29, #112
	mov	x0, x19
	mov	x1, x22
	bl	_hns_dsaf_tcam_mc_get
LBB0_10:
	ldr	w8, [x20, #8]
Lloh18:
	adrp	x9, _DSAF_SERVICE_NW_NUM@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DSAF_SERVICE_NW_NUM@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_14
; %bb.11:
Lloh21:
	adrp	x10, _DSAF_BASE_INNER_PORT_NUM@GOTPAGE
Lloh22:
	ldr	x10, [x10, _DSAF_BASE_INNER_PORT_NUM@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	cmp	w8, w10
	b.ge	LBB0_13
; %bb.12:
	ldp	w2, w0, [x19]
	ldp	w10, w9, [x29, #-80]
	sub	sp, sp, #32
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	add	sp, sp, #32
	b	LBB0_2
LBB0_13:
	add	w8, w9, w8
	sub	w8, w8, w10
LBB0_14:
	ldur	x9, [x29, #-96]
	add	w10, w8, #31
	cmp	w8, #0
	csel	w10, w10, w8, lt
	asr	w11, w10, #5
	ldr	w0, [x9, w11, sxtw #2]
	and	w9, w10, #0xffffffe0
	sub	w1, w8, w9
	mov	w20, #1
	mov	w2, #1
	bl	_dsaf_set_bit
	stur	xzr, [x29, #-104]
	stur	w20, [x29, #-112]
	ldp	w2, w0, [x19]
	ldp	w4, w3, [x29, #-80]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x5, x22
	bl	_dev_dbg
	ldur	d0, [x29, #-80]
	stur	d0, [x29, #-120]
	sub	x2, x29, #120
	sub	x4, x29, #112
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	bl	_hns_dsaf_tcam_mc_cfg
	mov	w0, #0
	add	x8, x25, x22, lsl #4
	str	x22, [x8, #8]
	ldur	d0, [x29, #-80]
	str	d0, [x8]
LBB0_15:
	mov	sp, x24
	ldur	x8, [x29, #-72]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	sub	sp, x29, #64
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ; @DSAF_INVALID_ENTRY_IDX
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_entry failed,addr %pM!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"set_uc_entry failed, %s Mac key(%#x:%#x)\n"

	.comm	_DSAF_SERVICE_NW_NUM,4,2        ; @DSAF_SERVICE_NW_NUM
	.comm	_DSAF_BASE_INNER_PORT_NUM,4,2   ; @DSAF_BASE_INNER_PORT_NUM
l_.str.2:                               ; @.str.2
	.asciz	"%s,pnum(%d)error,key(%#x:%#x)\n"

l_.str.3:                               ; @.str.3
	.asciz	"set_uc_entry, %s Mac key(%#x:%#x) entry_index%d\n"

.subsections_via_symbols
