	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function tulip_init_ring
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_tulip_init_ring:                       ## @tulip_init_ring
	.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, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rax)
	movq	$0, 72(%rax)
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_1
## %bb.2:
	movq	32(%r15), %rcx
	movq	$-1, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rcx,%rbx,8)
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movq	%rax, 24(%rcx,%rbx,8)
	movl	(%r15), %eax
	leal	(%rbx,%rax), %edi
	addl	$4, %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movq	%rax, 16(%rcx,%rbx,8)
	movq	40(%r15), %rax
	movq	$0, 8(%rax,%rbx,4)
	movl	$0, (%rax,%rbx,4)
	movslq	(%r12), %rax
	leaq	1(%r14), %r13
	addq	$4, %rbx
	addq	$2, %r14
	cmpq	%rax, %r14
	movq	%r13, %r14
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movq	$-1, %r13
LBB0_4:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rbx
	movq	_DESC_RING_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%rbx), %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	shlq	$5, %r13
	movq	%rax, 24(%rcx,%r13)
	movl	(%r15), %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movq	%rax, 16(%rcx,%r13)
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_dev_alloc_skb
	movq	%rbx, %r13
	movq	%rax, %rbx
	movq	40(%r15), %rax
	movq	%rbx, 8(%rax,%r14)
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	48(%r15), %edi
	movl	8(%rbx), %esi
	movl	(%r13), %edx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, %r12d
	movq	40(%r15), %rax
	movl	%r12d, (%rax,%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	_DescOwned@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movl	%eax, (%rcx,%r14,2)
	movl	%r12d, %edi
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r12
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movq	%rax, 8(%rcx,%r14,2)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movslq	(%r12), %rax
	addq	$16, %r14
	cmpq	%rax, %rcx
	movq	%r13, %rbx
	jl	LBB0_7
	jmp	LBB0_10
LBB0_5:
	xorl	%ecx, %ecx
	jmp	LBB0_10
LBB0_8:
	movl	(%r12), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_10:
	subl	%eax, %ecx
	movl	%ecx, 4(%r15)
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_11
## %bb.12:
	movq	16(%r15), %rcx
	movq	$-1, %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax,%r12,4)
	movl	$0, (%rcx,%r12,4)
	movl	8(%r15), %eax
	leal	(%r12,%rax), %edi
	addl	$4, %edi
	callq	_cpu_to_le32
	movq	16(%r15), %rcx
	movq	%rax, 8(%rcx,%r12,4)
	movslq	(%r14), %rax
	leaq	1(%rbx), %r13
	addq	$4, %r12
	addq	$2, %rbx
	cmpq	%rax, %rbx
	movq	%r13, %rbx
	jl	LBB0_13
	jmp	LBB0_14
LBB0_11:
	movq	$-1, %r13
LBB0_14:
	movl	8(%r15), %edi
	callq	_cpu_to_le32
	movq	16(%r15), %rcx
	shlq	$4, %r13
	movq	%rax, 8(%rcx,%r13)
	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	_DESC_RING_WRAP,4,2             ## @DESC_RING_WRAP
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_DescOwned,4,2                  ## @DescOwned
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.no_dead_strip	_tulip_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tulip_init_ring
_tulip_init_ring:                       ; @tulip_init_ring
	.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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	stp	xzr, xzr, [x0, #64]
	str	xzr, [x0, #56]
Lloh0:
	adrp	x23, _RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _PKT_BUF_SZ@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PKT_BUF_SZ@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x22, #0
	ldr	x8, [x19, #32]
	mov	x26, #-1
	mov	w25, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x8, x22]
	ldr	w0, [x24]
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	add	x8, x8, x22
	str	x0, [x8, #24]
	ldr	w8, [x19]
	add	w0, w25, w8
	bl	_cpu_to_le32
	ldp	x8, x9, [x19, #32]
	add	x10, x8, x22
	str	x0, [x10, #16]
	add	x9, x9, x21
	str	xzr, [x9, #8]
	str	wzr, [x9]
	ldrsw	x9, [x23]
	add	x27, x26, #1
	add	x22, x22, #32
	add	x21, x21, #16
	add	w25, w25, #4
	add	x10, x26, #2
	mov	x26, x27
	cmp	x10, x9
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x27, #-1
LBB0_4:
	ldr	w8, [x24]
Lloh4:
	adrp	x9, _DESC_RING_WRAP@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DESC_RING_WRAP@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	lsl	x21, x27, #5
	add	x8, x8, x21
	str	x0, [x8, #24]
	ldr	w0, [x19]
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	add	x8, x8, x21
	str	x0, [x8, #16]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x26, #0
	mov	x27, #0
	mov	x25, #0
Lloh7:
	adrp	x28, _DescOwned@GOTPAGE
Lloh8:
	ldr	x28, [x28, _DescOwned@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_dev_alloc_skb
	ldr	x8, [x19, #40]
	add	x8, x8, x27
	str	x0, [x8, #8]
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x0
	ldr	w0, [x19, #48]
	ldr	w1, [x21, #8]
	ldr	w2, [x24]
Lloh9:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	bl	_pci_map_single
	mov	x22, x0
	ldr	x8, [x19, #40]
	str	w0, [x8, x27]
	str	x20, [x21]
	ldr	w0, [x28]
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	str	w0, [x8, x26]
	mov	x0, x22
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	add	x8, x8, x26
	str	x0, [x8, #8]
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x27, x27, #16
	add	x26, x26, #32
	cmp	x25, x8
	b.lt	LBB0_6
	b	LBB0_10
LBB0_8:
	mov	w25, #0
	b	LBB0_10
LBB0_9:
	ldr	w8, [x23]
LBB0_10:
	sub	w8, w25, w8
	str	w8, [x19, #4]
Lloh12:
	adrp	x20, _TX_RING_SIZE@GOTPAGE
Lloh13:
	ldr	x20, [x20, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x21, #0
	ldr	x8, [x19, #16]
	mov	x23, #-1
	mov	w22, #4
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	add	x9, x9, x21
	stp	xzr, xzr, [x9]
	str	wzr, [x8, x21]
	ldr	w8, [x19, #8]
	add	w0, w22, w8
	bl	_cpu_to_le32
	ldr	x8, [x19, #16]
	add	x9, x8, x21
	str	x0, [x9, #8]
	ldrsw	x9, [x20]
	add	x24, x23, #1
	add	x21, x21, #16
	add	w22, w22, #4
	add	x10, x23, #2
	mov	x23, x24
	cmp	x10, x9
	b.lt	LBB0_12
	b	LBB0_14
LBB0_13:
	mov	x24, #-1
LBB0_14:
	ldr	w0, [x19, #8]
	bl	_cpu_to_le32
	ldr	x8, [x19, #16]
	add	x8, x8, x24, lsl #4
	str	x0, [x8, #8]
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_DESC_RING_WRAP,4,2             ; @DESC_RING_WRAP
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_DescOwned,4,2                  ; @DescOwned
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.no_dead_strip	_tulip_init_ring
.subsections_via_symbols
