	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_ring
_init_ring:                             ## @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, %r12
	movq	$0, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rax)
	movq	$0, 72(%rax)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	cmpl	$1521, %eax                     ## imm = 0x5F1
	jge	LBB0_2
## %bb.1:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_3
LBB0_2:
	addl	$16, %eax
LBB0_3:
	movl	%eax, 8(%r12)
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.4:
	movl	$2, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%r15), %r14
	movl	%r14d, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	leal	(%rdx,%rdx,2), %edi
	shll	$3, %edi
	addl	12(%r12), %edi
	callq	_cpu_to_le32
	movq	32(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	$0, -8(%rcx,%rbx,8)
	movq	-16(%rcx,%rbx,8), %rax
	movq	$0, (%rax)
	movq	40(%r12), %rax
	movq	$0, (%rax,%r15,8)
	movslq	(%r13), %rcx
	addq	$3, %rbx
	movq	%r14, %r15
	cmpq	%rcx, %r14
	jl	LBB0_5
## %bb.6:
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.7:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %esi
	addl	$2, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_alloc_skb
	movq	%rax, %r15
	movq	40(%r12), %rax
	movq	%r15, (%rax,%rbx,8)
	testq	%r15, %r15
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movq	48(%r12), %rdi
	movl	(%r15), %esi
	movl	8(%r12), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	32(%r12), %rcx
	movq	(%rcx,%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	48(%r12), %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_LastFrag@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	8(%r12), %edi
	callq	_cpu_to_le32
	movq	32(%r12), %rcx
	movq	(%rcx,%r14), %rcx
	movq	%rax, (%rcx)
	incq	%rbx
	movslq	(%r13), %rax
	addq	$24, %r14
	cmpq	%rax, %rbx
	jl	LBB0_8
	jmp	LBB0_14
LBB0_12:
	xorl	%ebx, %ebx
LBB0_14:
	subl	(%r13), %ebx
	movl	%ebx, (%r12)
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.15:
	cmpl	$1, %eax
	jne	LBB0_17
## %bb.16:
	xorl	%ecx, %ecx
	jmp	LBB0_19
LBB0_17:
	movl	%eax, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	16(%r12), %rsi
	movq	$0, (%rsi,%rcx,8)
	movq	24(%r12), %rsi
	movq	$0, 8(%rsi,%rcx,8)
	movq	16(%r12), %rsi
	movq	$0, 8(%rsi,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_18
LBB0_19:
	testb	$1, %al
	je	LBB0_21
## %bb.20:
	movq	24(%r12), %rax
	movq	$0, (%rax,%rcx,8)
	movq	16(%r12), %rax
	movq	$0, (%rax,%rcx,8)
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r15, %rdi
	callq	_dev_kfree_skb
	movq	40(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_LastFrag,4,2                   ## @LastFrag
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.no_dead_strip	_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_ring
_init_ring:                             ; @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, #64]
	str	xzr, [x0, #56]
	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, #16
	cmp	w8, #1521
	csel	w8, w9, w10, lt
	str	w8, [x0, #8]
Lloh3:
	adrp	x22, _RX_RING_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x21, #0
	mov	x24, #0
	mov	w23, #24
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, #12]
	add	x25, x24, #1
	sdiv	w10, w25, w8
	msub	w8, w10, w8, w25
	madd	w0, w8, w23, w9
	bl	_cpu_to_le32
	ldp	x8, x9, [x19, #32]
	add	x8, x8, x21
	stp	xzr, x0, [x8, #8]
	ldr	x8, [x8]
	str	xzr, [x8]
	str	xzr, [x9, x24, lsl #3]
	ldrsw	x8, [x22]
	add	x21, x21, #24
	mov	x24, x25
	cmp	x25, x8
	b.lt	LBB0_2
; %bb.3:
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x24, #0
	mov	x23, #0
Lloh5:
	adrp	x25, _DMA_FROM_DEVICE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh7:
	adrp	x26, _LastFrag@GOTPAGE
Lloh8:
	ldr	x26, [x26, _LastFrag@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #8]
	add	w1, w8, #2
	mov	x0, x20
	bl	_netdev_alloc_skb
	ldr	x8, [x19, #40]
	str	x0, [x8, x23, lsl #3]
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
	mov	w1, #2
	bl	_skb_reserve
	ldr	x0, [x19, #48]
	ldr	w1, [x21]
	ldr	w2, [x19, #8]
	ldr	w3, [x25]
	bl	_dma_map_single
	bl	_cpu_to_le32
	mov	x1, x0
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x24]
	str	x0, [x8, #8]
	ldr	x0, [x19, #48]
	bl	_dma_mapping_error
	cbnz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #8]
	ldr	w9, [x26]
	orr	w0, w9, w8
	bl	_cpu_to_le32
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x24]
	str	x0, [x8]
	add	x23, x23, #1
	ldrsw	x8, [x22]
	add	x24, x24, #24
	cmp	x23, x8
	b.lt	LBB0_5
	b	LBB0_9
LBB0_8:
	mov	w23, #0
LBB0_9:
	ldr	w8, [x22]
	sub	w8, w23, w8
	str	w8, [x19]
Lloh9:
	adrp	x8, _TX_RING_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TX_RING_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x8, #0
	lsl	x9, x9, #3
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	str	xzr, [x10, x8]
	ldr	x10, [x19, #16]
	str	xzr, [x10, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_11
LBB0_12:
	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
LBB0_13:
	mov	x0, x21
	bl	_dev_kfree_skb
	ldr	x8, [x19, #40]
	str	xzr, [x8, x23, lsl #3]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_LastFrag,4,2                   ; @LastFrag
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.no_dead_strip	_init_ring
.subsections_via_symbols
