	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_powersaver
_do_powersaver:                         ## @do_powersaver
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movl	%edi, %r14d
	movq	_MSR_VIA_LONGHAUL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_rdmsrl
	andl	$15, %ebx
	xorl	%eax, %eax
	callq	_safe_halt
	movq	_can_scale_voltage@GOTPCREL(%rip), %r13
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.1:
	cmpq	$0, (%r13)
	je	LBB0_6
## %bb.2:
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_wrmsrl
	xorl	%eax, %eax
	callq	_ACPI_FLUSH_CPU_CACHE
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.4:
	movl	%r14d, %edi
	callq	_inb
	movq	_acpi_gbl_FADT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_inl
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
	callq	_halt
LBB0_5:
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_wrmsrl
LBB0_6:
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_wrmsrl
	xorl	%eax, %eax
	callq	_ACPI_FLUSH_CPU_CACHE
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.8:
	movl	%r14d, %edi
	callq	_inb
	movq	_acpi_gbl_FADT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_inl
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
	callq	_halt
LBB0_9:
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_wrmsrl
	testl	%r15d, %r15d
	jne	LBB0_15
## %bb.10:
	cmpq	$0, (%r13)
	je	LBB0_15
## %bb.11:
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_wrmsrl
	xorl	%eax, %eax
	callq	_ACPI_FLUSH_CPU_CACHE
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.13:
	movl	%r14d, %edi
	callq	_inb
	movq	_acpi_gbl_FADT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_inl
	jmp	LBB0_14
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	callq	_halt
LBB0_14:
	movl	(%r12), %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wrmsrl                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_VIA_LONGHAUL,4,2           ## @MSR_VIA_LONGHAUL
	.comm	_revid_errata,4,2               ## @revid_errata
	.comm	_can_scale_voltage,8,3          ## @can_scale_voltage
	.comm	_acpi_gbl_FADT,4,2              ## @acpi_gbl_FADT
	.no_dead_strip	_do_powersaver
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_powersaver
_do_powersaver:                         ; @do_powersaver
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _MSR_VIA_LONGHAUL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MSR_VIA_LONGHAUL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_rdmsrl
	and	w19, w19, #0xf
	bl	_safe_halt
Lloh2:
	adrp	x23, _can_scale_voltage@GOTPAGE
Lloh3:
	ldr	x23, [x23, _can_scale_voltage@GOTPAGEOFF]
	cbz	w21, LBB0_6
; %bb.1:
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_wrmsrl
	bl	_ACPI_FLUSH_CPU_CACHE
	cbz	w20, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_inb
Lloh4:
	adrp	x8, _acpi_gbl_FADT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _acpi_gbl_FADT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_inl
	b	LBB0_5
LBB0_4:
	bl	_halt
LBB0_5:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_wrmsrl
LBB0_6:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_wrmsrl
	bl	_ACPI_FLUSH_CPU_CACHE
	cbz	w20, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_inb
Lloh7:
	adrp	x8, _acpi_gbl_FADT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _acpi_gbl_FADT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_inl
	b	LBB0_9
LBB0_8:
	bl	_halt
LBB0_9:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_wrmsrl
	cbnz	w21, LBB0_13
; %bb.10:
	ldr	x8, [x23]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_wrmsrl
	bl	_ACPI_FLUSH_CPU_CACHE
	cbz	w20, LBB0_14
; %bb.12:
	mov	x0, x20
	bl	_inb
Lloh10:
	adrp	x8, _acpi_gbl_FADT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _acpi_gbl_FADT@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_inl
	b	LBB0_15
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	_halt
LBB0_15:
	ldr	w0, [x22]
	mov	x1, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_wrmsrl
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_VIA_LONGHAUL,4,2           ; @MSR_VIA_LONGHAUL
	.comm	_revid_errata,4,2               ; @revid_errata
	.comm	_can_scale_voltage,8,3          ; @can_scale_voltage
	.comm	_acpi_gbl_FADT,4,2              ; @acpi_gbl_FADT
	.no_dead_strip	_do_powersaver
.subsections_via_symbols
