	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adc_to_temp
_adc_to_temp:                           ## @adc_to_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	testl	%edi, %edi
	je	LBB0_3
## %bb.1:
	movq	_MSIC_DIE_ADC_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSIC_DIE_ADC_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_is_valid_adc
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	%ebx, %edi
	callq	_to_msic_die_temp
	jmp	LBB0_13
LBB0_3:
	movq	_ADC_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADC_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_is_valid_adc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_ADC_VAL0C@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jge	LBB0_7
## %bb.6:
	movl	$177, %ecx
	movl	$-5, %esi
	jmp	LBB0_12
LBB0_4:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_7:
	movq	_ADC_VAL20C@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jge	LBB0_9
## %bb.8:
	movl	$111, %ecx
	movl	$-8, %esi
	jmp	LBB0_12
LBB0_9:
	movq	_ADC_VAL40C@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jge	LBB0_11
## %bb.10:
	movl	$92, %ecx
	movl	$-10, %esi
	jmp	LBB0_12
LBB0_11:
	movq	_ADC_VAL60C@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%ebx, (%rax)
	setge	%cl
	leal	-10(,%rcx,4), %esi
	movl	$91, %eax
	movl	$112, %ecx
	cmovll	%eax, %ecx
LBB0_12:
	movl	%ebx, %eax
	cltd
	idivl	%esi
	addl	%ecx, %eax
LBB0_13:
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSIC_DIE_ADC_MIN,4,2           ## @MSIC_DIE_ADC_MIN
	.comm	_MSIC_DIE_ADC_MAX,4,2           ## @MSIC_DIE_ADC_MAX
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_ADC_MIN,4,2                    ## @ADC_MIN
	.comm	_ADC_MAX,4,2                    ## @ADC_MAX
	.comm	_ADC_VAL0C,4,2                  ## @ADC_VAL0C
	.comm	_ADC_VAL20C,4,2                 ## @ADC_VAL20C
	.comm	_ADC_VAL40C,4,2                 ## @ADC_VAL40C
	.comm	_ADC_VAL60C,4,2                 ## @ADC_VAL60C
	.no_dead_strip	_adc_to_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adc_to_temp
_adc_to_temp:                           ; @adc_to_temp
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _MSIC_DIE_ADC_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSIC_DIE_ADC_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MSIC_DIE_ADC_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSIC_DIE_ADC_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_is_valid_adc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_to_msic_die_temp
	mov	x8, x0
	mov	w0, #0
	b	LBB0_13
LBB0_3:
Lloh6:
	adrp	x8, _ADC_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADC_MIN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _ADC_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADC_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_is_valid_adc
	cbz	x0, LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, _ADC_VAL0C@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ADC_VAL0C@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ge	LBB0_7
; %bb.5:
	mov	w9, #177
	mov	w8, #-5
	b	LBB0_12
LBB0_6:
Lloh15:
	adrp	x8, _ERANGE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_7:
Lloh18:
	adrp	x8, _ADC_VAL20C@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ADC_VAL20C@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ge	LBB0_9
; %bb.8:
	mov	w9, #111
	mov	w8, #-8
	b	LBB0_12
LBB0_9:
Lloh21:
	adrp	x8, _ADC_VAL40C@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ADC_VAL40C@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x8]
	mov	w8, #-10
	cmp	w9, w20
	b.ge	LBB0_11
; %bb.10:
	mov	w9, #92
	b	LBB0_12
LBB0_11:
Lloh24:
	adrp	x9, _ADC_VAL60C@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ADC_VAL60C@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	mov	w10, #-6
	cmp	w9, w20
	csel	w8, w8, w10, lt
	mov	w9, #112
	mov	w10, #91
	csel	w9, w10, w9, lt
LBB0_12:
	mov	w0, #0
	sdiv	w8, w20, w8
	add	w8, w8, w9
LBB0_13:
	mov	w9, #1000
	mul	w8, w8, w9
	str	w8, [x19]
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MSIC_DIE_ADC_MIN,4,2           ; @MSIC_DIE_ADC_MIN
	.comm	_MSIC_DIE_ADC_MAX,4,2           ; @MSIC_DIE_ADC_MAX
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_ADC_MIN,4,2                    ; @ADC_MIN
	.comm	_ADC_MAX,4,2                    ; @ADC_MAX
	.comm	_ADC_VAL0C,4,2                  ; @ADC_VAL0C
	.comm	_ADC_VAL20C,4,2                 ; @ADC_VAL20C
	.comm	_ADC_VAL40C,4,2                 ; @ADC_VAL40C
	.comm	_ADC_VAL60C,4,2                 ; @ADC_VAL60C
	.no_dead_strip	_adc_to_temp
.subsections_via_symbols
