	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_loongson3_cpu_temp             ## -- Begin function loongson3_cpu_temp
	.p2align	4, 0x90
_loongson3_cpu_temp:                    ## @loongson3_cpu_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
	callq	_LOONGSON_CHIPTEMP
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_read_c0_prid
	movq	_PRID_REV_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_6
## %bb.1:
	movl	$51, %ecx
	btl	%eax, %ecx
	jae	LBB0_2
## %bb.4:
	movzbl	%bh, %ebx
	addl	$-100, %ebx
	jmp	LBB0_6
LBB0_2:
	movl	$12, %ecx
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.5:
	movzwl	%bx, %eax
	imull	$731, %eax, %ebx                ## imm = 0x2DB
	shrl	$14, %ebx
	addl	$-273, %ebx                     ## imm = 0xFEEF
	jmp	LBB0_6
LBB0_3:
	movzbl	%bh, %ebx
LBB0_6:
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRID_REV_MASK,4,2              ## @PRID_REV_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_loongson3_cpu_temp             ; -- Begin function loongson3_cpu_temp
	.p2align	2
_loongson3_cpu_temp:                    ; @loongson3_cpu_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
	bl	_LOONGSON_CHIPTEMP
	mov	x19, x0
	bl	_read_c0_prid
Lloh0:
	adrp	x8, _PRID_REV_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRID_REV_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_6
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #51
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
	ubfx	w8, w19, #8, #8
	sub	w19, w8, #100
	b	LBB0_6
LBB0_3:
	tst	w8, #0xc
	b.eq	LBB0_5
; %bb.4:
	and	w8, w19, #0xffff
	mov	w9, #731
	mul	w8, w8, w9
	lsr	w8, w8, #14
	sub	w19, w8, #273
	b	LBB0_6
LBB0_5:
	ubfx	w19, w19, #8, #8
LBB0_6:
	mov	w8, #1000
	mul	w0, w19, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PRID_REV_MASK,4,2              ; @PRID_REV_MASK
.subsections_via_symbols
