	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_prs_flow_find
_mvpp2_prs_flow_find:                   ## @mvpp2_prs_flow_find
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_MVPP2_PRS_TCAM_SRAM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	jle	LBB0_6
## %bb.1:
	movq	%rdi, %r15
	movq	_MVPP2_PRS_LU_FLOWS@GOTPCREL(%rip), %r14
	leaq	-48(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rax
	incq	%rax
	movq	%rbx, %r13
	cmpq	$1, %rax
	jbe	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%r13), %rbx
	movq	(%r15), %rax
	movl	%ebx, %ecx
	shlq	$4, %rcx
	cmpl	$0, 8(%rax,%rcx)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax,%rcx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_mvpp2_prs_init_from_hw
	movq	%r12, %rdi
	callq	_mvpp2_prs_sram_ai_get
	movq	_MVPP2_PRS_FLOW_ID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_5
## %bb.7:
	decl	%r13d
	jmp	LBB0_8
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_8:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVPP2_PRS_TCAM_SRAM_SIZE,4,2   ## @MVPP2_PRS_TCAM_SRAM_SIZE
	.comm	_MVPP2_PRS_LU_FLOWS,8,3         ## @MVPP2_PRS_LU_FLOWS
	.comm	_MVPP2_PRS_FLOW_ID_MASK,4,2     ## @MVPP2_PRS_FLOW_ID_MASK
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_mvpp2_prs_flow_find
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_prs_flow_find
_mvpp2_prs_flow_find:                   ; @mvpp2_prs_flow_find
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x8, _MVPP2_PRS_TCAM_SRAM_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MVPP2_PRS_TCAM_SRAM_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	cmp	w22, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh3:
	adrp	x23, _MVPP2_PRS_LU_FLOWS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MVPP2_PRS_LU_FLOWS@GOTPAGEOFF]
Lloh5:
	adrp	x24, _MVPP2_PRS_FLOW_ID_MASK@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MVPP2_PRS_FLOW_ID_MASK@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x21, #1
	mov	x22, x21
	cmp	x8, #1
	b.ls	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	x21, x22, #1
	ldr	x8, [x20]
	add	x9, x8, w21, uxtw #4
	ldr	w9, [x9, #8]
	cbz	w9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	and	x9, x21, #0xffffffff
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x21
	bl	_mvpp2_prs_init_from_hw
	add	x0, sp, #8
	bl	_mvpp2_prs_sram_ai_get
	ldr	w8, [x24]
	and	w8, w8, w0
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.6:
	sub	w0, w22, #1
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MVPP2_PRS_TCAM_SRAM_SIZE,4,2   ; @MVPP2_PRS_TCAM_SRAM_SIZE
	.comm	_MVPP2_PRS_LU_FLOWS,8,3         ; @MVPP2_PRS_LU_FLOWS
	.comm	_MVPP2_PRS_FLOW_ID_MASK,4,2     ; @MVPP2_PRS_FLOW_ID_MASK
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_mvpp2_prs_flow_find
.subsections_via_symbols
