	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function current_qm_write
_current_qm_write:                      ## @current_qm_write
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_file_to_qm
	movq	%rax, %r14
	movq	(%rbx), %rax
	movl	(%rax), %esi
	cmpl	%r15d, %esi
	jge	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.4:
	movl	4(%r14), %ecx
	subl	(%r14), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%esi
	cmpl	%r15d, %esi
	jne	LBB0_6
## %bb.5:
	leal	-1(%r15), %edx
	imull	%edx, %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	jmp	LBB0_6
LBB0_3:
	movl	(%r14), %eax
LBB0_6:
	movl	%eax, 16(%r14)
	movq	_QM_DFX_MB_CNT_VF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	_QM_DFX_DB_CNT_VF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	_QM_DFX_SQE_CNT_VF_SQN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_readl
	movq	_CURRENT_Q_MASK@GOTPCREL(%rip), %r12
	andl	(%r12), %eax
	orl	%r15d, %eax
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_QM_DFX_CQE_CNT_VF_CQN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_readl
	andl	(%r12), %eax
	orl	%eax, %r15d
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QM_DFX_MB_CNT_VF,8,3           ## @QM_DFX_MB_CNT_VF
	.comm	_QM_DFX_DB_CNT_VF,8,3           ## @QM_DFX_DB_CNT_VF
	.comm	_QM_DFX_SQE_CNT_VF_SQN,8,3      ## @QM_DFX_SQE_CNT_VF_SQN
	.comm	_CURRENT_Q_MASK,4,2             ## @CURRENT_Q_MASK
	.comm	_QM_DFX_CQE_CNT_VF_CQN,8,3      ## @QM_DFX_CQE_CNT_VF_CQN
	.no_dead_strip	_current_qm_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function current_qm_write
_current_qm_write:                      ; @current_qm_write
	.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, x1
	mov	x21, x0
	bl	_file_to_qm
	ldr	x8, [x21]
	ldr	w8, [x8]
	cmp	w8, w19
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x20, x0
	cbz	w19, LBB0_4
; %bb.3:
	ldp	w10, w9, [x20]
	sub	w9, w9, w10
	sdiv	w10, w9, w8
	sub	w11, w19, #1
	msub	w9, w10, w11, w9
	cmp	w8, w19
	csel	w8, w10, w9, ne
	b	LBB0_5
LBB0_4:
	ldr	w8, [x20]
LBB0_5:
	str	w8, [x20, #16]
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _QM_DFX_MB_CNT_VF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QM_DFX_MB_CNT_VF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	bl	_writel
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _QM_DFX_DB_CNT_VF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _QM_DFX_DB_CNT_VF@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	bl	_writel
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x21, _QM_DFX_SQE_CNT_VF_SQN@GOTPAGE
Lloh10:
	ldr	x21, [x21, _QM_DFX_SQE_CNT_VF_SQN@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh11:
	adrp	x22, _CURRENT_Q_MASK@GOTPAGE
Lloh12:
	ldr	x22, [x22, _CURRENT_Q_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w8, w8, w0
	orr	w0, w8, w19
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20, #8]
Lloh13:
	adrp	x21, _QM_DFX_CQE_CNT_VF_CQN@GOTPAGE
Lloh14:
	ldr	x21, [x21, _QM_DFX_CQE_CNT_VF_CQN@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x22]
	and	w8, w8, w0
	orr	w0, w8, w19
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QM_DFX_MB_CNT_VF,8,3           ; @QM_DFX_MB_CNT_VF
	.comm	_QM_DFX_DB_CNT_VF,8,3           ; @QM_DFX_DB_CNT_VF
	.comm	_QM_DFX_SQE_CNT_VF_SQN,8,3      ; @QM_DFX_SQE_CNT_VF_SQN
	.comm	_CURRENT_Q_MASK,4,2             ; @CURRENT_Q_MASK
	.comm	_QM_DFX_CQE_CNT_VF_CQN,8,3      ; @QM_DFX_CQE_CNT_VF_CQN
	.no_dead_strip	_current_qm_write
.subsections_via_symbols
