	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hnae_init_ring
_hnae_init_ring:                        ## @hnae_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rsi)
	jle	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	cmpq	$0, 8(%rsi)
	jle	LBB0_2
## %bb.4:
	movq	%rdi, 64(%r14)
	movl	%edx, 16(%r14)
	movq	(%rdi), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r14)
	xorl	%edi, %edi
	cmpl	$0, 52(%r14)
	jne	LBB0_7
## %bb.5:
	cmpq	$0, 40(%r14)
	jne	LBB0_7
## %bb.6:
	xorl	%edi, %edi
	cmpl	$0, 48(%r14)
	sete	%dil
LBB0_7:
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 24(%r14)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 32(%r14)
	sete	%dil
	callq	_assert
	movq	(%r14), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	callq	_hnae_alloc_desc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	%r14, %rdi
	callq	_is_rx_ring
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%r14, %rdi
	callq	_hnae_alloc_buffers
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_hnae_free_desc
	movl	%r15d, %ebx
LBB0_13:
	movq	40(%r14), %rdi
	callq	_kfree
	movq	$0, 40(%r14)
	jmp	LBB0_14
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hnae_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hnae_init_ring
_hnae_init_ring:                        ; @hnae_init_ring
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x1]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x1
	ldr	x8, [x1, #8]
	cmp	x8, #0
	b.le	LBB0_8
; %bb.2:
	str	x0, [x19, #64]
	str	w2, [x19, #16]
	ldr	x8, [x0]
	ldr	w8, [x8]
	str	w8, [x19, #56]
	ldr	w8, [x19, #52]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_15
LBB0_4:
	mov	w0, #0
LBB0_5:
	bl	_assert
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x0, [x19]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_hnae_alloc_desc
	mov	x20, x0
	cbz	w0, LBB0_12
LBB0_7:
	ldr	x0, [x19, #40]
	bl	_kfree
	str	xzr, [x19, #40]
	b	LBB0_10
LBB0_8:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_12:
	mov	x0, x19
	bl	_is_rx_ring
	cbz	x0, LBB0_16
; %bb.13:
	mov	x0, x19
	bl	_hnae_alloc_buffers
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.14:
	mov	x0, x19
	bl	_hnae_free_desc
	b	LBB0_7
LBB0_15:
	ldr	w8, [x19, #48]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_5
LBB0_16:
	mov	w20, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hnae_init_ring
.subsections_via_symbols
