	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_thermal_throttle
_aw_thermal_throttle:                   ## @aw_thermal_throttle
	.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	%esi, (%rdi)
	je	LBB0_7
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_devclass_find
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_devclass_get_device
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r15
	movq	_MAX_CF_LEVELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	8(%r14), %rsi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_CPUFREQ_LEVELS
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	cltq
	movq	8(%r14), %rcx
	leaq	(%rcx,%rax,4), %rsi
	addq	$-4, %rsi
	movl	-4(%rcx,%rax,4), %eax
	movl	%eax, 16(%r14)
	movq	_CPUFREQ_PRIO_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_CPUFREQ_SET
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	movl	%ebx, (%r14)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpufreq"

	.comm	_MAX_CF_LEVELS,4,2              ## @MAX_CF_LEVELS
	.comm	_CPUFREQ_PRIO_USER,4,2          ## @CPUFREQ_PRIO_USER
	.no_dead_strip	_aw_thermal_throttle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_thermal_throttle
_aw_thermal_throttle:                   ; @aw_thermal_throttle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.eq	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	cbz	w1, LBB0_6
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_devclass_find
	mov	w1, #0
	bl	_devclass_get_device
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
Lloh2:
	adrp	x8, _MAX_CF_LEVELS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_CF_LEVELS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	ldr	x1, [x20, #8]
	add	x2, sp, #12
	bl	_CPUFREQ_LEVELS
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_7
; %bb.5:
	ldr	x9, [x20, #8]
	sub	w8, w8, #1
	add	x1, x9, w8, sxtw #2
	ldr	w8, [x1]
	str	w8, [x20, #16]
Lloh5:
	adrp	x8, _CPUFREQ_PRIO_USER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CPUFREQ_PRIO_USER@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_CPUFREQ_SET
	cbnz	w0, LBB0_7
LBB0_6:
	str	w19, [x20]
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpufreq"

	.comm	_MAX_CF_LEVELS,4,2              ; @MAX_CF_LEVELS
	.comm	_CPUFREQ_PRIO_USER,4,2          ; @CPUFREQ_PRIO_USER
	.no_dead_strip	_aw_thermal_throttle
.subsections_via_symbols
