	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_net_bpf_load
_nfp_net_bpf_load:                      ## @nfp_net_bpf_load
	.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	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	(%rsi), %rax
	movq	8(%rax), %rax
	movq	(%rax), %r15
	movq	_NFP_NET_CFG_BPF_INL_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nn_readb
	movl	%eax, %ebx
	shll	$6, %ebx
	addl	$-32, %ebx
	movq	(%r13), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rax
	movl	(%rax), %esi
	callq	_min
	cmpl	%eax, %ebx
	jae	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	movq	_NFP_NET_CFG_BPF_STACK_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_nn_readb
	shll	$6, %eax
	cmpl	%eax, (%r15)
	jbe	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	movq	_NFP_NET_CFG_BPF_MAX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_nn_readw
	cmpl	%eax, 4(%r15)
	jbe	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	16(%r12), %esi
	movq	%r15, %rdi
	callq	_nfp_bpf_relo_for_vnic
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.15:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_9:
	movl	(%r12), %edi
	movl	4(%r15), %edx
	shll	$2, %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_dma_map_single
	movl	%eax, %r13d
	movl	(%r12), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_11:
	movq	_NFP_NET_CFG_BPF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %edx
	movq	%r12, %rdi
	callq	_nn_writew
	movq	_NFP_NET_CFG_BPF_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %edx
	callq	_nn_writeq
	movq	_NFP_NET_CFG_UPDATE_BPF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_nfp_net_reconfig
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_NL_SET_ERR_MSG_MOD
LBB0_13:
	movl	(%r12), %edi
	movl	4(%r15), %edx
	shll	$2, %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_unmap_single
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_NET_CFG_BPF_INL_MTU,4,2    ## @NFP_NET_CFG_BPF_INL_MTU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BPF offload not supported with potential packet access beyond HW packet split boundary"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_NFP_NET_CFG_BPF_STACK_SZ,4,2   ## @NFP_NET_CFG_BPF_STACK_SZ
L_.str.1:                               ## @.str.1
	.asciz	"stack too large"

	.comm	_NFP_NET_CFG_BPF_MAX_LEN,4,2    ## @NFP_NET_CFG_BPF_MAX_LEN
L_.str.2:                               ## @.str.2
	.asciz	"program too long"

	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NFP_NET_CFG_BPF_SIZE,4,2       ## @NFP_NET_CFG_BPF_SIZE
	.comm	_NFP_NET_CFG_BPF_ADDR,4,2       ## @NFP_NET_CFG_BPF_ADDR
	.comm	_NFP_NET_CFG_UPDATE_BPF,4,2     ## @NFP_NET_CFG_UPDATE_BPF
L_.str.3:                               ## @.str.3
	.asciz	"FW command error while loading BPF"

	.no_dead_strip	_nfp_net_bpf_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_net_bpf_load
_nfp_net_bpf_load:                      ; @nfp_net_bpf_load
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x1]
	ldr	x8, [x8, #8]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _NFP_NET_CFG_BPF_INL_MTU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFP_NET_CFG_BPF_INL_MTU@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nn_readb
	lsl	w8, w0, #6
	sub	w23, w8, #32
	ldr	x8, [x22]
	ldr	w0, [x8]
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
	bl	_min
	cmp	w23, w0
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
Lloh5:
	adrp	x8, _NFP_NET_CFG_BPF_STACK_SZ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NFP_NET_CFG_BPF_STACK_SZ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nn_readb
	ldr	w8, [x21]
	cmp	w8, w0, lsl #6
	b.ls	LBB0_4
; %bb.3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _NFP_NET_CFG_BPF_MAX_LEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NFP_NET_CFG_BPF_MAX_LEN@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nn_readw
	ldr	w8, [x21, #4]
	cmp	w8, w0
	b.ls	LBB0_9
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_NL_SET_ERR_MSG_MOD
Lloh15:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_8:
	mov	x0, x24
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w1, [x20, #16]
	mov	x0, x21
	bl	_nfp_bpf_relo_for_vnic
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_11:
	ldr	w0, [x20]
	ldr	w8, [x21, #4]
	lsl	w2, w8, #2
Lloh17:
	adrp	x25, _DMA_TO_DEVICE@GOTPAGE
Lloh18:
	ldr	x25, [x25, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x1, x22
	bl	_dma_map_single
	mov	x23, x0
	ldr	w0, [x20]
	mov	x1, x23
	bl	_dma_mapping_error
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x22
	bl	_kfree
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_13:
Lloh21:
	adrp	x8, _NFP_NET_CFG_BPF_SIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NFP_NET_CFG_BPF_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
	mov	x0, x20
	bl	_nn_writew
Lloh24:
	adrp	x8, _NFP_NET_CFG_BPF_ADDR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NFP_NET_CFG_BPF_ADDR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x23
	bl	_nn_writeq
Lloh27:
	adrp	x8, _NFP_NET_CFG_UPDATE_BPF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NFP_NET_CFG_UPDATE_BPF@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nfp_net_reconfig
	mov	x24, x0
	cbz	w0, LBB0_15
; %bb.14:
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_NL_SET_ERR_MSG_MOD
LBB0_15:
	ldr	w0, [x20]
	ldr	w8, [x21, #4]
	lsl	w2, w8, #2
	ldr	w3, [x25]
	mov	x1, x23
	bl	_dma_unmap_single
	mov	x0, x22
	bl	_kfree
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_NET_CFG_BPF_INL_MTU,4,2    ; @NFP_NET_CFG_BPF_INL_MTU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BPF offload not supported with potential packet access beyond HW packet split boundary"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_NFP_NET_CFG_BPF_STACK_SZ,4,2   ; @NFP_NET_CFG_BPF_STACK_SZ
l_.str.1:                               ; @.str.1
	.asciz	"stack too large"

	.comm	_NFP_NET_CFG_BPF_MAX_LEN,4,2    ; @NFP_NET_CFG_BPF_MAX_LEN
l_.str.2:                               ; @.str.2
	.asciz	"program too long"

	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NFP_NET_CFG_BPF_SIZE,4,2       ; @NFP_NET_CFG_BPF_SIZE
	.comm	_NFP_NET_CFG_BPF_ADDR,4,2       ; @NFP_NET_CFG_BPF_ADDR
	.comm	_NFP_NET_CFG_UPDATE_BPF,4,2     ; @NFP_NET_CFG_UPDATE_BPF
l_.str.3:                               ; @.str.3
	.asciz	"FW command error while loading BPF"

	.no_dead_strip	_nfp_net_bpf_load
.subsections_via_symbols
