	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function velocity_tx_srv
_velocity_tx_srv:                       ## @velocity_tx_srv
	.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	%rdi, %r14
	cmpl	$0, 16(%rdi)
	jle	LBB0_1
## %bb.2:
	movq	8(%r14), %r13
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %r12d                ## 4-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r14), %rax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%edx, (%rax,%r15,4)
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_AVAIL_TD
	testl	%eax, %eax
	movl	$1, %eax
	cmovlel	%eax, %ebx
	incq	%r15
	movslq	16(%r14), %rax
	cmpq	%rax, %r15
	jge	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	24(%r14), %rax
	movq	32(%r14), %rcx
	movl	(%rax,%r15,4), %edx
	cmpq	$0, (%rcx,%r15,8)
	jle	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	cmpl	$17, %r12d
	movl	$16, %eax
	cmovgel	%r12d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	incl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=2
	incl	4(%r13)
	movq	(%rsi), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, (%r13)
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=2
	leaq	(%rax,%rbx,8), %rdx
	movq	%r14, %rdi
	callq	_velocity_free_tx_buf
	movq	32(%r14), %rax
	movq	(%rax,%r15,8), %rcx
	leaq	-1(%rcx), %rdx
	movq	%rdx, (%rax,%r15,8)
	incl	%ebx
	movl	%ebx, %eax
	cltd
	idivl	56(%r14)
	incl	%r12d
	cmpq	$1, %rcx
	jle	LBB0_19
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	48(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movslq	%edx, %rbx
	movq	_OWNED_BY_NIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax,%rbx,8)
	jne	LBB0_19
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpl	%r12d, -56(%rbp)                ## 4-byte Folded Reload
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	40(%r14), %rcx
	leaq	(,%rbx,8), %rsi
	addq	(%rcx,%r15,8), %rsi
	movl	4(%rax,%rbx,8), %ecx
	movq	_TSR0_TERR@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	incl	28(%r13)
	incl	24(%r13)
	movq	_TSR0_CDH@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=2
	incl	20(%r13)
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	_TSR0_CRS@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=2
	incl	16(%r13)
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	_TSR0_ABT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=2
	incl	12(%r13)
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	_TSR0_OWC@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=2
	incl	8(%r13)
	jmp	LBB0_18
LBB0_21:
	testl	%ebx, %ebx
	sete	%bl
	jmp	LBB0_22
LBB0_1:
	movb	$1, %bl
	xorl	%r12d, %r12d
LBB0_22:
	movq	8(%r14), %rdi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_26
## %bb.23:
	testb	%bl, %bl
	je	LBB0_26
## %bb.24:
	movq	_VELOCITY_LINK_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_26
## %bb.25:
	movq	8(%r14), %rdi
	callq	_netif_wake_queue
LBB0_26:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OWNED_BY_NIC,4,2               ## @OWNED_BY_NIC
	.comm	_TSR0_TERR,4,2                  ## @TSR0_TERR
	.comm	_TSR0_CDH,4,2                   ## @TSR0_CDH
	.comm	_TSR0_CRS,4,2                   ## @TSR0_CRS
	.comm	_TSR0_ABT,4,2                   ## @TSR0_ABT
	.comm	_TSR0_OWC,4,2                   ## @TSR0_OWC
	.comm	_VELOCITY_LINK_FAIL,4,2         ## @VELOCITY_LINK_FAIL
	.no_dead_strip	_velocity_tx_srv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function velocity_tx_srv
_velocity_tx_srv:                       ; @velocity_tx_srv
	.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
	mov	x19, x0
	ldr	w8, [x0, #16]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.1:
	mov	x21, #0
	mov	w22, #0
	mov	w20, #0
	ldr	x23, [x19, #8]
Lloh0:
	adrp	x24, _OWNED_BY_NIC@GOTPAGE
Lloh1:
	ldr	x24, [x24, _OWNED_BY_NIC@GOTPAGEOFF]
Lloh2:
	adrp	x26, _TSR0_TERR@GOTPAGE
Lloh3:
	ldr	x26, [x26, _TSR0_TERR@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #24]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w28, [x8, x21, lsl #2]
	mov	x0, x19
	mov	x1, x21
	bl	_AVAIL_TD
	cmp	w0, #1
	csinc	w22, w22, wzr, ge
	add	x21, x21, #1
	ldrsw	x8, [x19, #16]
	cmp	x21, x8
	b.ge	LBB0_20
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldp	x8, x9, [x19, #24]
	ldr	w28, [x8, x21, lsl #2]
	ldr	x9, [x9, x21, lsl #3]
	cmp	x9, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w20, #16
	mov	w8, #16
	csel	w25, w20, w8, gt
	add	w8, w25, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x1]
	ldr	d0, [x23]
	movi.2s	v1, #1
	ld1.s	{ v1 }[0], [x8]
	add.2s	v0, v0, v1
	str	d0, [x23]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x19
	bl	_velocity_free_tx_buf
	ldr	x8, [x19, #32]
	ldr	x9, [x8, x27]
	add	w10, w28, #1
	ldr	w11, [x19, #56]
	sdiv	w12, w10, w11
	msub	w28, w12, w11, w10
	add	w20, w20, #1
	subs	x9, x9, #1
	str	x9, [x8, x27]
	b.le	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #48]
	lsl	x27, x21, #3
	ldr	x8, [x8, x27]
	sbfiz	x9, x28, #3, #32
	add	x2, x8, x9
	ldr	w10, [x2]
	ldr	w11, [x24]
	tst	w11, w10
	b.ne	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	cmp	w25, w20
	b.eq	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x10, [x19, #40]
	ldr	x10, [x10, x27]
	sxtw	x11, w28
	add	x1, x10, x9
	add	x8, x8, x11, lsl #3
	ldr	w8, [x8, #4]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	d0, [x23, #24]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	str	d0, [x23, #24]
Lloh4:
	adrp	x9, _TSR0_CDH@GOTPAGE
Lloh5:
	ldr	x9, [x9, _TSR0_CDH@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w9, [x23, #20]
	add	w9, w9, #1
	str	w9, [x23, #20]
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=2
Lloh7:
	adrp	x9, _TSR0_CRS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TSR0_CRS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w9, [x23, #16]
	add	w9, w9, #1
	str	w9, [x23, #16]
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=2
Lloh10:
	adrp	x9, _TSR0_ABT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TSR0_ABT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w9, [x23, #12]
	add	w9, w9, #1
	str	w9, [x23, #12]
LBB0_18:                                ;   in Loop: Header=BB0_9 Depth=2
Lloh13:
	adrp	x9, _TSR0_OWC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TSR0_OWC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.19:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x23, #8]
	add	w8, w8, #1
	str	w8, [x23, #8]
	b	LBB0_8
LBB0_20:
	cmp	w22, #0
	cset	w21, eq
	b	LBB0_22
LBB0_21:
	mov	w20, #0
	mov	w21, #1
LBB0_22:
	ldr	x0, [x19, #8]
	bl	_netif_queue_stopped
	cmp	x0, #0
	ccmp	w21, #0, #4, ne
	b.eq	LBB0_25
; %bb.23:
	ldr	w8, [x19]
Lloh16:
	adrp	x9, _VELOCITY_LINK_FAIL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _VELOCITY_LINK_FAIL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_25
; %bb.24:
	ldr	x0, [x19, #8]
	bl	_netif_wake_queue
LBB0_25:
	mov	x0, x20
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_OWNED_BY_NIC,4,2               ; @OWNED_BY_NIC
	.comm	_TSR0_TERR,4,2                  ; @TSR0_TERR
	.comm	_TSR0_CDH,4,2                   ; @TSR0_CDH
	.comm	_TSR0_CRS,4,2                   ; @TSR0_CRS
	.comm	_TSR0_ABT,4,2                   ; @TSR0_ABT
	.comm	_TSR0_OWC,4,2                   ; @TSR0_OWC
	.comm	_VELOCITY_LINK_FAIL,4,2         ; @VELOCITY_LINK_FAIL
	.no_dead_strip	_velocity_tx_srv
.subsections_via_symbols
