	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function postgresGetForeignJoinPaths
_postgresGetForeignJoinPaths:           ## @postgresGetForeignJoinPaths
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	cmpq	$0, 24(%rsi)
	je	LBB0_1
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	8(%rsi), %edi
	callq	_bms_is_empty
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	movl	$88, %edi
	callq	_palloc0
	movl	$0, (%rax)
	movq	%rax, 24(%rbx)
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	$0, 80(%rax)
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	_CMD_DELETE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_CMD_UPDATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	cmpq	$0, (%r12)
	je	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_GetExistingLocalJoinPath
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	%r13, %rcx
	movq	%r15, %r8
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_foreign_join_ok
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pfree                          ## TAILCALL
LBB0_14:
	movq	_DEBUG3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elog                           ## TAILCALL
LBB0_8:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	%r13, %rcx
	movq	%r15, %r8
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_foreign_join_ok
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_10:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	60(%r15), %esi
	movq	_JOIN_INNER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_clauselist_selectivity
	movq	%rax, 72(%r15)
	movq	%r15, %rdi
	addq	$64, %rdi
	movl	60(%r15), %esi
	movq	%r12, %rdx
	callq	_cost_qual_eval
	cmpl	$0, 56(%r15)
	jne	LBB0_12
## %bb.11:
	movl	40(%r15), %ecx
	movl	44(%r15), %esi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r8
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_clauselist_selectivity
	movq	%rax, 48(%r15)
LBB0_12:
	movq	_NIL@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	subq	$8, %rsp
	leaq	-80(%rbp), %rax
	leaq	-88(%rbp), %r10
	leaq	-44(%rbp), %r11
	leaq	-96(%rbp), %r9
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%ecx, %edx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%r10
	pushq	%r11
	callq	_estimate_path_cost_size
	addq	$32, %rsp
	movsd	-96(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rbx)
	movl	-44(%rbp), %eax
	movq	16(%rbx), %rcx
	movl	%eax, (%rcx)
	movsd	%xmm0, 8(%r15)
	movl	-44(%rbp), %eax
	movl	%eax, 16(%r15)
	movq	-88(%rbp), %rcx
	movq	%rcx, 32(%r15)
	movq	-80(%rbp), %r8
	movq	%r8, 24(%r15)
	movl	(%r14), %r9d
	movl	8(%rbx), %eax
	subq	$8, %rsp
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	pushq	%r9
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	pushq	%r14
	pushq	%rax
	callq	_create_foreign_join_path
	addq	$32, %rsp
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_add_path
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_add_paths_with_pathkeys_for_rel
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_DELETE,8,3                 ## @CMD_DELETE
	.comm	_CMD_UPDATE,8,3                 ## @CMD_UPDATE
	.comm	_DEBUG3,4,2                     ## @DEBUG3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not push down foreign join because a local path suitable for EPQ checks was not found"

	.comm	_JOIN_INNER,4,2                 ## @JOIN_INNER
	.comm	_NIL,4,2                        ## @NIL
	.no_dead_strip	_postgresGetForeignJoinPaths
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function postgresGetForeignJoinPaths
_postgresGetForeignJoinPaths:           ; @postgresGetForeignJoinPaths
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	x8, [x1, #24]
	cbz	x8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
	mov	x23, x5
	mov	x26, x4
	mov	x24, x3
	mov	x25, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #8]
	bl	_bms_is_empty
	cbz	w0, LBB0_1
; %bb.3:
	mov	w0, #88
	bl	_palloc0
	mov	x21, x0
	str	wzr, [x0]
	str	x0, [x19, #24]
	str	xzr, [x0, #80]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _CMD_DELETE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CMD_DELETE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _CMD_UPDATE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CMD_UPDATE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x20]
	cbz	x8, LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_GetExistingLocalJoinPath
	cbz	x0, LBB0_8
; %bb.6:
	mov	x22, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x26
	mov	x3, x25
	mov	x4, x24
	mov	x5, x23
	bl	_foreign_join_ok
	cbnz	w0, LBB0_11
; %bb.7:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_pfree
LBB0_8:
Lloh6:
	adrp	x8, _DEBUG3@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEBUG3@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_elog
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x26
	mov	x3, x25
	mov	x4, x24
	mov	x5, x23
	bl	_foreign_join_ok
	cbz	w0, LBB0_1
; %bb.10:
	mov	x22, #0
LBB0_11:
	ldr	w1, [x21, #60]
Lloh11:
	adrp	x8, _JOIN_INNER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _JOIN_INNER@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	x4, #0
	bl	_clauselist_selectivity
	str	x0, [x21, #72]
	add	x0, x21, #64
	ldr	w1, [x21, #60]
	mov	x2, x20
	bl	_cost_qual_eval
	ldr	w8, [x21, #56]
	cbnz	w8, LBB0_13
; %bb.12:
	ldp	w3, w1, [x21, #40]
	ldr	x4, [x23]
	mov	x0, x20
	mov	w2, #0
	bl	_clauselist_selectivity
	str	x0, [x21, #48]
LBB0_13:
Lloh14:
	adrp	x23, _NIL@GOTPAGE
Lloh15:
	ldr	x23, [x23, _NIL@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x8, sp, #16
	str	x8, [sp]
	add	x5, sp, #40
	add	x6, sp, #36
	add	x7, sp, #24
	mov	x0, x20
	mov	x1, x19
	mov	x3, x2
	mov	x4, #0
	bl	_estimate_path_cost_size
	ldr	d0, [sp, #40]
	str	d0, [x19]
	ldr	w8, [sp, #36]
	ldr	x9, [x19, #16]
	str	w8, [x9]
	str	d0, [x21, #8]
	ldr	w8, [sp, #36]
	str	w8, [x21, #16]
	ldp	x4, x3, [sp, #16]
	stp	x4, x3, [x21, #24]
	ldr	w5, [x23]
	ldr	w6, [x19, #8]
	str	w5, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	mov	x7, x22
	bl	_create_foreign_join_path
	mov	x1, x0
	mov	x0, x19
	bl	_add_path
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_add_paths_with_pathkeys_for_rel
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_DELETE,8,3                 ; @CMD_DELETE
	.comm	_CMD_UPDATE,8,3                 ; @CMD_UPDATE
	.comm	_DEBUG3,4,2                     ; @DEBUG3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not push down foreign join because a local path suitable for EPQ checks was not found"

	.comm	_JOIN_INNER,4,2                 ; @JOIN_INNER
	.comm	_NIL,4,2                        ; @NIL
	.no_dead_strip	_postgresGetForeignJoinPaths
.subsections_via_symbols
