	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipgre_tunnel_ioctl
_ipgre_tunnel_ioctl:                    ## @ipgre_tunnel_ioctl
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rsi), %esi
	leaq	-64(%rbp), %rdi
	movl	$32, %edx
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_1
LBB0_13:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_1:
	movq	_SIOCADDTUNNEL@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_7
## %bb.2:
	movq	_SIOCCHGTUNNEL@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_7
## %bb.3:
	movl	-64(%rbp), %edi
LBB0_4:
	callq	_gre_flags_to_tnl_flags
	movl	%eax, -64(%rbp)
	movl	-60(%rbp), %edi
	callq	_gre_flags_to_tnl_flags
	movl	%eax, -60(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_ip_tunnel_ioctl
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:
	movl	-64(%rbp), %edi
	callq	_tnl_flags_to_gre_flags
	movl	%eax, -64(%rbp)
	movl	-60(%rbp), %edi
	callq	_tnl_flags_to_gre_flags
	movl	%eax, -60(%rbp)
	movl	(%r14), %edi
	leaq	-64(%rbp), %rsi
	movl	$32, %edx
	callq	_copy_to_user
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_7:
	cmpl	$4, -56(%rbp)
	jne	LBB0_12
## %bb.8:
	movq	-48(%rbp), %rax
	movq	_IPPROTO_GRE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	cmpl	$5, -40(%rbp)
	jne	LBB0_12
## %bb.10:
	movl	-36(%rbp), %r12d
	movq	_IP_DF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	callq	_htons
	testl	%r12d, %eax
	jne	LBB0_12
## %bb.11:
	movl	-64(%rbp), %edi
	movl	-60(%rbp), %eax
	orl	%edi, %eax
	movq	_GRE_VERSION@GOTPCREL(%rip), %rcx
	movq	_GRE_ROUTING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_4
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_SIOCADDTUNNEL,4,2              ## @SIOCADDTUNNEL
	.comm	_SIOCCHGTUNNEL,4,2              ## @SIOCCHGTUNNEL
	.comm	_IPPROTO_GRE,8,3                ## @IPPROTO_GRE
	.comm	_IP_DF,4,2                      ## @IP_DF
	.comm	_GRE_VERSION,4,2                ## @GRE_VERSION
	.comm	_GRE_ROUTING,4,2                ## @GRE_ROUTING
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ipgre_tunnel_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipgre_tunnel_ioctl
_ipgre_tunnel_ioctl:                    ; @ipgre_tunnel_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w1, [x1]
	mov	x0, sp
	mov	w2, #32
	bl	_copy_from_user
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
Lloh2:
	adrp	x8, _SIOCADDTUNNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIOCADDTUNNEL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SIOCCHGTUNNEL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SIOCCHGTUNNEL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_10
; %bb.3:
	ldr	w8, [sp, #8]
	cmp	w8, #4
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [sp, #16]
Lloh8:
	adrp	x9, _IPPROTO_GRE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IPPROTO_GRE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w10, [sp, #24]
	cmp	x8, x9
	ccmp	w10, #5, #0, eq
	b.ne	LBB0_7
; %bb.5:
	ldr	w22, [sp, #28]
Lloh11:
	adrp	x8, _IP_DF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IP_DF@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mvn	w0, w8
	bl	_htons
	tst	w0, w22
	b.ne	LBB0_7
; %bb.6:
	ldp	w0, w8, [sp]
	orr	w8, w8, w0
Lloh14:
	adrp	x9, _GRE_VERSION@GOTPAGE
Lloh15:
	ldr	x9, [x9, _GRE_VERSION@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _GRE_ROUTING@GOTPAGE
Lloh18:
	ldr	x10, [x10, _GRE_ROUTING@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_11
LBB0_7:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	w0, [sp]
LBB0_11:
	bl	_gre_flags_to_tnl_flags
	str	w0, [sp]
	ldr	w0, [sp, #4]
	bl	_gre_flags_to_tnl_flags
	str	w0, [sp, #4]
	mov	x1, sp
	mov	x0, x21
	mov	x2, x20
	bl	_ip_tunnel_ioctl
	cbnz	w0, LBB0_9
; %bb.12:
	ldr	w0, [sp]
	bl	_tnl_flags_to_gre_flags
	str	w0, [sp]
	ldr	w0, [sp, #4]
	bl	_tnl_flags_to_gre_flags
	str	w0, [sp, #4]
	ldr	w0, [x19]
	mov	x1, sp
	mov	w2, #32
	bl	_copy_to_user
	cbnz	x0, LBB0_1
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_SIOCADDTUNNEL,4,2              ; @SIOCADDTUNNEL
	.comm	_SIOCCHGTUNNEL,4,2              ; @SIOCCHGTUNNEL
	.comm	_IPPROTO_GRE,8,3                ; @IPPROTO_GRE
	.comm	_IP_DF,4,2                      ; @IP_DF
	.comm	_GRE_VERSION,4,2                ; @GRE_VERSION
	.comm	_GRE_ROUTING,4,2                ; @GRE_ROUTING
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ipgre_tunnel_ioctl
.subsections_via_symbols
