	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_prs_tcam_first_free
_mvpp2_prs_tcam_first_free:             ## @mvpp2_prs_tcam_first_free
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movzbl	%dl, %ebx
	cmpb	%dl, %r15b
	jbe	LBB0_2
## %bb.1:
	movzbl	%r15b, %edi
	movl	%ebx, %esi
	callq	_swap
LBB0_2:
	movq	_MVPP2_PRS_TCAM_SRAM_SIZE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	leal	-1(%rax), %ecx
	cmpb	%bl, %al
	movzbl	%cl, %eax
	cmoval	%ebx, %eax
	cmpb	%r15b, %al
	jb	LBB0_6
## %bb.3:
	movzbl	%al, %ecx
	movq	(%r14), %rdx
	movzbl	%r15b, %eax
	incq	%rcx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx,%rax,4)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_4
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVPP2_PRS_TCAM_SRAM_SIZE,1,0   ## @MVPP2_PRS_TCAM_SRAM_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mvpp2_prs_tcam_first_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_prs_tcam_first_free
_mvpp2_prs_tcam_first_free:             ; @mvpp2_prs_tcam_first_free
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	cmp	w1, w2
	b.ls	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_swap
LBB0_2:
Lloh0:
	adrp	x8, _MVPP2_PRS_TCAM_SRAM_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MVPP2_PRS_TCAM_SRAM_SIZE@GOTPAGEOFF]
	ldrb	w8, [x8]
	sub	w9, w8, #1
	cmp	w8, w21
	csel	w8, w21, w9, hi
	cmp	w19, w8, uxtb
	b.hi	LBB0_6
; %bb.3:
	and	x9, x8, #0xff
	ldr	x8, [x20]
	mov	w0, w19
	add	x9, x9, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8, x0, lsl #2]
	cbz	w10, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x0, #1
	cmp	x9, x0
	b.ne	LBB0_4
LBB0_6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MVPP2_PRS_TCAM_SRAM_SIZE,1,0   ; @MVPP2_PRS_TCAM_SRAM_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mvpp2_prs_tcam_first_free
.subsections_via_symbols
