	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_get_cm_pq_idx_mcos         ## -- Begin function qed_get_cm_pq_idx_mcos
	.p2align	4, 0x90
_qed_get_cm_pq_idx_mcos:                ## @qed_get_cm_pq_idx_mcos
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_qed_init_qm_get_num_tcs
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	cmpl	%r14d, %eax
	jge	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_4:
	movq	_PQ_FLAGS_MCOS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qed_get_cm_pq_idx
	movq	%rax, %rcx
	movl	%r14d, %eax
	cltd
	idivl	%ebx
	movslq	%edx, %rax
	addq	%rcx, %rax
	jmp	LBB0_5
LBB0_1:
	movq	_PQ_FLAGS_MCOS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	(%r15), %rax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pq with flag 0x%lx do not exist\n"

	.comm	_PQ_FLAGS_MCOS,4,2              ## @PQ_FLAGS_MCOS
L_.str.1:                               ## @.str.1
	.asciz	"tc %d must be smaller than %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_get_cm_pq_idx_mcos         ; -- Begin function qed_get_cm_pq_idx_mcos
	.p2align	2
_qed_get_cm_pq_idx_mcos:                ; @qed_get_cm_pq_idx_mcos
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_qed_init_qm_get_num_tcs
	cbz	w0, LBB0_4
; %bb.1:
	mov	x21, x0
	cmp	w0, w20
	b.ge	LBB0_3
; %bb.2:
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_DP_ERR
LBB0_3:
Lloh2:
	adrp	x8, _PQ_FLAGS_MCOS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PQ_FLAGS_MCOS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qed_get_cm_pq_idx
	sdiv	w8, w20, w21
	msub	w8, w8, w21, w20
	add	x0, x0, w8, sxtw
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _PQ_FLAGS_MCOS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PQ_FLAGS_MCOS@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	ldr	x0, [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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pq with flag 0x%lx do not exist\n"

	.comm	_PQ_FLAGS_MCOS,4,2              ; @PQ_FLAGS_MCOS
l_.str.1:                               ; @.str.1
	.asciz	"tc %d must be smaller than %d\n"

.subsections_via_symbols
