	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StartTunnelingMode             ## -- Begin function StartTunnelingMode
	.p2align	4, 0x90
_StartTunnelingMode:                    ## @StartTunnelingMode
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	_CONNECTION_TCP@GOTPCREL(%rip), %rax
	movq	(%rdi), %rcx
	movq	40(%rdi), %r14
	cmpq	(%rax), %rcx
	jne	LBB0_8
## %bb.2:
	movq	64(%rbx), %r12
	cmpq	$0, 56(%rbx)
	je	LBB0_4
## %bb.3:
	movl	4(%r14), %edi
	callq	_AddRef
	movq	%r14, 48(%rbx)
LBB0_4:
	movq	%r14, %rdi
	callq	_NewTcpSock
	movq	%rax, %r15
	cmpl	$0, 8(%rbx)
	jne	LBB0_7
## %bb.5:
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_Tick64
	movq	24(%rbx), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx), %rcx
	imulq	$1000, %rcx, %rcx               ## imm = 0x3E8
	addq	%rax, %rcx
	movq	%rcx, (%r15)
LBB0_7:
	movl	(%r12), %edi
	callq	_LockList
	movl	(%r12), %edi
	movq	%r15, %rsi
	callq	_Add
	movl	(%r12), %edi
	callq	_UnlockList
	movq	%r14, %rdi
	callq	_ReleaseSock
	movq	$0, 40(%rbx)
	jmp	LBB0_12
LBB0_8:
	leaq	-36(%rbp), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_Copy
	movq	$0, 40(%rbx)
	movq	%r14, %rdi
	callq	_Disconnect
	movq	%r14, %rdi
	callq	_ReleaseSock
	movl	$4, %edi
	callq	_ZeroMalloc
	movq	%rax, 16(%rbx)
	cmpl	$0, 8(%rbx)
	je	LBB0_10
## %bb.9:
	movl	32(%rbx), %edi
	movq	24(%rbx), %rsi
	callq	_AddUDPEntry
	movq	16(%rbx), %rax
	movq	$0, 16(%rax)
	jmp	LBB0_11
LBB0_10:
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movl	4(%rax), %r14d
	xorl	%edi, %edi
	callq	_NewUDP
	movq	16(%rbx), %rdi
	movq	%rax, 16(%rdi)
	addq	$8, %rdi
	leaq	-36(%rbp), %rsi
	movl	$4, %edx
	callq	_Copy
	movq	16(%rbx), %rax
	movl	%r14d, 4(%rax)
LBB0_11:
	xorl	%eax, %eax
	callq	_NewQueue
	movq	16(%rbx), %rcx
	movl	%eax, (%rcx)
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONNECTION_TCP,8,3             ## @CONNECTION_TCP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StartTunnelingMode             ; -- Begin function StartTunnelingMode
	.p2align	2
_StartTunnelingMode:                    ; @StartTunnelingMode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CONNECTION_TCP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CONNECTION_TCP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x20, [x0, #40]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	ldp	x8, x22, [x19, #56]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x20, #4]
	bl	_AddRef
	str	x20, [x19, #48]
LBB0_4:
	mov	x0, x20
	bl	_NewTcpSock
	mov	x21, x0
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_7
; %bb.5:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.6:
	bl	_Tick64
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldrsw	x8, [x8]
	mov	w9, #1000
	madd	x8, x8, x9, x0
	str	x8, [x21]
LBB0_7:
	ldr	w0, [x22]
	bl	_LockList
	ldr	w0, [x22]
	mov	x1, x21
	bl	_Add
	ldr	w0, [x22]
	bl	_UnlockList
	mov	x0, x20
	bl	_ReleaseSock
	str	xzr, [x19, #40]
	b	LBB0_12
LBB0_8:
	add	x0, sp, #12
	mov	x1, x20
	mov	w2, #4
	bl	_Copy
	str	xzr, [x19, #40]
	mov	x0, x20
	bl	_Disconnect
	mov	x0, x20
	bl	_ReleaseSock
	mov	w0, #4
	bl	_ZeroMalloc
	str	x0, [x19, #16]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_10
; %bb.9:
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #24]
	bl	_AddUDPEntry
	ldr	x8, [x19, #16]
	str	xzr, [x8, #16]
	b	LBB0_11
LBB0_10:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w20, [x8, #4]
	mov	w0, #0
	bl	_NewUDP
	ldr	x8, [x19, #16]
	str	x0, [x8, #16]
	add	x0, x8, #8
	add	x1, sp, #12
	mov	w2, #4
	bl	_Copy
	ldr	x8, [x19, #16]
	str	w20, [x8, #4]
LBB0_11:
	bl	_NewQueue
	ldr	x8, [x19, #16]
	str	w0, [x8]
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CONNECTION_TCP,8,3             ; @CONNECTION_TCP
.subsections_via_symbols
