	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cfv_netdev_tx
_cfv_netdev_tx:                         ## @cfv_netdev_tx
	.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
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r15
	movq	24(%rax), %rdi
	callq	_cfv_release_used_buf
	leaq	16(%r15), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	24(%r15), %rax
	movq	(%rax), %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_num_present_cpus
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	setle	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	incl	60(%r15)
	movl	$1, %r14d
LBB0_2:
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %rbx
	movq	%r12, %rsi
	callq	_cfv_alloc_and_copy_to_shm
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	incl	56(%r15)
	movq	32(%r15), %rsi
	movl	$1, %r14d
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.4:
	movq	48(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movl	40(%r15), %edx
	callq	_gen_pool_free
	movq	$0, 32(%r15)
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_cfv_alloc_and_copy_to_shm
	movq	%rax, %r12
LBB0_6:
	movl	%r14d, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	24(%r15), %rdi
	callq	_virtqueue_get_vring_size
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, (%r15)
	movq	24(%r15), %rdi
	callq	_virtqueue_enable_cb
	movq	%r13, %rdi
	callq	_netif_tx_stop_all_queues
LBB0_8:
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_warn
	jmp	LBB0_12
LBB0_10:
	movq	24(%r15), %rdi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-48(%rbp), %rsi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_virtqueue_add_outbuf
	movl	%eax, %r14d
	movl	%eax, %edi
	shrl	$31, %edi
	callq	_unlikely
	movq	8(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_netdev_warn
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	8(%r15), %rax
	incl	(%rax)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_free_buf_info
LBB0_13:
	movq	%rbx, %rdi
	callq	_dev_kfree_skb
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	incl	8(%rdi)
	movl	(%rbx), %eax
	addl	%eax, 4(%rdi)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movq	24(%r15), %rdi
	callq	_virtqueue_kick
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of gen_pool memory\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"Failed adding buffer to TX vring:%d\n"

	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_cfv_netdev_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cfv_netdev_tx
_cfv_netdev_tx:                         ; @cfv_netdev_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x1
	mov	x19, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x20, x0
	ldr	x0, [x0, #24]
	bl	_cfv_release_used_buf
	add	x21, x20, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #24]
	ldr	x23, [x8]
	bl	_num_present_cpus
	cmp	x23, x0
	cset	w0, le
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x20, #60]
	add	w8, w8, #1
	str	w8, [x20, #60]
	mov	w24, #1
	b	LBB0_3
LBB0_2:
	mov	w24, #0
LBB0_3:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_cfv_alloc_and_copy_to_shm
	mov	x23, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w8, [x20, #56]
	add	w8, w8, #1
	str	w8, [x20, #56]
	ldr	x1, [x20, #32]
	cbz	x1, LBB0_7
; %bb.5:
	ldr	x0, [x20, #48]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w2, [x20, #40]
	bl	_gen_pool_free
	str	xzr, [x20, #32]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_cfv_alloc_and_copy_to_shm
	mov	x23, x0
LBB0_7:
	mov	w24, #1
LBB0_8:
	mov	x0, x24
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x0, [x20, #24]
	bl	_virtqueue_get_vring_size
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #2
	str	w8, [x20]
	ldr	x0, [x20, #24]
	bl	_virtqueue_enable_cb
	mov	x0, x22
	bl	_netif_tx_stop_all_queues
LBB0_10:
	cmp	x23, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x0, [x20, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_12:
	ldr	x0, [x20, #24]
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
	add	x1, sp, #8
	mov	w2, #1
	mov	x3, x23
	bl	_virtqueue_add_outbuf
	mov	x22, x0
	lsr	w0, w0, #31
	bl	_unlikely
	mov	x8, x0
	ldr	x0, [x20, #8]
	cbz	x8, LBB0_16
; %bb.13:
	str	x22, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_14:
	bl	_netdev_warn
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	x0, x20
	mov	x1, x23
	bl	_free_buf_info
LBB0_15:
	mov	x0, x19
	bl	_dev_kfree_skb
Lloh7:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	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
	add	sp, sp, #80
	ret
LBB0_16:
	ldur	d0, [x0, #4]
	movi.2s	v1, #1
	ld1.s	{ v1 }[0], [x19]
	add.2s	v0, v0, v1
	stur	d0, [x0, #4]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x0, [x20, #24]
	bl	_virtqueue_kick
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of gen_pool memory\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"Failed adding buffer to TX vring:%d\n"

	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_cfv_netdev_tx
.subsections_via_symbols
