	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_pf_soft_reset
_cn23xx_pf_soft_reset:                  ## @cn23xx_pf_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_CN23XX_WIN_WR_MASK_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$255, %edx
	callq	_octeon_write_csr64
	movq	8(%rbx), %rdi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_CN23XX_SLI_SCRATCH1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$4660, %edx                     ## imm = 0x1234
	callq	_octeon_write_csr64
	movq	_CN23XX_RST_SOFT_RST@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_lio_pci_readq
	movl	(%r14), %edx
	movl	$1, %r14d
	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	8(%rbx), %rdi
	movl	(%rbx), %edx
	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
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CN23XX_WIN_WR_MASK_REG,4,2     ## @CN23XX_WIN_WR_MASK_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OCTEON[%d]: BIST enabled for CN23XX soft reset\n"

	.comm	_CN23XX_SLI_SCRATCH1,4,2        ## @CN23XX_SLI_SCRATCH1
	.comm	_CN23XX_RST_SOFT_RST,4,2        ## @CN23XX_RST_SOFT_RST
L_.str.1:                               ## @.str.1
	.asciz	"OCTEON[%d]: Soft reset failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"OCTEON[%d]: Reset completed\n"

	.no_dead_strip	_cn23xx_pf_soft_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cn23xx_pf_soft_reset
_cn23xx_pf_soft_reset:                  ; @cn23xx_pf_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, _CN23XX_WIN_WR_MASK_REG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CN23XX_WIN_WR_MASK_REG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w2, #255
	bl	_octeon_write_csr64
	ldr	x0, [x19, #8]
	ldr	w2, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh4:
	adrp	x21, _CN23XX_SLI_SCRATCH1@GOTPAGE
Lloh5:
	ldr	x21, [x21, _CN23XX_SLI_SCRATCH1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #4660
	bl	_octeon_write_csr64
Lloh6:
	adrp	x22, _CN23XX_RST_SOFT_RST@GOTPAGE
Lloh7:
	ldr	x22, [x22, _CN23XX_RST_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, #8]
	ldr	w2, [x19]
	cbz	x8, LBB0_2
; %bb.1:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	w0, #1
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CN23XX_WIN_WR_MASK_REG,4,2     ; @CN23XX_WIN_WR_MASK_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OCTEON[%d]: BIST enabled for CN23XX soft reset\n"

	.comm	_CN23XX_SLI_SCRATCH1,4,2        ; @CN23XX_SLI_SCRATCH1
	.comm	_CN23XX_RST_SOFT_RST,4,2        ; @CN23XX_RST_SOFT_RST
l_.str.1:                               ; @.str.1
	.asciz	"OCTEON[%d]: Soft reset failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"OCTEON[%d]: Reset completed\n"

	.no_dead_strip	_cn23xx_pf_soft_reset
.subsections_via_symbols
