	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_net_ring_reconfig          ## -- Begin function nfp_net_ring_reconfig
	.p2align	4, 0x90
_nfp_net_ring_reconfig:                 ## @nfp_net_ring_reconfig
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_nfp_net_calc_fl_bufsz
	movl	%eax, 36(%r14)
	movl	32(%r14), %esi
	movl	%esi, 8(%r14)
	cmpq	$0, 24(%r14)
	movq	16(%r14), %rdi
	je	LBB0_2
## %bb.1:
	subl	%edi, %esi
	movl	%esi, 8(%r14)
LBB0_2:
	callq	_max
	movl	%eax, (%r14)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_nfp_net_check_config
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
LBB0_23:
	movq	%r14, %rdi
	callq	_kfree
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	4(%r14), %edi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movslq	8(%r12), %rbx
	cmpl	(%r14), %ebx
	jge	LBB0_10
## %bb.6:
	leaq	(,%rbx,4), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_nfp_net_prepare_vector
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_10:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nfp_net_rx_rings_prepare
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.11:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nfp_net_tx_rings_prepare
	testl	%eax, %eax
	je	LBB0_12
## %bb.19:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_nfp_net_rx_rings_free
	jmp	LBB0_20
LBB0_4:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nfp_net_dp_swap
	xorl	%r15d, %r15d
	jmp	LBB0_23
LBB0_8:
	movl	%eax, %r15d
	movl	%ebx, (%r14)
LBB0_20:
	movslq	(%r14), %r13
	cmpl	8(%r12), %r13d
	jle	LBB0_23
## %bb.21:
	leaq	-4(,%r13,4), %rbx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	decq	%r13
	movq	(%r12), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	callq	_nfp_net_cleanup_vector
	movslq	8(%r12), %rax
	addq	$-4, %rbx
	cmpq	%rax, %r13
	jg	LBB0_22
	jmp	LBB0_23
LBB0_12:
	movq	%r12, %rdi
	callq	_nfp_net_close_stack
	movq	%r12, %rdi
	callq	_nfp_net_clear_config_and_disable
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nfp_net_dp_swap_enable
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movq	%r12, %rdi
	callq	_nfp_net_clear_config_and_disable
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nfp_net_dp_swap_enable
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_nn_err
LBB0_15:
	movslq	(%r14), %r13
	cmpl	8(%r12), %r13d
	jle	LBB0_18
## %bb.16:
	leaq	-4(,%r13,4), %rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	decq	%r13
	movq	(%r12), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	callq	_nfp_net_cleanup_vector
	movslq	8(%r12), %rax
	addq	$-4, %rbx
	cmpq	%rax, %r13
	jg	LBB0_17
LBB0_18:
	movq	%r14, %rdi
	callq	_nfp_net_rx_rings_free
	movq	%r14, %rdi
	callq	_nfp_net_tx_rings_free
	movq	%r12, %rdi
	callq	_nfp_net_open_stack
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't restore ring config - FW communication failed (%d,%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_net_ring_reconfig          ; -- Begin function nfp_net_ring_reconfig
	.p2align	2
_nfp_net_ring_reconfig:                 ; @nfp_net_ring_reconfig
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_nfp_net_calc_fl_bufsz
	str	w0, [x19, #36]
	ldr	w1, [x19, #32]
	str	w1, [x19, #8]
	ldp	x0, x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	sub	w1, w1, w0
	str	w1, [x19, #8]
LBB0_2:
	bl	_max
	str	w0, [x19]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_nfp_net_check_config
	mov	x21, x0
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w0, [x19, #4]
	bl	_netif_running
	cbz	w0, LBB0_12
; %bb.5:
	ldrsw	x22, [x20, #8]
	ldr	w8, [x19]
	cmp	w22, w8
	b.ge	LBB0_9
; %bb.6:
	lsl	x23, x22, #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x1, x8, x23
	mov	x0, x20
	mov	x2, x22
	bl	_nfp_net_prepare_vector
	cbnz	w0, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x23, x23, #4
	cmp	x22, x8
	b.lt	LBB0_7
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_nfp_net_rx_rings_prepare
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.10:
	mov	x0, x20
	mov	x1, x19
	bl	_nfp_net_tx_rings_prepare
	cbz	w0, LBB0_17
; %bb.11:
	mov	x21, x0
	mov	x0, x19
	bl	_nfp_net_rx_rings_free
	b	LBB0_14
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_nfp_net_dp_swap
	mov	w21, #0
	b	LBB0_3
LBB0_13:
	mov	x21, x0
	str	w22, [x19]
LBB0_14:
	ldrsw	x22, [x19]
	ldr	w8, [x20, #8]
	cmp	w22, w8
	b.le	LBB0_3
; %bb.15:
	lsl	x8, x22, #2
	sub	x23, x8, #4
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	sub	x22, x22, #1
	ldr	x8, [x20]
	add	x1, x8, x23
	mov	x0, x20
	bl	_nfp_net_cleanup_vector
	ldrsw	x8, [x20, #8]
	sub	x23, x23, #4
	cmp	x22, x8
	b.gt	LBB0_16
	b	LBB0_3
LBB0_17:
	mov	x0, x20
	bl	_nfp_net_close_stack
	mov	x0, x20
	bl	_nfp_net_clear_config_and_disable
	mov	x0, x20
	mov	x1, x19
	bl	_nfp_net_dp_swap_enable
	mov	x21, x0
	cbz	w0, LBB0_20
; %bb.18:
	mov	x0, x20
	bl	_nfp_net_clear_config_and_disable
	mov	x0, x20
	mov	x1, x19
	bl	_nfp_net_dp_swap_enable
	cbz	w0, LBB0_20
; %bb.19:
	mov	x3, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_nn_err
LBB0_20:
	ldrsw	x22, [x19]
	ldr	w8, [x20, #8]
	cmp	w22, w8
	b.le	LBB0_23
; %bb.21:
	lsl	x8, x22, #2
	sub	x23, x8, #4
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	sub	x22, x22, #1
	ldr	x8, [x20]
	add	x1, x8, x23
	mov	x0, x20
	bl	_nfp_net_cleanup_vector
	ldrsw	x8, [x20, #8]
	sub	x23, x23, #4
	cmp	x22, x8
	b.gt	LBB0_22
LBB0_23:
	mov	x0, x19
	bl	_nfp_net_rx_rings_free
	mov	x0, x19
	bl	_nfp_net_tx_rings_free
	mov	x0, x20
	bl	_nfp_net_open_stack
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't restore ring config - FW communication failed (%d,%d)\n"

.subsections_via_symbols
