	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5e_gen_ip_tunnel_header_geneve
_mlx5e_gen_ip_tunnel_header_geneve:     ## @mlx5e_gen_ip_tunnel_header_geneve
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdx), %r15
	leaq	4(%rdi), %r12
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi)
	movl	12(%r15), %eax
	movl	%eax, (%rdi)
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$28, %edx
	callq	_memset
	movq	_MLX5E_GENEVE_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	(%r15), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, 4(%rbx)
	movl	4(%r15), %eax
	movq	_TUNNEL_OAM@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%dl
	movl	%edx, 8(%rbx)
	movq	_TUNNEL_CRIT_OPT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, 12(%rbx)
	movl	8(%r15), %edi
	movl	24(%rbx), %esi
	callq	_mlx5e_tunnel_id_to_vni
	movq	_ETH_P_TEB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, 20(%rbx)
	movq	_TUNNEL_GENEVE_OPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_4
## %bb.1:
	cmpl	$0, (%r12)
	je	LBB0_2
## %bb.3:
	movl	16(%rbx), %edi
	movq	%r15, %rsi
	callq	_ip_tunnel_info_opts_get
	jmp	LBB0_4
LBB0_2:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
	.comm	_MLX5E_GENEVE_VER,4,2           ## @MLX5E_GENEVE_VER
	.comm	_TUNNEL_OAM,4,2                 ## @TUNNEL_OAM
	.comm	_TUNNEL_CRIT_OPT,4,2            ## @TUNNEL_CRIT_OPT
	.comm	_ETH_P_TEB,4,2                  ## @ETH_P_TEB
	.comm	_TUNNEL_GENEVE_OPT,4,2          ## @TUNNEL_GENEVE_OPT
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_mlx5e_gen_ip_tunnel_header_geneve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5e_gen_ip_tunnel_header_geneve
_mlx5e_gen_ip_tunnel_header_geneve:     ; @mlx5e_gen_ip_tunnel_header_geneve
	.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	x20, x0
	ldr	x19, [x2]
	add	x21, x0, #4
Lloh0:
	adrp	x8, _IPPROTO_UDP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPPROTO_UDP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x1]
	ldr	w8, [x19, #12]
	str	w8, [x0]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #28
	bl	_memset
Lloh3:
	adrp	x8, _MLX5E_GENEVE_VER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX5E_GENEVE_VER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #28]
	ldp	w8, w9, [x19]
	add	w10, w8, #3
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w8, w8, #2
Lloh6:
	adrp	x10, _TUNNEL_OAM@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TUNNEL_OAM@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w10, ne
	stp	w8, w10, [x20, #4]
Lloh9:
	adrp	x8, _TUNNEL_CRIT_OPT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TUNNEL_CRIT_OPT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w8, ne
	str	w8, [x20, #12]
	ldr	w0, [x19, #8]
	ldr	w1, [x20, #24]
	bl	_mlx5e_tunnel_id_to_vni
Lloh12:
	adrp	x8, _ETH_P_TEB@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETH_P_TEB@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [x20, #20]
	ldr	w8, [x19, #4]
Lloh15:
	adrp	x9, _TUNNEL_GENEVE_OPT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TUNNEL_GENEVE_OPT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	w0, [x20, #16]
	mov	x1, x19
	bl	_ip_tunnel_info_opts_get
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh18:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
	.comm	_MLX5E_GENEVE_VER,4,2           ; @MLX5E_GENEVE_VER
	.comm	_TUNNEL_OAM,4,2                 ; @TUNNEL_OAM
	.comm	_TUNNEL_CRIT_OPT,4,2            ; @TUNNEL_CRIT_OPT
	.comm	_ETH_P_TEB,4,2                  ; @ETH_P_TEB
	.comm	_TUNNEL_GENEVE_OPT,4,2          ; @TUNNEL_GENEVE_OPT
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_mlx5e_gen_ip_tunnel_header_geneve
.subsections_via_symbols
