	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_pstate_sample
_intel_pstate_sample:                   ## @intel_pstate_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_ktime_get
	movq	%rax, %r14
	movl	48(%rbx), %edi
	xorl	%esi, %esi
	callq	_get_cpu_idle_time_us
	movq	%rax, %r15
	movq	_MSR_IA32_APERF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsrl
	movq	_MSR_IA32_MPERF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsrl
	cmpq	$0, (%rbx)
	jle	LBB0_2
## %bb.1:
	movl	8(%rbx), %eax
	incl	%eax
	movq	_SAMPLE_COUNT@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, 8(%rbx)
	movq	32(%rbx), %rsi
	movq	40(%rbx), %rax
	movslq	%edx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	%rsi, 40(%rax,%rcx)
	movq	%r14, 32(%rax,%rcx)
	movq	%r14, %rdi
	callq	_ktime_us_delta
	movq	40(%rbx), %rcx
	movslq	8(%rbx), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	shlq	$4, %rdx
	leaq	(%rcx,%rdx), %rsi
	movl	%eax, 24(%rcx,%rdx)
	movq	%r15, %rax
	subq	(%rbx), %rax
	movq	%rax, 16(%rcx,%rdx)
	movdqu	16(%rbx), %xmm0
	movdqu	(%rcx,%rdx), %xmm1
	psubq	%xmm0, %xmm1
	movdqu	%xmm1, (%rcx,%rdx)
	movq	%rbx, %rdi
	callq	_intel_pstate_calc_busy
LBB0_2:
	movq	%r14, 32(%rbx)
	movq	%r15, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_IA32_APERF,4,2             ## @MSR_IA32_APERF
	.comm	_MSR_IA32_MPERF,4,2             ## @MSR_IA32_MPERF
	.comm	_SAMPLE_COUNT,4,2               ## @SAMPLE_COUNT
	.no_dead_strip	_intel_pstate_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_pstate_sample
_intel_pstate_sample:                   ; @intel_pstate_sample
	.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, x0
	bl	_ktime_get
	mov	x20, x0
	ldr	w0, [x19, #48]
	mov	x1, #0
	bl	_get_cpu_idle_time_us
	mov	x21, x0
Lloh0:
	adrp	x8, _MSR_IA32_APERF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_IA32_APERF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rdmsrl
Lloh3:
	adrp	x8, _MSR_IA32_MPERF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSR_IA32_MPERF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_rdmsrl
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
Lloh6:
	adrp	x9, _SAMPLE_COUNT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SAMPLE_COUNT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x19, #8]
	ldp	x1, x9, [x19, #32]
	mov	w22, #48
	smaddl	x8, w8, w22, x9
	stp	x20, x1, [x8, #32]
	mov	x0, x20
	bl	_ktime_us_delta
	ldr	x8, [x19, #40]
	ldrsw	x9, [x19, #8]
	madd	x1, x9, x22, x8
	str	w0, [x1, #24]
	ldr	x8, [x19]
	sub	x8, x21, x8
	str	x8, [x1, #16]
	ldp	x9, x8, [x19, #16]
	ldp	x11, x10, [x1]
	sub	x8, x10, x8
	sub	x9, x11, x9
	stp	x9, x8, [x1]
	mov	x0, x19
	bl	_intel_pstate_calc_busy
LBB0_2:
	str	x20, [x19, #32]
	str	x21, [x19]
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_IA32_APERF,4,2             ; @MSR_IA32_APERF
	.comm	_MSR_IA32_MPERF,4,2             ; @MSR_IA32_MPERF
	.comm	_SAMPLE_COUNT,4,2               ; @SAMPLE_COUNT
	.no_dead_strip	_intel_pstate_sample
.subsections_via_symbols
