	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_dsaf_find_empty_mac_entry_reverse
_hns_dsaf_find_empty_mac_entry_reverse: ## @hns_dsaf_find_empty_mac_entry_reverse
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_hns_dsaf_dev_priv
	movq	_DSAF_TCAM_SUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$1, %ecx
	jle	LBB0_5
## %bb.1:
	leal	-1(%rcx), %edx
	shlq	$3, %rdx
	addq	(%rax), %rdx
	movq	_DSAF_INVALID_ENTRY_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rdx)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$-8, %rdx
	decl	%ecx
	cmpl	$1, %ecx
	jg	LBB0_2
## %bb.4:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_5:
	movq	_DSAF_INVALID_ENTRY_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_6:
	decl	%ecx
	movl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_TCAM_SUM,4,2              ## @DSAF_TCAM_SUM
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ## @DSAF_INVALID_ENTRY_IDX
	.no_dead_strip	_hns_dsaf_find_empty_mac_entry_reverse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_dsaf_find_empty_mac_entry_reverse
_hns_dsaf_find_empty_mac_entry_reverse: ; @hns_dsaf_find_empty_mac_entry_reverse
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_hns_dsaf_dev_priv
Lloh0:
	adrp	x8, _DSAF_TCAM_SUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSAF_TCAM_SUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	subs	w9, w8, #1
	b.le	LBB0_5
; %bb.1:
	ldr	x10, [x0]
	add	x9, x10, w9, uxtw #3
Lloh3:
	adrp	x10, _DSAF_INVALID_ENTRY_IDX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DSAF_INVALID_ENTRY_IDX@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x10]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cmp	x10, x0
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x9, x9, #8
	sub	w8, w8, #1
	cmp	w8, #1
	b.gt	LBB0_2
; %bb.4:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh6:
	adrp	x8, _DSAF_INVALID_ENTRY_IDX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DSAF_INVALID_ENTRY_IDX@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
	sub	w0, w8, #1
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_TCAM_SUM,4,2              ; @DSAF_TCAM_SUM
	.comm	_DSAF_INVALID_ENTRY_IDX,8,3     ; @DSAF_INVALID_ENTRY_IDX
	.no_dead_strip	_hns_dsaf_find_empty_mac_entry_reverse
.subsections_via_symbols
