	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsi108_refill_rx
_tsi108_refill_rx:                      ## @tsi108_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_netdev_priv
	movq	%rax, %r13
	movl	(%rax), %eax
	movq	_TSI108_RXRING_LEN@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.1:
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.2:
	movl	4(%r13), %ebx
	decl	%r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TSI108_RXBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_alloc_skb_ip_align
	movq	24(%r13), %rcx
	movslq	%ebx, %rbx
	movq	%rax, (%rcx,%rbx,8)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r13), %rdi
	movl	(%rax), %esi
	movq	_TSI108_RX_SKB_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	8(%r13), %rcx
	leaq	(%rbx,%rbx,2), %rdx
	movl	%eax, 8(%rcx,%rdx,4)
	movl	(%r12), %eax
	movl	%eax, 4(%rcx,%rdx,4)
	movq	_TSI108_RX_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TSI108_RX_OWN@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	movl	%eax, (%rcx,%rdx,4)
	movl	(%r13), %ecx
	movl	4(%r13), %eax
	incl	%eax
	cltd
	movq	_TSI108_RXRING_LEN@GOTPCREL(%rip), %rsi
	idivl	(%rsi)
	movl	%edx, 4(%r13)
	incl	%ecx
	movl	%ecx, (%r13)
	leal	1(%r14), %r12d
	cmpl	(%rsi), %ecx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%edx, %ebx
	cmpl	%r14d, %r15d
	movl	%r12d, %r14d
	jne	LBB0_3
	jmp	LBB0_6
LBB0_8:
	movl	%r14d, %r12d
	testl	%r14d, %r14d
	je	LBB0_9
LBB0_6:
	movq	_TSI108_EC_RXSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TSI_READ
	movq	_TSI108_EC_RXSTAT_QUEUE0@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.7:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_tsi108_restart_rx
	jmp	LBB0_10
LBB0_9:
	xorl	%r12d, %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TSI108_RXRING_LEN,4,2          ## @TSI108_RXRING_LEN
	.comm	_TSI108_RXBUF_SIZE,4,2          ## @TSI108_RXBUF_SIZE
	.comm	_TSI108_RX_SKB_SIZE,4,2         ## @TSI108_RX_SKB_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_TSI108_RX_OWN,4,2              ## @TSI108_RX_OWN
	.comm	_TSI108_RX_INT,4,2              ## @TSI108_RX_INT
	.comm	_TSI108_EC_RXSTAT,4,2           ## @TSI108_EC_RXSTAT
	.comm	_TSI108_EC_RXSTAT_QUEUE0,4,2    ## @TSI108_EC_RXSTAT_QUEUE0
	.no_dead_strip	_tsi108_refill_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsi108_refill_rx
_tsi108_refill_rx:                      ; @tsi108_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, x1
	mov	x19, x0
	bl	_netdev_priv
	ldr	w8, [x0]
Lloh0:
	adrp	x22, _TSI108_RXRING_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TSI108_RXRING_LEN@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	ccmp	w21, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_9
LBB0_2:
	mov	x20, x0
	mov	w23, #0
	ldr	w28, [x0, #4]
Lloh2:
	adrp	x25, _TSI108_RX_SKB_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _TSI108_RX_SKB_SIZE@GOTPAGEOFF]
	sub	w27, w21, #1
Lloh4:
	adrp	x26, _TSI108_RX_OWN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _TSI108_RX_OWN@GOTPAGEOFF]
Lloh6:
	adrp	x24, _TSI108_RX_INT@GOTPAGE
Lloh7:
	ldr	x24, [x24, _TSI108_RX_INT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
Lloh8:
	adrp	x8, _TSI108_RXBUF_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TSI108_RXBUF_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_netdev_alloc_skb_ip_align
	ldr	x8, [x20, #24]
	str	x0, [x8, w28, sxtw #3]
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x21, w28
	ldr	x8, [x20, #16]
	ldr	w1, [x0]
	ldr	w2, [x25]
Lloh11:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x9]
	mov	x0, x8
	bl	_dma_map_single
	ldr	x8, [x20, #8]
	mov	w9, #12
	madd	x8, x21, x9, x8
	str	w0, [x8, #8]
	ldr	w9, [x25]
	str	w9, [x8, #4]
	ldr	w9, [x26]
	ldr	w10, [x24]
	orr	w9, w10, w9
	str	w9, [x8]
	ldp	w9, w8, [x20]
	add	w8, w8, #1
	ldr	w10, [x22]
	sdiv	w11, w8, w10
	msub	w28, w11, w10, w8
	add	w8, w9, #1
	stp	w8, w28, [x20]
	add	w21, w23, #1
	ldr	w9, [x22]
	cmp	w8, w9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w27, w23
	mov	x23, x21
	b.ne	LBB0_3
	b	LBB0_7
LBB0_6:
	mov	x21, x23
	cbz	w23, LBB0_9
LBB0_7:
Lloh14:
	adrp	x8, _TSI108_EC_RXSTAT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TSI108_EC_RXSTAT@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_TSI_READ
Lloh17:
	adrp	x8, _TSI108_EC_RXSTAT_QUEUE0@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TSI108_EC_RXSTAT_QUEUE0@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	bl	_tsi108_restart_rx
LBB0_9:
	mov	x0, x21
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TSI108_RXRING_LEN,4,2          ; @TSI108_RXRING_LEN
	.comm	_TSI108_RXBUF_SIZE,4,2          ; @TSI108_RXBUF_SIZE
	.comm	_TSI108_RX_SKB_SIZE,4,2         ; @TSI108_RX_SKB_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_TSI108_RX_OWN,4,2              ; @TSI108_RX_OWN
	.comm	_TSI108_RX_INT,4,2              ; @TSI108_RX_INT
	.comm	_TSI108_EC_RXSTAT,4,2           ; @TSI108_EC_RXSTAT
	.comm	_TSI108_EC_RXSTAT_QUEUE0,4,2    ; @TSI108_EC_RXSTAT_QUEUE0
	.no_dead_strip	_tsi108_refill_rx
.subsections_via_symbols
