	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gre_delete_tunnel
_gre_delete_tunnel:                     ## @gre_delete_tunnel
	.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
	movq	%rdi, %r14
	movq	_SA_XLOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_gre_ioctl_sx@GOTPCREL(%rip), %rdi
	callq	_sx_assert
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.1:
	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
	movl	28(%r14), %edi
	movq	_M_GRE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movq	$0, (%r14)
LBB0_2:
	movq	8(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.3:
	leaq	24(%rbx), %rdi
	callq	_CK_LIST_EMPTY
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_chain@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_CK_LIST_REMOVE
	movl	20(%rbx), %edi
	callq	_soclose
	movq	_net_epoch_preempt@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$16, %rbx
	movq	_gre_sofree@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_epoch_call
	movq	$0, 8(%r14)
LBB0_5:
	movq	_IFF_DRV_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	movq	%r14, %rdi
	callq	_GRE2IFP
	andl	%ebx, (%rax)
	movq	%r14, %rdi
	callq	_GRE2IFP
	movq	_LINK_STATE_DOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_if_link_state_change           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_gre_ioctl_sx,4,2               ## @gre_ioctl_sx
	.comm	_SA_XLOCKED,4,2                 ## @SA_XLOCKED
	.comm	_chain,4,2                      ## @chain
	.comm	_srchash,4,2                    ## @srchash
	.comm	_M_GRE,4,2                      ## @M_GRE
	.comm	_net_epoch_preempt,4,2          ## @net_epoch_preempt
	.comm	_gre_sofree,4,2                 ## @gre_sofree
	.comm	_IFF_DRV_RUNNING,4,2            ## @IFF_DRV_RUNNING
	.comm	_LINK_STATE_DOWN,4,2            ## @LINK_STATE_DOWN
	.no_dead_strip	_gre_delete_tunnel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gre_delete_tunnel
_gre_delete_tunnel:                     ; @gre_delete_tunnel
	.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	x19, x0
Lloh0:
	adrp	x8, _SA_XLOCKED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SA_XLOCKED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _gre_ioctl_sx@GOTPAGE
Lloh4:
	ldr	x0, [x0, _gre_ioctl_sx@GOTPAGEOFF]
	bl	_sx_assert
	ldr	x8, [x19]
Lloh5:
	adrp	x21, _chain@GOTPAGE
Lloh6:
	ldr	x21, [x21, _chain@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_CK_LIST_REMOVE
Lloh7:
	adrp	x8, _srchash@GOTPAGE
Lloh8:
	ldr	x8, [x8, _srchash@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CK_LIST_REMOVE
	bl	_GRE_WAIT
	ldr	w0, [x19, #28]
Lloh10:
	adrp	x8, _M_GRE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _M_GRE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_free
	str	xzr, [x19]
LBB0_2:
	ldr	x20, [x19, #8]
	cbz	x20, LBB0_5
; %bb.3:
	add	x0, x20, #24
	bl	_CK_LIST_EMPTY
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_CK_LIST_REMOVE
	ldr	w0, [x20, #20]
	bl	_soclose
Lloh13:
	adrp	x8, _net_epoch_preempt@GOTPAGE
Lloh14:
	ldr	x8, [x8, _net_epoch_preempt@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	x1, x20, #16
Lloh16:
	adrp	x8, _gre_sofree@GOTPAGE
Lloh17:
	ldr	x8, [x8, _gre_sofree@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	bl	_epoch_call
	str	xzr, [x19, #8]
LBB0_5:
Lloh19:
	adrp	x8, _IFF_DRV_RUNNING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IFF_DRV_RUNNING@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_GRE2IFP
	ldr	w8, [x0]
	bic	w8, w8, w20
	str	w8, [x0]
	mov	x0, x19
	bl	_GRE2IFP
Lloh22:
	adrp	x8, _LINK_STATE_DOWN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LINK_STATE_DOWN@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	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
	b	_if_link_state_change
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_gre_ioctl_sx,4,2               ; @gre_ioctl_sx
	.comm	_SA_XLOCKED,4,2                 ; @SA_XLOCKED
	.comm	_chain,4,2                      ; @chain
	.comm	_srchash,4,2                    ; @srchash
	.comm	_M_GRE,4,2                      ; @M_GRE
	.comm	_net_epoch_preempt,4,2          ; @net_epoch_preempt
	.comm	_gre_sofree,4,2                 ; @gre_sofree
	.comm	_IFF_DRV_RUNNING,4,2            ; @IFF_DRV_RUNNING
	.comm	_LINK_STATE_DOWN,4,2            ; @LINK_STATE_DOWN
	.no_dead_strip	_gre_delete_tunnel
.subsections_via_symbols
