	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_pf_setup_global_output_regs
_cn23xx_pf_setup_global_output_regs:    ## @cn23xx_pf_setup_global_output_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	%rdi, %r14
	movq	40(%rdi), %r12
	movq	24(%rdi), %r15
	movq	32(%rdi), %r13
	movl	(%r12), %edi
	callq	_CFG_GET_IS_SLI_BP_ON
	xorl	%edx, %edx
	testq	%rax, %rax
	setne	%dl
	movq	_CN23XX_SLI_OQ_WMARK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$5, %edx
	movq	%r14, %rdi
	callq	_octeon_write_csr64
	testq	%r13, %r13
	jle	LBB0_3
## %bb.1:
	addq	%r15, %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_CN23XX_SLI_OQ_PKT_CONTROL
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_octeon_read_csr
	movq	_CN23XX_PKT_OUTPUT_CTL_IPTR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	notq	%rcx
	andq	%rax, %rcx
	movq	_CN23XX_PKT_OUTPUT_CTL_DPTR@GOTPCREL(%rip), %rax
	orq	(%rax), %rcx
	movq	_CN23XX_PKT_OUTPUT_CTL_ROR_P@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CN23XX_PKT_OUTPUT_CTL_BMODE@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rax
	movq	_CN23XX_PKT_OUTPUT_CTL_NSR_P@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rax
	notq	%rax
	andq	%rcx, %rax
	movq	_CN23XX_PKT_OUTPUT_CTL_ES_P@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	_CN23XX_PKT_OUTPUT_CTL_NSR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	_CN23XX_PKT_OUTPUT_CTL_ROR@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rbx
	notq	%rbx
	andq	%rax, %rbx
	movq	_CN23XX_PKT_OUTPUT_CTL_ES@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_CN23XX_SLI_OQ_PKT_CONTROL
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_octeon_write_csr
	movl	(%r12), %edi
	callq	_CFG_GET_OQ_INTR_TIME
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_cn23xx_pf_get_oq_ticks
	movq	%r15, %rdi
	callq	_CN23XX_SLI_OQ_PKT_INT_LEVELS
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_CFG_GET_OQ_INTR_PKT
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_octeon_write_csr64
	incq	%r15
	cmpq	%r13, %r15
	jl	LBB0_2
LBB0_3:
	movq	8(%r14), %rax
	movq	_CN23XX_SLI_OQ_WMARK@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	movl	$64, %edi
	callq	_writeq
	movq	(%r14), %rax
	movq	_OCTEON_CN23XX_REV_1_0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_OCTEON_CN23XX_REV_1_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	movq	8(%r14), %rax
	movq	_CN23XX_SLI_GBL_CONTROL@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	callq	_readq
	orl	$2, %eax
	movq	8(%r14), %rcx
	movslq	(%rbx), %rsi
	shlq	$2, %rsi
	addq	(%rcx), %rsi
	movl	%eax, %edi
	callq	_writeq
LBB0_6:
	cmpq	$0, 16(%r14)
	movq	8(%r14), %rax
	jne	LBB0_7
## %bb.8:
	movq	_CN23XX_SLI_OUT_BP_EN_W1S@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	movq	_CN23XX_SLI_OUT_BP_EN2_W1S@GOTPCREL(%rip), %rcx
LBB0_9:
	movslq	(%rcx), %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	movl	$-1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writeq                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CN23XX_SLI_OQ_WMARK,4,2        ## @CN23XX_SLI_OQ_WMARK
	.comm	_CN23XX_PKT_OUTPUT_CTL_IPTR,8,3 ## @CN23XX_PKT_OUTPUT_CTL_IPTR
	.comm	_CN23XX_PKT_OUTPUT_CTL_DPTR,8,3 ## @CN23XX_PKT_OUTPUT_CTL_DPTR
	.comm	_CN23XX_PKT_OUTPUT_CTL_BMODE,8,3 ## @CN23XX_PKT_OUTPUT_CTL_BMODE
	.comm	_CN23XX_PKT_OUTPUT_CTL_ROR_P,8,3 ## @CN23XX_PKT_OUTPUT_CTL_ROR_P
	.comm	_CN23XX_PKT_OUTPUT_CTL_NSR_P,8,3 ## @CN23XX_PKT_OUTPUT_CTL_NSR_P
	.comm	_CN23XX_PKT_OUTPUT_CTL_ES_P,8,3 ## @CN23XX_PKT_OUTPUT_CTL_ES_P
	.comm	_CN23XX_PKT_OUTPUT_CTL_ROR,8,3  ## @CN23XX_PKT_OUTPUT_CTL_ROR
	.comm	_CN23XX_PKT_OUTPUT_CTL_NSR,8,3  ## @CN23XX_PKT_OUTPUT_CTL_NSR
	.comm	_CN23XX_PKT_OUTPUT_CTL_ES,8,3   ## @CN23XX_PKT_OUTPUT_CTL_ES
	.comm	_OCTEON_CN23XX_REV_1_0,8,3      ## @OCTEON_CN23XX_REV_1_0
	.comm	_OCTEON_CN23XX_REV_1_1,8,3      ## @OCTEON_CN23XX_REV_1_1
	.comm	_CN23XX_SLI_GBL_CONTROL,4,2     ## @CN23XX_SLI_GBL_CONTROL
	.comm	_CN23XX_SLI_OUT_BP_EN2_W1S,4,2  ## @CN23XX_SLI_OUT_BP_EN2_W1S
	.comm	_CN23XX_SLI_OUT_BP_EN_W1S,4,2   ## @CN23XX_SLI_OUT_BP_EN_W1S
	.no_dead_strip	_cn23xx_pf_setup_global_output_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cn23xx_pf_setup_global_output_regs
_cn23xx_pf_setup_global_output_regs:    ; @cn23xx_pf_setup_global_output_regs
	.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
	mov	x19, x0
	ldp	x21, x22, [x0, #32]
	ldr	x20, [x0, #24]
	ldr	w0, [x22]
	bl	_CFG_GET_IS_SLI_BP_ON
	cmp	x0, #0
	cset	w8, ne
Lloh0:
	adrp	x9, _CN23XX_SLI_OQ_WMARK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CN23XX_SLI_OQ_WMARK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	lsl	w2, w8, #5
	mov	x0, x19
	bl	_octeon_write_csr64
	cmp	x21, #1
	b.lt	LBB0_3
; %bb.1:
	add	x24, x21, x20
Lloh3:
	adrp	x23, _CN23XX_PKT_OUTPUT_CTL_NSR_P@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CN23XX_PKT_OUTPUT_CTL_NSR_P@GOTPAGEOFF]
Lloh5:
	adrp	x25, _CN23XX_PKT_OUTPUT_CTL_ES_P@GOTPAGE
Lloh6:
	ldr	x25, [x25, _CN23XX_PKT_OUTPUT_CTL_ES_P@GOTPAGEOFF]
Lloh7:
	adrp	x26, _CN23XX_PKT_OUTPUT_CTL_ROR@GOTPAGE
Lloh8:
	ldr	x26, [x26, _CN23XX_PKT_OUTPUT_CTL_ROR@GOTPAGEOFF]
Lloh9:
	adrp	x27, _CN23XX_PKT_OUTPUT_CTL_NSR@GOTPAGE
Lloh10:
	ldr	x27, [x27, _CN23XX_PKT_OUTPUT_CTL_NSR@GOTPAGEOFF]
Lloh11:
	adrp	x28, _CN23XX_PKT_OUTPUT_CTL_ES@GOTPAGE
Lloh12:
	ldr	x28, [x28, _CN23XX_PKT_OUTPUT_CTL_ES@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_CONTROL
	mov	x1, x0
	mov	x0, x19
	bl	_octeon_read_csr
Lloh13:
	adrp	x8, _CN23XX_PKT_OUTPUT_CTL_IPTR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CN23XX_PKT_OUTPUT_CTL_IPTR@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	bic	x8, x0, x8
Lloh16:
	adrp	x9, _CN23XX_PKT_OUTPUT_CTL_DPTR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CN23XX_PKT_OUTPUT_CTL_DPTR@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh19:
	adrp	x9, _CN23XX_PKT_OUTPUT_CTL_BMODE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CN23XX_PKT_OUTPUT_CTL_BMODE@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, _CN23XX_PKT_OUTPUT_CTL_ROR_P@GOTPAGE
Lloh23:
	ldr	x10, [x10, _CN23XX_PKT_OUTPUT_CTL_ROR_P@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	orr	x9, x10, x9
	ldr	x10, [x23]
	orr	x9, x9, x10
	bic	x8, x8, x9
	ldr	x9, [x25]
	orr	x8, x8, x9
	ldr	x9, [x26]
	ldr	x10, [x27]
	orr	x9, x10, x9
	bic	x8, x8, x9
	ldr	x9, [x28]
	orr	x21, x8, x9
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_CONTROL
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_octeon_write_csr
	ldr	w0, [x22]
	bl	_CFG_GET_OQ_INTR_TIME
	mov	x1, x0
	mov	x0, x19
	bl	_cn23xx_pf_get_oq_ticks
	mov	x0, x20
	bl	_CN23XX_SLI_OQ_PKT_INT_LEVELS
	mov	x21, x0
	ldr	w0, [x22]
	bl	_CFG_GET_OQ_INTR_PKT
	mov	x0, x19
	mov	x1, x21
	bl	_octeon_write_csr64
	add	x20, x20, #1
	cmp	x20, x24
	b.lt	LBB0_2
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh25:
	adrp	x9, _CN23XX_SLI_OQ_WMARK@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CN23XX_SLI_OQ_WMARK@GOTPAGEOFF]
Lloh27:
	ldrsw	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	w0, #64
	bl	_writeq
	ldr	x8, [x19]
Lloh28:
	adrp	x9, _OCTEON_CN23XX_REV_1_0@GOTPAGE
Lloh29:
	ldr	x9, [x9, _OCTEON_CN23XX_REV_1_0@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
Lloh31:
	adrp	x10, _OCTEON_CN23XX_REV_1_1@GOTPAGE
Lloh32:
	ldr	x10, [x10, _OCTEON_CN23XX_REV_1_1@GOTPAGEOFF]
Lloh33:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh34:
	adrp	x20, _CN23XX_SLI_GBL_CONTROL@GOTPAGE
Lloh35:
	ldr	x20, [x20, _CN23XX_SLI_GBL_CONTROL@GOTPAGEOFF]
	ldrsw	x9, [x20]
	add	x0, x8, x9, lsl #2
	bl	_readq
	orr	w0, w0, #0x2
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldrsw	x9, [x20]
	add	x1, x8, x9, lsl #2
	bl	_writeq
LBB0_5:
	ldp	x9, x8, [x19, #8]
	ldr	x9, [x9]
Lloh36:
	adrp	x10, _CN23XX_SLI_OUT_BP_EN_W1S@GOTPAGE
Lloh37:
	ldr	x10, [x10, _CN23XX_SLI_OUT_BP_EN_W1S@GOTPAGEOFF]
Lloh38:
	adrp	x11, _CN23XX_SLI_OUT_BP_EN2_W1S@GOTPAGE
Lloh39:
	ldr	x11, [x11, _CN23XX_SLI_OUT_BP_EN2_W1S@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x11, eq
	ldrsw	x8, [x8]
	add	x1, x9, x8, lsl #2
	mov	w0, #-1
	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
	b	_writeq
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_CN23XX_SLI_OQ_WMARK,4,2        ; @CN23XX_SLI_OQ_WMARK
	.comm	_CN23XX_PKT_OUTPUT_CTL_IPTR,8,3 ; @CN23XX_PKT_OUTPUT_CTL_IPTR
	.comm	_CN23XX_PKT_OUTPUT_CTL_DPTR,8,3 ; @CN23XX_PKT_OUTPUT_CTL_DPTR
	.comm	_CN23XX_PKT_OUTPUT_CTL_BMODE,8,3 ; @CN23XX_PKT_OUTPUT_CTL_BMODE
	.comm	_CN23XX_PKT_OUTPUT_CTL_ROR_P,8,3 ; @CN23XX_PKT_OUTPUT_CTL_ROR_P
	.comm	_CN23XX_PKT_OUTPUT_CTL_NSR_P,8,3 ; @CN23XX_PKT_OUTPUT_CTL_NSR_P
	.comm	_CN23XX_PKT_OUTPUT_CTL_ES_P,8,3 ; @CN23XX_PKT_OUTPUT_CTL_ES_P
	.comm	_CN23XX_PKT_OUTPUT_CTL_ROR,8,3  ; @CN23XX_PKT_OUTPUT_CTL_ROR
	.comm	_CN23XX_PKT_OUTPUT_CTL_NSR,8,3  ; @CN23XX_PKT_OUTPUT_CTL_NSR
	.comm	_CN23XX_PKT_OUTPUT_CTL_ES,8,3   ; @CN23XX_PKT_OUTPUT_CTL_ES
	.comm	_OCTEON_CN23XX_REV_1_0,8,3      ; @OCTEON_CN23XX_REV_1_0
	.comm	_OCTEON_CN23XX_REV_1_1,8,3      ; @OCTEON_CN23XX_REV_1_1
	.comm	_CN23XX_SLI_GBL_CONTROL,4,2     ; @CN23XX_SLI_GBL_CONTROL
	.comm	_CN23XX_SLI_OUT_BP_EN2_W1S,4,2  ; @CN23XX_SLI_OUT_BP_EN2_W1S
	.comm	_CN23XX_SLI_OUT_BP_EN_W1S,4,2   ; @CN23XX_SLI_OUT_BP_EN_W1S
	.no_dead_strip	_cn23xx_pf_setup_global_output_regs
.subsections_via_symbols
