	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p_state_change
_p_state_change:                        ## @p_state_change
	.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
	cmpl	$8000000, %edx                  ## imm = 0x7A1200
	jg	LBB0_11
## %bb.1:
	movl	%edx, %ebx
	movl	%esi, %r14d
	movl	%edi, %r15d
	movl	$32, %edi
	callq	_zalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	_cpus_pstate_state@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	movslq	%r15d, %rdx
	movl	(%r9,%rdx,4), %esi
	movl	%esi, (%rax)
	movq	_cpus_pstate_start_times@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rsi,%rdx,4), %edi
	movl	%edi, 4(%rax)
	movl	%r14d, 8(%rax)
	movl	%edx, 12(%rax)
	movq	_PSTATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
	movq	_power_events@GOTPCREL(%rip), %r8
	movq	(%r8), %rcx
	movq	%rcx, 16(%rax)
	testl	%edi, %edi
	jne	LBB0_4
## %bb.3:
	movq	_first_time@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
LBB0_4:
	movq	%rax, (%r8)
	movl	%ebx, (%r9,%rdx,4)
	movl	%r14d, (%rsi,%rdx,4)
	movq	_max_freq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	cmpl	%ebx, %eax
	jge	LBB0_6
## %bb.5:
	movl	%ebx, (%rcx)
	movl	%ebx, %eax
LBB0_6:
	movq	_min_freq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%ebx, %edx
	jg	LBB0_8
## %bb.7:
	testl	%edx, %edx
	jne	LBB0_9
LBB0_8:
	movl	%ebx, (%rcx)
LBB0_9:
	leal	-1000(%rax), %ecx
	cmpl	%ebx, %ecx
	jne	LBB0_11
## %bb.10:
	movq	_turbo_frequency@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cpus_pstate_state,8,3          ## @cpus_pstate_state
	.comm	_cpus_pstate_start_times,8,3    ## @cpus_pstate_start_times
	.comm	_PSTATE,4,2                     ## @PSTATE
	.comm	_power_events,8,3               ## @power_events
	.comm	_first_time,4,2                 ## @first_time
	.comm	_max_freq,4,2                   ## @max_freq
	.comm	_min_freq,4,2                   ## @min_freq
	.comm	_turbo_frequency,4,2            ## @turbo_frequency
	.no_dead_strip	_p_state_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p_state_change
_p_state_change:                        ; @p_state_change
	.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	w8, #4608
	movk	w8, #122, lsl #16
	cmp	w2, w8
	b.gt	LBB0_11
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w0, #32
	bl	_zalloc
	cbz	x0, LBB0_11
; %bb.2:
Lloh0:
	adrp	x8, _cpus_pstate_state@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpus_pstate_state@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sbfiz	x10, x21, #2, #32
	ldr	w9, [x8, x10]
	str	w9, [x0]
Lloh3:
	adrp	x9, _cpus_pstate_start_times@GOTPAGE
Lloh4:
	ldr	x9, [x9, _cpus_pstate_start_times@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w12, [x9, x10]
	sxtw	x10, w21
	stp	w12, w20, [x0, #4]
	str	w21, [x0, #12]
Lloh6:
	adrp	x11, _PSTATE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _PSTATE@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	str	w11, [x0, #24]
Lloh9:
	adrp	x11, _power_events@GOTPAGE
Lloh10:
	ldr	x11, [x11, _power_events@GOTPAGEOFF]
	ldr	x13, [x11]
	str	x13, [x0, #16]
	cbnz	w12, LBB0_4
; %bb.3:
Lloh11:
	adrp	x12, _first_time@GOTPAGE
Lloh12:
	ldr	x12, [x12, _first_time@GOTPAGEOFF]
Lloh13:
	ldr	w12, [x12]
	str	w12, [x0, #4]
LBB0_4:
	str	x0, [x11]
	lsl	x10, x10, #2
	str	w19, [x8, x10]
	str	w20, [x9, x10]
Lloh14:
	adrp	x9, _max_freq@GOTPAGE
Lloh15:
	ldr	x9, [x9, _max_freq@GOTPAGEOFF]
	ldr	w8, [x9]
	cmp	w8, w19
	b.ge	LBB0_6
; %bb.5:
	str	w19, [x9]
	mov	x8, x19
LBB0_6:
Lloh16:
	adrp	x9, _min_freq@GOTPAGE
Lloh17:
	ldr	x9, [x9, _min_freq@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, w19
	b.gt	LBB0_8
; %bb.7:
	cbnz	w10, LBB0_9
LBB0_8:
	str	w19, [x9]
LBB0_9:
	sub	w9, w8, #1000
	cmp	w9, w19
	b.ne	LBB0_11
; %bb.10:
Lloh18:
	adrp	x9, _turbo_frequency@GOTPAGE
Lloh19:
	ldr	x9, [x9, _turbo_frequency@GOTPAGEOFF]
Lloh20:
	str	w8, [x9]
LBB0_11:
	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 AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_cpus_pstate_state,8,3          ; @cpus_pstate_state
	.comm	_cpus_pstate_start_times,8,3    ; @cpus_pstate_start_times
	.comm	_PSTATE,4,2                     ; @PSTATE
	.comm	_power_events,8,3               ; @power_events
	.comm	_first_time,4,2                 ; @first_time
	.comm	_max_freq,4,2                   ; @max_freq
	.comm	_min_freq,4,2                   ; @min_freq
	.comm	_turbo_frequency,4,2            ; @turbo_frequency
	.no_dead_strip	_p_state_change
.subsections_via_symbols
