	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function calc_length_hist_frac
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI0_2:
	.quad	0x0000000000000000              ## double 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_calc_length_hist_frac:                 ## @calc_length_hist_frac
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	xorl	%edi, %edi
	movsd	%xmm0, -80(%rbp)                ## 8-byte Spill
	ucomisd	%xmm0, %xmm1
	setae	%dil
	callq	_Assert
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	xorpd	%xmm3, %xmm3
	ucomisd	%xmm0, %xmm3
	ja	LBB0_30
## %bb.1:
	callq	_isinf
	movsd	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	testq	%rax, %rax
	jne	LBB0_30
LBB0_3:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movsd	-80(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movl	%ebx, %edx
	callq	_length_hist_bsearch
	movsd	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero
	decl	%r15d
	cmpl	%r15d, %eax
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	jge	LBB0_30
## %bb.4:
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	%r12d, %r13d
	movl	(%r14,%r13,4), %edi
	callq	_DatumGetFloat8
	movsd	%xmm0, -72(%rbp)                ## 8-byte Spill
	movl	4(%r14,%r13,4), %edi
	callq	_DatumGetFloat8
	movapd	%xmm0, %xmm2
	movsd	-80(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	-72(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	callq	_get_len_position
	movsd	-80(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	jmp	LBB0_7
LBB0_5:
	xorl	%r12d, %r12d
	xorpd	%xmm0, %xmm0
	movsd	-80(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
LBB0_7:
	xorps	%xmm3, %xmm3
	cvtsi2sd	%r12d, %xmm3
	cvtsi2sd	%r15d, %xmm4
	addsd	%xmm0, %xmm3
	divsd	%xmm4, %xmm3
	ucomisd	%xmm2, %xmm1
	jne	LBB0_8
	jnp	LBB0_30
LBB0_8:
	movapd	%xmm2, %xmm0
	cmpl	%r15d, %r12d
	jge	LBB0_9
## %bb.10:
	testl	%ebx, %ebx
	sete	-64(%rbp)                       ## 1-byte Folded Spill
	movabsq	$-4294967296, %rax              ## imm = 0xFFFFFFFF00000000
	movl	%r12d, %r12d
	movl	%r15d, %r13d
	movq	%r12, %rbx
	imulq	%rax, %rbx
	xorpd	%xmm1, %xmm1
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	movapd	%xmm0, %xmm1
	movsd	%xmm4, -88(%rbp)                ## 8-byte Spill
	jmp	LBB0_11
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	addsd	%xmm2, %xmm3
	mulsd	LCPI0_1(%rip), %xmm3
	movapd	%xmm0, %xmm1
	subsd	-96(%rbp), %xmm1                ## 8-byte Folded Reload
	mulsd	%xmm3, %xmm1
	movsd	-56(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	addsd	%xmm1, %xmm3
	movsd	%xmm3, -56(%rbp)                ## 8-byte Spill
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	movabsq	$-4294967296, %rcx              ## imm = 0xFFFFFFFF00000000
	addq	%rcx, %rbx
	movq	%rax, %r12
	movapd	%xmm2, %xmm3
	movapd	%xmm0, %xmm1
	cmpq	%rax, %r13
	je	LBB0_17
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movsd	%xmm1, -96(%rbp)                ## 8-byte Spill
	movsd	%xmm3, -72(%rbp)                ## 8-byte Spill
	movl	4(%r14,%r12,4), %edi
	callq	_DatumGetFloat8
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	setb	%al
	ucomisd	%xmm0, %xmm1
	ja	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	orb	-64(%rbp), %al                  ## 1-byte Folded Reload
	jne	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	xorps	%xmm2, %xmm2
	cvtsi2sd	%r12d, %xmm2
	leaq	1(%r12), %rax
	movsd	-88(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	divsd	%xmm4, %xmm2
	movsd	-72(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm3
	ja	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	ucomisd	%xmm1, %xmm2
	jbe	LBB0_16
	jmp	LBB0_15
LBB0_9:
	movapd	%xmm3, %xmm2
	movl	%r12d, %r15d
	xorpd	%xmm1, %xmm1
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	xorpd	%xmm1, %xmm1
	jmp	LBB0_22
LBB0_18:
	movq	%rbx, %r15
	negq	%r15
	movq	%r15, %rax
	sarq	$30, %rax
	movl	(%r14,%rax), %edi
	callq	_DatumGetFloat8
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	movabsq	$4294967296, %r13               ## imm = 0x100000000
	subq	%rbx, %r13
	movq	%r13, %rax
	sarq	$30, %rax
	movl	(%r14,%rax), %edi
	callq	_DatumGetFloat8
	movsd	-64(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jne	LBB0_20
	jp	LBB0_20
## %bb.19:
	xorpd	%xmm1, %xmm1
	jmp	LBB0_21
LBB0_17:
	xorpd	%xmm1, %xmm1
	jmp	LBB0_22
LBB0_20:
	sarq	$32, %r15
	sarq	$32, %r13
	movl	(%r14,%r15,4), %edi
	callq	_DatumGetFloat8
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	movl	(%r14,%r13,4), %edi
	callq	_DatumGetFloat8
	movapd	%xmm0, %xmm2
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	-64(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	callq	_get_len_position
	movapd	%xmm0, %xmm1
LBB0_21:
	movsd	-96(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	-72(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movl	%r12d, %r15d
	movsd	-88(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
LBB0_22:
	xorps	%xmm3, %xmm3
	cvtsi2sd	%r15d, %xmm3
	addsd	%xmm1, %xmm3
	divsd	%xmm4, %xmm3
	ucomisd	LCPI0_2(%rip), %xmm2
	ja	LBB0_25
## %bb.23:
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm3
	ja	LBB0_25
## %bb.24:
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	jmp	LBB0_26
LBB0_25:
	addsd	%xmm3, %xmm2
	mulsd	LCPI0_1(%rip), %xmm2
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	mulsd	%xmm2, %xmm1
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	%xmm1, %xmm0
LBB0_26:
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	callq	_isinf
	testq	%rax, %rax
	je	LBB0_29
## %bb.27:
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_isinf
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movsd	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero
	jmp	LBB0_30
LBB0_29:
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	subsd	-80(%rbp), %xmm0                ## 8-byte Folded Reload
	movsd	-56(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	divsd	%xmm0, %xmm3
LBB0_30:
	movapd	%xmm3, %xmm0
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_length_hist_frac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_length_hist_frac
_calc_length_hist_frac:                 ; @calc_length_hist_frac
	.cfi_startproc
; %bb.0:
	stp	d15, d14, [sp, #-144]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 144
	stp	d13, d12, [sp, #16]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #32]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	.cfi_offset b10, -104
	.cfi_offset b11, -112
	.cfi_offset b12, -120
	.cfi_offset b13, -128
	.cfi_offset b14, -136
	.cfi_offset b15, -144
	mov	x21, x2
	fmov	d8, d1
	fmov	d9, d0
	mov	x22, x1
	mov	x19, x0
	fcmp	d1, d0
	cset	w0, ge
	bl	_Assert
	movi	d10, #0000000000000000
	fcmp	d8, #0.0
	b.mi	LBB0_21
; %bb.1:
	fmov	d0, d8
	bl	_isinf
	fmov	d10, #1.00000000
	cbz	w21, LBB0_3
; %bb.2:
	cbnz	x0, LBB0_21
LBB0_3:
	mov	x0, x19
	mov	x1, x22
	fmov	d0, d9
	mov	x2, x21
	bl	_length_hist_bsearch
	sub	w22, w22, #1
	cmp	w0, w22
	b.ge	LBB0_21
; %bb.4:
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.5:
	ldr	w0, [x19, w20, uxtw #2]
	bl	_DatumGetFloat8
	fmov	d10, d0
	add	w8, w20, #1
	ldr	w0, [x19, w8, uxtw #2]
	bl	_DatumGetFloat8
	fmov	d2, d0
	fmov	d0, d9
	fmov	d1, d10
	bl	_get_len_position
	b	LBB0_7
LBB0_6:
	mov	w20, #0
	movi	d0, #0000000000000000
LBB0_7:
	scvtf	d1, w20
	fadd	d0, d0, d1
	scvtf	d12, w22
	fdiv	d10, d0, d12
	fcmp	d8, d9
	b.eq	LBB0_21
; %bb.8:
	movi	d13, #0000000000000000
	cmp	w20, w22
	b.ge	LBB0_15
; %bb.9:
	cmp	w21, #0
	cset	w23, eq
	mov	w20, w20
	neg	x21, x20, lsl #32
	add	x24, x19, #4
	movi	d14, #0000000000000000
	fmov	d11, #0.50000000
	mov	x25, #-4294967296
	fmov	d15, d9
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	scvtf	d0, w20
	add	x8, x20, #1
	fdiv	d2, d0, d12
	fcmp	d2, #0.0
	movi	d0, #0000000000000000
	fccmp	d10, d0, #0, le
	fadd	d3, d10, d2
	fmul	d3, d3, d11
	fsub	d4, d1, d15
	fmadd	d3, d3, d4, d14
	add	x21, x21, x25
	fcsel	d14, d3, d14, gt
	mov	x20, x8
	fmov	d10, d2
	fmov	d15, d1
	cmp	x22, x8
	b.eq	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24, x20, lsl #2]
	bl	_DatumGetFloat8
	fmov	d1, d0
	fcmp	d0, d8
	cset	w8, hi
	b.mi	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	orr	w8, w23, w8
	tbz	w8, #0, LBB0_10
; %bb.13:
	neg	x22, x21
	asr	x8, x22, #30
	ldr	w0, [x19, x8]
	bl	_DatumGetFloat8
	fmov	d11, d0
	mov	x8, #4294967296
	sub	x21, x8, x21
	asr	x8, x21, #30
	ldr	w0, [x19, x8]
	bl	_DatumGetFloat8
	fcmp	d11, d0
	b.ne	LBB0_17
; %bb.14:
	movi	d0, #0000000000000000
	b	LBB0_18
LBB0_15:
	fmov	d15, d9
	movi	d14, #0000000000000000
	movi	d0, #0000000000000000
	b	LBB0_18
LBB0_16:
	fmov	d15, d1
	fmov	d10, d2
	mov	x20, x22
	b	LBB0_18
LBB0_17:
	asr	x8, x22, #32
	asr	x21, x21, #32
	ldr	w0, [x19, x8, lsl #2]
	bl	_DatumGetFloat8
	fmov	d11, d0
	ldr	w0, [x19, x21, lsl #2]
	bl	_DatumGetFloat8
	fmov	d2, d0
	fmov	d0, d8
	fmov	d1, d11
	bl	_get_len_position
LBB0_18:
	scvtf	d1, w20
	fadd	d0, d0, d1
	fdiv	d0, d0, d12
	fcmp	d0, #0.0
	fccmp	d10, d13, #0, le
	fadd	d0, d10, d0
	fmov	d10, #0.50000000
	fmul	d0, d0, d10
	fsub	d1, d8, d15
	fmadd	d0, d0, d1, d14
	fcsel	d11, d0, d14, gt
	fmov	d0, d11
	bl	_isinf
	cbz	x0, LBB0_20
; %bb.19:
	fmov	d0, d8
	bl	_isinf
	cbnz	x0, LBB0_21
LBB0_20:
	fsub	d0, d8, d9
	fdiv	d10, d11, d0
LBB0_21:
	fmov	d0, d10
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #32]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #16]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp], #144            ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_length_hist_frac
.subsections_via_symbols
