	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tunstart_l2
_tunstart_l2:                           ## @tunstart_l2
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_TUNDEBUG
	movq	%r14, %rdi
	callq	_TUN_LOCK
	movl	(%r14), %edx
	movq	_TUN_VMNET@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_TUN_READY@GOTPCREL(%rip), %rax
	movl	%edx, %ecx
	notl	%ecx
	testl	%ecx, (%rax)
	jne	LBB0_2
LBB0_3:
	movq	_IFF_DRV_OACTIVE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	orl	%eax, (%rbx)
	leaq	4(%rbx), %rdi
	callq	_IFQ_IS_EMPTY
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movl	(%r14), %eax
	movq	_TUN_RWAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_wakeup
	movl	(%r14), %eax
LBB0_6:
	movq	_TUN_ASYNC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.7:
	cmpq	$0, 8(%r14)
	je	LBB0_9
## %bb.8:
	leaq	8(%r14), %r15
	movq	%r14, %rdi
	callq	_TUN_UNLOCK
	movq	_SIGIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_pgsigio
	movq	%r14, %rdi
	callq	_TUN_LOCK
LBB0_9:
	leaq	4(%r14), %r15
	movq	_PZERO@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movq	%r15, %rdi
	callq	_selwakeuppri
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_KNOTE_LOCKED
	movq	_IFCOUNTER_OPACKETS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_if_inc_counter
LBB0_10:
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%rbx)
LBB0_11:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TUN_UNLOCK                     ## TAILCALL
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_TUNDEBUG
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_IF_DEQUEUE
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"starting\n"

	.comm	_TUN_VMNET,4,2                  ## @TUN_VMNET
	.comm	_TUN_READY,4,2                  ## @TUN_READY
L_.str.1:                               ## @.str.1
	.asciz	"not ready, tun_flags = 0x%x\n"

	.comm	_IFCOUNTER_OERRORS,4,2          ## @IFCOUNTER_OERRORS
	.comm	_IFF_DRV_OACTIVE,4,2            ## @IFF_DRV_OACTIVE
	.comm	_TUN_RWAIT,4,2                  ## @TUN_RWAIT
	.comm	_TUN_ASYNC,4,2                  ## @TUN_ASYNC
	.comm	_SIGIO,4,2                      ## @SIGIO
	.comm	_PZERO,8,3                      ## @PZERO
	.comm	_IFCOUNTER_OPACKETS,4,2         ## @IFCOUNTER_OPACKETS
	.no_dead_strip	_tunstart_l2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tunstart_l2
_tunstart_l2:                           ; @tunstart_l2
	.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
	mov	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_TUNDEBUG
	mov	x0, x19
	bl	_TUN_LOCK
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _TUN_VMNET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TUN_VMNET@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x9, _TUN_READY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TUN_READY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_11
LBB0_2:
Lloh8:
	adrp	x22, _IFF_DRV_OACTIVE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _IFF_DRV_OACTIVE@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x20]
	orr	w8, w9, w8
	mov	x0, x20
	str	w8, [x0], #4
	bl	_IFQ_IS_EMPTY
	cbnz	w0, LBB0_9
; %bb.3:
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _TUN_RWAIT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TUN_RWAIT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	bic	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_wakeup
	ldr	w8, [x19]
LBB0_5:
Lloh13:
	adrp	x9, _TUN_ASYNC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TUN_ASYNC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	mov	x21, x19
	ldr	x8, [x21, #8]!
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_TUN_UNLOCK
Lloh16:
	adrp	x8, _SIGIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SIGIO@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_pgsigio
	mov	x0, x19
	bl	_TUN_LOCK
LBB0_8:
	add	x21, x19, #4
Lloh19:
	adrp	x8, _PZERO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PZERO@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	add	x1, x8, #1
	mov	x0, x21
	bl	_selwakeuppri
	mov	x0, x21
	mov	w1, #0
	bl	_KNOTE_LOCKED
Lloh22:
	adrp	x8, _IFCOUNTER_OPACKETS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IFCOUNTER_OPACKETS@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_if_inc_counter
LBB0_9:
	ldr	w8, [x22]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_10:
	mov	x0, x19
	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
	b	_TUN_UNLOCK
LBB0_11:
	str	x8, [sp]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_TUNDEBUG
	add	x0, x20, #4
	bl	_IF_DEQUEUE
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"starting\n"

	.comm	_TUN_VMNET,4,2                  ; @TUN_VMNET
	.comm	_TUN_READY,4,2                  ; @TUN_READY
l_.str.1:                               ; @.str.1
	.asciz	"not ready, tun_flags = 0x%x\n"

	.comm	_IFCOUNTER_OERRORS,4,2          ; @IFCOUNTER_OERRORS
	.comm	_IFF_DRV_OACTIVE,4,2            ; @IFF_DRV_OACTIVE
	.comm	_TUN_RWAIT,4,2                  ; @TUN_RWAIT
	.comm	_TUN_ASYNC,4,2                  ; @TUN_ASYNC
	.comm	_SIGIO,4,2                      ; @SIGIO
	.comm	_PZERO,8,3                      ; @PZERO
	.comm	_IFCOUNTER_OPACKETS,4,2         ; @IFCOUNTER_OPACKETS
	.no_dead_strip	_tunstart_l2
.subsections_via_symbols
