	.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_rangesel
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_calc_rangesel:                         ## @calc_rangesel
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	(%rsi), %edi
	callq	_HeapTupleIsValid
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	callq	_GETSTRUCT
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movl	(%rbx), %esi
	movq	_STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_InvalidOid@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ATTSTATSSLOT_NUMBERS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-64(%rbp), %rdi
	callq	_get_attstatsslot
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	cmpl	$1, -64(%rbp)
	je	LBB0_6
## %bb.5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_6:
	movq	-56(%rbp), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -40(%rbp)                ## 8-byte Spill
	leaq	-64(%rbp), %rdi
	callq	_free_attstatsslot
	jmp	LBB0_7
LBB0_1:
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -40(%rbp)                ## 8-byte Spill
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	jmp	LBB0_7
LBB0_3:
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -40(%rbp)                ## 8-byte Spill
LBB0_7:
	movq	%r15, %rdi
	callq	_RangeIsEmpty
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	xorpd	%xmm2, %xmm2
	leal	-128(%r14), %eax
	cmpl	$11, %eax
	ja	LBB0_13
## %bb.9:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_10:
	movsd	-40(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	jmp	LBB0_18
LBB0_14:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_calc_hist_selectivity
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_16
## %bb.15:
	movl	%r14d, %edi
	callq	_default_range_selectivity
LBB0_16:
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	movsd	-40(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	subsd	%xmm1, %xmm2
	mulsd	%xmm0, %xmm2
	cmpl	$139, %r14d
	jne	LBB0_18
## %bb.17:
	addsd	%xmm1, %xmm2
	jmp	LBB0_18
LBB0_11:
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	jmp	LBB0_18
LBB0_12:
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	subsd	-40(%rbp), %xmm2                ## 8-byte Folded Reload
	jmp	LBB0_18
LBB0_13:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_elog
	xorpd	%xmm2, %xmm2
LBB0_18:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	subsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	mulsd	%xmm2, %xmm0
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	callq	_CLAMP_PROBABILITY
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_10
	.long	L0_0_set_18
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_13
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM,4,2 ## @STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM
	.comm	_InvalidOid,4,2                 ## @InvalidOid
	.comm	_ATTSTATSSLOT_NUMBERS,4,2       ## @ATTSTATSSLOT_NUMBERS
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid empty fraction statistic"

L_.str.1:                               ## @.str.1
	.asciz	"unexpected operator %u"

	.no_dead_strip	_calc_rangesel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_rangesel
_calc_rangesel:                         ; @calc_rangesel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d11, d10, [sp, #32]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 b8, -56
	.cfi_offset b9, -64
	.cfi_offset b10, -72
	.cfi_offset b11, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x1]
	bl	_HeapTupleIsValid
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w0, [x21]
	bl	_GETSTRUCT
	ldr	d8, [x0]
	ldr	w1, [x21]
Lloh0:
	adrp	x8, _STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _InvalidOid@GOTPAGE
Lloh4:
	ldr	x8, [x8, _InvalidOid@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _ATTSTATSSLOT_NUMBERS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATTSTATSSLOT_NUMBERS@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	add	x0, sp, #16
	bl	_get_attstatsslot
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w8, [sp, #16]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_4:
	ldr	x8, [sp, #24]
	ldr	d9, [x8]
	add	x0, sp, #16
	bl	_free_attstatsslot
	b	LBB0_7
LBB0_5:
	movi	d9, #0000000000000000
	movi	d8, #0000000000000000
	b	LBB0_7
LBB0_6:
	movi	d9, #0000000000000000
LBB0_7:
	mov	x0, x20
	bl	_RangeIsEmpty
	cbz	x0, LBB0_11
; %bb.8:
	movi	d10, #0000000000000000
	sub	w8, w19, #128
	cmp	w8, #11
	b.hi	LBB0_18
; %bb.9:
Lloh14:
	adrp	x9, lJTI0_0@PAGE
Lloh15:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
	fmov	d10, d9
	b	LBB0_19
LBB0_11:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_calc_hist_selectivity
	fcmp	d0, #0.0
	b.pl	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_default_range_selectivity
LBB0_13:
	fmov	d1, #1.00000000
	fsub	d1, d1, d9
	cmp	w19, #139
	b.ne	LBB0_15
; %bb.14:
	fmadd	d10, d1, d0, d9
	b	LBB0_19
LBB0_15:
	fmul	d10, d1, d0
	b	LBB0_19
LBB0_16:
	fmov	d10, #1.00000000
	b	LBB0_19
LBB0_17:
	fmov	d0, #1.00000000
	fsub	d10, d0, d9
	b	LBB0_19
LBB0_18:
Lloh16:
	adrp	x8, _ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_19:
	fmov	d0, #1.00000000
	fsub	d0, d0, d8
	fmul	d8, d0, d10
	fmov	d0, d8
	bl	_CLAMP_PROBABILITY
	fmov	d0, d8
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_17-LBB0_10)>>2
	.byte	(LBB0_16-LBB0_10)>>2
	.byte	(LBB0_16-LBB0_10)>>2
	.byte	(LBB0_18-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
                                        ; -- End function
	.comm	_STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM,4,2 ; @STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM
	.comm	_InvalidOid,4,2                 ; @InvalidOid
	.comm	_ATTSTATSSLOT_NUMBERS,4,2       ; @ATTSTATSSLOT_NUMBERS
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid empty fraction statistic"

l_.str.1:                               ; @.str.1
	.asciz	"unexpected operator %u"

	.no_dead_strip	_calc_rangesel
.subsections_via_symbols
