	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tun_attach
_tun_attach:                            ## @tun_attach
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movq	%rdi, %r14
	movq	(%rsi), %r12
	movq	64(%rdi), %r15
	movq	72(%r12), %rdi
	movl	88(%r14), %esi
	callq	_security_tun_dev_attach
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	32(%r12), %edi
	callq	_rtnl_dereference
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	cmpq	$0, 48(%r12)
	je	LBB0_18
LBB0_3:
	movq	_IFF_MULTI_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_6
## %bb.4:
	cmpl	$1, 4(%r14)
	jne	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_6:
	movq	48(%r12), %rax
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:
	movslq	4(%r14), %rcx
	addq	8(%r14), %rcx
	movq	_MAX_TAP_QUEUES@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.8:
	movq	_E2BIG@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_10:
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	jne	LBB0_14
## %bb.11:
	cmpl	$1, 16(%r14)
	jne	LBB0_14
## %bb.12:
	movq	72(%r12), %rdi
	callq	_lock_sock
	leaq	84(%r14), %rdi
	movq	72(%r12), %rsi
	callq	_sk_attach_filter
	movl	%eax, %ebx
	movq	72(%r12), %rdi
	callq	_release_sock
	testl	%ebx, %ebx
	je	LBB0_35
## %bb.13:
	movq	48(%r12), %rax
LBB0_14:
	testq	%rax, %rax
	je	LBB0_19
LBB0_15:
	movl	4(%r14), %edx
	movl	%edx, 20(%r12)
	movq	_RCV_SHUTDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movq	72(%r12), %rsi
	andl	%ecx, (%rsi)
	leaq	56(%r12), %r13
	testq	%rax, %rax
	je	LBB0_22
## %bb.16:
	movq	%r13, %rdi
	callq	_xdp_rxq_info_is_reg
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movl	20(%r12), %eax
	cmpl	%eax, 56(%r12)
	je	LBB0_24
## %bb.17:
	movl	%eax, (%r13)
	jmp	LBB0_24
LBB0_18:
	negl	%ebx
	jmp	LBB0_32
LBB0_19:
	leaq	80(%r12), %rdi
	movl	(%r15), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_tun_ptr_free@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ptr_ring_resize
	testq	%rax, %rax
	je	LBB0_33
## %bb.20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_21:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_32
LBB0_22:
	movq	64(%r14), %rsi
	movq	%r13, %rdi
	callq	_xdp_rxq_info_reg
	testl	%eax, %eax
	js	LBB0_9
## %bb.23:
	movq	_MEM_TYPE_PAGE_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_xdp_rxq_info_reg_mem_model
	testl	%eax, %eax
	js	LBB0_36
LBB0_24:
	cmpq	$0, 48(%r12)
	je	LBB0_26
## %bb.25:
	movq	%r12, %rdi
	callq	_tun_enable_queue
	jmp	LBB0_27
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_32
LBB0_26:
	leaq	36(%r12), %rdi
	callq	_sock_hold
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	_tun_napi_init
LBB0_27:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	40(%r14), %edi
	callq	_rtnl_dereference
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	leaq	36(%r12), %rdi
	movq	_SOCK_XDP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sock_set_flag
LBB0_29:
	testl	%r15d, %r15d
	je	LBB0_31
## %bb.30:
	movl	32(%r12), %edi
	movq	%r14, %rsi
	callq	_rcu_assign_pointer
LBB0_31:
	movq	24(%r14), %rax
	movslq	4(%r14), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	%r12, %rsi
	callq	_rcu_assign_pointer
	incl	4(%r14)
	movq	%r14, %rdi
	callq	_tun_set_real_num_queues
LBB0_32:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	movq	48(%r12), %rax
	jmp	LBB0_15
LBB0_35:
	xorl	%ebx, %ebx
	jmp	LBB0_32
LBB0_36:
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_xdp_rxq_info_unreg
	movl	%r15d, %ebx
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IFF_MULTI_QUEUE,4,2            ## @IFF_MULTI_QUEUE
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_MAX_TAP_QUEUES,8,3             ## @MAX_TAP_QUEUES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_tun_ptr_free,4,2               ## @tun_ptr_free
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RCV_SHUTDOWN,4,2               ## @RCV_SHUTDOWN
	.comm	_MEM_TYPE_PAGE_SHARED,4,2       ## @MEM_TYPE_PAGE_SHARED
	.comm	_SOCK_XDP,4,2                   ## @SOCK_XDP
	.no_dead_strip	_tun_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tun_attach
_tun_attach:                            ; @tun_attach
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x25, x2
	mov	x19, x0
	ldr	x20, [x1]
	ldr	x26, [x0, #64]
	ldr	x0, [x20, #72]
	ldr	w1, [x19, #88]
	bl	_security_tun_dev_attach
	tbnz	w0, #31, LBB0_33
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	ldr	w0, [x20, #32]
	bl	_rtnl_dereference
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_17
LBB0_3:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _IFF_MULTI_QUEUE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IFF_MULTI_QUEUE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_16
LBB0_6:
	ldr	x8, [x20, #48]
	cbnz	x8, LBB0_9
; %bb.7:
	ldrsw	x9, [x19, #4]
	ldr	x10, [x19, #8]
Lloh8:
	adrp	x11, _MAX_TAP_QUEUES@GOTPAGE
Lloh9:
	ldr	x11, [x11, _MAX_TAP_QUEUES@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
	add	x9, x10, x9
	cmp	x9, x11
	b.ne	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _E2BIG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
	cbnz	w25, LBB0_13
; %bb.10:
	ldr	w9, [x19, #16]
	cmp	w9, #1
	b.ne	LBB0_13
; %bb.11:
	ldr	x0, [x20, #72]
	bl	_lock_sock
	add	x0, x19, #84
	ldr	x1, [x20, #72]
	bl	_sk_attach_filter
	mov	x24, x0
	ldr	x0, [x20, #72]
	bl	_release_sock
	cbz	w24, LBB0_34
; %bb.12:
	ldr	x8, [x20, #48]
	cbnz	x8, LBB0_19
	b	LBB0_14
LBB0_13:
	mov	w24, #0
	cbnz	x8, LBB0_19
LBB0_14:
	add	x0, x20, #80
	ldr	w1, [x26]
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _tun_ptr_free@GOTPAGE
Lloh17:
	ldr	x8, [x8, _tun_ptr_free@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	bl	_ptr_ring_resize
	cbz	x0, LBB0_18
; %bb.15:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_34
LBB0_17:
	neg	w24, w24
	b	LBB0_34
LBB0_18:
	ldr	x8, [x20, #48]
LBB0_19:
	ldr	w2, [x19, #4]
	str	w2, [x20, #20]
Lloh21:
	adrp	x9, _RCV_SHUTDOWN@GOTPAGE
Lloh22:
	ldr	x9, [x9, _RCV_SHUTDOWN@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	ldr	x10, [x20, #72]
	ldr	w11, [x10]
	bic	w9, w11, w9
	str	w9, [x10]
	add	x25, x20, #56
	cbz	x8, LBB0_24
; %bb.20:
	mov	x0, x25
	bl	_xdp_rxq_info_is_reg
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w9, [x20, #56]
	ldr	w8, [x20, #20]
	cmp	w9, w8
	b.eq	LBB0_22
; %bb.21:
	str	w8, [x25]
LBB0_22:
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_27
LBB0_23:
	mov	x0, x20
	bl	_tun_enable_queue
	b	LBB0_28
LBB0_24:
	ldr	x1, [x19, #64]
	mov	x0, x25
	bl	_xdp_rxq_info_reg
	tbnz	w0, #31, LBB0_33
; %bb.25:
Lloh24:
	adrp	x8, _MEM_TYPE_PAGE_SHARED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MEM_TYPE_PAGE_SHARED@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x25
	mov	x2, #0
	bl	_xdp_rxq_info_reg_mem_model
	tbnz	w0, #31, LBB0_35
; %bb.26:
	mov	w24, #0
	ldr	x8, [x20, #48]
	cbnz	x8, LBB0_23
LBB0_27:
	add	x0, x20, #36
	bl	_sock_hold
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	_tun_napi_init
LBB0_28:
	ldr	w0, [x19, #40]
	bl	_rtnl_dereference
	cbz	x0, LBB0_30
; %bb.29:
	add	x0, x20, #36
Lloh27:
	adrp	x8, _SOCK_XDP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SOCK_XDP@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_sock_set_flag
LBB0_30:
	cbz	w21, LBB0_32
; %bb.31:
	ldr	w0, [x20, #32]
	mov	x1, x19
	bl	_rcu_assign_pointer
LBB0_32:
	ldr	x8, [x19, #24]
	ldrsw	x9, [x19, #4]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, x20
	bl	_rcu_assign_pointer
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_tun_set_real_num_queues
	b	LBB0_34
LBB0_33:
	mov	x24, x0
LBB0_34:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_35:
	mov	x24, x0
	mov	x0, x25
	bl	_xdp_rxq_info_unreg
	b	LBB0_34
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IFF_MULTI_QUEUE,4,2            ; @IFF_MULTI_QUEUE
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_MAX_TAP_QUEUES,8,3             ; @MAX_TAP_QUEUES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_tun_ptr_free,4,2               ; @tun_ptr_free
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RCV_SHUTDOWN,4,2               ; @RCV_SHUTDOWN
	.comm	_MEM_TYPE_PAGE_SHARED,4,2       ; @MEM_TYPE_PAGE_SHARED
	.comm	_SOCK_XDP,4,2                   ; @SOCK_XDP
	.no_dead_strip	_tun_attach
.subsections_via_symbols
