	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_cpu_pid
_do_cpu_pid:                            ## @do_cpu_pid
	.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, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	88(%rdi), %r13d
	subl	80(%rdi), %r13d
	shll	$16, %r13d
	movl	%r13d, %edi
	callq	_FIX32TOPRINT
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	subl	%r12d, %r13d
	movl	%r13d, %edi
	callq	_FIX32TOPRINT
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DBG
	movl	(%r14), %eax
	incl	%eax
	movq	_CPU_TEMP_HISTORY_SIZE@GOTPCREL(%rip), %r8
	cltd
	idivl	(%r8)
	movl	%edx, (%r14)
	movq	8(%r14), %r9
	movslq	%edx, %rax
	movl	%r15d, (%r9,%rax,4)
	movl	16(%r14), %eax
	incl	%eax
	cltd
	idivl	20(%r14)
	movl	%edx, 16(%r14)
	movq	24(%r14), %r10
	movslq	%edx, %rax
	movl	%r12d, (%r10,%rax,4)
	movq	32(%r14), %rcx
	movslq	16(%r14), %rax
	movl	%r13d, (%rcx,%rax,4)
	cmpq	$0, 96(%r14)
	je	LBB0_8
## %bb.1:
	movl	20(%r14), %esi
	cmpl	$2, %esi
	jl	LBB0_4
## %bb.2:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r14), %eax
	incl	%eax
	cltd
	idivl	%esi
	movl	%edx, 16(%r14)
	movslq	%edx, %rax
	movl	%r12d, (%r10,%rax,4)
	movslq	16(%r14), %rax
	movl	%r13d, (%rcx,%rax,4)
	incl	%edi
	movl	20(%r14), %esi
	leal	-1(%rsi), %eax
	cmpl	%eax, %edi
	jl	LBB0_3
LBB0_4:
	movl	(%r8), %edi
	cmpl	$2, %edi
	jl	LBB0_7
## %bb.5:
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	incl	%eax
	cltd
	idivl	%edi
	movl	%edx, (%r14)
	movslq	%edx, %rax
	movl	%r15d, (%r9,%rax,4)
	incl	%esi
	movl	(%r8), %edi
	leal	-1(%rdi), %eax
	cmpl	%eax, %esi
	jl	LBB0_6
LBB0_7:
	movq	$0, 96(%r14)
LBB0_8:
	movl	20(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_20
## %bb.9:
	cmpl	$8, %eax
	jae	LBB0_11
## %bb.10:
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_11:
	movl	%eax, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rdi
	movq	%rdi, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %ebx
	andl	$3, %ebx
	cmpq	$24, %rdi
	jae	LBB0_13
## %bb.12:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	jmp	LBB0_15
LBB0_13:
	andq	$-4, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rdi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rcx,%rdi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	32(%rcx,%rdi,4), %xmm1
	movdqu	48(%rcx,%rdi,4), %xmm3
	movdqu	64(%rcx,%rdi,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	80(%rcx,%rdi,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	96(%rcx,%rdi,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	112(%rcx,%rdi,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rdi
	addq	$-4, %rsi
	jne	LBB0_14
LBB0_15:
	testq	%rbx, %rbx
	je	LBB0_18
## %bb.16:
	leaq	(%rcx,%rdi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	(%rsi,%rdi), %xmm2
	paddd	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %rbx
	jne	LBB0_17
LBB0_18:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebx
	cmpq	%rax, %rdx
	je	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rcx,%rdx,4), %ebx
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_19
LBB0_20:
	movq	_CPU_PID_INTERVAL@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DBG
	imull	72(%r14), %ebx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DBG
	movl	48(%r14), %eax
	movl	52(%r14), %edi
	shll	$16, %eax
	sarl	$20, %ebx
	subl	%ebx, %eax
	shll	$16, %edi
	cmpl	%eax, %edi
	cmovgel	%eax, %edi
	callq	_FIX32TOPRINT
	movl	52(%r14), %edx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DBG
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DBG
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_DBG
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DBG                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  power target: %d.%03d, error: %d.%03d\n"

	.comm	_CPU_TEMP_HISTORY_SIZE,4,2      ## @CPU_TEMP_HISTORY_SIZE
	.comm	_CPU_PID_INTERVAL,4,2           ## @CPU_PID_INTERVAL
L_.str.1:                               ## @.str.1
	.asciz	"  integral: %08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"   integ_p: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"   adj_in_target: %d.%03d, ttarget: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"   deriv_p: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"   prop_p: %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"   sum: %d\n"

	.no_dead_strip	_do_cpu_pid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_cpu_pid
_do_cpu_pid:                            ; @do_cpu_pid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x0, #88]
	ldr	w9, [x0, #80]
	sub	w8, w8, w9
	lsl	w22, w8, #16
	mov	x0, x22
	bl	_FIX32TOPRINT
	mov	x23, x0
	sub	w22, w22, w21
	mov	x0, x22
	bl	_FIX32TOPRINT
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_DBG
	ldr	w8, [x19]
	add	w8, w8, #1
Lloh2:
	adrp	x9, _CPU_TEMP_HISTORY_SIZE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CPU_TEMP_HISTORY_SIZE@GOTPAGEOFF]
	ldr	w10, [x9]
	sdiv	w11, w8, w10
	msub	w8, w11, w10, w8
	str	w8, [x19]
	ldr	x10, [x19, #8]
	str	w20, [x10, w8, sxtw #2]
	ldp	w8, w11, [x19, #16]
	add	w8, w8, #1
	sdiv	w12, w8, w11
	msub	w12, w12, w11, w8
	str	w12, [x19, #16]
	ldp	x11, x8, [x19, #24]
	str	w21, [x11, w12, sxtw #2]
	ldrsw	x12, [x19, #16]
	str	w22, [x8, x12, lsl #2]
	ldr	x12, [x19, #96]
	cbz	x12, LBB0_8
; %bb.1:
	ldr	w12, [x19, #20]
	cmp	w12, #2
	b.lt	LBB0_4
; %bb.2:
	mov	w13, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x19, #16]
	add	w14, w14, #1
	sdiv	w15, w14, w12
	msub	w12, w15, w12, w14
	str	w12, [x19, #16]
	str	w21, [x11, w12, sxtw #2]
	ldrsw	x12, [x19, #16]
	str	w22, [x8, x12, lsl #2]
	add	w13, w13, #1
	ldr	w12, [x19, #20]
	sub	w14, w12, #1
	cmp	w13, w14
	b.lt	LBB0_3
LBB0_4:
	ldr	w11, [x9]
	cmp	w11, #2
	b.lt	LBB0_7
; %bb.5:
	mov	w12, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x19]
	add	w13, w13, #1
	sdiv	w14, w13, w11
	msub	w11, w14, w11, w13
	str	w11, [x19]
	str	w20, [x10, w11, sxtw #2]
	add	w12, w12, #1
	ldr	w11, [x9]
	sub	w13, w11, #1
	cmp	w12, w13
	b.lt	LBB0_6
LBB0_7:
	str	xzr, [x19, #96]
LBB0_8:
	ldr	w9, [x19, #20]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.9:
	cmp	w9, #16
	b.hs	LBB0_12
; %bb.10:
	mov	x10, #0
	mov	w11, #0
	b	LBB0_15
LBB0_11:
	mov	w11, #0
	b	LBB0_17
LBB0_12:
	and	x10, x9, #0xfffffff0
	add	x11, x8, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x12, x12, #16
	b.ne	LBB0_13
; %bb.14:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w11, s0
	cmp	x10, x9
	b.eq	LBB0_17
LBB0_15:
	add	x8, x8, x10, lsl #2
	sub	x9, x9, x10
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8], #4
	add	w11, w10, w11
	subs	x9, x9, #1
	b.ne	LBB0_16
LBB0_17:
Lloh4:
	adrp	x8, _CPU_PID_INTERVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CPU_PID_INTERVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	mul	w20, w8, w11
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_DBG
	ldr	w8, [x19, #72]
	mul	w20, w20, w8
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
	ldp	w8, w9, [x19, #48]
	lsl	w8, w8, #16
	sub	w8, w8, w20, asr #20
	lsl	w9, w9, #16
	cmp	w9, w8
	csel	w0, w9, w8, lt
	bl	_FIX32TOPRINT
	mov	x1, x0
	ldr	w8, [x19, #52]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DBG
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DBG
Lloh15:
	adrp	x0, l_.str.5@PAGE
Lloh16:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DBG
Lloh17:
	adrp	x0, l_.str.6@PAGE
Lloh18:
	add	x0, x0, l_.str.6@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_DBG
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  power target: %d.%03d, error: %d.%03d\n"

	.comm	_CPU_TEMP_HISTORY_SIZE,4,2      ; @CPU_TEMP_HISTORY_SIZE
	.comm	_CPU_PID_INTERVAL,4,2           ; @CPU_PID_INTERVAL
l_.str.1:                               ; @.str.1
	.asciz	"  integral: %08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"   integ_p: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"   adj_in_target: %d.%03d, ttarget: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"   deriv_p: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"   prop_p: %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"   sum: %d\n"

	.no_dead_strip	_do_cpu_pid
.subsections_via_symbols
