	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_thermal_timer
_do_thermal_timer:                      ## @do_thermal_timer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_nr_packages@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_loongson3_cpu_temp
	cmpl	%r14d, %eax
	cmovgl	%eax, %r14d
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r14d, %r14d
LBB0_4:
	movq	_CPU_THERMAL_THRESHOLD@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jle	LBB0_5
## %bb.6:
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_orderly_poweroff               ## TAILCALL
LBB0_5:
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_msecs_to_jiffies
	movq	_thermal_work@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_delayed_work          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_nr_packages,4,2                ## @nr_packages
	.comm	_CPU_THERMAL_THRESHOLD,4,2      ## @CPU_THERMAL_THRESHOLD
	.comm	_thermal_work,4,2               ## @thermal_work
	.no_dead_strip	_do_thermal_timer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_thermal_timer
_do_thermal_timer:                      ; @do_thermal_timer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x20, _nr_packages@GOTPAGE
Lloh1:
	ldr	x20, [x20, _nr_packages@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w21, #0
	mov	w19, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_loongson3_cpu_temp
	cmp	w0, w21
	csel	w21, w0, w21, gt
	add	w19, w19, #1
	ldr	w8, [x20]
	cmp	w19, w8
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w21, #0
LBB0_4:
Lloh2:
	adrp	x8, _CPU_THERMAL_THRESHOLD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CPU_THERMAL_THRESHOLD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w21, w8
	b.le	LBB0_6
; %bb.5:
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_orderly_poweroff
LBB0_6:
	mov	w0, #5000
	bl	_msecs_to_jiffies
	mov	x1, x0
Lloh5:
	adrp	x0, _thermal_work@GOTPAGE
Lloh6:
	ldr	x0, [x0, _thermal_work@GOTPAGEOFF]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_schedule_delayed_work
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_nr_packages,4,2                ; @nr_packages
	.comm	_CPU_THERMAL_THRESHOLD,4,2      ; @CPU_THERMAL_THRESHOLD
	.comm	_thermal_work,4,2               ; @thermal_work
	.no_dead_strip	_do_thermal_timer
.subsections_via_symbols
