	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hisi_qm_stop                   ## -- Begin function hisi_qm_stop
	.p2align	4, 0x90
_hisi_qm_stop:                          ## @hisi_qm_stop
	.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
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	movq	32(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_8
## %bb.2:
	movq	_QM_VF_EQ_INT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r15), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_QM_VF_AEQ_INT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r15), %rsi
	movl	$1, %edi
	callq	_writel
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.3:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_hisi_qm_stop_qp
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r12d
	movl	(%r15), %eax
	jmp	LBB0_4
LBB0_8:
	movl	$1, %edi
	callq	_WARN_ON
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_9:
	subl	(%rax), %r12d
LBB0_10:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r12d, %r12d
LBB0_12:
	movq	8(%r15), %rax
	movq	_QM_HW_PF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.13:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_hisi_qm_set_vft
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_10
## %bb.14:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_15:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QM_VF_EQ_INT_MASK,8,3          ## @QM_VF_EQ_INT_MASK
	.comm	_QM_VF_AEQ_INT_MASK,8,3         ## @QM_VF_AEQ_INT_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to stop qp%d!\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_QM_HW_PF,8,3                   ## @QM_HW_PF
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set vft!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hisi_qm_stop                   ; -- Begin function hisi_qm_stop
	.p2align	2
_hisi_qm_stop:                          ; @hisi_qm_stop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0, #32]
	cbz	x19, LBB0_8
; %bb.2:
	ldr	x8, [x20, #24]
Lloh0:
	adrp	x9, _QM_VF_EQ_INT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QM_VF_EQ_INT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	x8, [x20, #24]
Lloh3:
	adrp	x9, _QM_VF_AEQ_INT_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QM_VF_AEQ_INT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.3:
	mov	x22, #0
	mov	w21, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	ldr	x0, [x9, x22, lsl #3]
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_hisi_qm_stop_qp
	tbnz	w0, #31, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
	ldr	w8, [x20]
	b	LBB0_4
LBB0_8:
	mov	w0, #1
	bl	_WARN_ON
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_11:
	mov	w21, #0
LBB0_12:
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _QM_HW_PF@GOTPAGE
Lloh9:
	ldr	x9, [x9, _QM_HW_PF@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.13:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_hisi_qm_set_vft
	mov	x21, x0
	tbz	w0, #31, LBB0_10
; %bb.14:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_10
LBB0_15:
	str	x22, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QM_VF_EQ_INT_MASK,8,3          ; @QM_VF_EQ_INT_MASK
	.comm	_QM_VF_AEQ_INT_MASK,8,3         ; @QM_VF_AEQ_INT_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to stop qp%d!\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_QM_HW_PF,8,3                   ; @QM_HW_PF
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set vft!\n"

.subsections_via_symbols
