	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function cost_sort
LCPI0_0:
	.quad	0x8000000000000000              ## double -0
LCPI0_1:
	.quad	0x4000000000000000              ## double 2
LCPI0_2:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_3:
	.quad	0x3fd0000000000000              ## double 0.25
LCPI0_4:
	.quad	0x3fe8000000000000              ## double 0.75
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cost_sort
	.p2align	4, 0x90
_cost_sort:                             ## @cost_sort
	.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	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movsd	%xmm3, -64(%rbp)                ## 8-byte Spill
	movl	%r8d, %ebx
	movsd	%xmm2, -72(%rbp)                ## 8-byte Spill
	movl	%ecx, %r15d
	movsd	%xmm0, -88(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	movapd	%xmm1, %xmm0
	movl	%ecx, %edi
	callq	_relation_byte_size
	movapd	%xmm0, %xmm4
	movslq	%ebx, %rbx
	movq	_enable_sort@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	jmp	LBB0_3
LBB0_1:
	movq	_disable_cost@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm2                   ## xmm2 = mem[0],zero
LBB0_3:
	shlq	$10, %rbx
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, (%r14)
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	maxsd	%xmm0, %xmm1
	movq	_cpu_operator_cost@GOTPCREL(%rip), %r12
	movsd	(%r12), %xmm3                   ## xmm3 = mem[0],zero
	addsd	%xmm3, %xmm3
	xorpd	%xmm0, %xmm0
	movsd	-64(%rbp), %xmm5                ## 8-byte Reload
                                        ## xmm5 = mem[0],zero
	ucomisd	%xmm0, %xmm5
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	movapd	%xmm1, %xmm0
	movapd	%xmm4, %xmm1
	jbe	LBB0_6
## %bb.4:
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	ucomisd	%xmm5, %xmm0
	movapd	%xmm4, %xmm1
	jbe	LBB0_6
## %bb.5:
	movapd	%xmm5, %xmm0
	movl	%r15d, %edi
	movsd	%xmm3, -40(%rbp)                ## 8-byte Spill
	movsd	%xmm2, -48(%rbp)                ## 8-byte Spill
	movsd	%xmm4, -80(%rbp)                ## 8-byte Spill
	callq	_relation_byte_size
	movsd	-80(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movsd	-48(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movsd	-40(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	movapd	%xmm0, %xmm1
	movsd	-64(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_6:
	addsd	-88(%rbp), %xmm2                ## 8-byte Folded Reload
	addsd	-72(%rbp), %xmm3                ## 8-byte Folded Reload
	movapd	%xmm2, %xmm5
	xorps	%xmm2, %xmm2
	cvtsi2sd	%rbx, %xmm2
	ucomisd	%xmm2, %xmm1
	movsd	%xmm5, -48(%rbp)                ## 8-byte Spill
	jbe	LBB0_11
## %bb.7:
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movapd	%xmm4, %xmm1
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	roundsd	$10, %xmm1, %xmm0
	movsd	%xmm0, -72(%rbp)                ## 8-byte Spill
	divsd	%xmm2, %xmm4
	movsd	%xmm4, -80(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movsd	%xmm3, -40(%rbp)                ## 8-byte Spill
	callq	_tuplesort_merge_order
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	-40(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	movsd	%xmm1, -40(%rbp)                ## 8-byte Spill
	callq	_LOG2
	movsd	-80(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	movapd	%xmm0, %xmm4
	mulsd	-40(%rbp), %xmm4                ## 8-byte Folded Reload
	addsd	-48(%rbp), %xmm4                ## 8-byte Folded Reload
	ucomisd	-64(%rbp), %xmm1                ## 8-byte Folded Reload
	jbe	LBB0_8
## %bb.9:
	movapd	%xmm1, %xmm0
	movsd	%xmm4, -40(%rbp)                ## 8-byte Spill
	callq	_log
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movsd	-64(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_log
	movsd	-40(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movsd	-48(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	roundsd	$10, %xmm1, %xmm0
	jmp	LBB0_10
LBB0_11:
	addsd	%xmm0, %xmm0
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	mulsd	%xmm1, %xmm3
	movsd	%xmm3, -40(%rbp)                ## 8-byte Spill
	ja	LBB0_14
## %bb.12:
	ucomisd	%xmm2, %xmm4
	ja	LBB0_14
## %bb.13:
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_14:
	callq	_LOG2
	movsd	-40(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	addsd	-48(%rbp), %xmm2                ## 8-byte Folded Reload
	jmp	LBB0_15
LBB0_8:
	movsd	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero
LBB0_10:
	movsd	-72(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	addsd	%xmm3, %xmm3
	movq	_seq_page_cost@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm2                   ## xmm2 = mem[0],zero
	movq	_random_page_cost@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	LCPI0_3(%rip), %xmm1
	mulsd	LCPI0_4(%rip), %xmm2
	mulsd	%xmm0, %xmm3
	addsd	%xmm1, %xmm2
	mulsd	%xmm3, %xmm2
	addsd	%xmm4, %xmm2
LBB0_15:
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	(%r12), %xmm1
	xorpd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm2, 8(%r14)
	addsd	%xmm2, %xmm0
	movsd	%xmm0, 16(%r14)
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_enable_sort,4,2                ## @enable_sort
	.comm	_disable_cost,8,3               ## @disable_cost
	.comm	_cpu_operator_cost,8,3          ## @cpu_operator_cost
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_seq_page_cost,8,3              ## @seq_page_cost
	.comm	_random_page_cost,8,3           ## @random_page_cost
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cost_sort                      ; -- Begin function cost_sort
	.p2align	2
_cost_sort:                             ; @cost_sort
	.cfi_startproc
; %bb.0:
	stp	d15, d14, [sp, #-112]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	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	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
	.cfi_offset b12, -88
	.cfi_offset b13, -96
	.cfi_offset b14, -104
	.cfi_offset b15, -112
	fmov	d12, d3
	mov	x20, x4
	fmov	d10, d2
	mov	x21, x3
	fmov	d8, d1
	fmov	d11, d0
	mov	x19, x0
	fmov	d0, d1
	mov	x0, x3
	bl	_relation_byte_size
	fmov	d9, d0
	sbfiz	x20, x20, #10, #32
Lloh0:
	adrp	x8, _enable_sort@GOTPAGE
Lloh1:
	ldr	x8, [x8, _enable_sort@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _disable_cost@GOTPAGE
Lloh4:
	ldr	x9, [x9, _disable_cost@GOTPAGEOFF]
Lloh5:
	ldr	d0, [x9]
	cmp	w8, #0
	mov	x8, #-9223372036854775808
	fmov	d1, x8
	fcsel	d13, d0, d1, eq
	str	d8, [x19]
	fmov	d14, #2.00000000
Lloh6:
	adrp	x22, _cpu_operator_cost@GOTPAGE
Lloh7:
	ldr	x22, [x22, _cpu_operator_cost@GOTPAGEOFF]
	fmax	d8, d8, d14
	ldr	d15, [x22]
	fcmp	d12, #0.0
	fccmp	d8, d12, #4, gt
	fmov	d1, d8
	fmov	d0, d9
	b.le	LBB0_2
; %bb.1:
	fmov	d0, d12
	mov	x0, x21
	bl	_relation_byte_size
	fmov	d1, d12
LBB0_2:
	fadd	d11, d13, d11
	fmadd	d13, d15, d14, d10
	scvtf	d2, x20
	fcmp	d0, d2
	b.le	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _BLCKSZ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BLCKSZ@GOTPAGEOFF]
Lloh10:
	ldr	d0, [x8]
	fdiv	d0, d9, d0
	frintp	d12, d0
	fdiv	d9, d9, d2
	mov	x0, x20
	bl	_tuplesort_merge_order
	fmov	d10, d0
	fmul	d13, d8, d13
	fmov	d0, d8
	bl	_LOG2
	fmadd	d11, d13, d0, d11
	fmov	d0, #1.00000000
	fcmp	d9, d10
	b.le	LBB0_5
; %bb.4:
	fmov	d0, d9
	bl	_log
	fmov	d9, d0
	fmov	d0, d10
	bl	_log
	fdiv	d0, d9, d0
	frintp	d0, d0
LBB0_5:
	fadd	d1, d12, d12
	fmul	d0, d1, d0
Lloh11:
	adrp	x8, _seq_page_cost@GOTPAGE
Lloh12:
	ldr	x8, [x8, _seq_page_cost@GOTPAGEOFF]
Lloh13:
	ldr	d1, [x8]
Lloh14:
	adrp	x8, _random_page_cost@GOTPAGE
Lloh15:
	ldr	x8, [x8, _random_page_cost@GOTPAGEOFF]
Lloh16:
	ldr	d2, [x8]
	fmov	d3, #0.25000000
	fmul	d2, d2, d3
	fmov	d3, #0.75000000
	fmadd	d1, d1, d3, d2
	fmadd	d0, d0, d1, d11
	b	LBB0_9
LBB0_6:
	fadd	d0, d1, d1
	fmul	d10, d8, d13
	fcmp	d8, d0
	fccmp	d9, d2, #0, le
	b.gt	LBB0_8
; %bb.7:
	fmov	d0, d8
LBB0_8:
	bl	_LOG2
	fmadd	d0, d10, d0, d11
LBB0_9:
	ldr	d1, [x22]
	movi	d2, #0000000000000000
	fmadd	d1, d1, d8, d2
	fadd	d1, d0, d1
	stp	d0, d1, [x19, #8]
	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
	ldp	d13, d12, [sp, #16]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp], #112            ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_enable_sort,4,2                ; @enable_sort
	.comm	_disable_cost,8,3               ; @disable_cost
	.comm	_cpu_operator_cost,8,3          ; @cpu_operator_cost
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_seq_page_cost,8,3              ; @seq_page_cost
	.comm	_random_page_cost,8,3           ; @random_page_cost
.subsections_via_symbols
