	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_est_clockrate              ## -- Begin function cpu_est_clockrate
	.p2align	4, 0x90
_cpu_est_clockrate:                     ## @cpu_est_clockrate
	.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
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_mfpvr
	movl	%eax, %ebx
	sarl	$16, %ebx
	xorl	%eax, %eax
	callq	_mfmsr
	movl	%eax, %r12d
	movq	_PSL_EE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	andl	%r12d, %edi
	callq	_mtmsr
	addl	$-128, %ebx
	cmpl	$11, %ebx
	ja	LBB0_7
## %bb.1:
	movl	$2303, %eax                     ## imm = 0x8FF
	btl	%ebx, %eax
	jae	LBB0_3
## %bb.2:
	movq	_SPR_MMCR0@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_SPR_MMCR0_FC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtspr
	movq	_SPR_PMC1@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	xorl	%esi, %esi
	callq	_mtspr
	movl	(%r13), %ebx
	movq	_PMCN_CYCLES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SPR_MMCR0_PMC1SEL
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_mtspr
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	movl	(%r14), %edi
	callq	_mfspr
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	addl	$4999, %eax                     ## imm = 0x1387
	movl	%eax, (%r15)
	movl	(%r13), %edi
	movq	_SPR_MMCR0_FC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtspr
	jmp	LBB0_4
LBB0_3:
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	callq	_isync
	movq	_SPR_970MMCR0@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_SPR_MMCR0_FC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtspr
	xorl	%eax, %eax
	callq	_isync
	movq	_SPR_970MMCR1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_mtspr
	movq	_SPR_970MMCRA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_mtspr
	movq	_SPR_970PMC1@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_mtspr
	movl	(%r13), %ebx
	movq	_PMC970N_CYCLES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SPR_970MMCR0_PMC1SEL
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_mtspr
	xorl	%eax, %eax
	callq	_isync
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	xorl	%eax, %eax
	callq	_powerpc_sync
	movl	(%r13), %edi
	movq	_SPR_MMCR0_FC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtspr
	movl	(%r14), %edi
	callq	_mfspr
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	addl	$4999, %eax                     ## imm = 0x1387
	movl	%eax, (%r15)
LBB0_4:
	movl	%r12d, %edi
	callq	_mtmsr
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.6:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_OF_peer
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movq	%r15, %r13
	movl	%eax, %edi
	callq	_OF_child
	testl	%eax, %eax
	je	LBB0_15
## %bb.9:
	leaq	L_.str(%rip), %r15
	leaq	-56(%rbp), %r12
	movl	$1937076323, %r14d              ## imm = 0x73757063
	movl	%eax, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%ebx, %edi
	callq	_OF_peer
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	$8, %ecx
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_OF_getprop
	testl	%eax, %eax
	jle	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-56(%rbp), %eax
	xorl	%r14d, %eax
	movzbl	-52(%rbp), %ecx
	orl	%eax, %ecx
	jne	LBB0_10
	jmp	LBB0_15
LBB0_13:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %edi
	callq	_OF_child
	testl	%eax, %eax
	je	LBB0_22
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %r15
	leaq	-56(%rbp), %r12
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	movl	%ebx, %edi
	callq	_OF_peer
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_22
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	$8, %ecx
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_OF_getprop
	testl	%eax, %eax
	jle	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$7696483, -56(%rbp)             ## imm = 0x757063
	jne	LBB0_17
## %bb.20:
	leaq	L_.str.4(%rip), %rsi
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	movl	$4, %ecx
	movl	%ebx, %edi
	movq	%r13, %r14
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_OF_getprop
	testl	%eax, %eax
	jns	LBB0_5
## %bb.21:
	leaq	L_.str.5(%rip), %rsi
	movl	$4, %ecx
	movl	%ebx, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_OF_getprop
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	sarl	$31, %eax
	andl	(%rcx), %eax
	jmp	LBB0_24
LBB0_22:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %eax
LBB0_24:
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PSL_EE,4,2                     ## @PSL_EE
	.comm	_SPR_MMCR0,4,2                  ## @SPR_MMCR0
	.comm	_SPR_MMCR0_FC,4,2               ## @SPR_MMCR0_FC
	.comm	_SPR_PMC1,4,2                   ## @SPR_PMC1
	.comm	_PMCN_CYCLES,4,2                ## @PMCN_CYCLES
	.comm	_SPR_970MMCR0,4,2               ## @SPR_970MMCR0
	.comm	_SPR_970MMCR1,4,2               ## @SPR_970MMCR1
	.comm	_SPR_970MMCRA,4,2               ## @SPR_970MMCRA
	.comm	_SPR_970PMC1,4,2                ## @SPR_970PMC1
	.comm	_PMC970N_CYCLES,4,2             ## @PMC970N_CYCLES
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"name"

L_.str.1:                               ## @.str.1
	.asciz	"cpus"

L_.str.2:                               ## @.str.2
	.asciz	"device_type"

L_.str.3:                               ## @.str.3
	.asciz	"cpu"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.4:                               ## @.str.4
	.asciz	"ibm,extended-clock-frequency"

L_.str.5:                               ## @.str.5
	.asciz	"clock-frequency"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpu_est_clockrate              ; -- Begin function cpu_est_clockrate
	.p2align	2
_cpu_est_clockrate:                     ; @cpu_est_clockrate
	.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, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_mfpvr
	asr	w21, w0, #16
	bl	_mfmsr
	mov	x20, x0
Lloh3:
	adrp	x8, _PSL_EE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSL_EE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bic	w0, w0, w8
	bl	_mtmsr
	sub	w8, w21, #128
	cmp	w8, #11
	b.hi	LBB0_8
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #2303
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x22, _SPR_MMCR0@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SPR_MMCR0@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh8:
	adrp	x23, _SPR_MMCR0_FC@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SPR_MMCR0_FC@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_mtspr
Lloh10:
	adrp	x24, _SPR_PMC1@GOTPAGE
Lloh11:
	ldr	x24, [x24, _SPR_PMC1@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	w1, #0
	bl	_mtspr
	ldr	w21, [x22]
Lloh12:
	adrp	x8, _PMCN_CYCLES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PMCN_CYCLES@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_SPR_MMCR0_PMC1SEL
	mov	x1, x0
	mov	x0, x21
	bl	_mtspr
	mov	w21, #1000
	mov	w0, #1000
	bl	_DELAY
	ldr	w0, [x24]
	bl	_mfspr
	mov	w8, #4999
	madd	w8, w0, w21, w8
	str	w8, [x19]
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_mtspr
	b	LBB0_4
LBB0_3:
	bl	_isync
Lloh15:
	adrp	x22, _SPR_970MMCR0@GOTPAGE
Lloh16:
	ldr	x22, [x22, _SPR_970MMCR0@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh17:
	adrp	x23, _SPR_MMCR0_FC@GOTPAGE
Lloh18:
	ldr	x23, [x23, _SPR_MMCR0_FC@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_mtspr
	bl	_isync
Lloh19:
	adrp	x8, _SPR_970MMCR1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SPR_970MMCR1@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_mtspr
Lloh22:
	adrp	x8, _SPR_970MMCRA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SPR_970MMCRA@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_mtspr
Lloh25:
	adrp	x24, _SPR_970PMC1@GOTPAGE
Lloh26:
	ldr	x24, [x24, _SPR_970PMC1@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	w1, #0
	bl	_mtspr
	ldr	w21, [x22]
Lloh27:
	adrp	x8, _PMC970N_CYCLES@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PMC970N_CYCLES@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_SPR_970MMCR0_PMC1SEL
	mov	x1, x0
	mov	x0, x21
	bl	_mtspr
	bl	_isync
	mov	w21, #1000
	mov	w0, #1000
	bl	_DELAY
	bl	_powerpc_sync
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_mtspr
	ldr	w0, [x24]
	bl	_mfspr
	mov	w8, #4999
	madd	w8, w0, w21, w8
	str	w8, [x19]
LBB0_4:
	mov	x0, x20
	bl	_mtmsr
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldr	x8, [sp, #24]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.7:
	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_8:
	mov	w0, #0
	bl	_OF_peer
	cbz	w0, LBB0_22
; %bb.9:
	bl	_OF_child
	mov	x20, x0
	cbz	w0, LBB0_14
; %bb.10:
	mov	w22, #8
	add	x23, sp, #16
	mov	w24, #28771
	movk	w24, #29557, lsl #16
Lloh33:
	adrp	x21, l_.str@PAGE
Lloh34:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	bl	_OF_peer
	mov	x20, x0
	cbz	w0, LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	stp	x23, x22, [sp]
	mov	x0, x20
	mov	x1, x21
	bl	_OF_getprop
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [sp, #16]
	eor	w8, w8, w24
	ldrb	w9, [sp, #20]
	orr	w8, w8, w9
	cbnz	w8, LBB0_11
LBB0_14:
	mov	x0, x20
	bl	_OF_child
	cbz	w0, LBB0_21
; %bb.15:
	mov	x20, x0
	mov	w22, #8
	add	x23, sp, #16
	mov	w24, #28771
	movk	w24, #117, lsl #16
Lloh35:
	adrp	x21, l_.str.2@PAGE
Lloh36:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x20
	bl	_OF_peer
	mov	x20, x0
	cbz	w0, LBB0_21
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	stp	x23, x22, [sp]
	mov	x0, x20
	mov	x1, x21
	bl	_OF_getprop
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [sp, #16]
	cmp	w8, w24
	b.ne	LBB0_16
; %bb.19:
	mov	w8, #4
	stp	x19, x8, [sp]
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_OF_getprop
	tbz	w0, #31, LBB0_5
; %bb.20:
	mov	w8, #4
	stp	x19, x8, [sp]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_OF_getprop
Lloh41:
	adrp	x8, _ENOENT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	and	w0, w8, w0, asr #31
	b	LBB0_6
LBB0_21:
Lloh44:
	adrp	x8, _ENOENT@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_22:
Lloh47:
	adrp	x8, _ENXIO@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_PSL_EE,4,2                     ; @PSL_EE
	.comm	_SPR_MMCR0,4,2                  ; @SPR_MMCR0
	.comm	_SPR_MMCR0_FC,4,2               ; @SPR_MMCR0_FC
	.comm	_SPR_PMC1,4,2                   ; @SPR_PMC1
	.comm	_PMCN_CYCLES,4,2                ; @PMCN_CYCLES
	.comm	_SPR_970MMCR0,4,2               ; @SPR_970MMCR0
	.comm	_SPR_970MMCR1,4,2               ; @SPR_970MMCR1
	.comm	_SPR_970MMCRA,4,2               ; @SPR_970MMCRA
	.comm	_SPR_970PMC1,4,2                ; @SPR_970PMC1
	.comm	_PMC970N_CYCLES,4,2             ; @PMC970N_CYCLES
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"name"

l_.str.1:                               ; @.str.1
	.asciz	"cpus"

l_.str.2:                               ; @.str.2
	.asciz	"device_type"

l_.str.3:                               ; @.str.3
	.asciz	"cpu"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.4:                               ; @.str.4
	.asciz	"ibm,extended-clock-frequency"

l_.str.5:                               ; @.str.5
	.asciz	"clock-frequency"

.subsections_via_symbols
