	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_net_clear_config_and_disable
_nfp_net_clear_config_and_disable:      ## @nfp_net_clear_config_and_disable
	.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	%rdi, %r12
	movq	_NFP_NET_CFG_CTRL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	8(%rdi), %eax
	movq	_NFP_NET_CFG_UPDATE_GEN@GOTPCREL(%rip), %rcx
	movq	_NFP_NET_CFG_UPDATE_MSIX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	orl	(%rcx), %r15d
	movq	_NFP_NET_CFG_UPDATE_RING@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	movq	_NFP_NET_CFG_CTRL_RINGCFG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rdi), %edx
	andl	%ecx, %edx
	notl	%ecx
	xorl	%r14d, %r14d
	cmpl	$1, %edx
	sbbl	%r14d, %r14d
	orl	%ecx, %r14d
	andl	%eax, %r14d
	movq	_NFP_NET_CFG_TXRS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_nn_writeq
	movq	_NFP_NET_CFG_RXRS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_nn_writeq
	movq	_NFP_NET_CFG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_nn_writel
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_nfp_net_reconfig
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_nn_err
LBB0_2:
	cmpl	$0, 12(%r12)
	je	LBB0_5
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rdi
	addq	%r15, %rdi
	callq	_nfp_net_rx_ring_reset
	incq	%rbx
	movl	12(%r12), %eax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jb	LBB0_4
LBB0_5:
	leaq	8(%r12), %r15
	cmpl	$0, 16(%r12)
	je	LBB0_8
## %bb.6:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rsi
	addq	%r13, %rsi
	movq	%r15, %rdi
	callq	_nfp_net_tx_ring_reset
	incq	%rbx
	movl	16(%r12), %eax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jb	LBB0_7
LBB0_8:
	cmpl	$0, 20(%r12)
	je	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_nfp_net_vec_clear_ring_data
	incl	%ebx
	cmpl	20(%r12), %ebx
	jb	LBB0_10
LBB0_11:
	movl	%r14d, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_NET_CFG_CTRL_ENABLE,4,2    ## @NFP_NET_CFG_CTRL_ENABLE
	.comm	_NFP_NET_CFG_UPDATE_GEN,4,2     ## @NFP_NET_CFG_UPDATE_GEN
	.comm	_NFP_NET_CFG_UPDATE_MSIX,4,2    ## @NFP_NET_CFG_UPDATE_MSIX
	.comm	_NFP_NET_CFG_UPDATE_RING,4,2    ## @NFP_NET_CFG_UPDATE_RING
	.comm	_NFP_NET_CFG_CTRL_RINGCFG,4,2   ## @NFP_NET_CFG_CTRL_RINGCFG
	.comm	_NFP_NET_CFG_TXRS_ENABLE,4,2    ## @NFP_NET_CFG_TXRS_ENABLE
	.comm	_NFP_NET_CFG_RXRS_ENABLE,4,2    ## @NFP_NET_CFG_RXRS_ENABLE
	.comm	_NFP_NET_CFG_CTRL,4,2           ## @NFP_NET_CFG_CTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not disable device: %d\n"

	.no_dead_strip	_nfp_net_clear_config_and_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_net_clear_config_and_disable
_nfp_net_clear_config_and_disable:      ; @nfp_net_clear_config_and_disable
	.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	x20, x0
	mov	x19, x0
	ldr	w8, [x19, #8]!
Lloh0:
	adrp	x9, _NFP_NET_CFG_CTRL_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NFP_NET_CFG_CTRL_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh3:
	adrp	x9, _NFP_NET_CFG_UPDATE_GEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NFP_NET_CFG_UPDATE_GEN@GOTPAGEOFF]
Lloh5:
	adrp	x10, _NFP_NET_CFG_UPDATE_MSIX@GOTPAGE
Lloh6:
	ldr	x10, [x10, _NFP_NET_CFG_UPDATE_MSIX@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh9:
	adrp	x10, _NFP_NET_CFG_UPDATE_RING@GOTPAGE
Lloh10:
	ldr	x10, [x10, _NFP_NET_CFG_UPDATE_RING@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w22, w9, w10
	ldr	w9, [x0]
Lloh12:
	adrp	x10, _NFP_NET_CFG_CTRL_RINGCFG@GOTPAGE
Lloh13:
	ldr	x10, [x10, _NFP_NET_CFG_CTRL_RINGCFG@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w9
	mov	w9, #-1
	csinv	w9, w9, w10, eq
	and	w21, w8, w9
Lloh15:
	adrp	x8, _NFP_NET_CFG_TXRS_ENABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NFP_NET_CFG_TXRS_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_nn_writeq
Lloh18:
	adrp	x8, _NFP_NET_CFG_RXRS_ENABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NFP_NET_CFG_RXRS_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_nn_writeq
Lloh21:
	adrp	x8, _NFP_NET_CFG_CTRL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NFP_NET_CFG_CTRL@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_nn_writel
	mov	x0, x20
	mov	x1, x22
	bl	_nfp_net_reconfig
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nn_err
LBB0_2:
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x22, #0
	mov	x23, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #32]
	add	x0, x8, x22
	bl	_nfp_net_rx_ring_reset
	add	x23, x23, #1
	ldr	w8, [x20, #12]
	add	x22, x22, #4
	cmp	x23, x8
	b.lo	LBB0_4
LBB0_5:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_8
; %bb.6:
	mov	x22, #0
	mov	x23, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	add	x1, x8, x22
	mov	x0, x19
	bl	_nfp_net_tx_ring_reset
	add	x23, x23, #1
	ldr	w8, [x20, #16]
	add	x22, x22, #4
	cmp	x23, x8
	b.lo	LBB0_7
LBB0_8:
	ldr	w8, [x20, #20]
	cbz	w8, LBB0_11
; %bb.9:
	mov	w22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_nfp_net_vec_clear_ring_data
	add	w22, w22, #1
	ldr	w8, [x20, #20]
	cmp	w22, w8
	b.lo	LBB0_10
LBB0_11:
	str	w21, [x19]
	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
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_NET_CFG_CTRL_ENABLE,4,2    ; @NFP_NET_CFG_CTRL_ENABLE
	.comm	_NFP_NET_CFG_UPDATE_GEN,4,2     ; @NFP_NET_CFG_UPDATE_GEN
	.comm	_NFP_NET_CFG_UPDATE_MSIX,4,2    ; @NFP_NET_CFG_UPDATE_MSIX
	.comm	_NFP_NET_CFG_UPDATE_RING,4,2    ; @NFP_NET_CFG_UPDATE_RING
	.comm	_NFP_NET_CFG_CTRL_RINGCFG,4,2   ; @NFP_NET_CFG_CTRL_RINGCFG
	.comm	_NFP_NET_CFG_TXRS_ENABLE,4,2    ; @NFP_NET_CFG_TXRS_ENABLE
	.comm	_NFP_NET_CFG_RXRS_ENABLE,4,2    ; @NFP_NET_CFG_RXRS_ENABLE
	.comm	_NFP_NET_CFG_CTRL,4,2           ; @NFP_NET_CFG_CTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not disable device: %d\n"

	.no_dead_strip	_nfp_net_clear_config_and_disable
.subsections_via_symbols
