	.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, -72(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movl	40(%rdi), %edi
	callq	_BIT
	movl	%eax, %r13d
	movl	40(%r14), %edi
	callq	_BIT
	movl	%eax, %r15d
	movq	8(%r14), %rax
	movl	8(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	callq	_DBG
	movl	24(%r14), %r12d
	movb	$1, %al
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	28(%r14), %r12d
	jne	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_2:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	leaq	24(%r14), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	decl	%r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r15d, %r15d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	24(%r14), %r12d
	addl	%r13d, %r12d
	movl	%r13d, %r15d
	cmpl	28(%r14), %r12d
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	andl	%r13d, %r12d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_ag71xx_ring_desc
	shlq	$4, %r12
	movq	32(%r14), %rcx
	movq	8(%rcx,%r12), %rbx
	cmpl	$0, -72(%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(%r15), %r13d
	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(%r14), %rax
	movq	$0, 8(%rax,%r12)
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	addl	(%rax,%r12), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	addl	%r13d, 24(%r14)
	testl	%r15d, %r15d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	js	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%r13d, %r13d
	movl	$1, %eax
	cmovgl	%eax, %r13d
	addl	$2, %r15d
	movq	_AG71XX_REG_TX_STATUS@GOTPCREL(%rip), %r12
	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	(%r12), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	callq	_ag71xx_wr
	decl	%r15d
	cmpl	$1, %r15d
	jg	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	decl	%r13d
	jmp	LBB0_14
LBB0_5:
	cmpq	$0, 16(%r14)
	je	LBB0_15
## %bb.6:
	movq	%r14, %rdi
	callq	_ag71xx_check_dma_stuck
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r14, %rdi
	callq	_schedule_delayed_work
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
LBB0_15:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_16:
	movq	8(%r14), %rax
	movl	8(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DBG
	testl	%ebx, %ebx
	je	LBB0_21
## %bb.17:
	movq	8(%r14), %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	addl	%edx, (%rdi)
	addl	%ebx, 4(%rdi)
	movl	%ebx, %esi
	callq	_netdev_completed_queue
	movl	28(%r14), %eax
	subl	24(%r14), %eax
	leal	(%r15,%r15,2), %ecx
	leal	(%r15,%r15,2), %edx
	addl	$3, %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$2, %edx
	cmpl	%edx, %eax
	jge	LBB0_19
## %bb.18:
	movq	8(%r14), %rdi
	callq	_netif_wake_queue
LBB0_19:
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	callq	_cancel_delayed_work
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: 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
L_.str.1:                               ## @.str.1
	.asciz	"%s: %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, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #40]
	bl	_BIT
	mov	x23, x0
	ldr	w0, [x19, #40]
	bl	_BIT
	mov	x24, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	mov	x22, x19
	ldp	w8, w9, [x22, #24]!
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	movi.2d	v1, #0000000000000000
	mov	w20, #1
	b	LBB0_19
LBB0_2:
	str	w24, [sp, #12]                  ; 4-byte Folded Spill
	mov	w28, #0
	sub	w25, w23, #1
	movi.2d	v1, #0000000000000000
Lloh2:
	adrp	x26, _AG71XX_REG_TX_STATUS@GOTPAGE
Lloh3:
	ldr	x26, [x26, _AG71XX_REG_TX_STATUS@GOTPAGEOFF]
Lloh4:
	adrp	x27, _TX_STATUS_PS@GOTPAGE
Lloh5:
	ldr	x27, [x27, _TX_STATUS_PS@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	q1, [sp, #16]                   ; 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	x28, x20
	b.eq	LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	str	q1, [sp, #16]                   ; 16-byte Folded Spill
	and	w23, w8, w25
	mov	x0, x22
	mov	x1, x23
	bl	_ag71xx_ring_desc
	ldr	x8, [x19, #32]
	add	x8, x8, w23, uxtw #4
	ldr	x24, [x8, #8]
	cbz	w21, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh6:
	adrp	x8, _DESC_EMPTY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DESC_EMPTY@GOTPAGEOFF]
Lloh8:
	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, w28, #1
	cbz	x24, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_dev_kfree_skb_any
	ldr	x8, [x19, #32]
	add	x8, x8, x23, lsl #4
	str	xzr, [x8, #8]
	movi.2s	v0, #1
	ld1.s	{ v0 }[0], [x8]
	ldr	q1, [sp, #16]                   ; 16-byte Folded Reload
	add.2s	v1, v1, v0
	ldr	w8, [x19, #24]
	add	w8, w8, w20
	str	w8, [x19, #24]
	tbnz	w28, #31, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	str	q1, [sp, #16]                   ; 16-byte Folded Spill
	cmp	w20, #1
	csinc	w20, w20, wzr, lt
	add	w23, w28, #2
LBB0_11:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x26]
	ldr	w2, [x27]
	mov	x0, x19
	bl	_ag71xx_wr
	sub	w23, w23, #1
	cmp	w23, #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	w24, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_19
LBB0_14:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_ag71xx_check_dma_stuck
	cbz	x0, LBB0_17
; %bb.16:
Lloh9:
	adrp	x8, _HZ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh11:
	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	w24, [sp, #12]                  ; 4-byte Folded Reload
	ldr	q1, [sp, #16]                   ; 16-byte Folded Reload
LBB0_19:
	str	q1, [sp, #16]                   ; 16-byte Folded Spill
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	mov.s	w21, v1[1]
	str	x21, [sp]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DBG
	cbz	w21, LBB0_24
; %bb.20:
	ldr	x0, [x19, #8]
	ldr	d0, [x0]
	ldr	q1, [sp, #16]                   ; 16-byte Folded Reload
	add.2s	v0, v0, v1
	str	d0, [x0]
	fmov	w2, s1
	mov	x1, x21
	bl	_netdev_completed_queue
	ldp	w9, w8, [x19, #24]
	sub	w8, w8, w9
	add	w9, w24, w24, 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, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: 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
l_.str.1:                               ; @.str.1
	.asciz	"%s: %d packets sent out\n"

	.no_dead_strip	_ag71xx_tx_packets
.subsections_via_symbols
