	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ravb_ring_init
_ravb_ring_init:                        ## @ravb_ring_init
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r13
	movl	(%r15), %eax
	cmpl	$1493, %eax                     ## imm = 0x5D5
	jge	LBB0_2
## %bb.1:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	movl	(%r13), %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_ETH_HLEN@GOTPCREL(%rip), %rcx
	movq	_VLAN_HLEN@GOTPCREL(%rip), %rdx
	addl	(%rcx), %eax
	movl	(%rdx), %ecx
	addl	%ecx, %eax
	addl	$4, %eax
	movl	%eax, 4(%r13)
	movq	8(%r13), %rax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %r12
	movl	(%rax,%r12,4), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$8, %esi
	callq	_kcalloc
	movq	72(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	16(%r13), %rax
	movl	(%rax,%r12,4), %edi
	movl	(%rbx), %edx
	movl	$1, %esi
	callq	_kcalloc
	movq	80(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	72(%r13), %rax
	cmpq	$0, (%rax,%r12,8)
	je	LBB0_13
## %bb.3:
	movq	80(%r13), %rax
	cmpq	$0, (%rax,%r12,8)
	je	LBB0_13
## %bb.4:
	movq	8(%r13), %rax
	cmpl	$0, (%rax,%r12,4)
	jle	LBB0_8
## %bb.5:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13), %eax
	movq	_RAVB_ALIGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rax,%rcx), %esi
	decl	%esi
	movq	%r15, %rdi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_ravb_set_buffer_align
	movq	72(%r13), %rax
	movq	(%rax,%r12,8), %rax
	movq	%rbx, (%rax,%r14,8)
	incq	%r14
	movq	8(%r13), %rax
	movslq	(%rax,%r12,4), %rcx
	cmpq	%rcx, %r14
	jl	LBB0_6
LBB0_8:
	cmpl	$2, -56(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_11
## %bb.9:
	movq	_DPTR_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r13), %rcx
	movl	%eax, %edx
	imull	(%rcx,%r12,4), %edx
	leal	(%rax,%rdx), %edi
	decl	%edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	64(%r13), %rcx
	movl	%eax, (%rcx,%r12,4)
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movq	8(%r13), %rax
LBB0_11:
	leaq	(,%r12,4), %rbx
	movl	(%rax,%r12,4), %eax
	leal	4(,%rax,4), %esi
	movl	4(%r15), %edi
	movq	56(%r13), %rdx
	addq	%rbx, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_coherent
	movq	48(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	48(%r13), %rax
	cmpq	$0, (%rax,%r12,8)
	je	LBB0_13
## %bb.12:
	movq	40(%r13), %rax
	movq	$0, (%rax,%r12,8)
	movq	16(%r13), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	imull	(%rax,%r12,4), %ecx
	leal	4(,%rcx,4), %esi
	movl	4(%r15), %edi
	addq	32(%r13), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdx
	callq	_dma_alloc_coherent
	movq	24(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	24(%r13), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx,%r12,8)
	jne	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ravb_ring_free
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_VLAN_HLEN,4,2                  ## @VLAN_HLEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_RAVB_ALIGN,4,2                 ## @RAVB_ALIGN
	.comm	_DPTR_ALIGN,4,2                 ## @DPTR_ALIGN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ravb_ring_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ravb_ring_init
_ravb_ring_init:                        ; @ravb_ring_init
	.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	x19, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	w23, [x0]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PKT_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PKT_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #1493
	csel	w8, w9, w8, lt
Lloh3:
	adrp	x9, _ETH_HLEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETH_HLEN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _VLAN_HLEN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _VLAN_HLEN@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	add	w8, w9, w8
	add	w8, w8, w10
	add	w8, w8, #4
	str	w8, [x0, #4]
	ldr	x8, [x0, #8]
	sbfiz	x22, x19, #2, #32
	ldr	w0, [x8, x22]
Lloh9:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #8
	bl	_kcalloc
	ldr	x8, [x21, #72]
	sbfiz	x25, x19, #3, #32
	str	x0, [x8, x25]
	ldr	x8, [x21, #16]
	ldr	w0, [x8, x22]
	ldr	w2, [x24]
	mov	w1, #1
	bl	_kcalloc
	ldr	x8, [x21, #80]
	str	x0, [x8, x25]
	ldr	x8, [x21, #72]
	ldr	x8, [x8, x25]
	cbz	x8, LBB0_12
; %bb.1:
	sxtw	x25, w19
	ldr	x8, [x21, #80]
	ldr	x8, [x8, x25, lsl #3]
	cbz	x8, LBB0_12
; %bb.2:
	ldr	x8, [x21, #8]
	ldr	w9, [x8, x25, lsl #2]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x26, #0
Lloh11:
	adrp	x27, _RAVB_ALIGN@GOTPAGE
Lloh12:
	ldr	x27, [x27, _RAVB_ALIGN@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, #4]
	ldr	w9, [x27]
	add	w8, w8, w9
	sub	w1, w8, #1
	mov	x0, x20
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	bl	_ravb_set_buffer_align
	ldr	x8, [x21, #72]
	ldr	x8, [x8, x25, lsl #3]
	str	x22, [x8, x26, lsl #3]
	add	x26, x26, #1
	ldr	x8, [x21, #8]
	ldrsw	x9, [x8, x25, lsl #2]
	cmp	x26, x9
	b.lt	LBB0_4
LBB0_6:
	lsl	x22, x25, #2
	cmp	w23, #1
	b.le	LBB0_9
; %bb.7:
Lloh13:
	adrp	x8, _DPTR_ALIGN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DPTR_ALIGN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	x9, [x21, #16]
	ldr	w9, [x9, x22]
	madd	w8, w9, w8, w8
	sub	w0, w8, #1
	ldr	w1, [x24]
	bl	_kmalloc
	ldr	x8, [x21, #64]
	str	w0, [x8, x22]
	cbz	w0, LBB0_12
; %bb.8:
	ldr	x8, [x21, #8]
LBB0_9:
	ldr	w8, [x8, x22]
	lsl	w8, w8, #2
	add	w1, w8, #4
	ldr	w0, [x20, #4]
	ldr	x8, [x21, #56]
	add	x2, x8, x22
	ldr	w3, [x24]
	bl	_dma_alloc_coherent
	ldr	x8, [x21, #48]
	lsl	x25, x25, #3
	str	x0, [x8, x25]
	ldr	x8, [x21, #48]
	ldr	x8, [x8, x25]
	cbz	x8, LBB0_12
; %bb.10:
	ldp	x9, x8, [x21, #32]
	str	xzr, [x8, x25]
	ldr	x8, [x21, #16]
	ldr	w8, [x8, x22]
	mul	w8, w23, w8
	lsl	w8, w8, #2
	add	w1, w8, #4
	ldr	w0, [x20, #4]
	add	x2, x9, x22
	ldr	w3, [x24]
	bl	_dma_alloc_coherent
	ldr	x8, [x21, #24]
	str	x0, [x8, x25]
	ldr	x8, [x21, #24]
	ldr	x8, [x8, x25]
	cbz	x8, LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_ravb_ring_free
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_VLAN_HLEN,4,2                  ; @VLAN_HLEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_RAVB_ALIGN,4,2                 ; @RAVB_ALIGN
	.comm	_DPTR_ALIGN,4,2                 ; @DPTR_ALIGN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ravb_ring_init
.subsections_via_symbols
