	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_bpf_finalize               ## -- Begin function nfp_bpf_finalize
	.p2align	4, 0x90
_nfp_bpf_finalize:                      ## @nfp_bpf_finalize
	.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
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	8(%rax), %r15
	movl	(%rdi), %edi
	movl	%edi, (%r15)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$16, %esi
	callq	_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_nfp_assign_subprog_idx_and_regs
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.4:
	movq	16(%r14), %r9
	movq	8(%r15), %rdx
	movq	_REG_WIDTH@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	(%r9), %edi
	movl	%edi, (%rdx)
	cmpl	$1, %eax
	jne	LBB0_5
LBB0_9:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_netdev_priv
	movq	_NFP_NET_CFG_BPF_STACK_SZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_nn_readb
	movl	%eax, %ebx
	shll	$6, %ebx
	movq	%r15, %rdi
	callq	_nfp_bpf_get_stack_usage
	movl	%eax, 4(%r15)
	cmpl	%ebx, %eax
	jbe	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_pr_vlog
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_11:
	movl	4(%r14), %esi
	movq	%r15, %rdi
	callq	_nfp_bpf_insn_flag_zext
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	addq	$16, %rdx
	movl	$1, %edi
	movq	_BPF_REG_SIZE@GOTPCREL(%rip), %r8
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdi
	addq	$16, %rdx
	cmpq	%rdi, %rax
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r9,%rdi,4), %ebx
	addl	%esi, %ebx
	movl	%ebx, (%rdx)
	cmpq	$0, 8(%rdx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r8), %ecx
	leal	(%rbx,%rcx,4), %ecx
	movl	%ecx, (%rdx)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_REG_WIDTH,8,3                  ## @REG_WIDTH
	.comm	_BPF_REG_SIZE,4,2               ## @BPF_REG_SIZE
	.comm	_NFP_NET_CFG_BPF_STACK_SZ,4,2   ## @NFP_NET_CFG_BPF_STACK_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stack too large: program %dB > FW stack %dB\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_bpf_finalize               ; -- Begin function nfp_bpf_finalize
	.p2align	2
_nfp_bpf_finalize:                      ; @nfp_bpf_finalize
	.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	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x20, [x8, #8]
	ldr	w0, [x0]
	str	w0, [x20]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #16
	bl	_kcalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_nfp_assign_subprog_idx_and_regs
	ldr	w11, [x20]
	cmp	w11, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	x9, [x19, #16]
	ldr	x10, [x20, #8]
Lloh3:
	adrp	x8, _REG_WIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w12, [x9]
	str	w12, [x10]
	cmp	w11, #1
	b.ne	LBB0_9
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_netdev_priv
Lloh6:
	adrp	x8, _NFP_NET_CFG_BPF_STACK_SZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NFP_NET_CFG_BPF_STACK_SZ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_nn_readb
	lsl	w21, w0, #6
	mov	x0, x20
	bl	_nfp_bpf_get_stack_usage
	str	w0, [x20, #4]
	cmp	w0, w21
	b.ls	LBB0_7
; %bb.4:
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_pr_vlog
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_nfp_bpf_insn_flag_zext
	mov	w0, #0
LBB0_8:
	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
LBB0_9:
	add	x9, x9, #4
	add	x10, x10, #16
	sub	x11, x11, #1
Lloh15:
	adrp	x12, _BPF_REG_SIZE@GOTPAGE
Lloh16:
	ldr	x12, [x12, _BPF_REG_SIZE@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x9, x9, #4
	add	x10, x10, #16
	subs	x11, x11, #1
	b.eq	LBB0_3
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x9]
	add	w13, w13, w8
	str	w13, [x10]
	ldr	x14, [x10, #8]
	cbz	x14, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w14, [x12]
	add	w13, w13, w14, lsl #2
	str	w13, [x10]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_REG_WIDTH,8,3                  ; @REG_WIDTH
	.comm	_BPF_REG_SIZE,4,2               ; @BPF_REG_SIZE
	.comm	_NFP_NET_CFG_BPF_STACK_SZ,4,2   ; @NFP_NET_CFG_BPF_STACK_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stack too large: program %dB > FW stack %dB\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
