	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_read_one_cpu_values
_do_read_one_cpu_values:                ## @do_read_one_cpu_values
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	(%rdi), %eax
	movl	%eax, (%rsi)
	movl	4(%rdi), %eax
	movl	%eax, (%rdx)
	movq	_cpu_pid_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CPU_PID_TYPE_RACKMAC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_CPUA_EXHAUST_FAN_RPM_INDEX@GOTPCREL(%rip), %rax
	cmoveq	_CPU_A1_FAN_RPM_INDEX@GOTPCREL(%rip), %rax
	movq	_CPUB_EXHAUST_FAN_RPM_INDEX@GOTPCREL(%rip), %rcx
	cmoveq	_CPU_B1_FAN_RPM_INDEX@GOTPCREL(%rip), %rcx
	cmpq	$0, 8(%rdi)
	cmoveq	%rax, %rcx
	movl	(%rcx), %edi
	movq	_RPM_PID_USE_ACTUAL_SPEED@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	$0, (%rax)
	sete	%sil
	callq	_get_rpm_fan
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, 16(%r13)
	movq	8(%r13), %rsi
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DBG
	jmp	LBB0_3
LBB0_1:
	movq	8(%r13), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DBG
LBB0_3:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_read_smon_adc
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movq	8(%r13), %rsi
	movl	36(%r13), %ecx
	movl	40(%r13), %r8d
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DBG
	imull	36(%r13), %r12d
	movl	40(%r13), %eax
	shll	$12, %eax
	addl	%r12d, %eax
	sarl	$2, %eax
	movl	%eax, (%r15)
	movl	%eax, 20(%r13)
	movl	(%r15), %edi
	callq	_FIX32TOPRINT
	movslq	%eax, %rsi
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_6
LBB0_4:
	incl	44(%r13)
	movq	8(%r13), %rsi
	leaq	L_.str.2(%rip), %rdi
LBB0_6:
	xorl	%eax, %eax
	callq	_DBG
	movq	%r13, %rdi
	movl	$3, %esi
	callq	_read_smon_adc
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_read_smon_adc
	movq	_ADC_CPU_VOLTAGE_SCALE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %ebx
	movq	_ADC_CPU_CURRENT_SCALE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, %ecx
	imull	%ebx, %ecx
	sarl	$16, %ecx
	movl	%ecx, (%r14)
	movl	%ebx, 24(%r13)
	movl	%eax, 28(%r13)
	movl	(%r14), %ecx
	movl	%ecx, 32(%r13)
	movq	8(%r13), %r15
	movl	%eax, %edi
	callq	_FIX32TOPRINT
	movl	%eax, %r12d
	movl	24(%r13), %edi
	callq	_FIX32TOPRINT
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_FIX32TOPRINT
	leaq	L_.str.5(%rip), %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_DBG
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cpu_pid_type,8,3               ## @cpu_pid_type
	.comm	_CPU_PID_TYPE_RACKMAC,8,3       ## @CPU_PID_TYPE_RACKMAC
	.comm	_CPU_A1_FAN_RPM_INDEX,4,2       ## @CPU_A1_FAN_RPM_INDEX
	.comm	_CPU_B1_FAN_RPM_INDEX,4,2       ## @CPU_B1_FAN_RPM_INDEX
	.comm	_CPUA_EXHAUST_FAN_RPM_INDEX,4,2 ## @CPUA_EXHAUST_FAN_RPM_INDEX
	.comm	_CPUB_EXHAUST_FAN_RPM_INDEX,4,2 ## @CPUB_EXHAUST_FAN_RPM_INDEX
	.comm	_RPM_PID_USE_ACTUAL_SPEED,4,2   ## @RPM_PID_USE_ACTUAL_SPEED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  cpu %d, fan reading error !\n"

L_.str.1:                               ## @.str.1
	.asciz	"  cpu %d, exhaust RPM: %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"  cpu %d, temp reading error !\n"

L_.str.3:                               ## @.str.3
	.asciz	"  cpu %d, temp raw: %04x, m_diode: %04x, b_diode: %04x\n"

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

	.comm	_ADC_CPU_VOLTAGE_SCALE,4,2      ## @ADC_CPU_VOLTAGE_SCALE
	.comm	_ADC_CPU_CURRENT_SCALE,4,2      ## @ADC_CPU_CURRENT_SCALE
L_.str.5:                               ## @.str.5
	.asciz	"  cpu %d, current: %d.%03d, voltage: %d.%03d, power: %d.%03d W\n"

	.no_dead_strip	_do_read_one_cpu_values
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_read_one_cpu_values
_do_read_one_cpu_values:                ; @do_read_one_cpu_values
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x0]
	str	w8, [x1]
	ldr	w8, [x0, #4]
	str	w8, [x2]
Lloh0:
	adrp	x8, _cpu_pid_type@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpu_pid_type@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _CPU_PID_TYPE_RACKMAC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CPU_PID_TYPE_RACKMAC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _CPU_A1_FAN_RPM_INDEX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CPU_A1_FAN_RPM_INDEX@GOTPAGEOFF]
	ldr	x11, [x0, #8]
Lloh8:
	adrp	x12, _CPUA_EXHAUST_FAN_RPM_INDEX@GOTPAGE
Lloh9:
	ldr	x12, [x12, _CPUA_EXHAUST_FAN_RPM_INDEX@GOTPAGEOFF]
Lloh10:
	adrp	x13, _CPU_B1_FAN_RPM_INDEX@GOTPAGE
Lloh11:
	ldr	x13, [x13, _CPU_B1_FAN_RPM_INDEX@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x12, eq
Lloh12:
	adrp	x9, _CPUB_EXHAUST_FAN_RPM_INDEX@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CPUB_EXHAUST_FAN_RPM_INDEX@GOTPAGEOFF]
	csel	x9, x13, x9, eq
	cmp	x11, #0
	csel	x8, x8, x9, eq
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _RPM_PID_USE_ACTUAL_SPEED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RPM_PID_USE_ACTUAL_SPEED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w1, eq
	bl	_get_rpm_fan
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_2
; %bb.1:
	str	w0, [x20, #16]
	ldr	x1, [x20, #8]
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:
	ldr	x1, [x20, #8]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
LBB0_3:
	bl	_DBG
	mov	x0, x20
	mov	w1, #1
	bl	_read_smon_adc
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.4:
	mov	x22, x0
	ldr	x1, [x20, #8]
	ldp	w8, w9, [x20, #36]
	stp	x8, x9, [sp, #8]
	str	x22, [sp]
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DBG
	ldp	w8, w9, [x20, #36]
	mul	w8, w8, w22
	add	w8, w8, w9, lsl #12
	asr	w8, w8, #2
	str	w8, [x21]
	str	w8, [x20, #20]
	ldr	w0, [x21]
	bl	_FIX32TOPRINT
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_5:
	ldr	w8, [x20, #44]
	add	w8, w8, #1
	str	w8, [x20, #44]
	ldr	x1, [x20, #8]
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	bl	_DBG
	mov	x0, x20
	mov	w1, #3
	bl	_read_smon_adc
	mov	x21, x0
	mov	x0, x20
	mov	w1, #4
	bl	_read_smon_adc
Lloh27:
	adrp	x8, _ADC_CPU_VOLTAGE_SCALE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ADC_CPU_VOLTAGE_SCALE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	mul	w8, w8, w21
Lloh30:
	adrp	x9, _ADC_CPU_CURRENT_SCALE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ADC_CPU_CURRENT_SCALE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	mul	w0, w9, w0
	mul	w9, w0, w8
	asr	w9, w9, #16
	str	w9, [x19]
	stp	w8, w0, [x20, #24]
	ldr	w8, [x19]
	str	w8, [x20, #32]
	ldr	x21, [x20, #8]
	bl	_FIX32TOPRINT
	mov	x22, x0
	ldr	w0, [x20, #24]
	bl	_FIX32TOPRINT
	mov	x20, x0
	ldr	w0, [x19]
	bl	_FIX32TOPRINT
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp, #8]
	str	x22, [sp]
Lloh33:
	adrp	x0, l_.str.5@PAGE
Lloh34:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x21
	bl	_DBG
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_cpu_pid_type,8,3               ; @cpu_pid_type
	.comm	_CPU_PID_TYPE_RACKMAC,8,3       ; @CPU_PID_TYPE_RACKMAC
	.comm	_CPU_A1_FAN_RPM_INDEX,4,2       ; @CPU_A1_FAN_RPM_INDEX
	.comm	_CPU_B1_FAN_RPM_INDEX,4,2       ; @CPU_B1_FAN_RPM_INDEX
	.comm	_CPUA_EXHAUST_FAN_RPM_INDEX,4,2 ; @CPUA_EXHAUST_FAN_RPM_INDEX
	.comm	_CPUB_EXHAUST_FAN_RPM_INDEX,4,2 ; @CPUB_EXHAUST_FAN_RPM_INDEX
	.comm	_RPM_PID_USE_ACTUAL_SPEED,4,2   ; @RPM_PID_USE_ACTUAL_SPEED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  cpu %d, fan reading error !\n"

l_.str.1:                               ; @.str.1
	.asciz	"  cpu %d, exhaust RPM: %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"  cpu %d, temp reading error !\n"

l_.str.3:                               ; @.str.3
	.asciz	"  cpu %d, temp raw: %04x, m_diode: %04x, b_diode: %04x\n"

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

	.comm	_ADC_CPU_VOLTAGE_SCALE,4,2      ; @ADC_CPU_VOLTAGE_SCALE
	.comm	_ADC_CPU_CURRENT_SCALE,4,2      ; @ADC_CPU_CURRENT_SCALE
l_.str.5:                               ; @.str.5
	.asciz	"  cpu %d, current: %d.%03d, voltage: %d.%03d, power: %d.%03d W\n"

	.no_dead_strip	_do_read_one_cpu_values
.subsections_via_symbols
