	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_thermal_tz_score_update
_mlxsw_thermal_tz_score_update:         ## @mlxsw_thermal_tz_score_update
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_MLXSW_THERMAL_TEMP_SCORE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MLXSW_THERMAL_TEMP_TRIP_NORM@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	_MLXSW_THERMAL_NUM_TRIPS@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r8d
	cmpl	%r8d, %esi
	jae	LBB0_5
## %bb.1:
	subl	%esi, %r8d
	movl	$1, %ebx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rdi,4), %esi
	subl	%ecx, %esi
	jg	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	shll	$8, %ebx
	incq	%rdi
	cmpl	%edi, %r8d
	jne	LBB0_2
LBB0_5:
	cmpl	(%r15), %eax
	jbe	LBB0_7
LBB0_6:
	movl	%eax, (%r15)
	movq	%r14, 8(%r15)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%ecx, %edi
	callq	_DIV_ROUND_CLOSEST
	imull	%ebx, %eax
	cmpl	(%r15), %eax
	ja	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_THERMAL_TEMP_SCORE_MAX,4,2 ## @MLXSW_THERMAL_TEMP_SCORE_MAX
	.comm	_MLXSW_THERMAL_TEMP_TRIP_NORM,4,2 ## @MLXSW_THERMAL_TEMP_TRIP_NORM
	.comm	_MLXSW_THERMAL_NUM_TRIPS,4,2    ## @MLXSW_THERMAL_NUM_TRIPS
	.no_dead_strip	_mlxsw_thermal_tz_score_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_thermal_tz_score_update
_mlxsw_thermal_tz_score_update:         ; @mlxsw_thermal_tz_score_update
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MLXSW_THERMAL_TEMP_SCORE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLXSW_THERMAL_TEMP_SCORE_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MLXSW_THERMAL_TEMP_TRIP_NORM@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLXSW_THERMAL_TEMP_TRIP_NORM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _MLXSW_THERMAL_NUM_TRIPS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MLXSW_THERMAL_NUM_TRIPS@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w10
	b.hs	LBB0_5
; %bb.1:
	sub	w9, w10, w9
	mov	w21, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x2]
	subs	w1, w10, w3
	b.gt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	w21, w21, #8
	add	x2, x2, #4
	subs	w9, w9, #1
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x0, x3
	bl	_DIV_ROUND_CLOSEST
	mul	w8, w0, w21
LBB0_5:
	ldr	w9, [x20]
	cmp	w8, w9
	b.ls	LBB0_7
; %bb.6:
	str	w8, [x20]
	str	x19, [x20, #8]
LBB0_7:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_THERMAL_TEMP_SCORE_MAX,4,2 ; @MLXSW_THERMAL_TEMP_SCORE_MAX
	.comm	_MLXSW_THERMAL_TEMP_TRIP_NORM,4,2 ; @MLXSW_THERMAL_TEMP_TRIP_NORM
	.comm	_MLXSW_THERMAL_NUM_TRIPS,4,2    ; @MLXSW_THERMAL_NUM_TRIPS
	.no_dead_strip	_mlxsw_thermal_tz_score_update
.subsections_via_symbols
