	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_setup_oq_regs
_cn23xx_setup_oq_regs:                  ## @cn23xx_setup_oq_regs
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	24(%rdi), %r15
	movq	32(%rdi), %rax
	movq	(%rax,%rsi,8), %r12
	addq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_BASE_ADDR64
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_octeon_write_csr64
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_SIZE
	movq	8(%r12), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_octeon_write_csr
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_BUFF_INFO_SIZE
	movq	16(%r12), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_octeon_write_csr
	movq	8(%rbx), %rax
	movq	(%rax), %r13
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_PKTS_SENT
	cltq
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	movq	%rax, 32(%r12)
	movq	8(%rbx), %rax
	movq	(%rax), %r13
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_PKTS_CREDIT
	cltq
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	movq	%rax, 24(%r12)
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movl	(%r15), %edi
	callq	_CFG_GET_OQ_INTR_TIME
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_cn23xx_pf_get_oq_ticks
	movl	(%r15), %edi
	callq	_CFG_GET_OQ_INTR_PKT
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_PKT_INT_LEVELS
	movq	%rbx, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_octeon_write_csr64             ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_PKT_CONTROL
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr
	movq	%rax, %r15
	movq	_CN23XX_PKT_OUTPUT_CTL_TENB@GOTPCREL(%rip), %rax
	orq	(%rax), %r15
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_PKT_CONTROL
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_octeon_write_csr
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_PKT_CONTROL
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr
	movq	%rax, %r15
	movq	_CN23XX_PKT_OUTPUT_CTL_CENB@GOTPCREL(%rip), %rax
	orq	(%rax), %r15
	movq	%r14, %rdi
	callq	_CN23XX_SLI_OQ_PKT_CONTROL
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_octeon_write_csr               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CN23XX_PKT_OUTPUT_CTL_TENB,8,3 ## @CN23XX_PKT_OUTPUT_CTL_TENB
	.comm	_CN23XX_PKT_OUTPUT_CTL_CENB,8,3 ## @CN23XX_PKT_OUTPUT_CTL_CENB
	.no_dead_strip	_cn23xx_setup_oq_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cn23xx_setup_oq_regs
_cn23xx_setup_oq_regs:                  ; @cn23xx_setup_oq_regs
	.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	x19, x0
	ldp	x21, x8, [x0, #24]
	ldr	x22, [x8, x1, lsl #3]
	ldr	x8, [x0, #16]
	add	x20, x8, x1
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_BASE_ADDR64
	mov	x1, x0
	ldr	w2, [x22]
	mov	x0, x19
	bl	_octeon_write_csr64
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_SIZE
	mov	x1, x0
	ldr	x2, [x22, #8]
	mov	x0, x19
	bl	_octeon_write_csr
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_BUFF_INFO_SIZE
	mov	x1, x0
	ldr	x2, [x22, #16]
	mov	x0, x19
	bl	_octeon_write_csr
	ldr	x8, [x19, #8]
	ldr	x23, [x8]
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKTS_SENT
	add	x8, x23, w0, sxtw #2
	str	x8, [x22, #32]
	ldr	x8, [x19, #8]
	ldr	x23, [x8]
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKTS_CREDIT
	add	x8, x23, w0, sxtw #2
	str	x8, [x22, #24]
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	bl	_CFG_GET_OQ_INTR_TIME
	mov	x1, x0
	mov	x0, x19
	bl	_cn23xx_pf_get_oq_ticks
	ldr	w0, [x21]
	bl	_CFG_GET_OQ_INTR_PKT
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_INT_LEVELS
	mov	x1, x0
	mov	x0, 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
	b	_octeon_write_csr64
LBB0_2:
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_CONTROL
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr
Lloh0:
	adrp	x8, _CN23XX_PKT_OUTPUT_CTL_TENB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CN23XX_PKT_OUTPUT_CTL_TENB@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	orr	x21, x8, x0
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_CONTROL
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_octeon_write_csr
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_CONTROL
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr
Lloh3:
	adrp	x8, _CN23XX_PKT_OUTPUT_CTL_CENB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CN23XX_PKT_OUTPUT_CTL_CENB@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	orr	x21, x8, x0
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_CONTROL
	mov	x1, x0
	mov	x0, x19
	mov	x2, 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
	b	_octeon_write_csr
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CN23XX_PKT_OUTPUT_CTL_TENB,8,3 ; @CN23XX_PKT_OUTPUT_CTL_TENB
	.comm	_CN23XX_PKT_OUTPUT_CTL_CENB,8,3 ; @CN23XX_PKT_OUTPUT_CTL_CENB
	.no_dead_strip	_cn23xx_setup_oq_regs
.subsections_via_symbols
