	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mid_read_temp
_mid_read_temp:                         ## @mid_read_temp
	.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	%rsi, %r14
	movq	(%rdi), %r13
	movl	$0, -44(%rbp)
	movl	(%r13), %r15d
	movq	_INTEL_MSIC_ADC1CNTL3@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_MSIC_ADCRRDATA_ENBL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_intel_msic_reg_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	(%rbx), %edi
	movq	_MSIC_ADCTHERM_ENBL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_intel_msic_reg_write
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	leaq	-44(%rbp), %rsi
	movl	%r15d, %edi
	callq	_intel_msic_reg_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	-44(%rbp), %r12d
	incl	%r15d
	leaq	-44(%rbp), %rsi
	movl	%r15d, %edi
	callq	_intel_msic_reg_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	-44(%rbp), %eax
	andl	$3, %eax
	movl	%eax, -44(%rbp)
	leal	(%rax,%r12,4), %esi
	movl	8(%r13), %edi
	leaq	-48(%rbp), %rdx
	callq	_adc_to_temp
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	-48(%rbp), %eax
	movl	%eax, 4(%r13)
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_MSIC_ADC1CNTL3,4,2       ## @INTEL_MSIC_ADC1CNTL3
	.comm	_MSIC_ADCRRDATA_ENBL,4,2        ## @MSIC_ADCRRDATA_ENBL
	.comm	_MSIC_ADCTHERM_ENBL,4,2         ## @MSIC_ADCTHERM_ENBL
	.no_dead_strip	_mid_read_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mid_read_temp
_mid_read_temp:                         ; @mid_read_temp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	ldr	x21, [x0]
	str	wzr, [sp, #12]
	ldr	w20, [x21]
Lloh0:
	adrp	x22, _INTEL_MSIC_ADC1CNTL3@GOTPAGE
Lloh1:
	ldr	x22, [x22, _INTEL_MSIC_ADC1CNTL3@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _MSIC_ADCRRDATA_ENBL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSIC_ADCRRDATA_ENBL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_intel_msic_reg_write
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w0, [x22]
Lloh5:
	adrp	x8, _MSIC_ADCTHERM_ENBL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSIC_ADCTHERM_ENBL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_intel_msic_reg_write
	cbnz	w0, LBB0_6
; %bb.2:
	add	x1, sp, #12
	mov	x0, x20
	bl	_intel_msic_reg_read
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w22, [sp, #12]
	add	w0, w20, #1
	add	x1, sp, #12
	bl	_intel_msic_reg_read
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w1, [sp, #12]
	and	w8, w1, #0x3
	str	w8, [sp, #12]
	bfi	w1, w22, #2, #30
	ldr	w0, [x21, #8]
	add	x2, sp, #8
	bl	_adc_to_temp
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w8, [sp, #8]
	str	w8, [x21, #4]
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_MSIC_ADC1CNTL3,4,2       ; @INTEL_MSIC_ADC1CNTL3
	.comm	_MSIC_ADCRRDATA_ENBL,4,2        ; @MSIC_ADCRRDATA_ENBL
	.comm	_MSIC_ADCTHERM_ENBL,4,2         ; @MSIC_ADCTHERM_ENBL
	.no_dead_strip	_mid_read_temp
.subsections_via_symbols
