	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_hist_selectivity_scalar
_calc_hist_selectivity_scalar:          ## @calc_hist_selectivity_scalar
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_rbound_bsearch
	movl	%eax, %r13d
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_Max
	cvtsi2sd	%rax, %xmm0
	decl	%ebx
	cvtsi2sd	%ebx, %xmm1
	divsd	%xmm1, %xmm0
	testl	%r13d, %r13d
	js	LBB0_3
## %bb.1:
	cmpl	%ebx, %r13d
	jge	LBB0_3
## %bb.2:
	movl	%r13d, %eax
	leaq	(%r12,%rax,4), %rdx
	leaq	(%r12,%rax,4), %rcx
	addq	$4, %rcx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	callq	_get_position
	divsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	addsd	%xmm0, %xmm1
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_hist_selectivity_scalar
.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_scalar
_calc_hist_selectivity_scalar:          ; @calc_hist_selectivity_scalar
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x23, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_rbound_bsearch
	mov	x22, x0
	mov	w1, #0
	bl	_Max
	scvtf	d0, x0
	sub	w8, w23, #1
	scvtf	d9, w8
	fdiv	d8, d0, d9
	tbnz	w22, #31, LBB0_3
; %bb.1:
	cmp	w22, w8
	b.ge	LBB0_3
; %bb.2:
	add	x2, x21, w22, uxtw #2
	add	w8, w22, #1
	add	x3, x21, w8, uxtw #2
	mov	x0, x20
	mov	x1, x19
	bl	_get_position
	fdiv	d0, d0, d9
	fadd	d8, d8, d0
LBB0_3:
	fmov	d0, d8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_hist_selectivity_scalar
.subsections_via_symbols
