	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fam15h_power_init_data
_fam15h_power_init_data:                ## @fam15h_power_init_data
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_REG_PROCESSOR_TDP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movl	-48(%rbp), %eax
	movzwl	%ax, %r13d
	sarl	$16, %eax
	movl	%eax, (%r14)
	movl	4(%r15), %edi
	movl	8(%r15), %r12d
	callq	_PCI_SLOT
	movl	%eax, %edi
	movl	$5, %esi
	callq	_PCI_DEVFN
	movq	_REG_TDP_LIMIT3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%rbx, %rcx
	callq	_pci_bus_read_config_dword
	movl	-48(%rbp), %ebx
	movl	%ebx, %eax
	shll	$6, %eax
	movzwl	%ax, %eax
	shrl	$10, %ebx
	andl	$63, %ebx
	orl	%eax, %ebx
	movl	%ebx, 4(%r14)
	imull	%r13d, %ebx
	movl	%ebx, -44(%rbp)
	cmpl	$16777216, %ebx                 ## imm = 0x1000000
	jb	LBB0_2
## %bb.1:
	movl	%ebx, %edx
	shrl	$16, %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
LBB0_2:
	imull	$15625, %ebx, %eax              ## imm = 0x3D09
	shrl	$10, %eax
	movl	%eax, 8(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_fam15h_power_init_attrs
	testl	%eax, %eax
	je	LBB0_3
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_X86_FEATURE_ACC_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_boot_cpu_has
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	$-2147483641, %edi              ## imm = 0x80000007
	callq	_cpuid_ecx
	movl	%eax, 20(%r14)
	movq	_MSR_F15H_CU_MAX_PWR_ACCUMULATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-44(%rbp), %rsi
	callq	_rdmsrl_safe
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movl	-44(%rbp), %eax
	movl	%eax, 12(%r14)
	movl	$10, 16(%r14)
	movq	%r14, %rdi
	callq	_read_registers
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_PROCESSOR_TDP,4,2          ## @REG_PROCESSOR_TDP
	.comm	_REG_TDP_LIMIT3,4,2             ## @REG_TDP_LIMIT3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bogus value for ProcessorPwrWatts (processor_pwr_watts>=%u)\n"

	.comm	_X86_FEATURE_ACC_POWER,4,2      ## @X86_FEATURE_ACC_POWER
	.comm	_MSR_F15H_CU_MAX_PWR_ACCUMULATOR,4,2 ## @MSR_F15H_CU_MAX_PWR_ACCUMULATOR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to read max compute unit power accumulator MSR\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_fam15h_power_init_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fam15h_power_init_data
_fam15h_power_init_data:                ; @fam15h_power_init_data
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _REG_PROCESSOR_TDP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_PROCESSOR_TDP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	asr	w9, w8, #16
	str	w9, [x19]
	and	w22, w8, #0xffff
	ldp	w0, w21, [x20, #4]
	bl	_PCI_SLOT
	mov	w1, #5
	bl	_PCI_DEVFN
	mov	x1, x0
Lloh3:
	adrp	x8, _REG_TDP_LIMIT3@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_TDP_LIMIT3@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x21
	bl	_pci_bus_read_config_dword
	ldr	w8, [sp, #12]
	ubfx	w9, w8, #10, #6
	bfi	w9, w8, #6, #10
	str	w9, [x19, #4]
	mul	w21, w9, w22
	str	w21, [sp, #8]
	lsr	w8, w21, #24
	cbz	w8, LBB0_2
; %bb.1:
	lsr	w2, w21, #16
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_2:
	mov	w8, #15625
	mul	w8, w21, w8
	lsr	w8, w8, #10
	str	w8, [x19, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_fam15h_power_init_attrs
	cbz	w0, LBB0_4
LBB0_3:
	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
LBB0_4:
Lloh8:
	adrp	x8, _X86_FEATURE_ACC_POWER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _X86_FEATURE_ACC_POWER@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_boot_cpu_has
	cbz	w0, LBB0_3
; %bb.5:
	mov	w0, #-2147483641
	bl	_cpuid_ecx
	str	w0, [x19, #20]
Lloh11:
	adrp	x8, _MSR_F15H_CU_MAX_PWR_ACCUMULATOR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSR_F15H_CU_MAX_PWR_ACCUMULATOR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_rdmsrl_safe
	cbz	x0, LBB0_7
; %bb.6:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_7:
	ldr	w8, [sp, #8]
	mov	w9, #10
	stp	w8, w9, [x19, #12]
	mov	x0, x19
	bl	_read_registers
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_PROCESSOR_TDP,4,2          ; @REG_PROCESSOR_TDP
	.comm	_REG_TDP_LIMIT3,4,2             ; @REG_TDP_LIMIT3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bogus value for ProcessorPwrWatts (processor_pwr_watts>=%u)\n"

	.comm	_X86_FEATURE_ACC_POWER,4,2      ; @X86_FEATURE_ACC_POWER
	.comm	_MSR_F15H_CU_MAX_PWR_ACCUMULATOR,4,2 ; @MSR_F15H_CU_MAX_PWR_ACCUMULATOR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to read max compute unit power accumulator MSR\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_fam15h_power_init_data
.subsections_via_symbols
