	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rate_control_pid_sample
_rate_control_pid_sample:               ## @rate_control_pid_sample
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	48(%rdi), %r14
	movl	40(%rdi), %edi
	callq	_msecs_to_jiffies
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movslq	(%rbx), %rdx
	movq	%rcx, %rsi
	subq	%rdx, %rsi
	addq	%rax, %rax
	cmpq	%rsi, %rax
	jae	LBB0_2
## %bb.1:
	movl	(%r13), %eax
	movl	%eax, 4(%rbx)
LBB0_2:
	movl	%ecx, (%rbx)
	xorl	%edi, %edi
	cmpl	$0, 8(%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	12(%rbx), %eax
	jmp	LBB0_5
LBB0_4:
	imull	$100, 16(%rbx), %eax
	cltd
	idivl	8(%rbx)
LBB0_5:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$0, 8(%rbx)
	movl	$0, 16(%rbx)
	movq	8(%r13), %rcx
	movq	24(%rbx), %rax
	cmpq	%rax, %rcx
	je	LBB0_7
## %bb.6:
	shlq	$4, %rcx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movslq	(%r14,%rcx), %r12
	shlq	$4, %rax
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movslq	(%r14,%rax), %r15
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	subl	12(%rbx), %edi
	movq	_RC_PID_ARITH_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RC_PID_DO_ARITH_RIGHT_SHIFT
	shlq	$4, %r12
	cltq
	addq	8(%r14,%r12), %rax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	shlq	$4, %r15
	movq	%rax, 8(%r14,%r15)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	24(%rbx), %rax
	movq	%rax, 8(%r13)
LBB0_7:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_rate_control_pid_normalize
	movl	16(%r13), %eax
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	subl	%r9d, %eax
	movq	_RC_PID_ARITH_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r8d, %ecx
	shll	%cl, %eax
	movl	32(%rbx), %edx
	movb	20(%r13), %cl
	movl	%edx, %edi
	sarl	%cl, %edi
	movl	4(%rbx), %esi
	subl	%edi, %edx
	addl	%eax, %edx
	movl	%edx, 32(%rbx)
	sarl	%cl, %edx
	movl	%r9d, %ecx
	subl	12(%rbx), %ecx
	movl	24(%r13), %edi
	imull	%esi, %edi
	incl	%edi
	imull	%ecx, %edi
	movl	%r9d, 12(%rbx)
	testl	%esi, %esi
	je	LBB0_9
## %bb.8:
	decl	%esi
	movl	%esi, 4(%rbx)
LBB0_9:
	imull	28(%r13), %eax
	imull	32(%r13), %edx
	addl	%eax, %edx
	imull	36(%r13), %edi
	addl	%edx, %edi
	addl	%r8d, %r8d
	movl	%r8d, %esi
	callq	_RC_PID_DO_ARITH_RIGHT_SHIFT
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	movq	%r14, %r8
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rate_control_pid_adjust_rate   ## TAILCALL
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_RC_PID_ARITH_SHIFT,4,2         ## @RC_PID_ARITH_SHIFT
	.no_dead_strip	_rate_control_pid_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rate_control_pid_sample
_rate_control_pid_sample:               ; @rate_control_pid_sample
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x20, [x0, #48]
	ldr	w0, [x0, #40]
	bl	_msecs_to_jiffies
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	ldrsw	x9, [x19]
	sub	x9, x8, x9
	cmp	x9, x0, lsl #1
	b.ls	LBB0_2
; %bb.1:
	ldr	w9, [x23]
	str	w9, [x19, #4]
LBB0_2:
	str	w8, [x19]
	ldr	w8, [x19, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w24, [x19, #12]
	b	LBB0_5
LBB0_4:
	ldr	w8, [x19, #16]
	mov	w9, #100
	mul	w8, w8, w9
	ldr	w9, [x19, #8]
	sdiv	w24, w8, w9
LBB0_5:
	str	wzr, [x19, #8]
	str	wzr, [x19, #16]
	ldr	x9, [x23, #8]
	ldr	x8, [x19, #24]
Lloh3:
	adrp	x25, _RC_PID_ARITH_SHIFT@GOTPAGE
Lloh4:
	ldr	x25, [x25, _RC_PID_ARITH_SHIFT@GOTPAGEOFF]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.6:
	lsl	x9, x9, #4
	ldrsw	x26, [x20, x9]
	lsl	x8, x8, #4
	ldrsw	x27, [x20, x8]
	ldr	w8, [x19, #12]
	sub	w0, w24, w8
	ldr	w1, [x25]
	bl	_RC_PID_DO_ARITH_RIGHT_SHIFT
	add	x8, x20, x26, lsl #4
	ldr	x8, [x8, #8]
	add	x8, x8, w0, sxtw
	add	x9, x20, x27, lsl #4
	str	x8, [x9, #8]
	ldr	x8, [x19, #24]
	str	x8, [x23, #8]
LBB0_7:
	ldr	w1, [x22]
	mov	x0, x23
	bl	_rate_control_pid_normalize
	ldp	w8, w10, [x23, #16]
	sub	w9, w8, w24
	ldr	w8, [x25]
	lsl	w9, w9, w8
	ldr	w11, [x19, #32]
	asr	w12, w11, w10
	sub	w11, w11, w12
	add	w11, w11, w9
	str	w11, [x19, #32]
	asr	w10, w11, w10
	ldr	w11, [x19, #12]
	sub	w11, w24, w11
	ldr	w13, [x23, #24]
	ldr	w12, [x19, #4]
	mul	w13, w12, w13
	madd	w11, w11, w13, w11
	str	w24, [x19, #12]
	cbz	w12, LBB0_9
; %bb.8:
	sub	w12, w12, #1
	str	w12, [x19, #4]
LBB0_9:
	ldp	w12, w13, [x23, #28]
	mul	w9, w12, w9
	madd	w9, w13, w10, w9
	ldr	w10, [x23, #36]
	madd	w0, w11, w10, w9
	lsl	w1, w8, #1
	bl	_RC_PID_DO_ARITH_RIGHT_SHIFT
	cbz	w0, LBB0_11
; %bb.10:
	mov	x3, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x4, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_rate_control_pid_adjust_rate
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_RC_PID_ARITH_SHIFT,4,2         ; @RC_PID_ARITH_SHIFT
	.no_dead_strip	_rate_control_pid_sample
.subsections_via_symbols
