	.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_hist_selectivity_contains
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_calc_hist_selectivity_contains:        ## @calc_hist_selectivity_contains
	.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
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r12d
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdx
	movl	%r8d, %ecx
	movl	$1, %r8d
	callq	_rbound_bsearch
	decl	%r12d
	movl	%eax, %r15d
	xorpd	%xmm0, %xmm0
	testl	%eax, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	js	LBB0_3
## %bb.1:
	xorpd	%xmm0, %xmm0
	cmpl	%r12d, %eax
	jge	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rdx
	leaq	(%rax,%r15,4), %rcx
	addq	$4, %rcx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_get_position
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_3:
	movsd	%xmm0, -88(%rbp)                ## 8-byte Spill
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	%eax, %ebx
	callq	_get_distance
	movq	%r13, %rdx
	movl	%eax, %r13d
	movl	%ebx, %eax
	testl	%ebx, %ebx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	xorpd	%xmm0, %xmm0
	js	LBB0_7
## %bb.4:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r12d, %xmm0
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	leaq	(%r12,%r15,4), %rsi
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	callq	_get_distance
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	16(%rbp), %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_calc_length_hist_frac
	movsd	-64(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	movsd	-88(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	mulsd	%xmm1, %xmm3
	divsd	%xmm2, %xmm3
	xorpd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.5:
	leaq	(%r12,%r15,4), %rbx
	addq	$-4, %rbx
	incq	%r15
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_get_distance
	movl	%eax, %r12d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	16(%rbp), %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_calc_length_hist_frac
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	movsd	-64(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	subsd	%xmm0, %xmm1
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	divsd	%xmm2, %xmm1
	addsd	%xmm1, %xmm0
	decq	%r15
	addq	$-4, %rbx
	movl	%r12d, %r14d
	cmpq	$1, %r15
	ja	LBB0_6
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_hist_selectivity_contains
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_hist_selectivity_contains
_calc_hist_selectivity_contains:        ; @calc_hist_selectivity_contains
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-128]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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 w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	mov	x19, x6
	mov	x20, x5
	mov	x26, x4
	mov	x23, x3
	mov	x21, x2
	mov	x25, x1
	mov	x22, x0
	mov	x2, x3
	mov	x3, x4
	mov	w4, #1
	bl	_rbound_bsearch
	mov	x24, x0
	sub	w28, w26, #1
	movi	d8, #0000000000000000
	add	x26, x23, w0, uxtw #2
	movi	d9, #0000000000000000
	tbnz	w0, #31, LBB0_3
; %bb.1:
	movi	d9, #0000000000000000
	cmp	w24, w28
	b.ge	LBB0_3
; %bb.2:
	add	w8, w24, #1
	add	x3, x23, w8, uxtw #2
	mov	x0, x22
	mov	x1, x25
	mov	x2, x26
	bl	_get_position
	fmov	d9, d0
LBB0_3:
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	bl	_get_distance
	tbnz	w24, #31, LBB0_7
; %bb.4:
	mov	x27, x0
	scvtf	d10, w28
	mov	x0, x22
	mov	x1, x26
	mov	x2, x21
	bl	_get_distance
	mov	x25, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x27
	mov	x3, x25
	mov	w4, #0
	bl	_calc_length_hist_frac
	fmov	d11, #1.00000000
	fsub	d0, d11, d0
	fmul	d0, d9, d0
	fdiv	d0, d0, d10
	movi	d1, #0000000000000000
	fadd	d8, d0, d1
	cbz	w24, LBB0_7
; %bb.5:
	mov	w8, w24
	add	x26, x8, #1
	add	x8, x23, x8, lsl #2
	sub	x23, x8, #4
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_get_distance
	mov	x24, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x25
	mov	x3, x24
	mov	w4, #0
	bl	_calc_length_hist_frac
	fsub	d0, d11, d0
	fdiv	d0, d0, d10
	fadd	d8, d8, d0
	sub	x26, x26, #1
	sub	x23, x23, #4
	mov	x25, x24
	cmp	x26, #1
	b.hi	LBB0_6
LBB0_7:
	fmov	d0, d8
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #128            ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_hist_selectivity_contains
.subsections_via_symbols
