	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function estimate_hash_bucket_stats
LCPI0_0:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_2:
	.quad	0x3eb0c6f7a0b5ed8d              ## double 9.9999999999999995E-7
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_estimate_hash_bucket_stats
	.p2align	4, 0x90
_estimate_hash_bucket_stats:            ## @estimate_hash_bucket_stats
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	leaq	-40(%rbp), %rcx
	xorl	%edx, %edx
	callq	_examine_variable
	movq	$0, (%rbx)
	movl	-32(%rbp), %edi
	callq	_HeapTupleIsValid
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movl	-32(%rbp), %esi
	movq	_STATISTIC_KIND_MCV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_InvalidOid@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ATTSTATSSLOT_NUMBERS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-72(%rbp), %rdi
	callq	_get_attstatsslot
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	cmpq	$0, -72(%rbp)
	jle	LBB0_4
## %bb.3:
	movq	-64(%rbp), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rbx)
LBB0_4:
	leaq	-72(%rbp), %rdi
	callq	_free_attstatsslot
LBB0_5:
	leaq	-40(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	callq	_get_variable_numdistinct
	cmpl	$0, -44(%rbp)
	je	LBB0_7
## %bb.6:
	movsd	(%rbx), %xmm1                   ## xmm1 = mem[0],zero
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_Max
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movsd	%xmm0, (%r14)
	jmp	LBB0_20
LBB0_7:
	movsd	%xmm0, -24(%rbp)                ## 8-byte Spill
	movl	-32(%rbp), %edi
	callq	_HeapTupleIsValid
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	-32(%rbp), %edi
	callq	_GETSTRUCT
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	jmp	LBB0_10
LBB0_8:
	xorpd	%xmm1, %xmm1
LBB0_10:
	movsd	-24(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
	movapd	%xmm2, %xmm4
	subsd	%xmm1, %xmm4
	divsd	%xmm0, %xmm4
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movsd	(%rax), %xmm3                   ## xmm3 = mem[0],zero
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm3
	jbe	LBB0_13
## %bb.12:
	movsd	8(%rax), %xmm1                  ## xmm1 = mem[0],zero
	divsd	%xmm3, %xmm1
	mulsd	%xmm1, %xmm0
	movsd	%xmm4, -24(%rbp)                ## 8-byte Spill
	callq	_clamp_row_est
	movsd	-24(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movsd	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero
LBB0_13:
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	minsd	%xmm0, %xmm1
	movapd	%xmm2, %xmm0
	divsd	%xmm1, %xmm0
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm4
	jbe	LBB0_16
## %bb.14:
	movsd	(%rbx), %xmm1                   ## xmm1 = mem[0],zero
	ucomisd	%xmm4, %xmm1
	jbe	LBB0_16
## %bb.15:
	divsd	%xmm4, %xmm1
	mulsd	%xmm1, %xmm0
LBB0_16:
	movsd	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	ja	LBB0_19
## %bb.17:
	ucomisd	LCPI0_1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	jbe	LBB0_19
## %bb.18:
	movapd	%xmm2, %xmm1
LBB0_19:
	movsd	%xmm1, (%r14)
LBB0_20:
	movq	-40(%rbp), %rdi
	movl	-32(%rbp), %esi
	callq	_ReleaseVariableStats
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATISTIC_KIND_MCV,4,2         ## @STATISTIC_KIND_MCV
	.comm	_InvalidOid,4,2                 ## @InvalidOid
	.comm	_ATTSTATSSLOT_NUMBERS,4,2       ## @ATTSTATSSLOT_NUMBERS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_estimate_hash_bucket_stats     ; -- Begin function estimate_hash_bucket_stats
	.p2align	2
_estimate_hash_bucket_stats:            ; @estimate_hash_bucket_stats
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d11, d10, [sp, #48]             ; 16-byte Folded Spill
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	.cfi_offset b10, -56
	.cfi_offset b11, -64
	mov	x19, x3
	mov	x20, x2
	fmov	d8, d0
	add	x3, sp, #32
	mov	w2, #0
	bl	_examine_variable
	str	xzr, [x20]
	ldr	w0, [sp, #40]
	bl	_HeapTupleIsValid
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w1, [sp, #40]
Lloh0:
	adrp	x8, _STATISTIC_KIND_MCV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATISTIC_KIND_MCV@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, #8
	bl	_get_attstatsslot
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [sp, #8]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	x8, [sp, #16]
	ldr	d0, [x8]
	str	d0, [x20]
LBB0_4:
	add	x0, sp, #8
	bl	_free_attstatsslot
LBB0_5:
	add	x0, sp, #32
	add	x1, sp, #28
	bl	_get_variable_numdistinct
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	d1, [x20]
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16313, lsl #48
	fmov	d0, x8
	bl	_Max
	scvtf	d1, x0
	b	LBB0_19
LBB0_7:
	fmov	d9, d0
	ldr	w0, [sp, #40]
	bl	_HeapTupleIsValid
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [sp, #40]
	bl	_GETSTRUCT
	ldr	d0, [x0]
	b	LBB0_10
LBB0_9:
	movi	d0, #0000000000000000
LBB0_10:
	fmov	d11, #1.00000000
	fsub	d0, d11, d0
	ldr	x8, [sp, #32]
	fdiv	d10, d0, d9
	cbz	x8, LBB0_13
; %bb.11:
	ldr	d0, [x8]
	fcmp	d0, #0.0
	b.le	LBB0_13
; %bb.12:
	ldr	d1, [x8, #8]
	fdiv	d0, d1, d0
	fmul	d0, d9, d0
	bl	_clamp_row_est
	fmov	d9, d0
LBB0_13:
	fcmp	d9, d8
	fcsel	d0, d8, d9, gt
	fcmp	d10, #0.0
	fdiv	d0, d11, d0
	b.le	LBB0_16
; %bb.14:
	ldr	d1, [x20]
	fcmp	d1, d10
	b.le	LBB0_16
; %bb.15:
	fdiv	d1, d1, d10
	fmul	d0, d0, d1
LBB0_16:
	mov	x8, #60813
	movk	x8, #41141, lsl #16
	movk	x8, #50935, lsl #32
	movk	x8, #16048, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.mi	LBB0_19
; %bb.17:
	fmov	d1, #1.00000000
	fcmp	d0, d1
	fmov	d1, d0
	b.le	LBB0_19
; %bb.18:
	fmov	d1, #1.00000000
LBB0_19:
	str	d1, [x19]
	ldp	x0, x1, [sp, #32]
	bl	_ReleaseVariableStats
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #64]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_STATISTIC_KIND_MCV,4,2         ; @STATISTIC_KIND_MCV
	.comm	_InvalidOid,4,2                 ; @InvalidOid
	.comm	_ATTSTATSSLOT_NUMBERS,4,2       ; @ATTSTATSSLOT_NUMBERS
.subsections_via_symbols
