	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_dsaf_set_mac_uc_entry      ## -- Begin function hns_dsaf_set_mac_uc_entry
	.p2align	4, 0x90
_hns_dsaf_set_mac_uc_entry:             ## @hns_dsaf_set_mac_uc_entry
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_hns_dsaf_dev_priv
	movq	(%rax), %r12
	movl	4(%r14), %edi
	callq	_MAC_IS_ALL_ZEROS
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movl	4(%r14), %edi
	callq	_MAC_IS_BROADCAST
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movl	4(%r14), %edi
	callq	_MAC_IS_MULTICAST
	testq	%rax, %rax
	je	LBB0_5
LBB0_3:
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	12(%r14), %edx
	movl	4(%r14), %r8d
	movl	8(%r14), %ecx
	leaq	-48(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_dsaf_set_mac_key
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_dsaf_find_soft_mac_entry
	movq	%rax, %r15
	movq	_DSAF_INVALID_ENTRY_IDX@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_hns_dsaf_find_empty_mac_entry
	movq	%rax, %r15
	cmpq	(%r13), %rax
	jne	LBB0_8
## %bb.7:
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	movl	-48(%rbp), %r8d
	movl	-44(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
LBB0_8:
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	movl	-48(%rbp), %r8d
	movl	-44(%rbp), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %r9
	callq	_dev_dbg
	movl	$1, -88(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	movl	(%r14), %eax
	movl	%eax, -84(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -56(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns_dsaf_tcam_uc_cfg
	movq	%r15, %rax
	shlq	$4, %rax
	movq	%r15, 8(%r12,%rax)
	movl	-44(%rbp), %ecx
	movl	%ecx, 4(%r12,%rax)
	movl	-48(%rbp), %ecx
	movl	%ecx, (%r12,%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ## @DSAF_INVALID_ENTRY_IDX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_uc %s Mac %pM err!\n"

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

L_.str.2:                               ## @.str.2
	.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_set_mac_uc_entry      ; -- Begin function hns_dsaf_set_mac_uc_entry
	.p2align	2
_hns_dsaf_set_mac_uc_entry:             ; @hns_dsaf_set_mac_uc_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
	mov	x19, x0
	bl	_hns_dsaf_dev_priv
	ldr	x22, [x0]
	ldr	w0, [x20, #4]
	bl	_MAC_IS_ALL_ZEROS
	cbnz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x20, #4]
	bl	_MAC_IS_BROADCAST
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x20, #4]
	bl	_MAC_IS_MULTICAST
	cbz	x0, LBB0_6
LBB0_3:
	ldp	w2, w0, [x19]
	ldr	w3, [x20, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	ldp	w3, w2, [x20, #8]
	ldr	w4, [x20, #4]
	add	x1, sp, #56
	mov	x0, x19
	bl	_hns_dsaf_set_mac_key
	add	x1, sp, #56
	mov	x0, x19
	bl	_hns_dsaf_find_soft_mac_entry
	mov	x21, x0
Lloh5:
	adrp	x23, _DSAF_INVALID_ENTRY_IDX@GOTPAGE
Lloh6:
	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	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	w2, w0, [x19]
	ldp	w8, w3, [sp, #56]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_9:
	ldp	w2, w0, [x19]
	ldp	w4, w3, [sp, #56]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x5, x21
	bl	_dev_dbg
	mov	w8, #1
	stp	xzr, xzr, [sp, #40]
	str	xzr, [sp, #32]
	ldr	w9, [x20]
	stp	w8, w9, [sp, #24]
	ldr	d0, [sp, #56]
	str	d0, [sp, #16]
	add	x2, sp, #16
	add	x3, sp, #24
	mov	x0, x19
	mov	x1, x21
	bl	_hns_dsaf_tcam_uc_cfg
	mov	w0, #0
	add	x8, x22, x21, lsl #4
	str	x21, [x8, #8]
	ldr	d0, [sp, #56]
	str	d0, [x8]
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ; @DSAF_INVALID_ENTRY_IDX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_uc %s Mac %pM err!\n"

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

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

.subsections_via_symbols
