	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm9000_tx_done
_dm9000_tx_done:                        ## @dm9000_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_DM9000_NSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ior
	movl	%eax, %r15d
	movq	_NSR_TX2END@GOTPCREL(%rip), %rax
	movq	_NSR_TX1END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_6
## %bb.1:
	decq	(%rbx)
	incl	(%r14)
	movq	%rbx, %rdi
	callq	_netif_msg_tx_done
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
LBB0_3:
	cmpq	$0, (%rbx)
	jle	LBB0_5
## %bb.4:
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	movq	%r14, %rdi
	callq	_dm9000_send_packet
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_wake_queue               ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DM9000_NSR,4,2                 ## @DM9000_NSR
	.comm	_NSR_TX2END,4,2                 ## @NSR_TX2END
	.comm	_NSR_TX1END,4,2                 ## @NSR_TX1END
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx done, NSR %02x\n"

	.no_dead_strip	_dm9000_tx_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm9000_tx_done
_dm9000_tx_done:                        ; @dm9000_tx_done
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DM9000_NSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DM9000_NSR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ior
Lloh3:
	adrp	x8, _NSR_TX2END@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NSR_TX2END@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _NSR_TX1END@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NSR_TX1END@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
	mov	x21, x0
	ldr	x8, [x20]
	sub	x8, x8, #1
	str	x8, [x20]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_netif_msg_tx_done
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x20, #16]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
LBB0_3:
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.4:
	ldp	w2, w1, [x20, #8]
	mov	x0, x19
	bl	_dm9000_send_packet
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_netif_wake_queue
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DM9000_NSR,4,2                 ; @DM9000_NSR
	.comm	_NSR_TX2END,4,2                 ; @NSR_TX2END
	.comm	_NSR_TX1END,4,2                 ; @NSR_TX1END
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx done, NSR %02x\n"

	.no_dead_strip	_dm9000_tx_done
.subsections_via_symbols
