	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_eth_ring_init
_sh_eth_ring_init:                      ## @sh_eth_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movl	(%r14), %eax
	cmpl	$1493, %eax                     ## imm = 0x5D5
	jge	LBB0_1
## %bb.2:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_3
LBB0_1:
	addl	$33, %eax
	andl	$-8, %eax
	addl	$18, %eax
LBB0_3:
	movl	%eax, (%rbx)
	movq	80(%rbx), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_5:
	movl	4(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$1, %esi
	callq	_kcalloc
	movq	%rax, 72(%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movl	8(%rbx), %edi
	movl	(%r15), %edx
	movl	$1, %esi
	callq	_kcalloc
	movq	%rax, 64(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	4(%rbx), %esi
	shll	$2, %esi
	movq	32(%rbx), %rdi
	leaq	56(%rbx), %rdx
	movl	(%r15), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	$0, 40(%rbx)
	movl	8(%rbx), %esi
	shll	$2, %esi
	movq	32(%rbx), %rdi
	movq	%rbx, %rdx
	addq	$24, %rdx
	movl	(%r15), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, %rcx
	movq	%rax, 16(%rbx)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_11
LBB0_9:
	movq	%r14, %rdi
	callq	_sh_eth_ring_free
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.comm	_NET_IP_ALIGN,8,3               ## @NET_IP_ALIGN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sh_eth_ring_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_eth_ring_init
_sh_eth_ring_init:                      ; @sh_eth_ring_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _PKT_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PKT_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w10, w8, #33
	and	w10, w10, #0xfffffff8
	add	w10, w10, #18
	cmp	w8, #1493
	csel	w8, w9, w10, lt
	str	w8, [x0]
	ldr	x9, [x0, #80]
	ldr	x9, [x9]
	cbz	x9, LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _NET_IP_ALIGN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w8, w8, w9
	str	w8, [x20]
LBB0_2:
	ldr	w0, [x20, #4]
Lloh6:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #1
	bl	_kcalloc
	str	x0, [x20, #72]
	cbz	x0, LBB0_8
; %bb.3:
	ldr	w0, [x20, #8]
	ldr	w2, [x21]
	mov	w1, #1
	bl	_kcalloc
	str	x0, [x20, #64]
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w8, [x20, #4]
	lsl	w1, w8, #2
	ldr	x0, [x20, #32]
	add	x2, x20, #56
	ldr	w3, [x21]
	bl	_dma_alloc_coherent
	str	x0, [x20, #48]
	cbz	x0, LBB0_7
; %bb.5:
	str	xzr, [x20, #40]
	ldr	w8, [x20, #8]
	lsl	w1, w8, #2
	ldr	x0, [x20, #32]
	add	x2, x20, #24
	ldr	w3, [x21]
	bl	_dma_alloc_coherent
	str	x0, [x20, #16]
	cbz	x0, LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_sh_eth_ring_free
LBB0_8:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_NET_IP_ALIGN,8,3               ; @NET_IP_ALIGN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sh_eth_ring_init
.subsections_via_symbols
