	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_foreign_grouping_paths
_add_foreign_grouping_paths:            ## @add_foreign_grouping_paths
	.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, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	8(%rsi), %r13
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %rbx
	cmpl	$0, 8(%rax)
	jne	LBB0_4
## %bb.1:
	cmpl	$0, 4(%rax)
	jne	LBB0_4
## %bb.2:
	cmpl	$0, (%rax)
	jne	LBB0_4
## %bb.3:
	cmpl	$0, (%r15)
	je	LBB0_6
LBB0_4:
	movq	(%r12), %rax
	movq	_PARTITIONWISE_AGGREGATE_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_PARTITIONWISE_AGGREGATE_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_Assert
	movq	%r14, 56(%rbx)
	movl	52(%r13), %eax
	movl	%eax, 52(%rbx)
	movl	48(%r13), %eax
	movl	%eax, 48(%rbx)
	movl	44(%r13), %eax
	movl	%eax, 44(%rbx)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_merge_fdw_options
	movl	8(%r12), %edx
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_foreign_grouping_ok
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	32(%rbx), %esi
	movq	_JOIN_INNER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_clauselist_selectivity
	movl	%eax, 40(%rbx)
	leaq	36(%rbx), %rdi
	movl	32(%rbx), %esi
	movq	%r15, %rdx
	callq	_cost_qual_eval
	movq	_NIL@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	subq	$8, %rsp
	leaq	-72(%rbp), %rax
	leaq	-80(%rbp), %r10
	leaq	-44(%rbp), %r11
	leaq	-64(%rbp), %r9
	movq	%r15, %rdi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%ecx, %edx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%r10
	pushq	%r11
	callq	_estimate_path_cost_size
	addq	$32, %rsp
	movsd	-64(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movsd	%xmm0, (%rbx)
	movl	-44(%rbp), %eax
	movl	%eax, 8(%rbx)
	movq	-80(%rbp), %rcx
	movq	%rcx, 24(%rbx)
	movq	-72(%rbp), %r8
	movq	%r8, 16(%rbx)
	movl	(%r12), %edx
	movsd	-64(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movl	(%r14), %r9d
	movq	%r15, %rdi
	movq	%r12, %rsi
	pushq	%r9
	pushq	$0
	callq	_create_foreign_upper_path
	addq	$16, %rsp
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_add_path
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PARTITIONWISE_AGGREGATE_NONE,8,3 ## @PARTITIONWISE_AGGREGATE_NONE
	.comm	_PARTITIONWISE_AGGREGATE_FULL,8,3 ## @PARTITIONWISE_AGGREGATE_FULL
	.comm	_JOIN_INNER,4,2                 ## @JOIN_INNER
	.comm	_NIL,4,2                        ## @NIL
	.no_dead_strip	_add_foreign_grouping_paths
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_foreign_grouping_paths
_add_foreign_grouping_paths:            ; @add_foreign_grouping_paths
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x19, x2
	mov	x24, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x23, [x1, #8]
	ldr	x21, [x2, #8]
	ldr	w9, [x8, #8]
	cbnz	w9, LBB0_4
; %bb.1:
	ldr	w9, [x8, #4]
	cbnz	w9, LBB0_4
; %bb.2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	w8, [x20]
	cbz	w8, LBB0_6
LBB0_4:
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _PARTITIONWISE_AGGREGATE_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PARTITIONWISE_AGGREGATE_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _PARTITIONWISE_AGGREGATE_FULL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PARTITIONWISE_AGGREGATE_FULL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_Assert
	str	x24, [x21, #56]
	ldr	w8, [x23, #52]
	str	w8, [x21, #52]
	ldur	d0, [x23, #44]
	stur	d0, [x21, #44]
	mov	x0, x21
	mov	x1, x23
	mov	x2, #0
	bl	_merge_fdw_options
	ldr	w2, [x22, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_foreign_grouping_ok
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w1, [x21, #32]
Lloh6:
	adrp	x8, _JOIN_INNER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _JOIN_INNER@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	x4, #0
	bl	_clauselist_selectivity
	str	w0, [x21, #40]
	add	x0, x21, #36
	ldr	w1, [x21, #32]
	mov	x2, x20
	bl	_cost_qual_eval
Lloh9:
	adrp	x22, _NIL@GOTPAGE
Lloh10:
	ldr	x22, [x22, _NIL@GOTPAGEOFF]
	ldr	w2, [x22]
	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, [x21]
	ldr	w8, [sp, #36]
	str	w8, [x21, #8]
	ldp	x4, x3, [sp, #16]
	stp	x4, x3, [x21, #16]
	ldr	w2, [x19]
	ldr	d0, [sp, #40]
	ldr	w5, [x22]
	mov	x0, x20
	mov	x1, x19
	mov	x6, #0
	mov	x7, x5
	bl	_create_foreign_upper_path
	mov	x1, x0
	mov	x0, x19
	bl	_add_path
LBB0_6:
	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	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PARTITIONWISE_AGGREGATE_NONE,8,3 ; @PARTITIONWISE_AGGREGATE_NONE
	.comm	_PARTITIONWISE_AGGREGATE_FULL,8,3 ; @PARTITIONWISE_AGGREGATE_FULL
	.comm	_JOIN_INNER,4,2                 ; @JOIN_INNER
	.comm	_NIL,4,2                        ; @NIL
	.no_dead_strip	_add_foreign_grouping_paths
.subsections_via_symbols
