	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tun_set_queue
_tun_set_queue:                         ## @tun_set_queue
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rdi), %r15
	xorl	%eax, %eax
	callq	_rtnl_lock
	movl	(%rbx), %eax
	movq	_IFF_ATTACH_QUEUE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.1:
	movq	(%r15), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.3:
	movl	8(%r14), %edi
	callq	_security_tun_dev_attach_queue
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	(%r14), %r8d
	movq	_IFF_NAPI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%r8d, %ecx
	movq	_IFF_NAPI_FRAGS@GOTPCREL(%rip), %rax
	andl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	$1, %r9d
	callq	_tun_attach
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_14
	jmp	LBB0_15
LBB0_6:
	movq	_IFF_DETACH_QUEUE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.7:
	movl	8(%r15), %edi
	callq	_rtnl_dereference
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	_IFF_MULTI_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.9:
	cmpq	$0, (%r15)
	je	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jns	LBB0_14
	jmp	LBB0_15
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_4:
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
                                        ## implicit-def: $r14
	testl	%ebx, %ebx
	jns	LBB0_14
	jmp	LBB0_15
LBB0_11:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	___tun_detach
LBB0_14:
	movl	4(%r14), %edi
	callq	_netdev_state_change
LBB0_15:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IFF_ATTACH_QUEUE,4,2           ## @IFF_ATTACH_QUEUE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IFF_NAPI,4,2                   ## @IFF_NAPI
	.comm	_IFF_NAPI_FRAGS,4,2             ## @IFF_NAPI_FRAGS
	.comm	_IFF_DETACH_QUEUE,4,2           ## @IFF_DETACH_QUEUE
	.comm	_IFF_MULTI_QUEUE,4,2            ## @IFF_MULTI_QUEUE
	.no_dead_strip	_tun_set_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tun_set_queue
_tun_set_queue:                         ; @tun_set_queue
	.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, x1
	mov	x21, x0
	ldr	x20, [x0]
	bl	_rtnl_lock
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _IFF_ATTACH_QUEUE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IFF_ATTACH_QUEUE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x19, [x20]
	cbz	x19, LBB0_9
; %bb.2:
	ldr	w0, [x19, #8]
	bl	_security_tun_dev_attach_queue
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _IFF_NAPI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IFF_NAPI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w3, w9, w8
Lloh6:
	adrp	x9, _IFF_NAPI_FRAGS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IFF_NAPI_FRAGS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w4, w9, w8
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w5, #1
	bl	_tun_attach
	mov	x20, x0
	tbz	w20, #31, LBB0_13
	b	LBB0_14
LBB0_4:
Lloh9:
	adrp	x9, _IFF_DETACH_QUEUE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IFF_DETACH_QUEUE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.5:
	ldr	w0, [x20, #8]
	bl	_rtnl_dereference
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w8, [x19]
Lloh12:
	adrp	x9, _IFF_MULTI_QUEUE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IFF_MULTI_QUEUE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x20]
	cbz	x8, LBB0_12
LBB0_8:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	tbz	w20, #31, LBB0_13
	b	LBB0_14
LBB0_9:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_10:
	mov	x20, x0
	b	LBB0_14
LBB0_11:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w20, w8
                                        ; implicit-def: $x19
	tbz	w20, #31, LBB0_13
	b	LBB0_14
LBB0_12:
	mov	x0, x20
	mov	w1, #0
	bl	___tun_detach
	mov	w20, #0
LBB0_13:
	ldr	w0, [x19, #4]
	bl	_netdev_state_change
LBB0_14:
	bl	_rtnl_unlock
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IFF_ATTACH_QUEUE,4,2           ; @IFF_ATTACH_QUEUE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IFF_NAPI,4,2                   ; @IFF_NAPI
	.comm	_IFF_NAPI_FRAGS,4,2             ; @IFF_NAPI_FRAGS
	.comm	_IFF_DETACH_QUEUE,4,2           ; @IFF_DETACH_QUEUE
	.comm	_IFF_MULTI_QUEUE,4,2            ; @IFF_MULTI_QUEUE
	.no_dead_strip	_tun_set_queue
.subsections_via_symbols
