	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mvpp2_prs_init_from_hw         ## -- Begin function mvpp2_prs_init_from_hw
	.p2align	4, 0x90
_mvpp2_prs_init_from_hw:                ## @mvpp2_prs_init_from_hw
	.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
	movq	_MVPP2_PRS_TCAM_SRAM_SIZE@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jle	LBB0_1
## %bb.2:
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	%ebx, (%r12)
	movq	_MVPP2_PRS_TCAM_IDX_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_mvpp2_write
	movq	_MVPP2_PRS_TCAM_INV_WORD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_MVPP2_PRS_TCAM_DATA_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mvpp2_read
	movq	8(%r12), %rcx
	movq	(%rbx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	_MVPP2_PRS_TCAM_INV_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.11:
	movq	_MVPP2_PRS_TCAM_ENTRY_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_MVPP2_PRS_TCAM_WORDS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_MVPP2_PRS_TCAM_DATA_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mvpp2_read
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	_MVPP2_PRS_SRAM_IDX_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_mvpp2_write
	movq	_MVPP2_PRS_SRAM_WORDS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.8:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_MVPP2_PRS_SRAM_DATA_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mvpp2_read
	movq	16(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
	jmp	LBB0_10
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MVPP2_PRS_TCAM_SRAM_SIZE,4,2   ## @MVPP2_PRS_TCAM_SRAM_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MVPP2_PRS_TCAM_IDX_REG,4,2     ## @MVPP2_PRS_TCAM_IDX_REG
	.comm	_MVPP2_PRS_TCAM_INV_WORD,8,3    ## @MVPP2_PRS_TCAM_INV_WORD
	.comm	_MVPP2_PRS_TCAM_INV_MASK,4,2    ## @MVPP2_PRS_TCAM_INV_MASK
	.comm	_MVPP2_PRS_TCAM_ENTRY_INVALID,4,2 ## @MVPP2_PRS_TCAM_ENTRY_INVALID
	.comm	_MVPP2_PRS_TCAM_WORDS,4,2       ## @MVPP2_PRS_TCAM_WORDS
	.comm	_MVPP2_PRS_SRAM_IDX_REG,4,2     ## @MVPP2_PRS_SRAM_IDX_REG
	.comm	_MVPP2_PRS_SRAM_WORDS,4,2       ## @MVPP2_PRS_SRAM_WORDS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mvpp2_prs_init_from_hw         ; -- Begin function mvpp2_prs_init_from_hw
	.p2align	2
_mvpp2_prs_init_from_hw:                ; @mvpp2_prs_init_from_hw
	.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
Lloh0:
	adrp	x8, _MVPP2_PRS_TCAM_SRAM_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MVPP2_PRS_TCAM_SRAM_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.le	LBB0_3
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	str	w21, [x19]
Lloh3:
	adrp	x8, _MVPP2_PRS_TCAM_IDX_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MVPP2_PRS_TCAM_IDX_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_mvpp2_write
Lloh6:
	adrp	x21, _MVPP2_PRS_TCAM_INV_WORD@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MVPP2_PRS_TCAM_INV_WORD@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_MVPP2_PRS_TCAM_DATA_REG
	mov	x1, x0
	mov	x0, x20
	bl	_mvpp2_read
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	str	w0, [x8, x9, lsl #2]
Lloh8:
	adrp	x8, _MVPP2_PRS_TCAM_INV_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MVPP2_PRS_TCAM_INV_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _MVPP2_PRS_TCAM_ENTRY_INVALID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MVPP2_PRS_TCAM_ENTRY_INVALID@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_3:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_4:
Lloh17:
	adrp	x22, _MVPP2_PRS_TCAM_WORDS@GOTPAGE
Lloh18:
	ldr	x22, [x22, _MVPP2_PRS_TCAM_WORDS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_MVPP2_PRS_TCAM_DATA_REG
	mov	x1, x0
	mov	x0, x20
	bl	_mvpp2_read
	ldr	x8, [x19, #8]
	str	w0, [x8, x21, lsl #2]
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.lt	LBB0_6
LBB0_7:
Lloh19:
	adrp	x8, _MVPP2_PRS_SRAM_IDX_REG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MVPP2_PRS_SRAM_IDX_REG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_mvpp2_write
Lloh22:
	adrp	x22, _MVPP2_PRS_SRAM_WORDS@GOTPAGE
Lloh23:
	ldr	x22, [x22, _MVPP2_PRS_SRAM_WORDS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_MVPP2_PRS_SRAM_DATA_REG
	mov	x1, x0
	mov	x0, x20
	bl	_mvpp2_read
	ldr	x8, [x19, #16]
	str	x0, [x8, x21, lsl #3]
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.lt	LBB0_9
LBB0_10:
	mov	w0, #0
LBB0_11:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MVPP2_PRS_TCAM_SRAM_SIZE,4,2   ; @MVPP2_PRS_TCAM_SRAM_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MVPP2_PRS_TCAM_IDX_REG,4,2     ; @MVPP2_PRS_TCAM_IDX_REG
	.comm	_MVPP2_PRS_TCAM_INV_WORD,8,3    ; @MVPP2_PRS_TCAM_INV_WORD
	.comm	_MVPP2_PRS_TCAM_INV_MASK,4,2    ; @MVPP2_PRS_TCAM_INV_MASK
	.comm	_MVPP2_PRS_TCAM_ENTRY_INVALID,4,2 ; @MVPP2_PRS_TCAM_ENTRY_INVALID
	.comm	_MVPP2_PRS_TCAM_WORDS,4,2       ; @MVPP2_PRS_TCAM_WORDS
	.comm	_MVPP2_PRS_SRAM_IDX_REG,4,2     ; @MVPP2_PRS_SRAM_IDX_REG
	.comm	_MVPP2_PRS_SRAM_WORDS,4,2       ; @MVPP2_PRS_SRAM_WORDS
.subsections_via_symbols
