	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sunvnet_port_free_tx_bufs_common ## -- Begin function sunvnet_port_free_tx_bufs_common
	.p2align	4, 0x90
_sunvnet_port_free_tx_bufs_common:      ## @sunvnet_port_free_tx_bufs_common
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r8
	movq	_VIO_DRIVER_TX_RING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %rbx
	movq	24(%r8,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	leaq	(%r8,%rbx,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_VNET_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.2:
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leaq	(%r8,%rbx,8), %rcx
	addq	$24, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rcx
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rdx
	addq	$16, %r14
	cmpq	%rdx, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%r14), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_vio_dring_entry
	movq	%rax, %r13
	movl	(%r15), %edi
	movq	16(%r15), %rax
	movl	8(%rax,%r14), %edx
	movl	12(%rax,%r14), %esi
	callq	_ldc_unmap
	movq	%r12, %rdi
	callq	_dev_kfree_skb
	movq	16(%r15), %rcx
	movq	$0, (%rcx,%r14)
	movq	_VIO_DESC_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	_VNET_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_7:
	movl	(%r15), %edi
	movl	4(%r8,%rbx,8), %edx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	imull	(%r14), %edx
	movl	32(%r8,%rbx,8), %ecx
	movq	8(%r8,%rbx,8), %r8
	callq	_ldc_free_exp_dring
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	movups	%xmm0, 16(%r14)
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIO_DRIVER_TX_RING,8,3         ## @VIO_DRIVER_TX_RING
	.comm	_VNET_TX_RING_SIZE,4,2          ## @VNET_TX_RING_SIZE
	.comm	_VIO_DESC_FREE,4,2              ## @VIO_DESC_FREE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sunvnet_port_free_tx_bufs_common ; -- Begin function sunvnet_port_free_tx_bufs_common
	.p2align	2
_sunvnet_port_free_tx_bufs_common:      ; @sunvnet_port_free_tx_bufs_common
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x10, [x0, #8]
Lloh0:
	adrp	x8, _VIO_DRIVER_TX_RING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIO_DRIVER_TX_RING@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	mov	w8, #40
	madd	x19, x25, x8, x10
	mov	x26, x19
	ldr	x1, [x26, #24]!
	cbz	x1, LBB0_8
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x27, _VNET_TX_RING_SIZE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _VNET_TX_RING_SIZE@GOTPAGEOFF]
	ldr	w9, [x27]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.2:
	str	x10, [sp, #8]                   ; 8-byte Folded Spill
	mov	x28, #0
	mov	x21, #0
	ldr	x8, [x20, #16]
Lloh5:
	adrp	x24, _VIO_DESC_FREE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _VIO_DESC_FREE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	add	x28, x28, #16
	cmp	x21, w9, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x8, x28]
	cbz	x22, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_vio_dring_entry
	mov	x23, x0
	ldr	w0, [x20]
	ldr	x8, [x20, #16]
	add	x8, x8, x28
	ldp	w2, w1, [x8, #8]
	bl	_ldc_unmap
	mov	x0, x22
	bl	_dev_kfree_skb
	ldr	x8, [x20, #16]
	str	xzr, [x8, x28]
	ldr	w9, [x24]
	str	w9, [x23]
	ldr	w9, [x27]
	b	LBB0_3
LBB0_6:
	ldr	x1, [x26]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
LBB0_7:
	ldr	w0, [x20]
	ldr	w8, [x19]
	mov	w9, #40
	madd	x9, x25, x9, x10
	ldr	w10, [x9, #4]
	mul	w2, w10, w8
	ldr	w3, [x9, #32]
	ldr	x4, [x9, #8]
	bl	_ldc_free_exp_dring
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VIO_DRIVER_TX_RING,8,3         ; @VIO_DRIVER_TX_RING
	.comm	_VNET_TX_RING_SIZE,4,2          ; @VNET_TX_RING_SIZE
	.comm	_VIO_DESC_FREE,4,2              ; @VIO_DESC_FREE
.subsections_via_symbols
