	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_dsaf_rm_mac_addr           ## -- Begin function hns_dsaf_rm_mac_addr
	.p2align	4, 0x90
_hns_dsaf_rm_mac_addr:                  ## @hns_dsaf_rm_mac_addr
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rsi), %edi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	16(%rbx), %edx
	movl	8(%rbx), %r8d
	movl	12(%rbx), %ecx
	leaq	-32(%rbp), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_hns_dsaf_set_mac_key
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_hns_dsaf_find_soft_mac_entry
	movq	%rax, %r15
	movq	_DSAF_INVALID_ENTRY_IDX@GOTPCREL(%rip), %rax
	movl	(%r14), %edx
	movl	4(%r14), %edi
	movl	-32(%rbp), %r8d
	movl	-28(%rbp), %ecx
	cmpq	(%rax), %r15
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	movl	(%r14), %edx
	movl	4(%r14), %edi
	movl	8(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %r9
	callq	_dev_dbg
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_hns_dsaf_tcam_uc_get
	movq	(%rbx), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.7:
	movl	16(%rbx), %esi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movq	%r14, %rdi
	callq	_hns_dsaf_del_mac_entry
	jmp	LBB0_8
LBB0_5:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ## @DSAF_INVALID_ENTRY_IDX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rm_uc_addr %s Mac %pM err!\n"

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

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

	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_dsaf_rm_mac_addr           ; -- Begin function hns_dsaf_rm_mac_addr
	.p2align	2
_hns_dsaf_rm_mac_addr:                  ; @hns_dsaf_rm_mac_addr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #8]
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_3
; %bb.1:
	ldp	w3, w2, [x20, #12]
	ldr	w4, [x20, #8]
	mov	x1, sp
	mov	x0, x19
	bl	_hns_dsaf_set_mac_key
	mov	x1, sp
	mov	x0, x19
	bl	_hns_dsaf_find_soft_mac_entry
	mov	x21, x0
Lloh0:
	adrp	x8, _DSAF_INVALID_ENTRY_IDX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSAF_INVALID_ENTRY_IDX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldp	w2, w0, [x19]
	ldp	w4, w3, [sp]
	cmp	x21, x8
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	mov	w0, #0
	b	LBB0_8
LBB0_3:
	ldp	w2, w0, [x19]
	ldr	w3, [x20, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x5, x21
	bl	_dev_dbg
	mov	x2, sp
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_hns_dsaf_tcam_uc_get
	ldr	x8, [x20]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldp	w2, w1, [x20, #12]
	ldr	w3, [x20, #8]
	mov	x0, x19
	bl	_hns_dsaf_del_mac_entry
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x8, _EFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ; @DSAF_INVALID_ENTRY_IDX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rm_uc_addr %s Mac %pM err!\n"

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

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

	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
