	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function choose_hashed_setop
LCPI0_0:
	.quad	0xbff0000000000000              ## double -1
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_choose_hashed_setop:                   ## @choose_hashed_setop
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movapd	%xmm1, -112(%rbp)               ## 16-byte Spill
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_list_length
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_grouping_is_sortable
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_grouping_is_hashable
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	testl	%r15d, %r15d
	jne	LBB0_5
LBB0_2:
	xorl	%ebx, %ebx
	testl	%eax, %eax
	setne	%cl
	orl	%eax, %r15d
	je	LBB0_4
## %bb.3:
	movb	%cl, %bl
	jmp	LBB0_8
LBB0_4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_FEATURE_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	callq	_errdetail
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movq	_enable_hashagg@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.6:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	callq	_MAXALIGN
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	movq	_SizeofMinimalTupleHeader@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MAXALIGN
	addsd	-64(%rbp), %xmm0                ## 8-byte Folded Reload
	movsd	-56(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm0
	movq	_work_mem@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	shlq	$10, %rax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rax, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	LBB0_8
## %bb.7:
	movq	_AGG_HASHED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NIL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rax, %rbx
	movl	8(%r13), %eax
	movl	(%r13), %ecx
	movl	4(%r13), %esi
	movl	%ecx, 16(%rsp)
	movl	%esi, 8(%rsp)
	movl	%eax, (%rsp)
	leaq	-136(%rbp), %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %r8d
	movapd	%xmm2, %xmm0
	callq	_cost_agg
	movl	8(%r13), %eax
	movl	%eax, -80(%rbp)
	movl	4(%r13), %ecx
	movl	%ecx, -84(%rbp)
	movl	(%rbx), %edx
	movl	(%r13), %r8d
	movq	16(%r13), %rax
	movl	(%rax), %r9d
	movq	(%r12), %rax
	movq	%rax, (%rsp)
	leaq	-88(%rbp), %rbx
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	xorpd	%xmm0, %xmm0
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_cost_sort
	movq	_NIL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-84(%rbp), %r9d
	movl	-80(%rbp), %r8d
	movl	(%r13), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_cost_group
	movsd	(%r14), %xmm0                   ## xmm0 = mem[0],zero
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	movapd	%xmm1, %xmm2
	cmpnlesd	%xmm0, %xmm2
	andpd	%xmm2, %xmm1
	andnpd	-112(%rbp), %xmm2               ## 16-byte Folded Reload
	orpd	%xmm1, %xmm2
	divsd	%xmm2, %xmm0
	leaq	-136(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_compare_fractional_path_costs
	movq	%rax, %rbx
	shrq	$63, %rbx
LBB0_8:
	movl	%ebx, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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 %s"

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

	.comm	_enable_hashagg,4,2             ## @enable_hashagg
	.comm	_SizeofMinimalTupleHeader,4,2   ## @SizeofMinimalTupleHeader
	.comm	_work_mem,8,3                   ## @work_mem
	.comm	_AGG_HASHED,4,2                 ## @AGG_HASHED
	.comm	_NIL,4,2                        ## @NIL
	.no_dead_strip	_choose_hashed_setop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_hashed_setop
_choose_hashed_setop:                   ; @choose_hashed_setop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	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
	mov	x22, x3
	fmov	d8, d1
	fmov	d9, d0
	mov	x20, x2
	mov	x24, x1
	mov	x19, x0
	mov	x0, x1
	bl	_list_length
	mov	x21, x0
	mov	x0, x24
	bl	_grouping_is_sortable
	mov	x23, x0
	mov	x0, x24
	bl	_grouping_is_hashable
	mov	x8, x0
	cbz	w0, LBB0_2
; %bb.1:
	cbnz	w23, LBB0_4
LBB0_2:
	cmp	w8, #0
	cset	w0, ne
	orr	w8, w8, w23
	cbnz	w8, LBB0_8
; %bb.3:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERRCODE_FEATURE_NOT_SUPPORTED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_errcode
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_errmsg
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errdetail
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_4:
Lloh10:
	adrp	x8, _enable_hashagg@GOTPAGE
Lloh11:
	ldr	x8, [x8, _enable_hashagg@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_MAXALIGN
	fmov	d10, d0
Lloh13:
	adrp	x8, _SizeofMinimalTupleHeader@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SizeofMinimalTupleHeader@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_MAXALIGN
	fadd	d0, d10, d0
Lloh16:
	adrp	x22, _work_mem@GOTPAGE
Lloh17:
	ldr	x22, [x22, _work_mem@GOTPAGEOFF]
	fmul	d0, d0, d9
	ldr	x8, [x22]
	lsl	x8, x8, #10
	scvtf	d1, x8
	fcmp	d0, d1
	b.le	LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x8, _AGG_HASHED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AGG_HASHED@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x23, _NIL@GOTPAGE
Lloh22:
	ldr	x23, [x23, _NIL@GOTPAGEOFF]
	ldr	w5, [x23]
	ldp	w7, w6, [x20, #4]
	ldr	w8, [x20]
	str	w8, [sp]
	add	x0, sp, #40
	mov	x1, x19
	mov	x3, #0
	mov	x4, x21
	fmov	d0, d9
	bl	_cost_agg
	ldur	d0, [x20, #4]
	stur	d0, [sp, #20]
	ldr	w2, [x23]
	ldr	w4, [x20]
	ldr	x8, [x20, #16]
	ldr	w5, [x8]
	ldr	x6, [x22]
	fmov	w3, s0
	add	x0, sp, #16
	movi	d0, #0000000000000000
	fmov	d1, #-1.00000000
	mov	x1, x19
	bl	_cost_sort
	ldr	w3, [x23]
	ldp	w5, w4, [sp, #20]
	ldr	w6, [x20]
	add	x0, sp, #16
	mov	x1, x19
	mov	x2, x21
	fmov	d0, d9
	bl	_cost_group
	ldr	d0, [x19]
	fmov	d1, #1.00000000
	fcmp	d0, d1
	fcsel	d1, d1, d8, lt
	fdiv	d0, d0, d1
	add	x0, sp, #40
	add	x1, sp, #16
	bl	_compare_fractional_path_costs
	lsr	x0, x0, #63
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	add	sp, sp, #160
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.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 %s"

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

	.comm	_enable_hashagg,4,2             ; @enable_hashagg
	.comm	_SizeofMinimalTupleHeader,4,2   ; @SizeofMinimalTupleHeader
	.comm	_work_mem,8,3                   ; @work_mem
	.comm	_AGG_HASHED,4,2                 ; @AGG_HASHED
	.comm	_NIL,4,2                        ; @NIL
	.no_dead_strip	_choose_hashed_setop
.subsections_via_symbols
