	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgmac_tx_complete
_xgmac_tx_complete:                     ## @xgmac_tx_complete
	.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, %r15
	movl	(%rdi), %esi
	movl	20(%rdi), %edi
	movq	_DMA_TX_RING_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rax
	movq	$0, (%rax,%r13,8)
	movq	_DMA_TX_RING_SZ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r13d, %edi
	callq	_dma_ring_incr
	movl	%eax, (%r15)
	movl	20(%r15), %edi
	movl	(%rbx), %edx
	movl	%eax, %esi
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	callq	_dma_ring_cnt
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %r13d
	movq	8(%r15), %rax
	movq	(%rax,%r13,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(,%r13,4), %rbx
	addq	24(%r15), %rbx
	movq	%rbx, %rdi
	callq	_desc_get_owner
	testq	%rax, %rax
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %ecx
	movl	4(%r15), %edi
	movl	20(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_netdev_dbg
	movq	%rbx, %rdi
	callq	_desc_get_tx_fs
	movq	%rax, %r14
	movl	16(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_desc_get_buf_addr
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_desc_get_buf_len
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_dma_unmap_single
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_dma_unmap_page
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_desc_get_tx_ls
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_desc_get_tx_status
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_consume_skb_any
	jmp	LBB0_8
LBB0_9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_smp_mb
	movl	4(%r15), %edi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_tx_dma_ring_space
	movq	_MAX_SKB_FRAGS@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	setg	%bl
LBB0_11:
	movl	%ebx, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movl	4(%r15), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_wake_queue               ## TAILCALL
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TX_RING_SZ,4,2             ## @DMA_TX_RING_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx ring: curr %d, dirty %d\n"

	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_MAX_SKB_FRAGS,8,3              ## @MAX_SKB_FRAGS
	.no_dead_strip	_xgmac_tx_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgmac_tx_complete
_xgmac_tx_complete:                     ; @xgmac_tx_complete
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	w0, [x0, #20]
	ldr	w1, [x19]
Lloh0:
	adrp	x27, _DMA_TX_RING_SZ@GOTPAGE
Lloh1:
	ldr	x27, [x27, _DMA_TX_RING_SZ@GOTPAGEOFF]
	ldr	w2, [x27]
	bl	_dma_ring_cnt
	cbz	x0, LBB0_9
; %bb.1:
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
Lloh4:
	adrp	x28, _DMA_TO_DEVICE@GOTPAGE
Lloh5:
	ldr	x28, [x28, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	str	xzr, [x8, x21, lsl #3]
	ldr	w1, [x27]
	mov	x0, x21
	bl	_dma_ring_incr
	mov	x1, x0
	str	w0, [x19]
	ldr	w0, [x19, #20]
	ldr	w2, [x27]
	bl	_dma_ring_cnt
	cbz	x0, LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x19]
	ldr	x8, [x19, #8]
	ldr	x22, [x8, x21, lsl #3]
	ldr	x8, [x19, #24]
	add	x23, x8, x21, lsl #2
	mov	x0, x23
	bl	_desc_get_owner
	cbnz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x19, #20]
	ldp	w3, w0, [x19]
	mov	x1, x20
	bl	_netdev_dbg
	mov	x0, x23
	bl	_desc_get_tx_fs
	mov	x26, x0
	ldr	w24, [x19, #16]
	mov	x0, x23
	bl	_desc_get_buf_addr
	mov	x25, x0
	mov	x0, x23
	bl	_desc_get_buf_len
	mov	x2, x0
	ldr	w3, [x28]
	mov	x0, x24
	mov	x1, x25
	cbz	x26, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_dma_unmap_single
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_dma_unmap_page
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_desc_get_tx_ls
	cbz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_desc_get_tx_status
	mov	x0, x22
	bl	_dev_consume_skb_any
	b	LBB0_2
LBB0_9:
	bl	_smp_mb
	ldr	w0, [x19, #4]
	bl	_netif_queue_stopped
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_tx_dma_ring_space
Lloh6:
	adrp	x8, _MAX_SKB_FRAGS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_SKB_FRAGS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, gt
LBB0_11:
	bl	_unlikely
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w0, [x19, #4]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_netif_wake_queue
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TX_RING_SZ,4,2             ; @DMA_TX_RING_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx ring: curr %d, dirty %d\n"

	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MAX_SKB_FRAGS,8,3              ; @MAX_SKB_FRAGS
	.no_dead_strip	_xgmac_tx_complete
.subsections_via_symbols
