	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function calc_avg_temp
LCPI0_0:
	.long	100                             ## 0x64
	.long	100                             ## 0x64
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_calc_avg_temp:                         ## @calc_avg_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	%rsi, %rax
	movq	_IPS_SAMPLE_COUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	cmpl	$4, %esi
	jae	LBB0_4
## %bb.3:
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_4:
	movl	%esi, %ecx
	andl	$-4, %ecx
	leaq	-4(%rcx), %rdx
	movq	%rdx, %rbx
	shrq	$2, %rbx
	incq	%rbx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdx
	andq	$-2, %rdx
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = <100,100,u,u>
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rdi,4), %xmm3            ## xmm3 = mem[0],zero
	movq	8(%rax,%rdi,4), %xmm4           ## xmm4 = mem[0],zero
	pmulld	%xmm2, %xmm3
	pmulld	%xmm2, %xmm4
	pmovsxdq	%xmm3, %xmm3
	paddq	%xmm0, %xmm3
	pmovsxdq	%xmm4, %xmm4
	paddq	%xmm1, %xmm4
	movq	16(%rax,%rdi,4), %xmm0          ## xmm0 = mem[0],zero
	movq	24(%rax,%rdi,4), %xmm1          ## xmm1 = mem[0],zero
	pmulld	%xmm2, %xmm0
	pmulld	%xmm2, %xmm1
	pmovsxdq	%xmm0, %xmm0
	paddq	%xmm3, %xmm0
	pmovsxdq	%xmm1, %xmm1
	paddq	%xmm4, %xmm1
	addq	$8, %rdi
	addq	$-2, %rdx
	jne	LBB0_7
## %bb.8:
	testb	$1, %bl
	je	LBB0_10
LBB0_9:
	movq	(%rax,%rdi,4), %xmm2            ## xmm2 = mem[0],zero
	movq	8(%rax,%rdi,4), %xmm3           ## xmm3 = mem[0],zero
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = <100,100,u,u>
	pmulld	%xmm4, %xmm2
	pmulld	%xmm4, %xmm3
	pmovsxdq	%xmm2, %xmm2
	paddq	%xmm2, %xmm0
	pmovsxdq	%xmm3, %xmm2
	paddq	%xmm2, %xmm1
LBB0_10:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rbx
	cmpq	%rsi, %rcx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%rax,%rcx,4), %rdx
	imulq	$100, %rdx, %rdx
	addq	%rdx, %rbx
	incq	%rcx
	cmpq	%rcx, %rsi
	jne	LBB0_11
LBB0_12:
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_do_div
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	testb	$1, %bl
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_IPS_SAMPLE_COUNT,4,2           ## @IPS_SAMPLE_COUNT
	.no_dead_strip	_calc_avg_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_avg_temp
_calc_avg_temp:                         ; @calc_avg_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	x8, x1
Lloh0:
	adrp	x9, _IPS_SAMPLE_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IPS_SAMPLE_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.1:
	cmp	w1, #8
	b.hs	LBB0_4
; %bb.2:
	mov	x9, #0
	mov	x19, #0
	b	LBB0_7
LBB0_3:
	mov	x19, #0
	b	LBB0_9
LBB0_4:
	and	x9, x1, #0xfffffff8
	add	x10, x8, #16
	movi.2d	v0, #0000000000000000
	movi.2s	v1, #100
	mov	x11, x9
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	d5, d6, [x10, #-16]
	ldp	d7, d16, [x10], #32
	mul.2s	v5, v5, v1
	mul.2s	v6, v6, v1
	mul.2s	v7, v7, v1
	mul.2s	v16, v16, v1
	saddw.2d	v0, v0, v5
	saddw.2d	v2, v2, v6
	saddw.2d	v3, v3, v7
	saddw.2d	v4, v4, v16
	subs	x11, x11, #8
	b.ne	LBB0_5
; %bb.6:
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	add.2d	v0, v4, v0
	addp.2d	d0, v0
	fmov	x19, d0
	cmp	x9, x1
	b.eq	LBB0_9
LBB0_7:
	add	x8, x8, x9, lsl #2
	sub	x9, x1, x9
	mov	w10, #100
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x11, [x8], #4
	madd	x19, x11, x10, x19
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_do_div
	mov	x0, x19
	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	_IPS_SAMPLE_COUNT,4,2           ; @IPS_SAMPLE_COUNT
	.no_dead_strip	_calc_avg_temp
.subsections_via_symbols
