	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_fl_set_ipv4_tun
_nfp_fl_set_ipv4_tun:                   ## @nfp_fl_set_ipv4_tun
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, %r15d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	(%rdx), %r13
	movq	_NFP_FL_TUNNEL_CSUM@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_TUNNEL_CSUM@GOTPCREL(%rip), %rdx
	movl	$1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.1:
	movq	_NFP_FL_TUNNEL_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_TUNNEL_KEY@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_3
## %bb.2:
	movq	_NFP_FL_TUNNEL_GENEVE_OPT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_TUNNEL_GENEVE_OPT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	setne	%al
LBB0_3:
	movq	(%rdi), %rbx
	movl	%eax, %edi
	callq	_BUILD_BUG_ON
	cmpl	$0, (%r13)
	je	LBB0_8
## %bb.4:
	movq	_NFP_FL_TUNNEL_GENEVE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	_NFP_FL_FEATS_GENEVE_OPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
LBB0_8:
	movq	_NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	movq	_NFP_FL_LW_SIZ@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$48, %eax
	shrq	%cl, %rax
	movq	%rax, 32(%r12)
	movq	_NFP_FL_IPV4_TUNNEL_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	movq	_NFP_FL_IPV4_PRE_TUN_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movl	%eax, 28(%r12)
	movl	32(%r13), %eax
	movl	%eax, 24(%r12)
	movq	24(%r13), %rax
	testq	%rax, %rax
	jne	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	callq	_dev_net
	movq	%rax, %rbx
	movl	12(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ip_route_output_key
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_PTR_ERR_OR_ZERO
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	(%rbx), %rax
LBB0_12:
	movq	%rax, 16(%r12)
LBB0_13:
	movl	16(%r13), %eax
	movl	%eax, 12(%r12)
	movl	8(%r13), %eax
	movq	_NFP_FL_TUNNEL_KEY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.14:
	movq	_NFP_FL_SUPPORTED_IPV4_UDP_TUN_FLAGS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	testl	%ecx, %eax
	je	LBB0_16
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movq	16(%rbp), %rdi
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	%eax, (%r12)
	movq	_NFP_FL_TUNNEL_GENEVE@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_18
## %bb.17:
	movq	_ETH_P_TEB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, 8(%r12)
	movl	(%r13), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, 4(%r12)
LBB0_18:
	movl	12(%r13), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_10:
	movq	%r14, %rdi
	callq	_ip4_dst_hoplimit
	movq	%rax, 16(%r12)
	movq	%r14, %rdi
	callq	_ip_rt_put
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_FL_TUNNEL_CSUM,8,3         ## @NFP_FL_TUNNEL_CSUM
	.comm	_TUNNEL_CSUM,8,3                ## @TUNNEL_CSUM
	.comm	_NFP_FL_TUNNEL_KEY,4,2          ## @NFP_FL_TUNNEL_KEY
	.comm	_TUNNEL_KEY,4,2                 ## @TUNNEL_KEY
	.comm	_NFP_FL_TUNNEL_GENEVE_OPT,8,3   ## @NFP_FL_TUNNEL_GENEVE_OPT
	.comm	_TUNNEL_GENEVE_OPT,8,3          ## @TUNNEL_GENEVE_OPT
	.comm	_NFP_FL_TUNNEL_GENEVE,4,2       ## @NFP_FL_TUNNEL_GENEVE
	.comm	_NFP_FL_FEATS_GENEVE_OPT,4,2    ## @NFP_FL_FEATS_GENEVE_OPT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported offload: loaded firmware does not support geneve options offload"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL,4,2 ## @NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL
	.comm	_NFP_FL_LW_SIZ,8,3              ## @NFP_FL_LW_SIZ
	.comm	_NFP_FL_IPV4_TUNNEL_TYPE,4,2    ## @NFP_FL_IPV4_TUNNEL_TYPE
	.comm	_NFP_FL_IPV4_PRE_TUN_INDEX,4,2  ## @NFP_FL_IPV4_PRE_TUN_INDEX
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
	.comm	_NFP_FL_SUPPORTED_IPV4_UDP_TUN_FLAGS,4,2 ## @NFP_FL_SUPPORTED_IPV4_UDP_TUN_FLAGS
L_.str.1:                               ## @.str.1
	.asciz	"unsupported offload: loaded firmware does not support tunnel flag offload"

	.comm	_ETH_P_TEB,4,2                  ## @ETH_P_TEB
	.no_dead_strip	_nfp_fl_set_ipv4_tun
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_fl_set_ipv4_tun
_nfp_fl_set_ipv4_tun:                   ; @nfp_fl_set_ipv4_tun
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x6
	mov	x23, x5
	mov	x22, x4
	mov	x19, x3
	mov	x20, x1
	ldr	x25, [x2]
Lloh0:
	adrp	x8, _NFP_FL_TUNNEL_CSUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFP_FL_TUNNEL_CSUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _TUNNEL_CSUM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TUNNEL_CSUM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x26, _NFP_FL_TUNNEL_KEY@GOTPAGE
Lloh7:
	ldr	x26, [x26, _NFP_FL_TUNNEL_KEY@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x26]
Lloh8:
	adrp	x9, _TUNNEL_KEY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TUNNEL_KEY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _NFP_FL_TUNNEL_GENEVE_OPT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NFP_FL_TUNNEL_GENEVE_OPT@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _TUNNEL_GENEVE_OPT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TUNNEL_GENEVE_OPT@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	b	LBB0_4
LBB0_3:
	mov	w8, #1
LBB0_4:
	ldr	x24, [x0]
	mov	x0, x8
	bl	_BUILD_BUG_ON
	ldr	w8, [x25]
	cbz	w8, LBB0_7
; %bb.5:
Lloh17:
	adrp	x8, _NFP_FL_TUNNEL_GENEVE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NFP_FL_TUNNEL_GENEVE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_14
; %bb.6:
	ldr	w8, [x24]
Lloh20:
	adrp	x9, _NFP_FL_FEATS_GENEVE_OPT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NFP_FL_FEATS_GENEVE_OPT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
LBB0_7:
Lloh23:
	adrp	x8, _NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x20, #40]
Lloh26:
	adrp	x8, _NFP_FL_LW_SIZ@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NFP_FL_LW_SIZ@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	mov	w9, #48
	lsr	x8, x9, x8
	str	x8, [x20, #32]
Lloh29:
	adrp	x8, _NFP_FL_IPV4_TUNNEL_TYPE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _NFP_FL_IPV4_TUNNEL_TYPE@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_FIELD_PREP
	mov	x24, x0
Lloh32:
	adrp	x8, _NFP_FL_IPV4_PRE_TUN_INDEX@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NFP_FL_IPV4_PRE_TUN_INDEX@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w0, w0, w24
	bl	_cpu_to_be32
	ldr	w8, [x25, #32]
	stp	w8, w0, [x20, #24]
	ldr	x8, [x25, #24]
	cbnz	x8, LBB0_10
; %bb.8:
	mov	x0, x23
	bl	_dev_net
	mov	x23, x0
	ldr	w8, [x25, #12]
Lloh35:
	adrp	x9, _IPPROTO_UDP@GOTPAGE
Lloh36:
	ldr	x9, [x9, _IPPROTO_UDP@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #8]
	add	x1, sp, #8
	bl	_ip_route_output_key
	mov	x24, x0
	bl	_PTR_ERR_OR_ZERO
	cbz	w0, LBB0_20
; %bb.9:
	ldr	x8, [x23]
LBB0_10:
	str	x8, [x20, #16]
LBB0_11:
	ldr	w8, [x25, #16]
	str	w8, [x20, #12]
	ldr	w8, [x25, #8]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
Lloh38:
	adrp	x9, _NFP_FL_SUPPORTED_IPV4_UDP_TUN_FLAGS@GOTPAGE
Lloh39:
	ldr	x9, [x9, _NFP_FL_SUPPORTED_IPV4_UDP_TUN_FLAGS@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	bics	wzr, w8, w9
	b.eq	LBB0_17
LBB0_13:
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh43:
	adrp	x1, l_.str@PAGE
Lloh44:
	add	x1, x1, l_.str@PAGEOFF
LBB0_15:
	mov	x0, x21
	bl	_NL_SET_ERR_MSG_MOD
Lloh45:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_17:
	str	w8, [x20]
Lloh48:
	adrp	x8, _NFP_FL_TUNNEL_GENEVE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _NFP_FL_TUNNEL_GENEVE@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_19
; %bb.18:
Lloh51:
	adrp	x8, _ETH_P_TEB@GOTPAGE
Lloh52:
	ldr	x8, [x8, _ETH_P_TEB@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
	bl	_htons
	ldr	w8, [x25]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	stp	w8, w0, [x20, #4]
LBB0_19:
	mov	w0, #0
	ldr	w8, [x25, #12]
	str	w8, [x19]
	b	LBB0_16
LBB0_20:
	mov	x0, x24
	bl	_ip4_dst_hoplimit
	str	x0, [x20, #16]
	mov	x0, x24
	bl	_ip_rt_put
	b	LBB0_11
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_FL_TUNNEL_CSUM,8,3         ; @NFP_FL_TUNNEL_CSUM
	.comm	_TUNNEL_CSUM,8,3                ; @TUNNEL_CSUM
	.comm	_NFP_FL_TUNNEL_KEY,4,2          ; @NFP_FL_TUNNEL_KEY
	.comm	_TUNNEL_KEY,4,2                 ; @TUNNEL_KEY
	.comm	_NFP_FL_TUNNEL_GENEVE_OPT,8,3   ; @NFP_FL_TUNNEL_GENEVE_OPT
	.comm	_TUNNEL_GENEVE_OPT,8,3          ; @TUNNEL_GENEVE_OPT
	.comm	_NFP_FL_TUNNEL_GENEVE,4,2       ; @NFP_FL_TUNNEL_GENEVE
	.comm	_NFP_FL_FEATS_GENEVE_OPT,4,2    ; @NFP_FL_FEATS_GENEVE_OPT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported offload: loaded firmware does not support geneve options offload"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL,4,2 ; @NFP_FL_ACTION_OPCODE_SET_IPV4_TUNNEL
	.comm	_NFP_FL_LW_SIZ,8,3              ; @NFP_FL_LW_SIZ
	.comm	_NFP_FL_IPV4_TUNNEL_TYPE,4,2    ; @NFP_FL_IPV4_TUNNEL_TYPE
	.comm	_NFP_FL_IPV4_PRE_TUN_INDEX,4,2  ; @NFP_FL_IPV4_PRE_TUN_INDEX
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
	.comm	_NFP_FL_SUPPORTED_IPV4_UDP_TUN_FLAGS,4,2 ; @NFP_FL_SUPPORTED_IPV4_UDP_TUN_FLAGS
l_.str.1:                               ; @.str.1
	.asciz	"unsupported offload: loaded firmware does not support tunnel flag offload"

	.comm	_ETH_P_TEB,4,2                  ; @ETH_P_TEB
	.no_dead_strip	_nfp_fl_set_ipv4_tun
.subsections_via_symbols
