	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_reset_io_queues
_cn23xx_reset_io_queues:                ## @cn23xx_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
	movq	16(%rdi), %rax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	testq	%rax, %rax
	jle	LBB0_15
## %bb.1:
	movq	%rdi, %r14
	movq	8(%rdi), %r13
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r13), %r12
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %r15
	movq	%r13, %rbx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_CN23XX_SLI_IQ_PKT_CONTROL64
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%eax, %r12d
	orl	(%r15), %r12d
	movq	%rbx, %rdi
	callq	_CN23XX_SLI_IQ_PKT_CONTROL64
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	callq	_octeon_write_csr64
	incq	%rbx
	cmpq	%r12, %rbx
	jl	LBB0_2
## %bb.3:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jle	LBB0_15
## %bb.4:
	movq	%r15, %r12
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1000, %r15d                    ## imm = 0x3E8
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	cmpq	-56(%rbp), %r13                 ## 8-byte Folded Reload
	jge	LBB0_15
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	%r13, %rdi
	callq	_CN23XX_SLI_IQ_PKT_CONTROL64
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_READ_ONCE
	testl	%eax, (%r12)
	je	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	callq	_READ_ONCE
	movq	_CN23XX_PKT_INPUT_CTL_QUIET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	subq	$1, %r15
	jb	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	%r13, %rdi
	callq	_CN23XX_SLI_IQ_PKT_CONTROL64
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WRITE_ONCE
	movl	%ebx, %edi
	callq	_READ_ONCE
	testl	%eax, (%r12)
	jne	LBB0_6
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	testq	%r15, %r15
	jne	LBB0_9
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	$-1, %r15
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	callq	_READ_ONCE
	movl	(%r12), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	callq	_WRITE_ONCE
	movq	%r13, %rdi
	callq	_CN23XX_SLI_IQ_PKT_CONTROL64
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_READ_ONCE
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	_CN23XX_PKT_INPUT_CTL_RST@GOTPCREL(%rip), %r12
	movl	%eax, %edx
	callq	_octeon_write_csr64
	movq	%r13, %rdi
	callq	_CN23XX_SLI_IQ_PKT_CONTROL64
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr64
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WRITE_ONCE
	movl	%ebx, %edi
	callq	_READ_ONCE
	testl	%eax, (%r12)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	callq	_dev_err
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_11
LBB0_14:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	callq	_dev_err
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_15:
	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	_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_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_reset_io_queues
_cn23xx_reset_io_queues:                ; @cn23xx_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
	ldr	x23, [x0, #16]
	cmp	x23, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #8]
	add	x25, x23, x20
Lloh0:
	adrp	x26, _CN23XX_PKT_INPUT_CTL_RST@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CN23XX_PKT_INPUT_CTL_RST@GOTPAGEOFF]
	mov	x21, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_CN23XX_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	ldr	w8, [x26]
	orr	w22, w8, w0
	mov	x0, x21
	bl	_CN23XX_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_octeon_write_csr64
	add	x21, x21, #1
	cmp	x21, x25
	b.lt	LBB0_2
; %bb.3:
	cmp	x23, #1
	b.lt	LBB0_14
; %bb.4:
	mov	w21, #0
	mov	w27, #1000
Lloh2:
	adrp	x28, _CN23XX_PKT_INPUT_CTL_QUIET@GOTPAGE
Lloh3:
	ldr	x28, [x28, _CN23XX_PKT_INPUT_CTL_QUIET@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str.1@PAGE
Lloh5:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #1
	cmp	x20, x25
	b.ge	LBB0_15
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	x0, x20
	bl	_CN23XX_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	mov	x23, x0
	bl	_READ_ONCE
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_12
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_READ_ONCE
	ldr	w8, [x28]
	tst	w8, w0
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	cbz	x27, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	sub	x27, x27, #1
	mov	x0, x20
	bl	_CN23XX_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	mov	x1, x0
	mov	x0, x23
	bl	_WRITE_ONCE
	mov	x0, x23
	bl	_READ_ONCE
	ldr	w8, [x26]
	tst	w8, w0
	b.ne	LBB0_7
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	x27, LBB0_12
	b	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x27, #-1
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_READ_ONCE
	ldr	w8, [x26]
	bic	w1, w0, w8
	mov	x0, x23
	bl	_WRITE_ONCE
	mov	x0, x20
	bl	_CN23XX_SLI_IQ_PKT_CONTROL64
	mov	x24, x0
	mov	x0, x23
	bl	_READ_ONCE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x24
	bl	_octeon_write_csr64
	mov	x0, x20
	bl	_CN23XX_SLI_IQ_PKT_CONTROL64
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr64
	mov	x1, x0
	mov	x0, x23
	bl	_WRITE_ONCE
	mov	x0, x23
	bl	_READ_ONCE
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x19]
	mov	x1, x22
	mov	x2, x20
	bl	_dev_err
	mov	w21, #-1
	b	LBB0_5
LBB0_14:
	mov	w21, #0
LBB0_15:
	mov	x0, x21
	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
LBB0_16:
	ldr	x0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	mov	w21, #-1
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.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_reset_io_queues
.subsections_via_symbols
