	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hwpstate_identify
_hwpstate_identify:                     ## @hwpstate_identify
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	$-1, %edx
	callq	_device_find_child
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movq	_cpu_vendor_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CPU_VENDOR_AMD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	movq	_cpu_id@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CPUID_TO_FAMILY
	cmpl	$16, %eax
	jl	LBB0_6
## %bb.3:
	movq	_amd_pminfo@GOTPCREL(%rip), %rax
	movq	_AMDPM_HW_PSTATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.4:
	leaq	L_.str(%rip), %rdi
	xorl	%esi, %esi
	callq	_resource_disabled
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %edi
	movl	$10, %esi
	movl	$-1, %ecx
	callq	_BUS_ADD_CHILD
	testq	%rax, %rax
	je	LBB0_8
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_HWPSTATE_DEBUG                 ## TAILCALL
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_device_printf                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hwpstate"

	.comm	_cpu_vendor_id,8,3              ## @cpu_vendor_id
	.comm	_CPU_VENDOR_AMD,8,3             ## @CPU_VENDOR_AMD
	.comm	_cpu_id,4,2                     ## @cpu_id
	.comm	_amd_pminfo,4,2                 ## @amd_pminfo
	.comm	_AMDPM_HW_PSTATE,4,2            ## @AMDPM_HW_PSTATE
L_.str.1:                               ## @.str.1
	.asciz	"hwpstate enable bit is not set.\n"

L_.str.2:                               ## @.str.2
	.asciz	"hwpstate: add child failed\n"

	.no_dead_strip	_hwpstate_identify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hwpstate_identify
_hwpstate_identify:                     ; @hwpstate_identify
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_device_find_child
	cbnz	x0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _cpu_vendor_id@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cpu_vendor_id@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _CPU_VENDOR_AMD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CPU_VENDOR_AMD@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
Lloh8:
	adrp	x8, _cpu_id@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cpu_id@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_CPUID_TO_FAMILY
	cmp	w0, #16
	b.lt	LBB0_6
; %bb.3:
Lloh11:
	adrp	x8, _amd_pminfo@GOTPAGE
Lloh12:
	ldr	x8, [x8, _amd_pminfo@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _AMDPM_HW_PSTATE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AMDPM_HW_PSTATE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	bl	_resource_disabled
	cbnz	x0, LBB0_6
; %bb.5:
Lloh19:
	adrp	x2, l_.str@PAGE
Lloh20:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #10
	mov	w3, #-1
	bl	_BUS_ADD_CHILD
	cbz	x0, LBB0_8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_HWPSTATE_DEBUG
LBB0_8:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_device_printf
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hwpstate"

	.comm	_cpu_vendor_id,8,3              ; @cpu_vendor_id
	.comm	_CPU_VENDOR_AMD,8,3             ; @CPU_VENDOR_AMD
	.comm	_cpu_id,4,2                     ; @cpu_id
	.comm	_amd_pminfo,4,2                 ; @amd_pminfo
	.comm	_AMDPM_HW_PSTATE,4,2            ; @AMDPM_HW_PSTATE
l_.str.1:                               ; @.str.1
	.asciz	"hwpstate enable bit is not set.\n"

l_.str.2:                               ; @.str.2
	.asciz	"hwpstate: add child failed\n"

	.no_dead_strip	_hwpstate_identify
.subsections_via_symbols
