	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rax)
	movq	$0, 72(%rax)
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movq	32(%r15), %rcx
	movq	$-1, %r14
	xorl	%ebx, %ebx
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r12
	.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
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r12
LBB0_4:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rcx
	movq	_DESC_RING_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%rcx), %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:
	movq	%r12, %rbx
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_netdev_alloc_skb
	movq	40(%r15), %rcx
	movq	%rax, 8(%rcx,%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	48(%r15), %edi
	movl	(%rax), %esi
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, %ebx
	movq	40(%r15), %rax
	movl	%ebx, (%rax,%r12)
	movq	_DescOwned@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movl	%eax, (%rcx,%r12,2)
	movl	%ebx, %edi
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rbx
	callq	_cpu_to_le32
	movq	32(%r15), %rcx
	movq	%rax, 8(%rcx,%r12,2)
	incq	%r14
	movslq	(%rbx), %rax
	addq	$16, %r12
	cmpq	%rax, %r14
	jl	LBB0_7
	jmp	LBB0_10
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_8:
	movl	(%rbx), %eax
LBB0_10:
	subl	%eax, %r14d
	movl	%r14d, 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	$8, %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	x22, _RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x23, _PKT_BUF_SZ@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PKT_BUF_SZ@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x24, #0
	ldr	x8, [x19, #32]
	mov	x26, #-1
	mov	w25, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x8, x24]
	ldr	w0, [x23]
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	add	x8, x8, x24
	str	x0, [x8, #24]
	ldr	w8, [x19]
	add	w0, w25, w8
	bl	_cpu_to_le32
	ldp	x8, x9, [x19, #32]
	add	x10, x8, x24
	str	x0, [x10, #16]
	add	x9, x9, x21
	str	xzr, [x9, #8]
	str	wzr, [x9]
	ldrsw	x9, [x22]
	add	x27, x26, #1
	add	x24, x24, #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, [x23]
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, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x25, #0
	mov	x26, #0
	mov	x24, #0
Lloh7:
	adrp	x27, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh8:
	ldr	x27, [x27, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh9:
	adrp	x28, _DescOwned@GOTPAGE
Lloh10:
	ldr	x28, [x28, _DescOwned@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_netdev_alloc_skb
	ldr	x8, [x19, #40]
	add	x8, x8, x26
	str	x0, [x8, #8]
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19, #48]
	ldr	w1, [x0]
	ldr	w2, [x23]
	ldr	w3, [x27]
	mov	x0, x8
	bl	_pci_map_single
	mov	x21, x0
	ldr	x8, [x19, #40]
	str	w0, [x8, x26]
	ldr	w0, [x28]
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	str	w0, [x8, x25]
	mov	x0, x21
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	add	x8, x8, x25
	str	x0, [x8, #8]
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x26, x26, #16
	add	x25, x25, #32
	cmp	x24, x8
	b.lt	LBB0_6
	b	LBB0_10
LBB0_8:
	mov	w24, #0
	b	LBB0_10
LBB0_9:
	ldr	w8, [x22]
LBB0_10:
	sub	w8, w24, w8
	str	w8, [x19, #4]
Lloh11:
	adrp	x20, _TX_RING_SIZE@GOTPAGE
Lloh12:
	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	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.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
