	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcr_attach
_pcr_attach:                            ## @pcr_attach
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_device_get_softc
	movq	%rax, %r12
	movl	%r14d, 16(%rax)
	movl	%r14d, %edi
	callq	_device_get_parent
	movl	%eax, %edi
	callq	_ofw_bus_get_node
	testq	%rax, %rax
	jle	LBB0_1
## %bb.3:
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_OF_getproplen
	testq	%rax, %rax
	jg	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_OF_parent
	movl	%eax, %edi
	callq	_OF_child
	movq	%rax, %r15
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_OF_getproplen
	movl	%eax, (%r12)
	leal	-9(%rax), %ecx
	cmpl	$-9, %ecx
	ja	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	leaq	-60(%rbp), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_OF_getprop
	movl	(%r12), %eax
	movl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, (%r12)
	cmpl	$4, %eax
	jl	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	-60(%rbp,%rbx,4), %r15d
	movq	8(%r12), %r13
	movl	%r15d, %edi
	callq	_PCR_TO_FREQ
	movl	%r15d, (%r13,%rax,4)
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movl	%r14d, %edi
	callq	_cpufreq_register
	xorl	%eax, %eax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No CPU device tree node!\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"power-mode-data"

L_.str.2:                               ## @.str.2
	.asciz	"No power mode data in device tree!\n"

	.no_dead_strip	_pcr_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcr_attach
_pcr_attach:                            ; @pcr_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #16]
	mov	x0, x19
	bl	_device_get_parent
	bl	_ofw_bus_get_node
	cmp	x0, #0
	b.le	LBB0_5
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_OF_getproplen
	cmp	x0, #0
	b.gt	LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_OF_parent
	bl	_OF_child
	mov	x21, x0
LBB0_3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_OF_getproplen
	mov	x3, x0
	str	w3, [x20]
	sub	w8, w3, #9
	cmn	w8, #9
	b.hi	LBB0_7
; %bb.4:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_device_printf
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_7:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x22, sp, #12
	add	x2, sp, #12
	mov	x0, x21
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_OF_getprop
	ldr	w8, [x20]
	asr	w9, w8, #2
	str	w9, [x20]
	cmp	w8, #4
	b.lt	LBB0_10
; %bb.8:
	mov	x23, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x22, x23, lsl #2]
	ldr	x24, [x20, #8]
	mov	x0, x21
	bl	_PCR_TO_FREQ
	str	w21, [x24, x0, lsl #2]
	add	x23, x23, #1
	ldrsw	x8, [x20]
	cmp	x23, x8
	b.lt	LBB0_9
LBB0_10:
	mov	x0, x19
	bl	_cpufreq_register
	mov	w0, #0
LBB0_11:
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No CPU device tree node!\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"power-mode-data"

l_.str.2:                               ; @.str.2
	.asciz	"No power mode data in device tree!\n"

	.no_dead_strip	_pcr_attach
.subsections_via_symbols
