	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_vf_reset_io_queues
_cn23xx_vf_reset_io_queues:             ## @cn23xx_vf_reset_io_queues
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	jle	LBB0_18
## %bb.1:
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_BUSY_READING_REG_VF_LOOP_COUNT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%eax, %r12d
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	%rbx, %rdi
	callq	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	callq	_octeon_write_csr64
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_2
## %bb.3:
	testq	%r13, %r13
	jle	LBB0_18
## %bb.4:
	xorl	%ebx, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r13, %rbx
	je	LBB0_19
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%rbx, %rdi
	callq	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_READ_ONCE
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %edi
	callq	_READ_ONCE
	movq	_CN23XX_PKT_INPUT_CTL_QUIET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	testq	%r14, %r14
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	%rbx, %rdi
	callq	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_WRITE_ONCE
	decq	%r14
	movl	%r12d, %edi
	callq	_READ_ONCE
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	%rcx, %rax
	jne	LBB0_7
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	testq	%r14, %r14
	jne	LBB0_13
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rcx, %rax
	testq	%r14, %r14
	jne	LBB0_13
	jmp	LBB0_16
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %rax
	testq	%r14, %r14
	jne	LBB0_13
	jmp	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %rax
	testq	%r14, %r14
	je	LBB0_16
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	movq	%rax, %r13
	callq	_READ_ONCE
	movl	(%r13), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%r12d, %edi
	callq	_WRITE_ONCE
	movq	%rbx, %rdi
	callq	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_READ_ONCE
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_octeon_write_csr64
	movq	%rbx, %rdi
	callq	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_WRITE_ONCE
	movl	%r12d, %edi
	callq	_READ_ONCE
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_dev_err
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_5
LBB0_18:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_19
LBB0_16:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_dev_err
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_19:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUSY_READING_REG_VF_LOOP_COUNT,8,3 ## @BUSY_READING_REG_VF_LOOP_COUNT
	.comm	_CN23XX_PKT_INPUT_CTL_RST,4,2   ## @CN23XX_PKT_INPUT_CTL_RST
	.comm	_CN23XX_PKT_INPUT_CTL_QUIET,4,2 ## @CN23XX_PKT_INPUT_CTL_QUIET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clearing the reset reg failed or setting the quiet reg failed for qno: %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"clearing the reset failed for qno: %u\n"

	.no_dead_strip	_cn23xx_vf_reset_io_queues
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cn23xx_vf_reset_io_queues
_cn23xx_vf_reset_io_queues:             ; @cn23xx_vf_reset_io_queues
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	x1, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x21, #0
Lloh0:
	adrp	x8, _BUSY_READING_REG_VF_LOOP_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUSY_READING_REG_VF_LOOP_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	x26, [x8]
Lloh3:
	adrp	x27, _CN23XX_PKT_INPUT_CTL_RST@GOTPAGE
Lloh4:
	ldr	x27, [x27, _CN23XX_PKT_INPUT_CTL_RST@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	ldr	w8, [x27]
	orr	w22, w8, w0
	mov	x0, x21
	bl	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_octeon_write_csr64
	add	x21, x21, #1
	cmp	x20, x21
	b.ne	LBB0_2
; %bb.3:
	cmp	x20, #1
	b.lt	LBB0_13
; %bb.4:
	mov	x21, #0
	mov	w22, #0
Lloh5:
	adrp	x28, _CN23XX_PKT_INPUT_CTL_QUIET@GOTPAGE
Lloh6:
	ldr	x28, [x28, _CN23XX_PKT_INPUT_CTL_QUIET@GOTPAGEOFF]
Lloh7:
	adrp	x23, l_.str.1@PAGE
Lloh8:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	cmp	x21, x20
	b.eq	LBB0_15
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	x0, x21
	bl	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	mov	x24, x0
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_READ_ONCE
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x24
	bl	_READ_ONCE
	ldr	w8, [x28]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	x26, #0, #4, eq
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x21
	bl	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	mov	x1, x0
	mov	x0, x24
	bl	_WRITE_ONCE
	sub	x26, x26, #1
	mov	x0, x24
	b	LBB0_7
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x26, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	bl	_READ_ONCE
	ldr	w8, [x27]
	bic	w1, w0, w8
	mov	x0, x24
	bl	_WRITE_ONCE
	mov	x0, x21
	bl	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	mov	x25, x0
	mov	x0, x24
	bl	_READ_ONCE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x25
	bl	_octeon_write_csr64
	mov	x0, x21
	bl	_CN23XX_VF_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	mov	x1, x0
	mov	x0, x24
	bl	_WRITE_ONCE
	mov	x0, x24
	bl	_READ_ONCE
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x19]
	mov	x1, x23
	mov	x2, x21
	bl	_dev_err
	mov	w22, #-1
	b	LBB0_5
LBB0_13:
	mov	w22, #0
	b	LBB0_15
LBB0_14:
	ldr	x0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	mov	w22, #-1
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BUSY_READING_REG_VF_LOOP_COUNT,8,3 ; @BUSY_READING_REG_VF_LOOP_COUNT
	.comm	_CN23XX_PKT_INPUT_CTL_RST,4,2   ; @CN23XX_PKT_INPUT_CTL_RST
	.comm	_CN23XX_PKT_INPUT_CTL_QUIET,4,2 ; @CN23XX_PKT_INPUT_CTL_QUIET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clearing the reset reg failed or setting the quiet reg failed for qno: %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"clearing the reset failed for qno: %u\n"

	.no_dead_strip	_cn23xx_vf_reset_io_queues
.subsections_via_symbols
