	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipgre_tunnel_validate
_ipgre_tunnel_validate:                 ## @ipgre_tunnel_validate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	movq	%rsi, %rbx
	movq	_IFLA_GRE_IFLAGS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rsi,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	callq	_nla_get_be16
	movl	%eax, %r14d
	jmp	LBB0_5
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movq	_IFLA_GRE_OFLAGS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_nla_get_be16
	orl	%eax, %r14d
LBB0_7:
	movq	_GRE_VERSION@GOTPCREL(%rip), %rax
	movq	_GRE_ROUTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r14d, %ecx
	je	LBB0_9
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IFLA_GRE_IFLAGS,8,3            ## @IFLA_GRE_IFLAGS
	.comm	_IFLA_GRE_OFLAGS,8,3            ## @IFLA_GRE_OFLAGS
	.comm	_GRE_VERSION,4,2                ## @GRE_VERSION
	.comm	_GRE_ROUTING,4,2                ## @GRE_ROUTING
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ipgre_tunnel_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipgre_tunnel_validate
_ipgre_tunnel_validate:                 ; @ipgre_tunnel_validate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x1, LBB0_8
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _IFLA_GRE_IFLAGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IFLA_GRE_IFLAGS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x0, [x1, x8, lsl #3]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_nla_get_be16
	mov	x19, x0
	b	LBB0_4
LBB0_3:
	mov	w19, #0
LBB0_4:
Lloh3:
	adrp	x8, _IFLA_GRE_OFLAGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IFLA_GRE_OFLAGS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x0, [x20, x8, lsl #3]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_nla_get_be16
	orr	w19, w0, w19
LBB0_6:
Lloh6:
	adrp	x8, _GRE_VERSION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GRE_VERSION@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _GRE_ROUTING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GRE_ROUTING@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w19
	b.eq	LBB0_8
; %bb.7:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IFLA_GRE_IFLAGS,8,3            ; @IFLA_GRE_IFLAGS
	.comm	_IFLA_GRE_OFLAGS,8,3            ; @IFLA_GRE_OFLAGS
	.comm	_GRE_VERSION,4,2                ; @GRE_VERSION
	.comm	_GRE_ROUTING,4,2                ; @GRE_ROUTING
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ipgre_tunnel_validate
.subsections_via_symbols
