	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hisi_qp_send                   ## -- Begin function hisi_qp_send
	.p2align	4, 0x90
_hisi_qp_send:                          ## @hisi_qp_send
	.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	%rsi, %r15
	movq	%rdi, %r13
	movl	(%rdi), %eax
	incl	%eax
	movq	_QM_Q_DEPTH@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, %r14d
	callq	_qm_get_avail_sqe
	movq	%rax, %r12
	movq	_QP_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r13), %rsi
	callq	_test_bit
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	16(%r13), %rax
	movq	8(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	testq	%r12, %r12
	je	LBB0_3
## %bb.5:
	movq	16(%r13), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_memcpy
	movq	16(%r13), %rdi
	movl	12(%r13), %esi
	movq	_QM_DOORBELL_CMD_SQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_qm_db
	leaq	4(%r13), %rdi
	callq	_atomic_inc
	movl	%r14d, (%r13)
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_Q_DEPTH,4,2                 ## @QM_Q_DEPTH
	.comm	_QP_STOP,4,2                    ## @QP_STOP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QP is stopped or resetting\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_QM_DOORBELL_CMD_SQ,4,2         ## @QM_DOORBELL_CMD_SQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hisi_qp_send                   ; -- Begin function hisi_qp_send
	.p2align	2
_hisi_qp_send:                          ; @hisi_qp_send
	.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	x20, x1
	mov	x19, x0
	mov	x22, x0
	ldr	w23, [x22], #8
Lloh0:
	adrp	x8, _QM_Q_DEPTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QM_Q_DEPTH@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	bl	_qm_get_avail_sqe
	mov	x21, x0
Lloh3:
	adrp	x8, _QP_STOP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QP_STOP@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	cbz	x21, LBB0_6
; %bb.4:
	add	w8, w23, #1
	sdiv	w9, w8, w24
	msub	w22, w9, w24, w8
	ldr	x8, [x19, #16]
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_memcpy
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #12]
Lloh10:
	adrp	x8, _QM_DOORBELL_CMD_SQ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _QM_DOORBELL_CMD_SQ@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x3, x22
	mov	w4, #0
	bl	_qm_db
	add	x0, x19, #4
	bl	_atomic_inc
	mov	w0, #0
	str	w22, [x19]
LBB0_5:
	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
	ret
LBB0_6:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_Q_DEPTH,4,2                 ; @QM_Q_DEPTH
	.comm	_QP_STOP,4,2                    ; @QP_STOP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QP is stopped or resetting\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_QM_DOORBELL_CMD_SQ,4,2         ; @QM_DOORBELL_CMD_SQ
.subsections_via_symbols
