	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __bcm_sysport_tx_reclaim
___bcm_sysport_tx_reclaim:              ## @__bcm_sysport_tx_reclaim
	.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, %rbx
	movq	%rdi, %r13
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rsi), %rdi
	movq	56(%rsi), %r14
	cmpl	$0, (%r14)
	je	LBB0_1
## %bb.2:
	movq	_INTRL2_0_TDMA_MBDONE_SHIFT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_BIT
	movq	_INTRL2_CPU_CLEAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intrl2_0_writel
	jmp	LBB0_3
LBB0_1:
	callq	_BIT
	movq	_INTRL2_CPU_CLEAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_intrl2_1_writel
LBB0_3:
	movq	32(%rbx), %rdi
	callq	_TDMA_DESC_RING_PROD_CONS_INDEX
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_tdma_readl
	movl	%eax, %r12d
	movq	_RING_CONS_INDEX_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %r12d
	movq	_RING_CONS_INDEX_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	%r14d, %r12d
	movl	(%rbx), %r9d
	movl	%r12d, %r15d
	subl	%r9d, %r15d
	movq	_tx_done@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	32(%rbx), %r8
	movl	%r15d, %eax
	andl	%r14d, %eax
	leaq	L_.str(%rip), %rcx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	pushq	%rax
	pushq	%r12
	callq	_netif_dbg
	addq	$16, %rsp
	andl	%r14d, %r15d
	je	LBB0_9
## %bb.4:
	movq	8(%rbx), %rsi
	leaq	-48(%rbp), %r13
	leaq	-44(%rbp), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rbx), %rsi
	incq	%rsi
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rsi, 8(%rbx)
	decl	%r15d
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	shlq	$2, %rsi
	addq	48(%rbx), %rsi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_bcm_sysport_tx_reclaim_one
	incl	40(%rbx)
	movslq	16(%rbx), %rax
	decq	%rax
	xorl	%edi, %edi
	cmpq	%rax, 8(%rbx)
	setb	%dil
	callq	_likely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_8
LBB0_9:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_u64_stats_update_begin
	movl	-44(%rbp), %eax
	addl	%eax, 20(%rbx)
	movl	-48(%rbp), %eax
	addl	%eax, 24(%rbx)
	movq	%r14, %rdi
	callq	_u64_stats_update_end
	movl	%r12d, (%rbx)
	movq	_tx_done@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	32(%rbx), %r8
	movl	-44(%rbp), %eax
	movl	-48(%rbp), %ebx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %r9d
	pushq	%rbx
	pushq	%rax
	callq	_netif_dbg
	addq	$16, %rsp
	movl	-44(%rbp), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTRL2_CPU_CLEAR,4,2           ## @INTRL2_CPU_CLEAR
	.comm	_INTRL2_0_TDMA_MBDONE_SHIFT,8,3 ## @INTRL2_0_TDMA_MBDONE_SHIFT
	.comm	_RING_CONS_INDEX_SHIFT,4,2      ## @RING_CONS_INDEX_SHIFT
	.comm	_RING_CONS_INDEX_MASK,4,2       ## @RING_CONS_INDEX_MASK
	.comm	_tx_done,4,2                    ## @tx_done
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ring=%d old_c_index=%u c_index=%u txbds_ready=%u\n"

L_.str.1:                               ## @.str.1
	.asciz	"ring=%d c_index=%d pkts_compl=%d, bytes_compl=%d\n"

	.no_dead_strip	___bcm_sysport_tx_reclaim
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __bcm_sysport_tx_reclaim
___bcm_sysport_tx_reclaim:              ; @__bcm_sysport_tx_reclaim
	.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	x21, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	ldr	x20, [x0, #8]
	ldr	x22, [x1, #56]
	ldr	w8, [x22]
	ldr	x0, [x1, #32]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _INTRL2_0_TDMA_MBDONE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTRL2_0_TDMA_MBDONE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x0, x8, x0
	bl	_BIT
	mov	x1, x0
Lloh3:
	adrp	x8, _INTRL2_CPU_CLEAR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTRL2_CPU_CLEAR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_intrl2_0_writel
	b	LBB0_3
LBB0_2:
	bl	_BIT
	mov	x1, x0
Lloh6:
	adrp	x8, _INTRL2_CPU_CLEAR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTRL2_CPU_CLEAR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_intrl2_1_writel
LBB0_3:
	ldr	x0, [x21, #32]
	bl	_TDMA_DESC_RING_PROD_CONS_INDEX
	mov	x1, x0
	mov	x0, x19
	bl	_tdma_readl
Lloh9:
	adrp	x8, _RING_CONS_INDEX_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RING_CONS_INDEX_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsr	w8, w0, w8
Lloh12:
	adrp	x9, _RING_CONS_INDEX_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RING_CONS_INDEX_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w22, w8, w9
	ldr	w5, [x21]
	sub	w8, w22, w5
	and	w23, w8, w9
Lloh15:
	adrp	x24, _tx_done@GOTPAGE
Lloh16:
	ldr	x24, [x24, _tx_done@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x4, [x21, #32]
Lloh17:
	adrp	x3, l_.str@PAGE
Lloh18:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x6, x22
	mov	x7, x23
	bl	_netif_dbg
	cbz	w23, LBB0_9
; %bb.4:
	ldr	x8, [x21, #8]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #8]
	add	x8, x8, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x21, #8]
	subs	w23, w23, #1
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #48]
	add	x1, x9, x8, lsl #2
	add	x2, sp, #8
	add	x3, sp, #12
	mov	x0, x21
	bl	_bcm_sysport_tx_reclaim_one
	ldr	w8, [x21, #40]
	add	w8, w8, #1
	str	w8, [x21, #40]
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21, #16]
	sub	x9, x9, #1
	cmp	x8, x9
	cset	w0, lo
	bl	_likely
	cbnz	x0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x8, #0
	b	LBB0_6
LBB0_9:
	mov	x0, x19
	bl	_u64_stats_update_begin
	ldr	w8, [sp, #12]
	ldp	w9, w10, [x21, #20]
	add	w8, w9, w8
	ldr	w9, [sp, #8]
	add	w9, w10, w9
	stp	w8, w9, [x21, #20]
	mov	x0, x19
	bl	_u64_stats_update_end
	str	w22, [x21]
	ldr	w1, [x24]
	ldr	x4, [x21, #32]
	ldp	w7, w6, [sp, #8]
Lloh19:
	adrp	x3, l_.str.1@PAGE
Lloh20:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x5, x22
	bl	_netif_dbg
	ldr	w0, [sp, #12]
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_INTRL2_CPU_CLEAR,4,2           ; @INTRL2_CPU_CLEAR
	.comm	_INTRL2_0_TDMA_MBDONE_SHIFT,8,3 ; @INTRL2_0_TDMA_MBDONE_SHIFT
	.comm	_RING_CONS_INDEX_SHIFT,4,2      ; @RING_CONS_INDEX_SHIFT
	.comm	_RING_CONS_INDEX_MASK,4,2       ; @RING_CONS_INDEX_MASK
	.comm	_tx_done,4,2                    ; @tx_done
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ring=%d old_c_index=%u c_index=%u txbds_ready=%u\n"

l_.str.1:                               ; @.str.1
	.asciz	"ring=%d c_index=%d pkts_compl=%d, bytes_compl=%d\n"

	.no_dead_strip	___bcm_sysport_tx_reclaim
.subsections_via_symbols
