	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tunifioctl
_tunifioctl:                            ## @tunifioctl
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_tun_ioctl_sx@GOTPCREL(%rip), %rdi
	callq	_sx_xlock
	movq	8(%r15), %r12
	testq	%r12, %r12
	je	LBB0_4
## %bb.1:
	movl	(%r12), %eax
	movq	_TUN_L2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	-128(%rbx), %edx
	cmpl	$7, %edx
	ja	LBB0_6
## %bb.2:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	xorl	%ebx, %ebx
	jmpq	*%rdx
LBB0_3:
	movl	4(%r14), %eax
	movl	%eax, 4(%r15)
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_21
LBB0_4:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
	jmp	LBB0_25
LBB0_6:
	testl	%eax, %ecx
	je	LBB0_18
## %bb.7:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_ether_ioctl
	movl	%eax, %ebx
	jmp	LBB0_25
LBB0_8:
	movq	%r12, %rdi
	callq	_TUN_LOCK
	movl	(%r14), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_tun_caps_changed
	movq	%r12, %rdi
	callq	_TUN_UNLOCK
	movq	%r15, %rdi
	callq	_VLAN_CAPABILITIES
	jmp	LBB0_24
LBB0_9:
	movq	%r15, %rdi
	testl	%eax, %ecx
	je	LBB0_19
## %bb.10:
	movl	$131, %esi
	movq	%r14, %rdx
	callq	_ether_ioctl
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
	jmp	LBB0_20
LBB0_11:
	movq	%r12, %rdi
	callq	_TUN_LOCK
	movl	4(%r12), %ecx
	movq	(%r14), %rdi
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.12:
	leaq	L_.str(%rip), %rdx
	movl	$8, %esi
	callq	_snprintf
	jmp	LBB0_23
LBB0_13:
	testl	%eax, %ecx
	je	LBB0_18
## %bb.14:
	movl	(%r14), %ecx
	movl	$1, (%r14)
	movq	_IFM_AVALID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%esi, 24(%r14)
	movq	_IFM_ETHER@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 8(%r14)
	movq	_TUN_OPEN@GOTPCREL(%rip), %rdi
	testl	%eax, (%rdi)
	je	LBB0_16
## %bb.15:
	movq	_IFM_ACTIVE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	%esi, 24(%r14)
LBB0_16:
	movq	%rdx, 16(%r14)
	movl	$0, %ebx
	testl	%ecx, %ecx
	jle	LBB0_25
## %bb.17:
	movl	%edx, -36(%rbp)
	movl	4(%r14), %esi
	leaq	-36(%rbp), %rdi
	movl	$4, %edx
	callq	_copyout
	movl	%eax, %ebx
	jmp	LBB0_25
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_19:
	callq	_tuninit
LBB0_20:
	leaq	L_.str.1(%rip), %rsi
LBB0_21:
	movq	%r15, %rdi
	callq	_TUNDEBUG
	jmp	LBB0_24
LBB0_22:
	movb	$0, (%rdi)
LBB0_23:
	movq	%r12, %rdi
	callq	_TUN_UNLOCK
LBB0_24:
	xorl	%ebx, %ebx
LBB0_25:
	movq	_tun_ioctl_sx@GOTPCREL(%rip), %rdi
	callq	_sx_xunlock
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_25
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_13
	.long	L0_0_set_25
	.long	L0_0_set_25
	.end_data_region
                                        ## -- End function
	.comm	_tun_ioctl_sx,4,2               ## @tun_ioctl_sx
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_TUN_L2,4,2                     ## @TUN_L2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\tOpened by PID %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"address set\n"

L_.str.2:                               ## @.str.2
	.asciz	"mtu set\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IFM_AVALID,4,2                 ## @IFM_AVALID
	.comm	_IFM_ETHER,8,3                  ## @IFM_ETHER
	.comm	_TUN_OPEN,4,2                   ## @TUN_OPEN
	.comm	_IFM_ACTIVE,4,2                 ## @IFM_ACTIVE
	.no_dead_strip	_tunifioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tunifioctl
_tunifioctl:                            ; @tunifioctl
	.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	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _tun_ioctl_sx@GOTPAGE
Lloh1:
	ldr	x0, [x0, _tun_ioctl_sx@GOTPAGEOFF]
	bl	_sx_xlock
	ldr	x21, [x20, #8]
	cbz	x21, LBB0_4
; %bb.1:
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _TUN_L2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TUN_L2@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	and	w9, w9, w8
	sub	w10, w22, #128
	cmp	w10, #7
	b.hi	LBB0_6
; %bb.2:
	mov	w22, #0
Lloh5:
	adrp	x11, lJTI0_0@PAGE
Lloh6:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_3
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_3:
	ldr	w8, [x19, #4]
	str	w8, [x20, #4]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_21
LBB0_4:
Lloh9:
	adrp	x8, _ENXIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_5:
	ldr	w22, [x8]
	b	LBB0_25
LBB0_6:
	cbz	w9, LBB0_18
; %bb.7:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_ether_ioctl
	mov	x22, x0
	b	LBB0_25
LBB0_8:
	mov	x0, x21
	bl	_TUN_LOCK
	ldr	w8, [x19]
	str	w8, [x20]
	mov	x0, x20
	bl	_tun_caps_changed
	mov	x0, x21
	bl	_TUN_UNLOCK
	mov	x0, x20
	bl	_VLAN_CAPABILITIES
	b	LBB0_24
LBB0_9:
	mov	x0, x20
	cbz	w9, LBB0_19
; %bb.10:
	mov	w1, #131
	mov	x2, x19
	bl	_ether_ioctl
	mov	x22, x0
	cbnz	w0, LBB0_25
	b	LBB0_20
LBB0_11:
	mov	x0, x21
	bl	_TUN_LOCK
	ldr	w3, [x21, #4]
	ldr	x0, [x19]
	cbz	w3, LBB0_22
; %bb.12:
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #8
	bl	_snprintf
	b	LBB0_23
LBB0_13:
	cbz	w9, LBB0_18
; %bb.14:
	ldr	w9, [x19]
	mov	w10, #1
	str	w10, [x19]
Lloh13:
	adrp	x10, _IFM_AVALID@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IFM_AVALID@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x10]
	str	w11, [x19, #24]
Lloh16:
	adrp	x10, _IFM_ETHER@GOTPAGE
Lloh17:
	ldr	x10, [x10, _IFM_ETHER@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	str	x10, [x19, #8]
Lloh19:
	adrp	x12, _TUN_OPEN@GOTPAGE
Lloh20:
	ldr	x12, [x12, _TUN_OPEN@GOTPAGEOFF]
Lloh21:
	ldr	w12, [x12]
	tst	w12, w8
	b.eq	LBB0_16
; %bb.15:
Lloh22:
	adrp	x8, _IFM_ACTIVE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IFM_ACTIVE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w8, w8, w11
	str	w8, [x19, #24]
LBB0_16:
	str	x10, [x19, #16]
	cmp	w9, #1
	b.lt	LBB0_24
; %bb.17:
	str	w10, [sp, #12]
	ldr	w1, [x19, #4]
	add	x0, sp, #12
	mov	w2, #4
	bl	_copyout
	mov	x22, x0
	b	LBB0_25
LBB0_18:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_19:
	bl	_tuninit
LBB0_20:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_21:
	mov	x0, x20
	bl	_TUNDEBUG
	b	LBB0_24
LBB0_22:
	strb	wzr, [x0]
LBB0_23:
	mov	x0, x21
	bl	_TUN_UNLOCK
LBB0_24:
	mov	w22, #0
LBB0_25:
Lloh29:
	adrp	x0, _tun_ioctl_sx@GOTPAGE
Lloh30:
	ldr	x0, [x0, _tun_ioctl_sx@GOTPAGEOFF]
	bl	_sx_xunlock
	mov	x0, x22
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_25-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_13-LBB0_3)>>2
	.byte	(LBB0_25-LBB0_3)>>2
	.byte	(LBB0_25-LBB0_3)>>2
                                        ; -- End function
	.comm	_tun_ioctl_sx,4,2               ; @tun_ioctl_sx
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_TUN_L2,4,2                     ; @TUN_L2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\tOpened by PID %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"address set\n"

l_.str.2:                               ; @.str.2
	.asciz	"mtu set\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IFM_AVALID,4,2                 ; @IFM_AVALID
	.comm	_IFM_ETHER,8,3                  ; @IFM_ETHER
	.comm	_TUN_OPEN,4,2                   ; @TUN_OPEN
	.comm	_IFM_ACTIVE,4,2                 ; @IFM_ACTIVE
	.no_dead_strip	_tunifioctl
.subsections_via_symbols
