	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evergreen_get_temp             ## -- Begin function evergreen_get_temp
	.p2align	4, 0x90
_evergreen_get_temp:                    ## @evergreen_get_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	_CHIP_JUNIPER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_CG_THERMAL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %ebx
	movq	_TOFFSET_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_TOFFSET_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_CG_TS0_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_TS0_ADC_DOUT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_TS0_ADC_DOUT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %edx
	sarl	%cl, %edx
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	leal	-512(%rbx), %ecx
	testl	$256, %ebx                      ## imm = 0x100
	cmovel	%ebx, %ecx
	addl	%eax, %ecx
	imull	$1000, %ecx, %eax               ## imm = 0x3E8
	jmp	LBB0_8
LBB0_2:
	movq	_CG_MULT_THERMAL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_ASIC_T_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_ASIC_T_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	$-256, %ecx
	testl	$1024, %eax                     ## imm = 0x400
	jne	LBB0_7
## %bb.3:
	movl	$255, %ecx
	testl	$512, %eax                      ## imm = 0x200
	jne	LBB0_7
## %bb.4:
	testl	$256, %eax                      ## imm = 0x100
	jne	LBB0_5
## %bb.6:
	movzbl	%al, %ecx
	jmp	LBB0_7
LBB0_5:
	orl	$-512, %eax                     ## imm = 0xFE00
	movl	%eax, %ecx
LBB0_7:
	imull	$500, %ecx, %eax                ## imm = 0x1F4
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_JUNIPER,8,3               ## @CHIP_JUNIPER
	.comm	_CG_THERMAL_CTRL,4,2            ## @CG_THERMAL_CTRL
	.comm	_TOFFSET_MASK,4,2               ## @TOFFSET_MASK
	.comm	_TOFFSET_SHIFT,4,2              ## @TOFFSET_SHIFT
	.comm	_CG_TS0_STATUS,4,2              ## @CG_TS0_STATUS
	.comm	_TS0_ADC_DOUT_MASK,4,2          ## @TS0_ADC_DOUT_MASK
	.comm	_TS0_ADC_DOUT_SHIFT,4,2         ## @TS0_ADC_DOUT_SHIFT
	.comm	_CG_MULT_THERMAL_STATUS,4,2     ## @CG_MULT_THERMAL_STATUS
	.comm	_ASIC_T_MASK,4,2                ## @ASIC_T_MASK
	.comm	_ASIC_T_SHIFT,4,2               ## @ASIC_T_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evergreen_get_temp             ; -- Begin function evergreen_get_temp
	.p2align	2
_evergreen_get_temp:                    ; @evergreen_get_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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CHIP_JUNIPER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_JUNIPER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CG_THERMAL_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CG_THERMAL_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_RREG32
Lloh6:
	adrp	x8, _TOFFSET_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TOFFSET_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _TOFFSET_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TOFFSET_SHIFT@GOTPAGEOFF]
	and	w8, w8, w0
Lloh11:
	ldr	w9, [x9]
	asr	w19, w8, w9
Lloh12:
	adrp	x8, _CG_TS0_STATUS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CG_TS0_STATUS@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_RREG32
Lloh15:
	adrp	x8, _TS0_ADC_DOUT_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TS0_ADC_DOUT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh18:
	adrp	x9, _TS0_ADC_DOUT_SHIFT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _TS0_ADC_DOUT_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	asr	w8, w8, w9
	cmp	w8, #0
	cinc	w8, w8, lt
	sub	w9, w19, #512
	tst	w19, #0x100
	csel	w9, w19, w9, eq
	add	w8, w9, w8, asr #1
	mov	w9, #1000
	b	LBB0_10
LBB0_2:
Lloh21:
	adrp	x8, _CG_MULT_THERMAL_STATUS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CG_MULT_THERMAL_STATUS@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_RREG32
Lloh24:
	adrp	x8, _ASIC_T_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ASIC_T_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh27:
	adrp	x9, _ASIC_T_SHIFT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ASIC_T_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	asr	w8, w8, w9
	tbnz	w8, #10, LBB0_6
; %bb.3:
	tbnz	w8, #9, LBB0_7
; %bb.4:
	tbnz	w8, #8, LBB0_8
; %bb.5:
	and	w8, w8, #0xff
	b	LBB0_9
LBB0_6:
	mov	w8, #-256
	b	LBB0_9
LBB0_7:
	mov	w8, #255
	b	LBB0_9
LBB0_8:
	orr	w8, w8, #0xfffffe00
LBB0_9:
	mov	w9, #500
LBB0_10:
	mul	w0, w8, w9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_JUNIPER,8,3               ; @CHIP_JUNIPER
	.comm	_CG_THERMAL_CTRL,4,2            ; @CG_THERMAL_CTRL
	.comm	_TOFFSET_MASK,4,2               ; @TOFFSET_MASK
	.comm	_TOFFSET_SHIFT,4,2              ; @TOFFSET_SHIFT
	.comm	_CG_TS0_STATUS,4,2              ; @CG_TS0_STATUS
	.comm	_TS0_ADC_DOUT_MASK,4,2          ; @TS0_ADC_DOUT_MASK
	.comm	_TS0_ADC_DOUT_SHIFT,4,2         ; @TS0_ADC_DOUT_SHIFT
	.comm	_CG_MULT_THERMAL_STATUS,4,2     ; @CG_MULT_THERMAL_STATUS
	.comm	_ASIC_T_MASK,4,2                ; @ASIC_T_MASK
	.comm	_ASIC_T_SHIFT,4,2               ; @ASIC_T_SHIFT
.subsections_via_symbols
