	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_ordinary_grouping_paths
_create_ordinary_grouping_paths:        ## @create_ordinary_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rcx
	movq	24(%rsi), %rax
	movq	_PARTITIONWISE_AGGREGATE_NONE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r12
	cmpq	%r12, (%r9)
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	movq	%r8, %r15
	callq	_IS_PARTITIONED_REL
	movq	%r15, %r8
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	(%r14), %rax
	movq	_PARTITIONWISE_AGGREGATE_FULL@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.3:
	movl	12(%r14), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_group_by_has_partkey
	movq	%r15, %r8
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%r12), %r12
	jmp	LBB0_9
LBB0_5:
	movq	_GROUPING_CAN_PARTIAL_AGG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_7
## %bb.6:
	movq	_PARTITIONWISE_AGGREGATE_PARTIAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_PARTITIONWISE_AGGREGATE_NONE@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %r12
LBB0_9:
	movq	_GROUPING_CAN_PARTIAL_AGG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	je	LBB0_10
## %bb.11:
	movq	_PARTITIONWISE_AGGREGATE_PARTIAL@GOTPCREL(%rip), %rax
	xorl	%r9d, %r9d
	cmpq	(%rax), %r12
	sete	%r9b
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %r15
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r8, %rcx
	movq	%r14, %r8
	callq	_create_partial_grouping_paths
	movq	%rax, %r13
	jmp	LBB0_12
LBB0_10:
	movq	%r13, %r15
	xorl	%r13d, %r13d
LBB0_12:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movq	_PARTITIONWISE_AGGREGATE_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	%r13, %rcx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	pushq	%r14
	pushq	%r12
	callq	_create_partitionwise_grouping_paths
	addq	$16, %rsp
LBB0_14:
	movq	(%r14), %rax
	movq	_PARTITIONWISE_AGGREGATE_PARTIAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.15:
	movq	%r13, %rdi
	callq	_Assert
	cmpq	$0, (%r13)
	je	LBB0_26
## %bb.16:
	movq	%r13, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_cheapest                   ## TAILCALL
LBB0_17:
	movq	%r15, %r12
	testq	%r13, %r13
	je	LBB0_20
## %bb.18:
	cmpq	$0, 16(%r13)
	je	LBB0_20
## %bb.19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_gather_grouping_paths
	movq	%r13, %rdi
	callq	_set_cheapest
LBB0_20:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	12(%r14), %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_get_number_of_groups
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rbx
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	%r15, %r9
	pushq	%r14
	callq	_add_paths_to_grouping_rel
	addq	$16, %rsp
	movq	(%r12), %rax
	movq	_NIL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.21:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_FEATURE_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	callq	_errdetail
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_22:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_25
## %bb.23:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	_UPPERREL_GROUP_AGG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	%rbx, %rcx
	movq	%r14, %r8
	callq	*%rax
LBB0_25:
	movq	_UPPERREL_GROUP_AGG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	%rbx, %rcx
	movq	%r14, %r8
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_create_upper_paths_hook        ## TAILCALL
LBB0_26:
	addq	$56, %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	_GROUPING_CAN_PARTIAL_AGG,4,2   ## @GROUPING_CAN_PARTIAL_AGG
	.comm	_PARTITIONWISE_AGGREGATE_PARTIAL,8,3 ## @PARTITIONWISE_AGGREGATE_PARTIAL
	.comm	_NIL,8,3                        ## @NIL
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ## @ERRCODE_FEATURE_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not implement GROUP BY"

L_.str.1:                               ## @.str.1
	.asciz	"Some of the datatypes only support hashing, while others only support sorting."

	.comm	_UPPERREL_GROUP_AGG,4,2         ## @UPPERREL_GROUP_AGG
	.no_dead_strip	_create_ordinary_grouping_paths
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_ordinary_grouping_paths
_create_ordinary_grouping_paths:        ; @create_ordinary_grouping_paths
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x6
	mov	x19, x5
	mov	x23, x4
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x9, [x1, #24]
Lloh0:
	adrp	x28, _PARTITIONWISE_AGGREGATE_NONE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _PARTITIONWISE_AGGREGATE_NONE@GOTPAGEOFF]
	ldr	x27, [x28]
	ldr	x8, [x5]
Lloh2:
	adrp	x26, _GROUPING_CAN_PARTIAL_AGG@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GROUPING_CAN_PARTIAL_AGG@GOTPAGEOFF]
	cmp	x8, x27
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	b.eq	LBB0_8
; %bb.1:
	mov	x0, x21
	bl	_IS_PARTITIONED_REL
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x19]
Lloh4:
	adrp	x27, _PARTITIONWISE_AGGREGATE_FULL@GOTPAGE
Lloh5:
	ldr	x27, [x27, _PARTITIONWISE_AGGREGATE_FULL@GOTPAGEOFF]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	w1, [x19, #12]
	ldr	x8, [x22]
	ldr	w2, [x8]
	mov	x0, x21
	bl	_group_by_has_partkey
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x27, [x27]
	b	LBB0_8
LBB0_5:
	ldr	w8, [x19, #8]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh6:
	adrp	x8, _PARTITIONWISE_AGGREGATE_PARTIAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PARTITIONWISE_AGGREGATE_PARTIAL@GOTPAGEOFF]
Lloh8:
	ldr	x27, [x8]
	b	LBB0_8
LBB0_7:
	ldr	x27, [x28]
LBB0_8:
	ldr	w8, [x19, #8]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
Lloh9:
	adrp	x8, _PARTITIONWISE_AGGREGATE_PARTIAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PARTITIONWISE_AGGREGATE_PARTIAL@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x27, x8
	cset	w5, eq
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	mov	x4, x19
	bl	_create_partial_grouping_paths
	mov	x26, x0
	b	LBB0_11
LBB0_10:
	mov	x26, #0
LBB0_11:
	str	x26, [x25]
	ldr	x8, [x28]
	cmp	x27, x8
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x26
	mov	x4, x24
	mov	x5, x23
	mov	x6, x27
	mov	x7, x19
	bl	_create_partitionwise_grouping_paths
LBB0_13:
	ldr	x8, [x19]
Lloh12:
	adrp	x9, _PARTITIONWISE_AGGREGATE_PARTIAL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PARTITIONWISE_AGGREGATE_PARTIAL@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.14:
	mov	x0, x26
	bl	_Assert
	ldr	x8, [x26]
	cbz	x8, LBB0_25
; %bb.15:
	mov	x0, x26
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_set_cheapest
LBB0_16:
	cbz	x26, LBB0_19
; %bb.17:
	ldr	x8, [x26, #16]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x22
	mov	x1, x26
	bl	_gather_grouping_paths
	mov	x0, x26
	bl	_set_cheapest
LBB0_19:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w1, [x8]
	ldr	w3, [x19, #12]
	mov	x0, x22
	mov	x2, x23
	bl	_get_number_of_groups
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x26
	mov	x4, x24
	mov	x5, x23
	mov	x6, x19
	bl	_add_paths_to_grouping_rel
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _NIL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NIL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.20:
Lloh18:
	adrp	x8, _ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w23, [x8]
Lloh21:
	adrp	x8, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_errcode
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errdetail
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_21:
	ldr	x8, [x20, #8]
Lloh28:
	adrp	x23, _UPPERREL_GROUP_AGG@GOTPAGE
Lloh29:
	ldr	x23, [x23, _UPPERREL_GROUP_AGG@GOTPAGEOFF]
	cbz	x8, LBB0_24
; %bb.22:
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.23:
	ldr	w1, [x23]
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	blr	x8
LBB0_24:
	ldr	w1, [x23]
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_create_upper_paths_hook
LBB0_25:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_PARTITIONWISE_AGGREGATE_NONE,8,3 ; @PARTITIONWISE_AGGREGATE_NONE
	.comm	_PARTITIONWISE_AGGREGATE_FULL,8,3 ; @PARTITIONWISE_AGGREGATE_FULL
	.comm	_GROUPING_CAN_PARTIAL_AGG,4,2   ; @GROUPING_CAN_PARTIAL_AGG
	.comm	_PARTITIONWISE_AGGREGATE_PARTIAL,8,3 ; @PARTITIONWISE_AGGREGATE_PARTIAL
	.comm	_NIL,8,3                        ; @NIL
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_FEATURE_NOT_SUPPORTED,4,2 ; @ERRCODE_FEATURE_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not implement GROUP BY"

l_.str.1:                               ; @.str.1
	.asciz	"Some of the datatypes only support hashing, while others only support sorting."

	.comm	_UPPERREL_GROUP_AGG,4,2         ; @UPPERREL_GROUP_AGG
	.no_dead_strip	_create_ordinary_grouping_paths
.subsections_via_symbols
