	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_worktablescan_plan
_create_worktablescan_plan:             ## @create_worktablescan_plan
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %rax
	movq	(%rax), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setg	%dil
	callq	_Assert
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_planner_rt_fetch
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	_RTE_CTE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	8(%r14), %edi
	callq	_Assert
	movq	16(%r14), %r12
	testq	%r12, %r12
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%r15, %rbx
	cmpq	$2, %r12
	jl	LBB0_7
## %bb.3:
	incq	%r12
	movq	_ERROR@GOTPCREL(%rip), %r15
	leaq	L_.str(%rip), %r13
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	decq	%r12
	cmpq	$2, %r12
	jbe	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %edi
	movl	24(%r14), %edx
	movq	%r13, %rsi
	callq	_elog
	jmp	LBB0_6
LBB0_1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_elog
	movq	%r15, %rbx
LBB0_7:
	cmpq	$0, (%rbx)
	jns	LBB0_9
## %bb.8:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_9:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_order_qual_clauses
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_extract_actual_clauses
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	cmpq	$0, (%r14)
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_replace_nestloop_params
LBB0_11:
	movq	(%rbx), %rcx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_make_worktablescan
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_copy_generic_path_info
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTE_CTE,8,3                    ## @RTE_CTE
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad levelsup for CTE \"%s\""

L_.str.1:                               ## @.str.1
	.asciz	"could not find param ID for CTE \"%s\""

	.no_dead_strip	_create_worktablescan_plan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_worktablescan_plan
_create_worktablescan_plan:             ; @create_worktablescan_plan
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	ldr	x8, [x1, #8]
	ldr	x21, [x8]
	cmp	x21, #0
	cset	w0, gt
	bl	_Assert
	mov	x0, x21
	mov	x1, x22
	bl	_planner_rt_fetch
	mov	x24, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _RTE_CTE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RTE_CTE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	w0, [x24, #8]
	bl	_Assert
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x26, x22
	cmp	x8, #2
	b.lt	LBB0_7
; %bb.2:
	add	x27, x8, #1
Lloh3:
	adrp	x28, _ERROR@GOTPAGE
Lloh4:
	ldr	x28, [x28, _ERROR@GOTPAGEOFF]
	mov	x26, x22
Lloh5:
	adrp	x25, l_.str@PAGE
Lloh6:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x27, x27, #1
	cmp	x27, #2
	b.ls	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x26, #8]
	cbnz	x26, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x28]
	ldr	w2, [x24, #24]
	mov	x1, x25
	bl	_elog
	b	LBB0_3
LBB0_6:
Lloh7:
	adrp	x8, _ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w2, [x24, #24]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	mov	x26, x22
LBB0_7:
	ldr	x8, [x26]
	tbz	x8, #63, LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x24, #24]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_9:
	mov	x0, x22
	mov	x1, x23
	bl	_order_qual_clauses
	mov	w1, #0
	bl	_extract_actual_clauses
	mov	x1, x0
	ldr	x8, [x19]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x22
	bl	_replace_nestloop_params
	mov	x1, x0
LBB0_11:
	ldr	x3, [x26]
	mov	x0, x20
	mov	x2, x21
	bl	_make_worktablescan
	mov	x20, x0
	mov	x1, x19
	bl	_copy_generic_path_info
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RTE_CTE,8,3                    ; @RTE_CTE
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad levelsup for CTE \"%s\""

l_.str.1:                               ; @.str.1
	.asciz	"could not find param ID for CTE \"%s\""

	.no_dead_strip	_create_worktablescan_plan
.subsections_via_symbols
