	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_agg_arguments
_check_agg_arguments:                   ## @check_agg_arguments
	.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	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)
	movq	$-1, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	_check_agg_arguments_walker@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-64(%rbp), %r14
	movq	%rdx, %rdi
	movq	%r14, %rdx
	callq	_expression_tree_walker
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_expression_tree_walker
	movl	-64(%rbp), %ebx
	movl	-60(%rbp), %r14d
	testl	%ebx, %ebx
	js	LBB0_1
## %bb.2:
	testl	%r14d, %r14d
	js	LBB0_4
## %bb.3:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_Min
	movl	%eax, %ebx
	movl	-60(%rbp), %r14d
LBB0_4:
	cmpl	%r14d, %ebx
	je	LBB0_5
LBB0_8:
	testq	%r15, %r15
	jne	LBB0_9
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	cmovgl	%r14d, %ebx
	cmpl	%r14d, %ebx
	jne	LBB0_8
LBB0_5:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_locate_agg_of_level
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_locate_agg_of_level
	movl	%eax, %r13d
LBB0_7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_GROUPING_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_parser_errposition
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	testq	%r15, %r15
	je	LBB0_15
LBB0_9:
	movq	$-1, -64(%rbp)
	movq	_check_agg_arguments_walker@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_expression_tree_walker
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_12
## %bb.10:
	cmpl	%ebx, %eax
	jge	LBB0_12
## %bb.11:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_GROUPING_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	callq	_errmsg
	movl	-64(%rbp), %esi
	movq	%r15, %rdi
	callq	_locate_var_of_level
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_parser_errposition
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_12:
	movl	-60(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_15
## %bb.13:
	cmpl	%ebx, %eax
	jg	LBB0_15
## %bb.14:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_GROUPING_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	-60(%rbp), %esi
	movq	%r15, %rdi
	callq	_locate_agg_of_level
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_parser_errposition
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_check_agg_arguments_walker,4,2 ## @check_agg_arguments_walker
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_GROUPING_ERROR,4,2     ## @ERRCODE_GROUPING_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aggregate function calls cannot be nested"

L_.str.1:                               ## @.str.1
	.asciz	"outer-level aggregate cannot contain a lower-level variable in its direct arguments"

	.no_dead_strip	_check_agg_arguments
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_agg_arguments
_check_agg_arguments:                   ; @check_agg_arguments
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [sp, #8]
	stp	xzr, x0, [sp, #16]
Lloh0:
	adrp	x27, _check_agg_arguments_walker@GOTPAGE
Lloh1:
	ldr	x27, [x27, _check_agg_arguments_walker@GOTPAGEOFF]
	ldr	w1, [x27]
	add	x2, sp, #8
	mov	x0, x23
	bl	_expression_tree_walker
	ldr	w1, [x27]
	add	x2, sp, #8
	mov	x0, x22
	bl	_expression_tree_walker
	ldp	w21, w24, [sp, #8]
	tbnz	w21, #31, LBB0_3
; %bb.1:
	tbnz	w24, #31, LBB0_4
; %bb.2:
	mov	x0, x21
	mov	x1, x24
	bl	_Min
	mov	x21, x0
	ldr	w24, [sp, #12]
	b	LBB0_4
LBB0_3:
	cmp	w24, #0
	csel	w21, w24, wzr, gt
LBB0_4:
Lloh2:
	adrp	x25, _ERROR@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ERROR@GOTPAGEOFF]
Lloh4:
	adrp	x26, _ERRCODE_GROUPING_ERROR@GOTPAGE
Lloh5:
	ldr	x26, [x26, _ERRCODE_GROUPING_ERROR@GOTPAGEOFF]
	cmp	w21, w24
	b.ne	LBB0_8
; %bb.5:
	mov	x0, x23
	mov	x1, x24
	bl	_locate_agg_of_level
	mov	x23, x0
	tbz	w0, #31, LBB0_7
; %bb.6:
	mov	x0, x22
	mov	x1, x24
	bl	_locate_agg_of_level
	mov	x23, x0
LBB0_7:
	ldr	w22, [x25]
	ldr	w0, [x26]
	bl	_errcode
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x0, x19
	mov	x1, x23
	bl	_parser_errposition
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_8:
	cbz	x20, LBB0_15
; %bb.9:
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [sp, #8]
	ldr	w1, [x27]
	add	x2, sp, #8
	mov	x0, x20
	bl	_expression_tree_walker
	ldr	w8, [sp, #8]
	tbnz	w8, #31, LBB0_12
; %bb.10:
	cmp	w8, w21
	b.ge	LBB0_12
; %bb.11:
	ldr	w22, [x25]
	ldr	w0, [x26]
	bl	_errcode
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	ldr	w1, [sp, #8]
	mov	x0, x20
	bl	_locate_var_of_level
	mov	x1, x0
	mov	x0, x19
	bl	_parser_errposition
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_12:
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_15
; %bb.13:
	cmp	w8, w21
	b.gt	LBB0_15
; %bb.14:
	ldr	w22, [x25]
	ldr	w0, [x26]
	bl	_errcode
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_locate_agg_of_level
	mov	x1, x0
	mov	x0, x19
	bl	_parser_errposition
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_15:
	mov	x0, x21
	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
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_check_agg_arguments_walker,4,2 ; @check_agg_arguments_walker
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_GROUPING_ERROR,4,2     ; @ERRCODE_GROUPING_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aggregate function calls cannot be nested"

l_.str.1:                               ; @.str.1
	.asciz	"outer-level aggregate cannot contain a lower-level variable in its direct arguments"

	.no_dead_strip	_check_agg_arguments
.subsections_via_symbols
