	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function timehist_quartile
LCPI0_0:
	.quad	0x412e848000000000              ## double 1.0E+6
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_timehist_quartile
	.p2align	4, 0x90
_timehist_quartile:                     ## @timehist_quartile
	.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
	movapd	%xmm0, %xmm1
	xorpd	%xmm0, %xmm0
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_9
## %bb.2:
	movsd	%xmm1, -16(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_timehist_count
	xorpd	%xmm0, %xmm0
	cmpq	$4, %rax
	jl	LBB0_9
## %bb.3:
	cvtsi2sd	%rax, %xmm7
	movq	(%rbx), %rsi
	cmpq	$2, %rsi
	movl	$1, %edx
	cmovbq	%rdx, %rsi
	mulsd	-16(%rbp), %xmm7                ## 8-byte Folded Reload
	leaq	-1(%rsi), %rax
	xorpd	%xmm3, %xmm3
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movapd	%xmm3, %xmm1
	leaq	(%rsi,%rdx), %rcx
	cmpq	$2, %rcx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rcx
	xorps	%xmm2, %xmm2
	cvtsi2sdq	(%rcx,%rdi), %xmm2
	movapd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	decq	%rdx
	addq	$40, %rdi
	ucomisd	%xmm3, %xmm7
	ja	LBB0_4
## %bb.7:
	negq	%rdx
	movq	%rdx, %rax
	jmp	LBB0_8
LBB0_5:
	movq	8(%rbx), %rcx
	leaq	(%rax,%rax,4), %rdx
	xorps	%xmm2, %xmm2
	cvtsi2sdq	(%rcx,%rdx,8), %xmm2
LBB0_8:
	leaq	(%rax,%rax,4), %rax
	xorps	%xmm3, %xmm3
	cvtsi2sdq	32(%rcx,%rax,8), %xmm3
	cvtsi2sdq	24(%rcx,%rax,8), %xmm4
	movsd	LCPI0_0(%rip), %xmm5            ## xmm5 = mem[0],zero
	divsd	%xmm5, %xmm4
	cvtsi2sdq	16(%rcx,%rax,8), %xmm6
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%rcx,%rax,8), %xmm0
	addsd	%xmm3, %xmm4
	divsd	%xmm5, %xmm0
	addsd	%xmm6, %xmm0
	subsd	%xmm1, %xmm7
	subsd	%xmm4, %xmm0
	mulsd	%xmm7, %xmm0
	divsd	%xmm2, %xmm0
	addsd	%xmm4, %xmm0
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_timehist_quartile              ; -- Begin function timehist_quartile
	.p2align	2
_timehist_quartile:                     ; @timehist_quartile
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	movi	d8, #0000000000000000
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_9
; %bb.2:
	fmov	d9, d0
	mov	x0, x19
	bl	_timehist_count
	cmp	x0, #4
	b.lt	LBB0_9
; %bb.3:
	mov	x10, #0
	scvtf	d0, x0
	fmul	d0, d0, d9
	ldr	x8, [x19]
	cmp	x8, #1
	csinc	x11, x8, xzr, hi
	sub	x8, x11, #1
	movi	d3, #0000000000000000
	mov	w12, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	fmov	d1, d3
	cmp	x11, x12
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #8]
	ldr	d2, [x9, x10]
	scvtf	d2, d2
	fadd	d3, d1, d2
	add	x12, x12, #1
	add	x10, x10, #40
	fcmp	d3, d0
	b.mi	LBB0_4
; %bb.6:
	sub	x8, x12, #2
	b	LBB0_8
LBB0_7:
	ldr	x9, [x19, #8]
	mov	w10, #40
	mul	x10, x8, x10
	ldr	d2, [x9, x10]
	scvtf	d2, d2
LBB0_8:
	mov	w10, #40
	madd	x8, x8, x10, x9
	ldp	d4, d3, [x8, #24]
	scvtf	d3, d3
	scvtf	d4, d4
	mov	x9, #145685290680320
	movk	x9, #16686, lsl #48
	fmov	d5, x9
	fdiv	d4, d4, d5
	fadd	d3, d4, d3
	ldp	d6, d4, [x8, #8]
	scvtf	d4, d4
	scvtf	d6, d6
	fdiv	d5, d6, d5
	fadd	d4, d5, d4
	fsub	d0, d0, d1
	fsub	d1, d4, d3
	fmul	d0, d0, d1
	fdiv	d0, d0, d2
	fadd	d8, d3, d0
LBB0_9:
	fmov	d0, d8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
