	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function final_cost_nestloop
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0x4000000000000000              ## double 2
LCPI0_2:
	.quad	0xbff0000000000000              ## double -1
LCPI0_3:
	.quad	0x8000000000000000              ## double -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_final_cost_nestloop
	.p2align	4, 0x90
_final_cost_nestloop:                   ## @final_cost_nestloop
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	72(%rsi), %rax
	movq	80(%rsi), %rcx
	movsd	(%rcx), %xmm1                   ## xmm1 = mem[0],zero
	movsd	(%rax), %xmm2                   ## xmm2 = mem[0],zero
	movsd	(%rdx), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -104(%rbp)               ## 8-byte Spill
	movsd	8(%rdx), %xmm0                  ## xmm0 = mem[0],zero
	movapd	%xmm0, -80(%rbp)                ## 16-byte Spill
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm1, %xmm0
	movsd	%xmm2, -48(%rbp)                ## 8-byte Spill
	jae	LBB0_2
## %bb.1:
	movapd	%xmm1, %xmm0
	movapd	%xmm1, -96(%rbp)                ## 16-byte Spill
	callq	_isnan
	movsd	-48(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movapd	-96(%rbp), %xmm1                ## 16-byte Reload
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
LBB0_3:
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm2, %xmm0
	movapd	%xmm1, -96(%rbp)                ## 16-byte Spill
	jae	LBB0_5
## %bb.4:
	movapd	%xmm2, %xmm0
	callq	_isnan
	movsd	-48(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movapd	-96(%rbp), %xmm1                ## 16-byte Reload
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
LBB0_6:
	movq	56(%r13), %rax
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	48(%r13), %rax
LBB0_8:
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%r13)
	cmpq	$0, 16(%r13)
	movsd	%xmm2, -48(%rbp)                ## 8-byte Spill
	jle	LBB0_10
## %bb.9:
	leaq	8(%r13), %rbx
	movq	%rbx, %rdi
	callq	_get_parallel_divisor
	movsd	(%rbx), %xmm1                   ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	callq	_clamp_row_est
	movsd	-48(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	movapd	-96(%rbp), %xmm1                ## 16-byte Reload
	movsd	%xmm0, (%rbx)
LBB0_10:
	movq	_enable_nestloop@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_disable_cost@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm3                   ## xmm3 = mem[0],zero
	movq	(%r13), %rax
	movq	_JOIN_SEMI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.11:
	movq	_JOIN_ANTI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.12:
	cmpq	$0, 16(%r15)
	je	LBB0_19
LBB0_13:
	movsd	%xmm3, -136(%rbp)               ## 8-byte Spill
	movsd	16(%r12), %xmm0                 ## xmm0 = mem[0],zero
	movaps	%xmm0, -160(%rbp)               ## 16-byte Spill
	movsd	24(%r12), %xmm0                 ## xmm0 = mem[0],zero
	movsd	%xmm0, -128(%rbp)               ## 8-byte Spill
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm0
	xorps	%xmm3, %xmm3
	roundsd	$4, %xmm0, %xmm3
	subsd	%xmm3, %xmm1
	movapd	%xmm1, -96(%rbp)                ## 16-byte Spill
	movsd	8(%r15), %xmm0                  ## xmm0 = mem[0],zero
	addsd	LCPI0_0(%rip), %xmm0
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movapd	%xmm2, %xmm0
	movsd	%xmm3, -120(%rbp)               ## 8-byte Spill
	mulsd	%xmm3, %xmm0
	movsd	%xmm1, -112(%rbp)               ## 8-byte Spill
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	callq	_has_indexed_join_quals
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movapd	-160(%rbp), %xmm4               ## 16-byte Reload
	movsd	-112(%rbp), %xmm1               ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm4
	addsd	-80(%rbp), %xmm4                ## 16-byte Folded Reload
	movsd	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero
	movsd	-120(%rbp), %xmm2               ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	addsd	%xmm2, %xmm0
	movsd	-128(%rbp), %xmm3               ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	mulsd	%xmm3, %xmm0
	mulsd	%xmm1, %xmm0
	addsd	%xmm4, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	cmpltsd	%xmm2, %xmm1
	movapd	%xmm1, %xmm2
	andnpd	%xmm4, %xmm2
	andpd	%xmm0, %xmm1
	orpd	%xmm2, %xmm1
	movapd	-96(%rbp), %xmm2                ## 16-byte Reload
	mulsd	%xmm3, %xmm2
	divsd	-48(%rbp), %xmm2                ## 8-byte Folded Reload
	addsd	%xmm1, %xmm2
	movsd	-136(%rbp), %xmm3               ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	jmp	LBB0_20
LBB0_15:
	movsd	-128(%rbp), %xmm5               ## 8-byte Reload
                                        ## xmm5 = mem[0],zero
	movapd	-96(%rbp), %xmm3                ## 16-byte Reload
	movsd	-48(%rbp), %xmm4                ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	mulsd	%xmm3, %xmm4
	movapd	-80(%rbp), %xmm0                ## 16-byte Reload
	addsd	-160(%rbp), %xmm0               ## 16-byte Folded Reload
	movapd	%xmm0, -80(%rbp)                ## 16-byte Spill
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	ucomisd	%xmm0, %xmm3
	movsd	LCPI0_2(%rip), %xmm2            ## xmm2 = mem[0],zero
	movapd	%xmm3, %xmm1
	addsd	%xmm2, %xmm1
	movsd	-120(%rbp), %xmm6               ## 8-byte Reload
                                        ## xmm6 = mem[0],zero
	movsd	-112(%rbp), %xmm7               ## 8-byte Reload
                                        ## xmm7 = mem[0],zero
	jae	LBB0_17
## %bb.16:
	addsd	%xmm2, %xmm6
LBB0_17:
	movsd	-56(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	addsd	%xmm4, %xmm2
	movsd	%xmm2, -56(%rbp)                ## 8-byte Spill
	cmpnlesd	%xmm3, %xmm0
	movapd	%xmm0, %xmm2
	andnpd	%xmm1, %xmm2
	andpd	%xmm3, %xmm0
	orpd	%xmm2, %xmm0
	movapd	%xmm5, %xmm1
	mulsd	%xmm6, %xmm1
	mulsd	%xmm7, %xmm1
	movapd	-80(%rbp), %xmm3                ## 16-byte Reload
	addsd	%xmm3, %xmm1
	xorpd	%xmm2, %xmm2
	ucomisd	%xmm2, %xmm0
	cmpltsd	%xmm6, %xmm2
	andpd	%xmm2, %xmm1
	andnpd	%xmm3, %xmm2
	orpd	%xmm1, %xmm2
	movsd	-136(%rbp), %xmm3               ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	jbe	LBB0_20
## %bb.18:
	movapd	%xmm5, %xmm4
	mulsd	%xmm5, %xmm0
	addsd	%xmm0, %xmm2
	jmp	LBB0_20
LBB0_19:
	mulsd	%xmm2, %xmm1
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	movapd	-80(%rbp), %xmm2                ## 16-byte Reload
LBB0_20:
	movapd	%xmm2, -80(%rbp)                ## 16-byte Spill
	testl	%ebx, %ebx
	je	LBB0_22
## %bb.21:
	movsd	LCPI0_3(%rip), %xmm3            ## xmm3 = mem[0],zero
LBB0_22:
	movsd	-104(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	%xmm3, %xmm0
	movsd	%xmm0, -104(%rbp)               ## 8-byte Spill
	movl	64(%r13), %esi
	leaq	-176(%rbp), %rdi
	movq	%r14, %rdx
	callq	_cost_qual_eval
	movsd	-104(%rbp), %xmm2               ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	addsd	-176(%rbp), %xmm2
	movq	_cpu_tuple_cost@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	addsd	-168(%rbp), %xmm0
	mulsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	-80(%rbp), %xmm0                ## 16-byte Folded Reload
	movq	40(%r13), %rax
	addsd	(%rax), %xmm2
	xorps	%xmm1, %xmm1
	cvtsi2sdl	8(%rax), %xmm1
	mulsd	8(%r13), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm2, 24(%r13)
	addsd	%xmm2, %xmm1
	movsd	%xmm1, 32(%r13)
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_enable_nestloop,4,2            ## @enable_nestloop
	.comm	_disable_cost,8,3               ## @disable_cost
	.comm	_JOIN_SEMI,8,3                  ## @JOIN_SEMI
	.comm	_JOIN_ANTI,8,3                  ## @JOIN_ANTI
	.comm	_cpu_tuple_cost,8,3             ## @cpu_tuple_cost
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_final_cost_nestloop            ; -- Begin function final_cost_nestloop
	.p2align	2
_final_cost_nestloop:                   ; @final_cost_nestloop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	d15, d14, [sp, #32]             ; 16-byte Folded Spill
	stp	d13, d12, [sp, #48]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #64]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset b10, -88
	.cfi_offset b11, -96
	.cfi_offset b12, -104
	.cfi_offset b13, -112
	.cfi_offset b14, -120
	.cfi_offset b15, -128
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldp	x9, x8, [x1, #72]
	ldr	d9, [x8]
	ldr	d8, [x9]
	ldp	d10, d12, [x2]
	fcmp	d9, #0.0
	b.ls	LBB0_2
; %bb.1:
	fmov	d0, d9
	bl	_isnan
	cbz	x0, LBB0_3
LBB0_2:
	fmov	d9, #1.00000000
LBB0_3:
	fcmp	d8, #0.0
	b.ls	LBB0_5
; %bb.4:
	fmov	d0, d8
	bl	_isnan
	cbz	x0, LBB0_6
LBB0_5:
	fmov	d8, #1.00000000
LBB0_6:
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_8
; %bb.7:
	ldr	x8, [x19, #48]
LBB0_8:
	ldr	d0, [x8]
	str	d0, [x19, #8]
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.9:
	add	x23, x19, #8
	mov	x0, x23
	bl	_get_parallel_divisor
	ldr	d1, [x23]
	fdiv	d0, d1, d0
	bl	_clamp_row_est
	str	d0, [x23]
LBB0_10:
Lloh0:
	adrp	x8, _enable_nestloop@GOTPAGE
Lloh1:
	ldr	x8, [x8, _enable_nestloop@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _disable_cost@GOTPAGE
Lloh4:
	ldr	x8, [x8, _disable_cost@GOTPAGEOFF]
Lloh5:
	ldr	d1, [x8]
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _JOIN_SEMI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _JOIN_SEMI@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _JOIN_ANTI@GOTPAGE
Lloh10:
	ldr	x10, [x10, _JOIN_ANTI@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_16
LBB0_12:
	stp	d1, d10, [sp]                   ; 16-byte Folded Spill
	ldp	d11, d13, [x22, #16]
	ldp	d0, d1, [x21]
	fmul	d0, d9, d0
	frintx	d15, d0
	fsub	d14, d9, d15
	fmov	d0, #1.00000000
	fadd	d0, d1, d0
	fmov	d1, #2.00000000
	fdiv	d10, d1, d0
	fmul	d0, d8, d15
	fmul	d9, d0, d10
	mov	x0, x19
	bl	_has_indexed_join_quals
	cbz	x0, LBB0_14
; %bb.13:
	fmadd	d0, d11, d10, d12
	fmov	d1, #-1.00000000
	fadd	d1, d15, d1
	fmul	d1, d13, d1
	fmadd	d1, d1, d10, d0
	fmov	d2, #1.00000000
	fcmp	d15, d2
	fcsel	d0, d1, d0, gt
	fmul	d1, d13, d14
	fdiv	d1, d1, d8
	fadd	d12, d1, d0
	ldp	d1, d10, [sp]                   ; 16-byte Folded Reload
	b	LBB0_17
LBB0_14:
	fmadd	d9, d14, d8, d9
	fadd	d1, d12, d11
	fmov	d0, #-1.00000000
	fadd	d2, d14, d0
	fadd	d0, d15, d0
	fmov	d3, #1.00000000
	fcmp	d14, d3
	fcsel	d3, d0, d15, lt
	fcsel	d0, d14, d2, lt
	fmul	d2, d13, d3
	fmadd	d2, d2, d10, d1
	fcmp	d3, #0.0
	fcsel	d12, d2, d1, gt
	fcmp	d0, #0.0
	ldp	d1, d10, [sp]                   ; 16-byte Folded Reload
	b.le	LBB0_17
; %bb.15:
	fmadd	d12, d0, d13, d12
	b	LBB0_17
LBB0_16:
	fmul	d9, d9, d8
LBB0_17:
	cmp	w23, #0
	mov	x8, #-9223372036854775808
	fmov	d0, x8
	fcsel	d0, d1, d0, eq
	fadd	d8, d10, d0
	ldr	w1, [x19, #64]
	add	x0, sp, #16
	mov	x2, x20
	bl	_cost_qual_eval
	ldp	d0, d1, [sp, #16]
	fadd	d0, d8, d0
Lloh12:
	adrp	x8, _cpu_tuple_cost@GOTPAGE
Lloh13:
	ldr	x8, [x8, _cpu_tuple_cost@GOTPAGEOFF]
Lloh14:
	ldr	d2, [x8]
	fadd	d1, d2, d1
	fmadd	d1, d1, d9, d12
	ldr	x8, [x19, #40]
	ldr	d2, [x8]
	fadd	d0, d0, d2
	ldr	s2, [x8, #8]
	sshll.2d	v2, v2, #0
	scvtf	d2, d2
	ldr	d3, [x19, #8]
	fmadd	d1, d2, d3, d1
	fadd	d1, d0, d1
	stp	d0, d1, [x19, #24]
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #64]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #48]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_enable_nestloop,4,2            ; @enable_nestloop
	.comm	_disable_cost,8,3               ; @disable_cost
	.comm	_JOIN_SEMI,8,3                  ; @JOIN_SEMI
	.comm	_JOIN_ANTI,8,3                  ; @JOIN_ANTI
	.comm	_cpu_tuple_cost,8,3             ; @cpu_tuple_cost
.subsections_via_symbols
