	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_in_gre_ioctl                   ## -- Begin function in_gre_ioctl
	.p2align	4, 0x90
_in_gre_ioctl:                          ## @in_gre_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	%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, %r13
	movl	%esi, %ebx
	movq	%rdi, %r14
	leal	-129(%rbx), %eax
	cmpl	$2, %eax
	jae	LBB0_1
## %bb.18:
	movq	(%r14), %rax
	movq	_AF_INET@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_19
LBB0_8:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_22
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	cmpl	$128, %ebx
	jne	LBB0_22
## %bb.2:
	movq	16(%r13), %rax
	cmpq	(%r13), %rax
	jne	LBB0_22
## %bb.3:
	movq	_AF_INET@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_22
## %bb.4:
	cmpl	$16, 24(%r13)
	jne	LBB0_22
## %bb.5:
	cmpl	$16, 8(%r13)
	jne	LBB0_22
## %bb.6:
	movl	28(%r13), %esi
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %esi
	je	LBB0_8
## %bb.7:
	movl	12(%r13), %edx
	cmpl	%eax, %edx
	je	LBB0_8
## %bb.9:
	movq	_V_ipv4_hashtbl@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	jne	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_gre_hashinit
	movq	%rax, (%r15)
	xorl	%eax, %eax
	callq	_gre_hashinit
	movq	_V_ipv4_srchashtbl@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_gre_hashinit
	movq	_V_ipv4_sockets@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	12(%r13), %edx
	movl	28(%r13), %esi
LBB0_11:
	movl	32(%r14), %ecx
	movq	%r14, %rdi
	callq	_in_gre_checkdup
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.12:
	movl	%eax, %r15d
	jmp	LBB0_22
LBB0_19:
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	(%r12), %rax
	movq	%rax, (%r13)
	movl	$16, 8(%r13)
	xorl	%eax, %eax
	cmpl	$129, %ebx
	sete	%al
	movl	8(%r14,%rax,4), %eax
	movl	%eax, 12(%r13)
	movq	_curthread@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_prison_if
	testl	%eax, %eax
	je	LBB0_22
## %bb.20:
	movl	%eax, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
LBB0_21:
	movl	%ebx, %r15d
LBB0_22:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpl	(%rcx), %eax
	je	LBB0_22
## %bb.14:
	movq	_M_GRE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$16, %edi
	callq	_malloc
	movq	%rax, %r12
	movl	28(%r13), %eax
	movl	%eax, 4(%r12)
	movl	12(%r13), %eax
	movq	_M_GRE@GOTPCREL(%rip), %r13
	movl	%eax, (%r12)
	cmpq	$0, (%r14)
	je	LBB0_16
## %bb.15:
	movq	_chain@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_CK_LIST_REMOVE
	movq	_srchash@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_CK_LIST_REMOVE
	xorl	%eax, %eax
	callq	_GRE_WAIT
	movq	16(%r14), %rdi
	movl	(%r13), %esi
	callq	_free
LBB0_16:
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	movq	%r12, 16(%r14)
	movl	$0, 28(%r14)
	movq	_UINT32_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	%r14, %rdi
	callq	_in_gre_attach
	testl	%eax, %eax
	je	LBB0_22
## %bb.17:
	movl	%eax, %ebx
	movq	$0, (%r14)
	movq	16(%r14), %rdi
	movl	(%r13), %esi
	callq	_free
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_V_ipv4_hashtbl,8,3             ## @V_ipv4_hashtbl
	.comm	_V_ipv4_srchashtbl,8,3          ## @V_ipv4_srchashtbl
	.comm	_V_ipv4_sockets,8,3             ## @V_ipv4_sockets
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_M_GRE,4,2                      ## @M_GRE
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_chain,4,2                      ## @chain
	.comm	_srchash,4,2                    ## @srchash
	.comm	_UINT32_MAX,4,2                 ## @UINT32_MAX
	.comm	_curthread,8,3                  ## @curthread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_in_gre_ioctl                   ; -- Begin function in_gre_ioctl
	.p2align	2
_in_gre_ioctl:                          ; @in_gre_ioctl
	.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	x20, x2
	mov	x22, x1
	mov	x19, x0
	sub	w8, w1, #129
	cmp	w8, #2
	b.hs	LBB0_3
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x21, _AF_INET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AF_INET@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_13
LBB0_2:
Lloh2:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	b	LBB0_15
LBB0_3:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	cmp	w22, #128
	b.ne	LBB0_15
; %bb.4:
	ldr	x8, [x20, #16]
	ldr	x9, [x20]
Lloh8:
	adrp	x22, _AF_INET@GOTPAGE
Lloh9:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #0, eq
	b.ne	LBB0_15
; %bb.5:
	ldr	w8, [x20, #24]
	ldr	w9, [x20, #8]
	cmp	w8, #16
	ccmp	w9, #16, #0, eq
	b.ne	LBB0_15
; %bb.6:
	ldr	w1, [x20, #28]
Lloh10:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w1, w8
	b.eq	LBB0_2
; %bb.7:
	ldr	w2, [x20, #12]
	cmp	w2, w8
	b.eq	LBB0_2
; %bb.8:
Lloh13:
	adrp	x21, _V_ipv4_hashtbl@GOTPAGE
Lloh14:
	ldr	x21, [x21, _V_ipv4_hashtbl@GOTPAGEOFF]
	ldr	x8, [x21]
	cbnz	x8, LBB0_10
; %bb.9:
	bl	_gre_hashinit
	str	x0, [x21]
	bl	_gre_hashinit
Lloh15:
	adrp	x8, _V_ipv4_srchashtbl@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V_ipv4_srchashtbl@GOTPAGEOFF]
Lloh17:
	str	x0, [x8]
	bl	_gre_hashinit
Lloh18:
	adrp	x8, _V_ipv4_sockets@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V_ipv4_sockets@GOTPAGEOFF]
Lloh20:
	str	x0, [x8]
	ldr	w1, [x20, #28]
	ldr	w2, [x20, #12]
LBB0_10:
	ldr	w3, [x19, #32]
	mov	x0, x19
	bl	_in_gre_checkdup
	mov	x21, x0
Lloh21:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_15
; %bb.11:
Lloh24:
	adrp	x8, _EEXIST@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_16
; %bb.12:
	mov	w21, #0
	b	LBB0_15
LBB0_13:
	mov	w23, #16
	mov	x0, x20
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x8, [x21]
	str	w23, [x20, #8]
	cmp	w22, #129
	mov	w9, #8
	mov	w10, #12
	csel	x9, x10, x9, eq
	ldr	w9, [x19, x9]
	str	x8, [x20]
	str	w9, [x20, #12]
Lloh27:
	adrp	x8, _curthread@GOTPAGE
Lloh28:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_prison_if
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.14:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #16
	bl	_memset
LBB0_15:
	mov	x0, 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
	ret
LBB0_16:
Lloh30:
	adrp	x23, _M_GRE@GOTPAGE
Lloh31:
	ldr	x23, [x23, _M_GRE@GOTPAGEOFF]
Lloh32:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh36:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #16
	bl	_malloc
	mov	x21, x0
	ldr	w8, [x20, #28]
	ldr	w9, [x20, #12]
	stp	w9, w8, [x0]
	ldr	x8, [x19]
	cbz	x8, LBB0_18
; %bb.17:
Lloh38:
	adrp	x8, _chain@GOTPAGE
Lloh39:
	ldr	x8, [x8, _chain@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CK_LIST_REMOVE
Lloh41:
	adrp	x8, _srchash@GOTPAGE
Lloh42:
	ldr	x8, [x8, _srchash@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CK_LIST_REMOVE
	bl	_GRE_WAIT
	ldr	x0, [x19, #16]
	ldr	w1, [x23]
	bl	_free
LBB0_18:
	ldr	x8, [x22]
	str	x8, [x19]
	str	x21, [x19, #16]
Lloh44:
	adrp	x8, _UINT32_MAX@GOTPAGE
Lloh45:
	ldr	x8, [x8, _UINT32_MAX@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	stp	w8, wzr, [x19, #24]
	mov	x0, x19
	bl	_in_gre_attach
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.19:
	str	xzr, [x19]
	ldr	x0, [x19, #16]
	ldr	w1, [x23]
	bl	_free
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_V_ipv4_hashtbl,8,3             ; @V_ipv4_hashtbl
	.comm	_V_ipv4_srchashtbl,8,3          ; @V_ipv4_srchashtbl
	.comm	_V_ipv4_sockets,8,3             ; @V_ipv4_sockets
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_M_GRE,4,2                      ; @M_GRE
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_chain,4,2                      ; @chain
	.comm	_srchash,4,2                    ; @srchash
	.comm	_UINT32_MAX,4,2                 ; @UINT32_MAX
	.comm	_curthread,8,3                  ; @curthread
.subsections_via_symbols
