	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gve_alloc_rings
_gve_alloc_rings:                       ## @gve_alloc_rings
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	20(%rdi), %edi
	shll	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_kvzalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_gve_tx_alloc_rings
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movl	16(%r15), %edi
	shll	$2, %edi
	movl	(%rbx), %esi
	callq	_kvzalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	callq	_gve_rx_alloc_rings
	testl	%eax, %eax
	je	LBB0_6
## %bb.13:
	movl	%eax, %r14d
	movq	8(%r15), %rdi
	callq	_kvfree
	movq	$0, 8(%r15)
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_14:
	movq	%r15, %rdi
	callq	_gve_tx_free_rings
LBB0_15:
	movq	(%r15), %rdi
	callq	_kvfree
	movq	$0, (%r15)
LBB0_16:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, 20(%r15)
	jle	LBB0_9
## %bb.7:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	%r14, %rdi
	callq	_u64_stats_init
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gve_tx_idx_to_ntfy
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_gve_add_napi
	incq	%rbx
	movslq	20(%r15), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	cmpl	$0, 16(%r15)
	jle	LBB0_10
## %bb.11:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rdi
	addq	%r12, %rdi
	callq	_u64_stats_init
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gve_rx_idx_to_ntfy
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_gve_add_napi
	incq	%rbx
	movslq	16(%r15), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jl	LBB0_12
	jmp	LBB0_16
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_gve_alloc_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gve_alloc_rings
_gve_alloc_rings:                       ; @gve_alloc_rings
	.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
	ldr	w8, [x0, #20]
	lsl	w0, w8, #2
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_kvzalloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_gve_tx_alloc_rings
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w8, [x19, #16]
	lsl	w0, w8, #2
	ldr	w1, [x21]
	bl	_kvzalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_gve_rx_alloc_rings
	cbz	w0, LBB0_10
; %bb.4:
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_kvfree
	str	xzr, [x19, #8]
	b	LBB0_7
LBB0_5:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x19
	bl	_gve_tx_free_rings
LBB0_8:
	ldr	x0, [x19]
	bl	_kvfree
	str	xzr, [x19]
LBB0_9:
	mov	x0, x20
	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
LBB0_10:
	ldr	w8, [x19, #20]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x21, #0
	mov	x20, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x0, x8, x21
	bl	_u64_stats_init
	mov	x0, x19
	mov	x1, x20
	bl	_gve_tx_idx_to_ntfy
	mov	x1, x0
	mov	x0, x19
	bl	_gve_add_napi
	add	x20, x20, #1
	ldrsw	x8, [x19, #20]
	add	x21, x21, #4
	cmp	x20, x8
	b.lt	LBB0_12
LBB0_13:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x21, #0
	mov	x20, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x21
	bl	_u64_stats_init
	mov	x0, x19
	mov	x1, x20
	bl	_gve_rx_idx_to_ntfy
	mov	x1, x0
	mov	x0, x19
	bl	_gve_add_napi
	add	x20, x20, #1
	ldrsw	x8, [x19, #16]
	add	x21, x21, #4
	cmp	x20, x8
	b.lt	LBB0_15
LBB0_16:
	mov	w20, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_gve_alloc_rings
.subsections_via_symbols
