	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_qsb
_set_qsb:                               ## @set_qsb
	.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
	movl	%edx, %r14d
	movq	%rsi, %r12
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_clk_get_fpi
	movq	%rax, %rdi
	callq	_clk_get_rate
	movl	%eax, %ecx
	movq	_FIRST_QSB_QID@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	(%r12), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_qsb_tstep@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%ecx, %eax
	shrl	$5, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %ebx
	incl	%ebx
	movq	_QSB_TP_TS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	cmovael	%eax, %ebx
LBB0_2:
	cmpl	$131, 4(%r12)
	jne	LBB0_5
## %bb.3:
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.4:
	movq	_g_atm_priv_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	8(%rax), %rax
	movl	%r14d, %esi
	movslq	(%rax,%rsi,4), %rax
	movl	$1000, %esi                     ## imm = 0x3E8
	addl	(%rdx,%rax,4), %esi
	movq	_qsb_tstep@GOTPCREL(%rip), %rax
	imull	(%rax), %ecx
	shrl	$5, %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
	movq	_QSB_TP_TS_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	1(%rax), %ebx
	cmpl	%ecx, %eax
	cmovael	%ecx, %ebx
LBB0_5:
	addl	%r14d, %r15d
	movq	_QSB_QPT_SET_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RTM_DM_SET
	movq	_QSB_RTM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movl	%ebx, %edi
	callq	_QSB_RTD_TTV_SET
	movq	_QSB_RTD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_QSB_RAMAC_RW_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RAMAC_RW_SET
	movl	%eax, %r14d
	movq	_QSB_RAMAC_TSEL_QPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RAMAC_TSEL_SET
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	_QSB_RAMAC_LH_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RAMAC_LH_SET
	movl	%eax, %ebx
	orl	%r12d, %ebx
	movl	%r15d, %edi
	callq	_QSB_RAMAC_TESEL_SET
	orl	%ebx, %eax
	movq	_QSB_RAMAC@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movl	%eax, (%rcx)
	movq	_QSB_QVPT_SET_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RTM_DM_SET
	movq	_QSB_RTM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	xorl	%edi, %edi
	callq	_QSB_RTD_TTV_SET
	movq	_QSB_RTD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_QSB_RAMAC_RW_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RAMAC_RW_SET
	movl	%eax, %r14d
	movq	_QSB_RAMAC_TSEL_VBR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RAMAC_TSEL_SET
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	_QSB_RAMAC_LH_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_QSB_RAMAC_LH_SET
	movl	%eax, %ebx
	orl	%r12d, %ebx
	movl	%r15d, %edi
	callq	_QSB_RAMAC_TESEL_SET
	orl	%ebx, %eax
	movq	(%r13), %rcx
	movl	%eax, (%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRST_QSB_QID,4,2              ## @FIRST_QSB_QID
	.comm	_qsb_tstep,4,2                  ## @qsb_tstep
	.comm	_QSB_TP_TS_MAX,4,2              ## @QSB_TP_TS_MAX
	.comm	_g_atm_priv_data,16,3           ## @g_atm_priv_data
	.comm	_QSB_WFQ_NONUBR_MAX,4,2         ## @QSB_WFQ_NONUBR_MAX
	.comm	_QSB_GCR_MIN,4,2                ## @QSB_GCR_MIN
	.comm	_QSB_WFQ_UBR_BYPASS,4,2         ## @QSB_WFQ_UBR_BYPASS
	.comm	_QSB_QPT_SET_MASK,4,2           ## @QSB_QPT_SET_MASK
	.comm	_QSB_RTM,8,3                    ## @QSB_RTM
	.comm	_QSB_RTD,8,3                    ## @QSB_RTD
	.comm	_QSB_RAMAC_RW_WRITE,4,2         ## @QSB_RAMAC_RW_WRITE
	.comm	_QSB_RAMAC_TSEL_QPT,4,2         ## @QSB_RAMAC_TSEL_QPT
	.comm	_QSB_RAMAC_LH_LOW,4,2           ## @QSB_RAMAC_LH_LOW
	.comm	_QSB_RAMAC,8,3                  ## @QSB_RAMAC
	.comm	_QSB_QVPT_SET_MASK,4,2          ## @QSB_QVPT_SET_MASK
	.comm	_QSB_RAMAC_TSEL_VBR,4,2         ## @QSB_RAMAC_TSEL_VBR
	.comm	_ATM_ATMOPT_CLP,4,2             ## @ATM_ATMOPT_CLP
	.comm	_QSB_TAUS_MAX,4,2               ## @QSB_TAUS_MAX
	.no_dead_strip	_set_qsb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_qsb
_set_qsb:                               ; @set_qsb
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	bl	_clk_get_fpi
	bl	_clk_get_rate
Lloh0:
	adrp	x10, _FIRST_QSB_QID@GOTPAGE
Lloh1:
	ldr	x10, [x10, _FIRST_QSB_QID@GOTPAGEOFF]
	ldr	w11, [x20]
Lloh2:
	adrp	x9, _qsb_tstep@GOTPAGE
Lloh3:
	ldr	x9, [x9, _qsb_tstep@GOTPAGEOFF]
Lloh4:
	adrp	x8, _QSB_TP_TS_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _QSB_TP_TS_MAX@GOTPAGEOFF]
	cbz	w11, LBB0_2
; %bb.1:
	ldr	w12, [x9]
	mul	w12, w12, w0
	lsr	w12, w12, #5
	udiv	w11, w12, w11
	add	w12, w11, #1
	ldr	w13, [x8]
	cmp	w12, w13
	csinc	w21, w13, w11, hs
	b	LBB0_3
LBB0_2:
	mov	w21, #0
LBB0_3:
	ldr	w10, [x10]
	ldr	w11, [x20, #4]
	cmp	w11, #131
	ccmp	w21, #0, #0, eq
	b.ne	LBB0_5
; %bb.4:
Lloh6:
	adrp	x11, _g_atm_priv_data@GOTPAGE
Lloh7:
	ldr	x11, [x11, _g_atm_priv_data@GOTPAGEOFF]
	ldp	x11, x12, [x11]
	ldrsw	x12, [x12, w19, uxtw #2]
	ldr	w11, [x11, x12, lsl #2]
	add	w11, w11, #1000
	ldr	w9, [x9]
	mul	w9, w9, w0
	lsr	w9, w9, #5
	udiv	w9, w9, w11
	ldr	w8, [x8]
	cmp	w9, w8
	csinc	w21, w8, w9, hs
LBB0_5:
	add	w19, w10, w19
Lloh8:
	adrp	x8, _QSB_QPT_SET_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QSB_QPT_SET_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_QSB_RTM_DM_SET
Lloh11:
	adrp	x22, _QSB_RTM@GOTPAGE
Lloh12:
	ldr	x22, [x22, _QSB_RTM@GOTPAGEOFF]
	ldr	x8, [x22]
	str	w0, [x8]
	mov	x0, x21
	bl	_QSB_RTD_TTV_SET
Lloh13:
	adrp	x21, _QSB_RTD@GOTPAGE
Lloh14:
	ldr	x21, [x21, _QSB_RTD@GOTPAGEOFF]
	ldr	x8, [x21]
	str	w0, [x8]
Lloh15:
	adrp	x23, _QSB_RAMAC_RW_WRITE@GOTPAGE
Lloh16:
	ldr	x23, [x23, _QSB_RAMAC_RW_WRITE@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_QSB_RAMAC_RW_SET
	mov	x20, x0
Lloh17:
	adrp	x8, _QSB_RAMAC_TSEL_QPT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _QSB_RAMAC_TSEL_QPT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_QSB_RAMAC_TSEL_SET
	orr	w20, w0, w20
Lloh20:
	adrp	x24, _QSB_RAMAC_LH_LOW@GOTPAGE
Lloh21:
	ldr	x24, [x24, _QSB_RAMAC_LH_LOW@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_QSB_RAMAC_LH_SET
	orr	w20, w20, w0
	mov	x0, x19
	bl	_QSB_RAMAC_TESEL_SET
Lloh22:
	adrp	x25, _QSB_RAMAC@GOTPAGE
Lloh23:
	ldr	x25, [x25, _QSB_RAMAC@GOTPAGEOFF]
	orr	w8, w20, w0
	ldr	x9, [x25]
	str	w8, [x9]
Lloh24:
	adrp	x8, _QSB_QVPT_SET_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _QSB_QVPT_SET_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_QSB_RTM_DM_SET
	ldr	x8, [x22]
	str	w0, [x8]
	mov	w0, #0
	bl	_QSB_RTD_TTV_SET
	ldr	x8, [x21]
	str	w0, [x8]
	ldr	w0, [x23]
	bl	_QSB_RAMAC_RW_SET
	mov	x20, x0
Lloh27:
	adrp	x8, _QSB_RAMAC_TSEL_VBR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _QSB_RAMAC_TSEL_VBR@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_QSB_RAMAC_TSEL_SET
	orr	w20, w0, w20
	ldr	w0, [x24]
	bl	_QSB_RAMAC_LH_SET
	orr	w20, w20, w0
	mov	x0, x19
	bl	_QSB_RAMAC_TESEL_SET
	orr	w8, w20, w0
	ldr	x9, [x25]
	str	w8, [x9]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRST_QSB_QID,4,2              ; @FIRST_QSB_QID
	.comm	_qsb_tstep,4,2                  ; @qsb_tstep
	.comm	_QSB_TP_TS_MAX,4,2              ; @QSB_TP_TS_MAX
	.comm	_g_atm_priv_data,16,3           ; @g_atm_priv_data
	.comm	_QSB_WFQ_NONUBR_MAX,4,2         ; @QSB_WFQ_NONUBR_MAX
	.comm	_QSB_GCR_MIN,4,2                ; @QSB_GCR_MIN
	.comm	_QSB_WFQ_UBR_BYPASS,4,2         ; @QSB_WFQ_UBR_BYPASS
	.comm	_QSB_QPT_SET_MASK,4,2           ; @QSB_QPT_SET_MASK
	.comm	_QSB_RTM,8,3                    ; @QSB_RTM
	.comm	_QSB_RTD,8,3                    ; @QSB_RTD
	.comm	_QSB_RAMAC_RW_WRITE,4,2         ; @QSB_RAMAC_RW_WRITE
	.comm	_QSB_RAMAC_TSEL_QPT,4,2         ; @QSB_RAMAC_TSEL_QPT
	.comm	_QSB_RAMAC_LH_LOW,4,2           ; @QSB_RAMAC_LH_LOW
	.comm	_QSB_RAMAC,8,3                  ; @QSB_RAMAC
	.comm	_QSB_QVPT_SET_MASK,4,2          ; @QSB_QVPT_SET_MASK
	.comm	_QSB_RAMAC_TSEL_VBR,4,2         ; @QSB_RAMAC_TSEL_VBR
	.comm	_ATM_ATMOPT_CLP,4,2             ; @ATM_ATMOPT_CLP
	.comm	_QSB_TAUS_MAX,4,2               ; @QSB_TAUS_MAX
	.no_dead_strip	_set_qsb
.subsections_via_symbols
