	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tulip_refill_rx                ## -- Begin function tulip_refill_rx
	.p2align	4, 0x90
_tulip_refill_rx:                       ## @tulip_refill_rx
	.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, -56(%rbp)                 ## 8-byte Spill
	callq	_netdev_priv
	movq	%rax, %r12
	movslq	8(%rax), %rax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmpq	%rax, (%r12)
	jle	LBB0_6
## %bb.1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r14
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %r15
	movq	_DescOwned@GOTPCREL(%rip), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	48(%r12), %edi
	movl	8(%rbx), %esi
	movl	(%r15), %edx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movq	40(%r12), %rcx
	movl	%eax, (%rcx,%r13)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rbx)
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	32(%r12), %rcx
	movq	%rax, 8(%rcx,%r13)
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	movq	_DescOwned@GOTPCREL(%rip), %rbx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	callq	_cpu_to_le32
	movq	32(%r12), %rcx
	movq	%rax, (%rcx,%r13)
	movslq	8(%r12), %rax
	incq	%rax
	movl	%eax, 8(%r12)
	cmpq	%rax, (%r12)
	jle	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	(%r14)
	movq	40(%r12), %rax
	movslq	%edx, %r13
	shlq	$4, %r13
	cmpq	$0, 8(%rax,%r13)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edi
	callq	_dev_alloc_skb
	movq	%rax, %rbx
	movq	40(%r12), %rax
	movq	%rbx, 8(%rax,%r13)
	testq	%rbx, %rbx
	jne	LBB0_4
LBB0_6:
	movq	16(%r12), %rax
	movq	_LC82C168@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	movq	_CSR5@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%r12), %rdi
	callq	_ioread32
	andl	$917504, %eax                   ## imm = 0xE0000
	cmpl	$524288, %eax                   ## imm = 0x80000
	jne	LBB0_9
## %bb.8:
	movq	_CSR2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r12), %rsi
	movl	$1, %edi
	callq	_iowrite32
LBB0_9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_DescOwned,4,2                  ## @DescOwned
	.comm	_LC82C168,8,3                   ## @LC82C168
	.comm	_CSR5,8,3                       ## @CSR5
	.comm	_CSR2,8,3                       ## @CSR2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tulip_refill_rx                ; -- Begin function tulip_refill_rx
	.p2align	2
_tulip_refill_rx:                       ; @tulip_refill_rx
	.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	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x9, [x0]
	ldrsw	x8, [x0, #8]
	cmp	x9, x8
	b.le	LBB0_6
; %bb.1:
	mov	w19, #0
Lloh0:
	adrp	x23, _RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RX_RING_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _PKT_BUF_SZ@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PKT_BUF_SZ@GOTPAGEOFF]
Lloh4:
	adrp	x25, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
Lloh6:
	adrp	x26, _DescOwned@GOTPAGE
Lloh7:
	ldr	x26, [x26, _DescOwned@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	ldr	w0, [x20, #48]
	ldr	w1, [x22, #8]
	ldr	w2, [x24]
	ldr	w3, [x25]
	bl	_pci_map_single
	ldr	x8, [x20, #40]
	str	w0, [x8, x27]
	str	x21, [x22]
	bl	_cpu_to_le32
	ldr	x8, [x20, #32]
	add	x8, x8, x27
	str	x0, [x8, #8]
	add	w19, w19, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x26]
	bl	_cpu_to_le32
	ldr	x8, [x20, #32]
	str	x0, [x8, x27]
	ldrsw	x8, [x20, #8]
	add	x8, x8, #1
	str	w8, [x20, #8]
	ldr	x9, [x20]
	cmp	x9, x8
	b.le	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x23]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	ldr	x9, [x20, #40]
	sxtw	x28, w8
	add	x8, x9, w8, sxtw #4
	ldr	x8, [x8, #8]
	lsl	x27, x28, #4
	cbnz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	bl	_dev_alloc_skb
	ldr	x8, [x20, #40]
	add	x8, x8, x28, lsl #4
	str	x0, [x8, #8]
	cbnz	x0, LBB0_2
	b	LBB0_7
LBB0_6:
	mov	w19, #0
LBB0_7:
	ldr	x8, [x20, #16]
Lloh8:
	adrp	x9, _LC82C168@GOTPAGE
Lloh9:
	ldr	x9, [x9, _LC82C168@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x20, #24]
Lloh11:
	adrp	x9, _CSR5@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CSR5@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
	and	w8, w0, #0xe0000
	cmp	w8, #128, lsl #12               ; =524288
	b.ne	LBB0_10
; %bb.9:
	ldr	x8, [x20, #24]
Lloh14:
	adrp	x9, _CSR2@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CSR2@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_iowrite32
LBB0_10:
	mov	x0, x19
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_DescOwned,4,2                  ; @DescOwned
	.comm	_LC82C168,8,3                   ; @LC82C168
	.comm	_CSR5,8,3                       ; @CSR5
	.comm	_CSR2,8,3                       ; @CSR2
.subsections_via_symbols
