	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc520_freq_set_cpu_state
_sc520_freq_set_cpu_state:              ## @sc520_freq_set_cpu_state
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	xorl	%edi, %edi
	callq	_sc520_freq_get_cpu_frequency
	movl	%eax, -28(%rbp)
	movq	_sc520_freq_table@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	%ebx, %ebx
	movl	4(%rax,%rbx,8), %eax
	movl	%eax, -32(%rbp)
	movq	$0, -40(%rbp)
	movq	_CPUFREQ_PRECHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %r15
	movq	%r15, %rdi
	callq	_cpufreq_notify_transition
	movq	(%r14), %rax
	movl	4(%rax,%rbx,8), %esi
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	xorl	%eax, %eax
	callq	_local_irq_disable
	movq	_cpuctl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	andl	$-4, %ecx
	movq	(%r14), %rdx
	orl	(%rdx,%rbx,8), %ecx
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	callq	_local_irq_enable
	movq	_CPUFREQ_POSTCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_cpufreq_notify_transition
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sc520_freq_table,8,3           ## @sc520_freq_table
	.comm	_CPUFREQ_PRECHANGE,4,2          ## @CPUFREQ_PRECHANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"attempting to set frequency to %i kHz\n"

	.comm	_cpuctl,8,3                     ## @cpuctl
	.comm	_CPUFREQ_POSTCHANGE,4,2         ## @CPUFREQ_POSTCHANGE
	.no_dead_strip	_sc520_freq_set_cpu_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc520_freq_set_cpu_state
_sc520_freq_set_cpu_state:              ; @sc520_freq_set_cpu_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	w0, #0
	bl	_sc520_freq_get_cpu_frequency
	str	w0, [sp, #12]
Lloh0:
	adrp	x20, _sc520_freq_table@GOTPAGE
Lloh1:
	ldr	x20, [x20, _sc520_freq_table@GOTPAGEOFF]
	ldr	x8, [x20]
	mov	w9, w19
	lsl	x19, x9, #3
	add	x8, x8, x19
	ldr	w8, [x8, #4]
	str	w8, [sp, #8]
	str	xzr, [sp]
Lloh2:
	adrp	x8, _CPUFREQ_PRECHANGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CPUFREQ_PRECHANGE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, sp
	bl	_cpufreq_notify_transition
	ldr	x8, [x20]
	add	x8, x8, x19
	ldr	w1, [x8, #4]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	bl	_local_irq_disable
Lloh7:
	adrp	x8, _cpuctl@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cpuctl@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	w9, [x8]
	and	w9, w9, #0xfffffffc
	ldr	x10, [x20]
	ldr	w10, [x10, x19]
	orr	w9, w10, w9
	str	w9, [x8]
	bl	_local_irq_enable
Lloh10:
	adrp	x8, _CPUFREQ_POSTCHANGE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CPUFREQ_POSTCHANGE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, sp
	bl	_cpufreq_notify_transition
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_sc520_freq_table,8,3           ; @sc520_freq_table
	.comm	_CPUFREQ_PRECHANGE,4,2          ; @CPUFREQ_PRECHANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attempting to set frequency to %i kHz\n"

	.comm	_cpuctl,8,3                     ; @cpuctl
	.comm	_CPUFREQ_POSTCHANGE,4,2         ; @CPUFREQ_POSTCHANGE
	.no_dead_strip	_sc520_freq_set_cpu_state
.subsections_via_symbols
