	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_gre_header
_parse_gre_header:                      ## @parse_gre_header
	.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, %r12
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_ip_hdrlen
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_pskb_may_pull
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_18
## %bb.1:
	movq	%r13, %rdi
	callq	_skb_network_header
	movq	%rax, %r15
	movl	%ebx, %ebx
	movq	_GRE_VERSION@GOTPCREL(%rip), %rax
	movq	_GRE_ROUTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	andl	(%r15,%rbx), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%rbx,%r15), %edi
	callq	_gre_flags_to_tnl_flags
	movl	%eax, 24(%r14)
	movl	%eax, %edi
	callq	_ip_gre_calc_hlen
	movl	%eax, %r15d
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_pskb_may_pull
	testl	%eax, %eax
	je	LBB0_18
## %bb.3:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r13, %rdi
	callq	_skb_network_header
	leaq	(%rax,%rbx), %r15
	movl	4(%rax,%rbx), %ecx
	movl	%ecx, (%r14)
	movl	(%rax,%rbx), %edi
	movq	_GRE_CSUM@GOTPCREL(%rip), %rcx
	testl	%edi, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	%r13, %rdi
	callq	_check_checksum
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	$1, (%r12)
	jmp	LBB0_18
LBB0_4:
	addq	%rax, %rbx
	addq	$8, %rbx
	movq	%r15, %r12
	jmp	LBB0_8
LBB0_7:
	movq	%r15, %r12
	leaq	16(%r15), %rbx
	movl	(%r15), %edi
LBB0_8:
	movq	_GRE_KEY@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_9
## %bb.10:
	movq	(%rbx), %rax
	addq	$8, %rbx
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
LBB0_11:
	movq	%rax, 16(%r14)
	movq	_GRE_SEQ@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	(%rbx), %rax
	addq	$8, %rbx
	jmp	LBB0_14
LBB0_12:
	xorl	%eax, %eax
LBB0_14:
	movq	%rax, 8(%r14)
	cmpl	$0, (%r12)
	jne	LBB0_19
## %bb.15:
	movl	(%r14), %r12d
	movq	_ETH_P_WCCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpl	%eax, %r12d
	jne	LBB0_19
## %bb.16:
	movq	_ETH_P_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, (%r14)
	movl	$240, %eax
	andl	(%rbx), %eax
	cmpl	$64, %eax
	je	LBB0_19
## %bb.17:
	addl	$4, %r15d
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_pskb_may_pull
	testl	%eax, %eax
	je	LBB0_18
LBB0_19:
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iptunnel_pull_header           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GRE_VERSION,4,2                ## @GRE_VERSION
	.comm	_GRE_ROUTING,4,2                ## @GRE_ROUTING
	.comm	_GRE_CSUM,4,2                   ## @GRE_CSUM
	.comm	_GRE_KEY,4,2                    ## @GRE_KEY
	.comm	_GRE_SEQ,4,2                    ## @GRE_SEQ
	.comm	_ETH_P_WCCP,4,2                 ## @ETH_P_WCCP
	.comm	_ETH_P_IP,4,2                   ## @ETH_P_IP
	.no_dead_strip	_parse_gre_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_gre_header
_parse_gre_header:                      ; @parse_gre_header
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	bl	_ip_hdrlen
	mov	x21, x0
	mov	x0, x19
	mov	w1, #8
	bl	_pskb_may_pull
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_skb_network_header
	mov	x23, x0
	mov	w24, w21
	ldr	w8, [x0, x24]
Lloh0:
	adrp	x9, _GRE_VERSION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GRE_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _GRE_ROUTING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _GRE_ROUTING@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w0, [x24, x23]
	bl	_gre_flags_to_tnl_flags
	str	w0, [x20, #24]
	bl	_ip_gre_calc_hlen
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_pskb_may_pull
	cbz	w0, LBB0_2
; %bb.4:
	mov	x0, x19
	bl	_skb_network_header
	add	x23, x0, x24
	ldp	w8, w9, [x23]
	str	w9, [x20]
Lloh9:
	adrp	x9, _GRE_CSUM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GRE_CSUM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_check_checksum
	cbz	x0, LBB0_8
; %bb.6:
	mov	w8, #1
	str	w8, [x22]
	b	LBB0_2
LBB0_7:
	add	x22, x23, #8
	b	LBB0_9
LBB0_8:
	mov	x22, x23
	ldr	w8, [x22], #16
LBB0_9:
Lloh12:
	adrp	x9, _GRE_KEY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GRE_KEY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	ldr	x9, [x22], #8
	b	LBB0_12
LBB0_11:
	mov	x9, #0
LBB0_12:
	str	x9, [x20, #16]
Lloh15:
	adrp	x9, _GRE_SEQ@GOTPAGE
Lloh16:
	ldr	x9, [x9, _GRE_SEQ@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_14
; %bb.13:
	ldr	x8, [x22], #8
	b	LBB0_15
LBB0_14:
	mov	x8, #0
LBB0_15:
	str	x8, [x20, #8]
	ldr	w8, [x23]
	cbnz	w8, LBB0_19
; %bb.16:
	ldr	w23, [x20]
Lloh18:
	adrp	x8, _ETH_P_WCCP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETH_P_WCCP@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_htons
	cmp	w23, w0
	b.ne	LBB0_19
; %bb.17:
Lloh21:
	adrp	x8, _ETH_P_IP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETH_P_IP@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [x20]
	ldr	w8, [x22]
	and	w8, w8, #0xf0
	cmp	w8, #64
	b.eq	LBB0_19
; %bb.18:
	add	w21, w21, #4
	mov	x0, x19
	mov	x1, x21
	bl	_pskb_may_pull
	cbz	w0, LBB0_2
LBB0_19:
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_iptunnel_pull_header
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GRE_VERSION,4,2                ; @GRE_VERSION
	.comm	_GRE_ROUTING,4,2                ; @GRE_ROUTING
	.comm	_GRE_CSUM,4,2                   ; @GRE_CSUM
	.comm	_GRE_KEY,4,2                    ; @GRE_KEY
	.comm	_GRE_SEQ,4,2                    ; @GRE_SEQ
	.comm	_ETH_P_WCCP,4,2                 ; @ETH_P_WCCP
	.comm	_ETH_P_IP,4,2                   ; @ETH_P_IP
	.no_dead_strip	_parse_gre_header
.subsections_via_symbols
