	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_qm_cache_wb
_hisi_qm_cache_wb:                      ## @hisi_qm_cache_wb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	_QM_HW_V2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rdi, %r14
	movq	_QM_CACHE_WB_START@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rdi), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_QM_CACHE_WB_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	16(%r14), %rbx
	xorl	%edi, %edi
	callq	_BIT
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$10, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_readl_relaxed_poll_timeout
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_HW_V2,8,3                   ## @QM_HW_V2
	.comm	_QM_CACHE_WB_START,8,3          ## @QM_CACHE_WB_START
	.comm	_QM_CACHE_WB_DONE,8,3           ## @QM_CACHE_WB_DONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QM writeback sqc cache fail!\n"

	.no_dead_strip	_hisi_qm_cache_wb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_qm_cache_wb
_hisi_qm_cache_wb:                      ; @hisi_qm_cache_wb
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _QM_HW_V2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QM_HW_V2@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
Lloh3:
	adrp	x9, _QM_CACHE_WB_START@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QM_CACHE_WB_START@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _QM_CACHE_WB_DONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QM_CACHE_WB_DONE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x20, x9, x8
	mov	w0, #0
	bl	_BIT
	mov	x0, x20
	mov	w2, #0
	mov	w3, #10
	mov	w4, #1000
	bl	_readl_relaxed_poll_timeout
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x19, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_HW_V2,8,3                   ; @QM_HW_V2
	.comm	_QM_CACHE_WB_START,8,3          ; @QM_CACHE_WB_START
	.comm	_QM_CACHE_WB_DONE,8,3           ; @QM_CACHE_WB_DONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QM writeback sqc cache fail!\n"

	.no_dead_strip	_hisi_qm_cache_wb
.subsections_via_symbols
