	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_tx_packets
_ag71xx_tx_packets:                     ## @ag71xx_tx_packets
	.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
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	8(%rdi), %r12
	movl	40(%rdi), %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	40(%r13), %edi
	callq	_BIT
	movl	%eax, %r14d
	movq	_tx_queued@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%r13, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_netif_dbg
	movl	24(%r13), %r15d
	cmpl	28(%r13), %r15d
	jne	LBB0_2
## %bb.1:
	movq	_tx_done@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	%r12, %rdx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_netif_dbg
	jmp	LBB0_22
LBB0_2:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	leaq	24(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	decl	%ebx
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	24(%r13), %r15d
	addl	%r14d, %r15d
	movl	%r14d, %r12d
	cmpl	28(%r13), %r15d
	je	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	andl	%ebx, %r15d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_ag71xx_ring_desc
	shlq	$4, %r15
	movq	32(%r13), %rcx
	movq	8(%rcx,%r15), %rbx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_DESC_EMPTY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rax)
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_ag71xx_desc_empty
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%r12), %r14d
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_dev_kfree_skb_any
	movq	32(%r13), %rax
	movq	$0, 8(%rax,%r15)
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	addl	(%rax,%r15), %ecx
	movl	%ecx, %eax
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	addl	%r14d, 24(%r13)
	testl	%r12d, %r12d
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	js	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%r14d, %r14d
	movl	$1, %eax
	cmovgl	%eax, %r14d
	addl	$2, %r12d
	movq	_AG71XX_REG_TX_STATUS@GOTPCREL(%rip), %r15
	movq	_TX_STATUS_PS@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_ag71xx_wr
	decl	%r12d
	cmpl	$1, %r12d
	jg	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	decl	%r14d
	jmp	LBB0_14
LBB0_15:
	movb	$1, %r15b
LBB0_16:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	_tx_done@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_netif_dbg
	testl	%r12d, %r12d
	je	LBB0_22
## %bb.17:
	movq	8(%r13), %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	addl	%edx, (%rdi)
	addl	%r12d, 4(%rdi)
	movl	%r12d, %esi
	callq	_netdev_completed_queue
	movl	28(%r13), %eax
	subl	24(%r13), %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leal	(%rdx,%rdx,2), %ecx
	leal	(%rdx,%rdx,2), %edx
	addl	$3, %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$2, %edx
	cmpl	%edx, %eax
	jge	LBB0_19
## %bb.18:
	movq	8(%r13), %rdi
	callq	_netif_wake_queue
LBB0_19:
	testb	%r15b, %r15b
	je	LBB0_21
## %bb.20:
	movq	%r13, %rdi
	callq	_cancel_delayed_work
LBB0_21:
	movl	%r12d, %r14d
LBB0_22:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	16(%r13), %rax
	movb	$1, %r15b
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.6:
	movq	%r13, %rdi
	callq	_ag71xx_check_dma_stuck
	testq	%rax, %rax
	je	LBB0_16
## %bb.7:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r13, %rdi
	callq	_schedule_delayed_work
	xorl	%r15d, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_tx_queued,4,2                  ## @tx_queued
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"processing TX ring\n"

	.comm	_HZ,4,2                         ## @HZ
	.comm	_DESC_EMPTY,4,2                 ## @DESC_EMPTY
	.comm	_AG71XX_REG_TX_STATUS,4,2       ## @AG71XX_REG_TX_STATUS
	.comm	_TX_STATUS_PS,4,2               ## @TX_STATUS_PS
	.comm	_tx_done,4,2                    ## @tx_done
L_.str.1:                               ## @.str.1
	.asciz	"%d packets sent out\n"

	.no_dead_strip	_ag71xx_tx_packets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_tx_packets
_ag71xx_tx_packets:                     ; @ag71xx_tx_packets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w0, [x0, #40]
	bl	_BIT
	mov	x24, x0
	ldr	w0, [x19, #40]
	bl	_BIT
	mov	x21, x0
Lloh0:
	adrp	x8, _tx_queued@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tx_queued@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_netif_dbg
	mov	x23, x19
	ldp	w8, w9, [x23, #24]!
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _tx_done@GOTPAGE
Lloh6:
	ldr	x8, [x8, _tx_done@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	str	xzr, [sp]
Lloh8:
	adrp	x3, l_.str.1@PAGE
Lloh9:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_netif_dbg
	mov	w22, #0
	b	LBB0_24
LBB0_2:
	str	w21, [sp, #20]                  ; 4-byte Folded Spill
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	mov	w21, #0
	sub	w26, w24, #1
	movi.2d	v1, #0000000000000000
Lloh10:
	adrp	x27, _AG71XX_REG_TX_STATUS@GOTPAGE
Lloh11:
	ldr	x27, [x27, _AG71XX_REG_TX_STATUS@GOTPAGEOFF]
Lloh12:
	adrp	x28, _TX_STATUS_PS@GOTPAGE
Lloh13:
	ldr	x28, [x28, _TX_STATUS_PS@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	q1, [sp, #32]                   ; 16-byte Folded Reload
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	w8, w9, [x19, #24]
	add	w8, w8, w20
	cmp	w8, w9
	mov	x21, x20
	b.eq	LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	str	q1, [sp, #32]                   ; 16-byte Folded Spill
	and	w24, w8, w26
	mov	x0, x23
	mov	x1, x24
	bl	_ag71xx_ring_desc
	ldr	x8, [x19, #32]
	add	x8, x8, w24, uxtw #4
	ldr	x25, [x8, #8]
	cbz	w22, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x8, _DESC_EMPTY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DESC_EMPTY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_ag71xx_desc_empty
	cbz	w0, LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w21, #1
	cbz	x25, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_dev_kfree_skb_any
	ldr	x8, [x19, #32]
	add	x8, x8, x24, lsl #4
	str	xzr, [x8, #8]
	movi.2s	v0, #1
	ld1.s	{ v0 }[0], [x8]
	ldr	q1, [sp, #32]                   ; 16-byte Folded Reload
	add.2s	v1, v1, v0
	ldr	w8, [x19, #24]
	add	w8, w8, w20
	str	w8, [x19, #24]
	tbnz	w21, #31, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	str	q1, [sp, #32]                   ; 16-byte Folded Spill
	cmp	w20, #1
	csinc	w20, w20, wzr, lt
	add	w21, w21, #2
LBB0_11:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x27]
	ldr	w2, [x28]
	mov	x0, x19
	bl	_ag71xx_wr
	sub	w21, w21, #1
	cmp	w21, #1
	b.gt	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	sub	w20, w20, #1
	b	LBB0_3
LBB0_13:
	mov	w20, #1
	ldr	x2, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w21, [sp, #20]                  ; 4-byte Folded Reload
	b	LBB0_19
LBB0_14:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_ag71xx_check_dma_stuck
	cbz	x0, LBB0_17
; %bb.16:
Lloh17:
	adrp	x8, _HZ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x19
	bl	_schedule_delayed_work
	mov	w20, #0
	b	LBB0_18
LBB0_17:
	mov	w20, #1
LBB0_18:
	ldr	x2, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w21, [sp, #20]                  ; 4-byte Folded Reload
	ldr	q1, [sp, #32]                   ; 16-byte Folded Reload
LBB0_19:
	str	q1, [sp, #32]                   ; 16-byte Folded Spill
Lloh20:
	adrp	x8, _tx_done@GOTPAGE
Lloh21:
	ldr	x8, [x8, _tx_done@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov.s	w22, v1[1]
	str	x22, [sp]
Lloh23:
	adrp	x3, l_.str.1@PAGE
Lloh24:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
	cbz	w22, LBB0_24
; %bb.20:
	ldr	x0, [x19, #8]
	ldr	d0, [x0]
	ldr	q1, [sp, #32]                   ; 16-byte Folded Reload
	add.2s	v0, v0, v1
	str	d0, [x0]
	fmov	w2, s1
	mov	x1, x22
	bl	_netdev_completed_queue
	ldp	w9, w8, [x19, #24]
	sub	w8, w8, w9
	add	w9, w21, w21, lsl #1
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	cmp	w8, w9, asr #2
	b.ge	LBB0_22
; %bb.21:
	ldr	x0, [x19, #8]
	bl	_netif_wake_queue
LBB0_22:
	cbz	w20, LBB0_24
; %bb.23:
	mov	x0, x19
	bl	_cancel_delayed_work
LBB0_24:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_tx_queued,4,2                  ; @tx_queued
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"processing TX ring\n"

	.comm	_HZ,4,2                         ; @HZ
	.comm	_DESC_EMPTY,4,2                 ; @DESC_EMPTY
	.comm	_AG71XX_REG_TX_STATUS,4,2       ; @AG71XX_REG_TX_STATUS
	.comm	_TX_STATUS_PS,4,2               ; @TX_STATUS_PS
	.comm	_tx_done,4,2                    ; @tx_done
l_.str.1:                               ; @.str.1
	.asciz	"%d packets sent out\n"

	.no_dead_strip	_ag71xx_tx_packets
.subsections_via_symbols
