	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skge_tx_done
_skge_tx_done:                          ## @skge_tx_done
	.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
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%rax, %r13
	movq	(%rax), %rax
	movq	40(%r15), %rbx
	movq	_txqaddr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edi
	movq	_Q_CSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_Q_ADDR
	movq	_CSR_IRQ_CL_F@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_skge_write8
	movq	16(%r15), %rbx
	cmpq	24(%r15), %rbx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rbx
	cmpq	24(%r13), %rbx
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax), %r12d
	movq	_BMU_OWN@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	40(%r13), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_skge_tx_unmap
	movq	_BMU_EOF@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_tx_done@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	32(%r13), %ecx
	movslq	8(%r13), %rax
	negq	%rax
	leaq	(%rax,%rax,2), %rax
	leaq	(%rbx,%rax,8), %r9
	movq	%r13, %rdi
	leaq	L_.str(%rip), %r8
	callq	_netif_printk
	incl	%r15d
	movq	(%rbx), %rdi
	addl	(%rdi), %r14d
	callq	_dev_consume_skb_any
	jmp	LBB0_6
LBB0_1:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %rax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%rax, %r15
	movl	%r14d, %edx
	movq	%rdi, %r14
	callq	_netdev_completed_queue
	movq	%rbx, 16(%r13)
	xorl	%eax, %eax
	callq	_smp_mb
	movq	%r14, %rdi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	movl	$0, %edi
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_skge_avail
	movq	_TX_LOW_WATER@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setg	%dil
LBB0_9:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	%r14, %rdi
	callq	_netif_tx_lock
	movq	%r14, %rdi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%r15, %rdi
	callq	_skge_avail
	movq	_TX_LOW_WATER@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setg	%dil
	jmp	LBB0_13
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%edi, %edi
LBB0_13:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_netif_wake_queue
LBB0_15:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_tx_unlock                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_txqaddr,8,3                    ## @txqaddr
	.comm	_Q_CSR,4,2                      ## @Q_CSR
	.comm	_CSR_IRQ_CL_F,4,2               ## @CSR_IRQ_CL_F
	.comm	_BMU_OWN,4,2                    ## @BMU_OWN
	.comm	_BMU_EOF,4,2                    ## @BMU_EOF
	.comm	_tx_done,4,2                    ## @tx_done
	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx done slot %td\n"

	.comm	_TX_LOW_WATER,8,3               ## @TX_LOW_WATER
	.no_dead_strip	_skge_tx_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skge_tx_done
_skge_tx_done:                          ; @skge_tx_done
	.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
	bl	_netdev_priv
	mov	x21, x0
	add	x20, x0, #8
	ldr	x22, [x0, #40]
Lloh0:
	adrp	x8, _txqaddr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _txqaddr@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	w0, [x8, x9, lsl #2]
Lloh3:
	adrp	x8, _Q_CSR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Q_CSR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_Q_ADDR
	mov	x1, x0
Lloh6:
	adrp	x8, _CSR_IRQ_CL_F@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CSR_IRQ_CL_F@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_skge_write8
	ldp	x22, x8, [x21, #16]
	cmp	x22, x8
	stp	x20, x19, [sp]                  ; 16-byte Folded Spill
	b.eq	LBB0_6
; %bb.1:
	mov	w24, #0
	mov	w23, #0
Lloh9:
	adrp	x27, _BMU_OWN@GOTPAGE
Lloh10:
	ldr	x27, [x27, _BMU_OWN@GOTPAGEOFF]
Lloh11:
	adrp	x28, _BMU_EOF@GOTPAGE
Lloh12:
	ldr	x28, [x28, _BMU_EOF@GOTPAGEOFF]
	mov	w19, #24
Lloh13:
	adrp	x20, _KERN_DEBUG@GOTPAGE
Lloh14:
	ldr	x20, [x20, _KERN_DEBUG@GOTPAGEOFF]
Lloh15:
	adrp	x25, l_.str@PAGE
Lloh16:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x22, [x22, #16]
	ldr	x8, [x21, #24]
	cmp	x22, x8
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w26, [x8]
	ldr	w8, [x27]
	tst	w8, w26
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #40]
	ldr	w0, [x8]
	mov	x1, x22
	mov	x2, x26
	bl	_skge_tx_unmap
	ldr	w8, [x28]
	tst	w8, w26
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh17:
	adrp	x8, _tx_done@GOTPAGE
Lloh18:
	ldr	x8, [x8, _tx_done@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x20]
	ldr	w3, [x21, #32]
	ldrsw	x8, [x21, #8]
	mneg	x8, x8, x19
	add	x5, x22, x8
	mov	x0, x21
	mov	x4, x25
	bl	_netif_printk
	add	w24, w24, #1
	ldr	x0, [x22]
	ldr	w8, [x0]
	add	w23, w23, w8
	bl	_dev_consume_skb_any
	b	LBB0_2
LBB0_6:
	mov	w23, #0
	mov	w24, #0
LBB0_7:
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	bl	_netdev_completed_queue
	str	x22, [x21, #16]
	bl	_smp_mb
	mov	x0, x20
	bl	_netif_queue_stopped
Lloh20:
	adrp	x19, _TX_LOW_WATER@GOTPAGE
Lloh21:
	ldr	x19, [x19, _TX_LOW_WATER@GOTPAGEOFF]
	cbz	x0, LBB0_14
; %bb.8:
	ldr	x21, [sp]                       ; 8-byte Folded Reload
	mov	x0, x21
	bl	_skge_avail
	ldr	x8, [x19]
	cmp	x0, x8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_15
LBB0_9:
	mov	x0, x20
	bl	_netif_tx_lock
	mov	x0, x20
	bl	_netif_queue_stopped
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_skge_avail
	ldr	x8, [x19]
	cmp	x0, x8
	cset	w0, gt
LBB0_11:
	bl	_unlikely
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_netif_wake_queue
LBB0_13:
	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
	b	_netif_tx_unlock
LBB0_14:
	ldr	x21, [sp]                       ; 8-byte Folded Reload
	bl	_unlikely
	cbnz	x0, LBB0_9
LBB0_15:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_txqaddr,8,3                    ; @txqaddr
	.comm	_Q_CSR,4,2                      ; @Q_CSR
	.comm	_CSR_IRQ_CL_F,4,2               ; @CSR_IRQ_CL_F
	.comm	_BMU_OWN,4,2                    ; @BMU_OWN
	.comm	_BMU_EOF,4,2                    ; @BMU_EOF
	.comm	_tx_done,4,2                    ; @tx_done
	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx done slot %td\n"

	.comm	_TX_LOW_WATER,8,3               ; @TX_LOW_WATER
	.no_dead_strip	_skge_tx_done
.subsections_via_symbols
