	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lio_cn6xxx_soft_reset          ## -- Begin function lio_cn6xxx_soft_reset
	.p2align	4, 0x90
_lio_cn6xxx_soft_reset:                 ## @lio_cn6xxx_soft_reset
	.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, %rbx
	movq	_CN6XXX_WIN_WR_MASK_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$255, %edx
	callq	_octeon_write_csr64
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_CN6XXX_CIU_SOFT_BIST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %r14d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lio_pci_writeq
	movq	_CN6XXX_SLI_SCRATCH1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$4660, %edx                     ## imm = 0x1234
	callq	_octeon_write_csr64
	movq	_CN6XXX_CIU_SOFT_RST@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_lio_pci_readq
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lio_pci_writeq
	movl	$100, %edi
	callq	_mdelay
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_octeon_read_csr64
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$255, %edx
	callq	_octeon_write_csr64
	xorl	%r14d, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CN6XXX_WIN_WR_MASK_REG,4,2     ## @CN6XXX_WIN_WR_MASK_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BIST enabled for soft reset\n"

	.comm	_CN6XXX_CIU_SOFT_BIST,4,2       ## @CN6XXX_CIU_SOFT_BIST
	.comm	_CN6XXX_SLI_SCRATCH1,4,2        ## @CN6XXX_SLI_SCRATCH1
	.comm	_CN6XXX_CIU_SOFT_RST,4,2        ## @CN6XXX_CIU_SOFT_RST
L_.str.1:                               ## @.str.1
	.asciz	"Soft reset failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"Reset completed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lio_cn6xxx_soft_reset          ; -- Begin function lio_cn6xxx_soft_reset
	.p2align	2
_lio_cn6xxx_soft_reset:                 ; @lio_cn6xxx_soft_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _CN6XXX_WIN_WR_MASK_REG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CN6XXX_WIN_WR_MASK_REG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #255
	bl	_octeon_write_csr64
	ldr	x0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh4:
	adrp	x8, _CN6XXX_CIU_SOFT_BIST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CN6XXX_CIU_SOFT_BIST@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_lio_pci_writeq
Lloh7:
	adrp	x21, _CN6XXX_SLI_SCRATCH1@GOTPAGE
Lloh8:
	ldr	x21, [x21, _CN6XXX_SLI_SCRATCH1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #4660
	bl	_octeon_write_csr64
Lloh9:
	adrp	x22, _CN6XXX_CIU_SOFT_RST@GOTPAGE
Lloh10:
	ldr	x22, [x22, _CN6XXX_CIU_SOFT_RST@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_lio_pci_readq
	ldr	w2, [x22]
	mov	x0, x19
	mov	w1, #1
	bl	_lio_pci_writeq
	mov	w0, #100
	bl	_mdelay
	ldr	w1, [x21]
	mov	x0, x19
	bl	_octeon_read_csr64
	mov	x8, x0
	ldr	x0, [x19]
	cbz	x8, LBB0_2
; %bb.1:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	w0, #1
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #255
	bl	_octeon_write_csr64
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CN6XXX_WIN_WR_MASK_REG,4,2     ; @CN6XXX_WIN_WR_MASK_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BIST enabled for soft reset\n"

	.comm	_CN6XXX_CIU_SOFT_BIST,4,2       ; @CN6XXX_CIU_SOFT_BIST
	.comm	_CN6XXX_SLI_SCRATCH1,4,2        ; @CN6XXX_SLI_SCRATCH1
	.comm	_CN6XXX_CIU_SOFT_RST,4,2        ; @CN6XXX_CIU_SOFT_RST
l_.str.1:                               ; @.str.1
	.asciz	"Soft reset failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"Reset completed\n"

.subsections_via_symbols
