	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __nb8800_tx_dma_start
___nb8800_tx_dma_start:                 ## @__nb8800_tx_dma_start
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	8(%rbx), %r15
	leaq	(%rax,%rax,2), %r12
	cmpl	$0, 8(%r15,%r12,4)
	je	LBB0_6
## %bb.1:
	movq	_NB8800_TXC_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nb8800_readl
	movq	_TCR_EN@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	jne	LBB0_6
## %bb.2:
	movl	%eax, %r14d
	movq	_NB8800_TX_DESC_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15,%r12,4), %edx
	movq	%rbx, %rdi
	callq	_nb8800_writel
	xorl	%eax, %eax
	callq	_wmb
	movq	_NB8800_TXC_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r13), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_nb8800_writel
	movslq	4(%r15,%r12,4), %rax
	addq	(%rbx), %rax
	movq	_TX_DESC_COUNT@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_5
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:
	movq	%rdx, (%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NB8800_TXC_CR,4,2              ## @NB8800_TXC_CR
	.comm	_TCR_EN,4,2                     ## @TCR_EN
	.comm	_NB8800_TX_DESC_ADDR,4,2        ## @NB8800_TX_DESC_ADDR
	.comm	_TX_DESC_COUNT,4,2              ## @TX_DESC_COUNT
	.no_dead_strip	___nb8800_tx_dma_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __nb8800_tx_dma_start
___nb8800_tx_dma_start:                 ; @__nb8800_tx_dma_start
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_netdev_priv
	ldp	x23, x22, [x0]
	mov	w8, #12
	madd	x8, x23, x8, x22
	ldr	w8, [x8, #8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _NB8800_TXC_CR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NB8800_TXC_CR@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_nb8800_readl
Lloh2:
	adrp	x24, _TCR_EN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TCR_EN@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:
	mov	x20, x0
Lloh4:
	adrp	x8, _NB8800_TX_DESC_ADDR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NB8800_TX_DESC_ADDR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w8, #12
	madd	x22, x23, x8, x22
	ldr	w2, [x22]
	mov	x0, x19
	bl	_nb8800_writel
	bl	_wmb
	ldr	w1, [x21]
	ldr	w8, [x24]
	orr	w2, w8, w20
	mov	x0, x19
	bl	_nb8800_writel
	ldr	x8, [x19]
	ldrsw	x9, [x22, #4]
	add	x8, x8, x9
Lloh7:
	adrp	x9, _TX_DESC_COUNT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TX_DESC_COUNT@GOTPAGEOFF]
Lloh9:
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_NB8800_TXC_CR,4,2              ; @NB8800_TXC_CR
	.comm	_TCR_EN,4,2                     ; @TCR_EN
	.comm	_NB8800_TX_DESC_ADDR,4,2        ; @NB8800_TX_DESC_ADDR
	.comm	_TX_DESC_COUNT,4,2              ; @TX_DESC_COUNT
	.no_dead_strip	___nb8800_tx_dma_start
.subsections_via_symbols
