	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lio_cn68xx_setup_pkt_ctl_regs
_lio_cn68xx_setup_pkt_ctl_regs:         ## @lio_cn68xx_setup_pkt_ctl_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, %r15
	movq	(%rdi), %r13
	movq	_CN6XXX_SLI_PKT_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_octeon_read_csr64
	movl	%eax, %r14d
	movq	_cn6xxx@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_CHIP_CONF
	movl	%eax, %edi
	callq	_CFG_GET_OQ_MAX_Q
	movl	%eax, %ebx
	movq	_CN68XX_SLI_TX_PIPE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_octeon_read_csr64
	andl	$-16711681, %eax                ## imm = 0xFF00FFFF
	shll	$16, %ebx
	orl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_octeon_write_csr64
	movl	(%r13), %edi
	callq	_CFG_GET_IS_SLI_BP_ON
	andl	$-16, %r14d
	xorl	%ecx, %ecx
	testq	%rax, %rax
	movl	$15, %edx
	cmovel	%ecx, %edx
	orl	%r14d, %edx
	movq	_CN6XXX_SLI_PKT_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_octeon_write_csr64             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CN6XXX_SLI_PKT_CTL,4,2         ## @CN6XXX_SLI_PKT_CTL
	.comm	_cn6xxx,4,2                     ## @cn6xxx
	.comm	_CN68XX_SLI_TX_PIPE,4,2         ## @CN68XX_SLI_TX_PIPE
	.no_dead_strip	_lio_cn68xx_setup_pkt_ctl_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lio_cn68xx_setup_pkt_ctl_regs
_lio_cn68xx_setup_pkt_ctl_regs:         ; @lio_cn68xx_setup_pkt_ctl_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
	ldr	x22, [x0]
Lloh0:
	adrp	x23, _CN6XXX_SLI_PKT_CTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CN6XXX_SLI_PKT_CTL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_octeon_read_csr64
	mov	x20, x0
Lloh2:
	adrp	x8, _cn6xxx@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cn6xxx@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_CHIP_CONF
	bl	_CFG_GET_OQ_MAX_Q
	mov	x21, x0
Lloh5:
	adrp	x24, _CN68XX_SLI_TX_PIPE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CN68XX_SLI_TX_PIPE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_octeon_read_csr64
	and	w8, w0, #0xff00ffff
	orr	w2, w8, w21, lsl #16
	ldr	w1, [x24]
	mov	x0, x19
	bl	_octeon_write_csr64
	ldr	w0, [x22]
	bl	_CFG_GET_IS_SLI_BP_ON
	and	w8, w20, #0xfffffff0
	cmp	x0, #0
	mov	w9, #15
	csel	w9, wzr, w9, eq
	orr	w2, w9, w8
	ldr	w1, [x23]
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CN6XXX_SLI_PKT_CTL,4,2         ; @CN6XXX_SLI_PKT_CTL
	.comm	_cn6xxx,4,2                     ; @cn6xxx
	.comm	_CN68XX_SLI_TX_PIPE,4,2         ; @CN68XX_SLI_TX_PIPE
	.no_dead_strip	_lio_cn68xx_setup_pkt_ctl_regs
.subsections_via_symbols
