	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function epic_init_ring
_epic_init_ring:                        ## @epic_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, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	$0, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%rax)
	movq	$0, 88(%rax)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %esi
	cmpl	$1501, %esi                     ## imm = 0x5DD
	jge	LBB0_1
## %bb.2:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_3
LBB0_1:
	addl	$32, %esi
LBB0_3:
	movl	%esi, 8(%rbx)
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.8:
	movq	64(%rbx), %r8
	movl	$4, %edx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%rbx), %rax
	movq	$0, -24(%rax,%rdx,8)
	movl	%esi, -32(%rax,%rdx,8)
	incq	%rdi
	leaq	(%r8,%rdx), %rcx
	movq	%rcx, -8(%rax,%rdx,8)
	movq	56(%rbx), %rax
	movq	$0, -8(%rax,%rdx,2)
	movslq	(%r12), %rax
	addq	$4, %rdx
	cmpq	%rax, %rdi
	jl	LBB0_9
## %bb.10:
	movq	40(%rbx), %rcx
	movq	%r8, -40(%rcx,%rdx,8)
	testl	%eax, %eax
	jle	LBB0_5
## %bb.11:
	addl	$2, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_alloc_skb
	movq	%rax, %r15
	movq	56(%rbx), %rax
	movq	%r15, (%rax)
	testq	%r15, %r15
	je	LBB0_12
## %bb.15:
	movl	$1, %r13d
	movl	$2, %r14d
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movl	8(%rbx), %edx
	movl	48(%rbx), %edi
	movl	(%r15), %esi
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movq	40(%rbx), %rcx
	movl	%eax, (%rcx,%r14,8)
	movq	_DescOwn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rcx,%r14,8)
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_6
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	8(%rbx), %esi
	addl	$2, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_alloc_skb
	movq	%rax, %r15
	movq	56(%rbx), %rax
	movq	%r15, (%rax,%r13,8)
	incq	%r13
	addq	$4, %r14
	testq	%r15, %r15
	jne	LBB0_16
## %bb.13:
	decq	%r13
	movl	(%r12), %eax
	jmp	LBB0_6
LBB0_4:
	movq	40(%rbx), %rcx
	movq	64(%rbx), %rdx
	movq	%rdx, -8(%rcx)
LBB0_5:
	xorl	%r13d, %r13d
LBB0_6:
	subl	%eax, %r13d
	movl	%r13d, 4(%rbx)
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %r9
	cmpl	$0, (%r9)
	jle	LBB0_7
## %bb.18:
	movq	16(%rbx), %r8
	leaq	4(%r8), %rdi
	movl	$8, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%rbx), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	24(%rbx), %rsi
	movl	$0, -8(%rsi,%rax)
	incq	%rcx
	movq	%rdi, (%rsi,%rax)
	movslq	(%r9), %rdx
	addq	$16, %rax
	addq	$4, %rdi
	cmpq	%rdx, %rcx
	jl	LBB0_19
## %bb.20:
	decq	%rcx
	jmp	LBB0_21
LBB0_7:
	movq	16(%rbx), %r8
	movq	24(%rbx), %rsi
	movq	$-1, %rcx
LBB0_21:
	shlq	$4, %rcx
	movq	%r8, 8(%rsi,%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%r13d, %r13d
	movl	(%r12), %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_DescOwn,8,3                    ## @DescOwn
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.no_dead_strip	_epic_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function epic_init_ring
_epic_init_ring:                        ; @epic_init_ring
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	str	xzr, [x0]
	stp	xzr, xzr, [x0, #80]
	str	xzr, [x0, #72]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PKT_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PKT_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w10, w8, #32
	cmp	w8, #1501
	csel	w9, w9, w10, lt
	str	w9, [x0, #8]
Lloh3:
	adrp	x22, _RX_RING_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #0
	b.le	LBB0_9
; %bb.1:
	mov	x10, #0
	mov	x13, #0
	ldr	x11, [x19, #64]
	add	x12, x11, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x8, x8, x10
	str	xzr, [x8, #8]
	str	w9, [x8]
	ldr	x14, [x19, #56]
	str	xzr, [x14, x13, lsl #3]
	add	x14, x13, #1
	str	x12, [x8, #24]
	ldrsw	x8, [x22]
	add	x10, x10, #32
	add	x12, x12, #4
	mov	x13, x14
	cmp	x14, x8
	b.lt	LBB0_2
; %bb.3:
	ldr	x12, [x19, #40]
	add	x10, x12, x10
	stur	x11, [x10, #-8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.4:
	add	w1, w9, #2
	mov	x0, x20
	bl	_netdev_alloc_skb
	ldr	x8, [x19, #56]
	str	x0, [x8]
	cbz	x0, LBB0_11
; %bb.5:
	mov	x21, x0
	mov	x24, #0
	mov	w23, #1
Lloh5:
	adrp	x25, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh7:
	adrp	x26, _DescOwn@GOTPAGE
Lloh8:
	ldr	x26, [x26, _DescOwn@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #2
	bl	_skb_reserve
	ldr	w0, [x19, #48]
	ldr	w1, [x21]
	ldr	w2, [x19, #8]
	ldr	w3, [x25]
	bl	_pci_map_single
	ldr	x8, [x19, #40]
	add	x8, x8, x24
	str	w0, [x8, #16]
	ldr	x9, [x26]
	str	x9, [x8, #8]
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19, #8]
	add	w1, w8, #2
	mov	x0, x20
	bl	_netdev_alloc_skb
	mov	x21, x0
	ldr	x8, [x19, #56]
	str	x0, [x8, x23, lsl #3]
	add	x23, x23, #1
	add	x24, x24, #32
	cbnz	x0, LBB0_6
; %bb.8:
	sub	x23, x23, #1
	ldr	w8, [x22]
	b	LBB0_13
LBB0_9:
	mov	w23, #0
	ldr	x9, [x19, #64]
	ldr	x10, [x19, #40]
	stur	x9, [x10, #-8]
	b	LBB0_13
LBB0_10:
	mov	w23, #0
	b	LBB0_13
LBB0_11:
	mov	x23, #0
	ldr	w8, [x22]
	b	LBB0_13
LBB0_12:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_13:
	sub	w8, w23, w8
	str	w8, [x19, #4]
Lloh9:
	adrp	x9, _TX_RING_SIZE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x9]
	cmp	w8, #0
	b.le	LBB0_17
; %bb.14:
	mov	x12, #0
	mov	x11, #0
	ldr	x8, [x19, #16]
	add	x13, x8, #4
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #32]
	str	xzr, [x10, x11, lsl #3]
	ldr	x10, [x19, #24]
	add	x14, x10, x12
	str	wzr, [x14]
	add	x11, x11, #1
	str	x13, [x14, #8]
	ldrsw	x14, [x9]
	add	x12, x12, #16
	add	x13, x13, #4
	cmp	x11, x14
	b.lt	LBB0_15
; %bb.16:
	sub	x9, x11, #1
	b	LBB0_18
LBB0_17:
	ldp	x8, x10, [x19, #16]
	mov	x9, #-1
LBB0_18:
	add	x9, x10, x9, lsl #4
	str	x8, [x9, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_DescOwn,8,3                    ; @DescOwn
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.no_dead_strip	_epic_init_ring
.subsections_via_symbols
