	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hypothetical_rank_common
_hypothetical_rank_common:              ## @hypothetical_rank_common
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movl	%edi, %r12d
	xorl	%eax, %eax
	callq	_PG_NARGS
	movl	%eax, %ebx
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_AggCheckCallContext
	movq	_AGG_CONTEXT_AGGREGATE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	xorl	%edi, %edi
	callq	_PG_ARGISNULL
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	$0, (%r15)
	movl	$1, %ebx
	jmp	LBB0_15
LBB0_2:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leal	-1(%rbx), %r13d
	xorl	%edi, %edi
	callq	_PG_GETARG_POINTER
	movq	%rax, %r14
	movl	(%rax), %eax
	movl	%eax, (%r15)
	testb	$1, %r13b
	je	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_4:
	movl	%r13d, %r15d
	shrl	$31, %r15d
	addl	%r13d, %r15d
	sarl	%r15d
	movq	16(%r14), %rax
	movl	8(%rax), %edx
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_hypothetical_check_argtypes
	xorl	%edi, %edi
	cmpl	$0, 4(%r14)
	sete	%dil
	callq	_Assert
	movq	16(%r14), %rax
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_ExecClearTuple
	cmpl	$3, -48(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_5
## %bb.6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	cmpl	$2, %r15d
	movl	$1, %r13d
	cmovgel	%r15d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%rbx), %r14
	movl	%r14d, %edi
	callq	_PG_GETARG_DATUM
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	%r14d, %edi
	callq	_PG_ARGISNULL
	movq	(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	%r14, %rbx
	cmpq	%r14, %r13
	jne	LBB0_7
## %bb.8:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_5:
	xorl	%r13d, %r13d
LBB0_9:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_Int32GetDatum
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%r13,4)
	movq	(%r12), %rax
	movl	$0, (%rax,%r13,4)
	movq	%r12, %rdi
	callq	_ExecStoreVirtualTuple
	movl	8(%r14), %edi
	movq	%r12, %rsi
	callq	_tuplesort_puttupleslot
	movl	8(%r14), %edi
	callq	_tuplesort_performsort
	movl	$1, 4(%r14)
	movl	8(%r14), %edi
	movl	$1, %ebx
	movl	$1, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_tuplesort_gettupleslot
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	incl	%r15d
	movl	$1, %ebx
	leaq	-56(%rbp), %r13
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	incl	%ebx
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movl	8(%r14), %edi
	movl	$1, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_tuplesort_gettupleslot
	testq	%rax, %rax
	je	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_slot_getattr
	cmpl	$0, -56(%rbp)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %edi
	callq	_DatumGetInt32
	testq	%rax, %rax
	je	LBB0_13
LBB0_14:
	movq	%r12, %rdi
	callq	_ExecClearTuple
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AGG_CONTEXT_AGGREGATE,8,3      ## @AGG_CONTEXT_AGGREGATE
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrong number of arguments in hypothetical-set function"

	.no_dead_strip	_hypothetical_rank_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hypothetical_rank_common
_hypothetical_rank_common:              ; @hypothetical_rank_common
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	bl	_PG_NARGS
	mov	x23, x0
	mov	x0, x20
	mov	x1, #0
	bl	_AggCheckCallContext
Lloh0:
	adrp	x8, _AGG_CONTEXT_AGGREGATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AGG_CONTEXT_AGGREGATE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_Assert
	mov	w0, #0
	bl	_PG_ARGISNULL
	cbz	w0, LBB0_2
; %bb.1:
	str	wzr, [x22]
	mov	w21, #1
	b	LBB0_14
LBB0_2:
	sub	w24, w23, #1
	bl	_PG_GETARG_POINTER
	mov	x19, x0
	ldr	w8, [x0]
	str	w8, [x22]
	tbz	w24, #0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_4:
	cmp	w24, #0
	cinc	w8, w24, lt
	asr	w22, w8, #1
	ldr	x8, [x19, #16]
	ldr	w2, [x8, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_hypothetical_check_argtypes
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x19, #16]
	ldr	x20, [x8]
	mov	x0, x20
	bl	_ExecClearTuple
	cmp	w23, #3
	b.lt	LBB0_7
; %bb.5:
	mov	x25, #0
	cmp	w22, #1
	csinc	w24, w22, wzr, gt
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x25, #1
	mov	x0, x23
	bl	_PG_GETARG_DATUM
	ldr	x8, [x20, #8]
	lsl	x25, x25, #2
	str	w0, [x8, x25]
	mov	x0, x23
	bl	_PG_ARGISNULL
	ldr	x8, [x20]
	str	w0, [x8, x25]
	mov	x25, x23
	cmp	x24, x23
	b.ne	LBB0_6
	b	LBB0_8
LBB0_7:
	mov	x24, #0
LBB0_8:
	mov	x0, x21
	bl	_Int32GetDatum
	lsl	x8, x24, #2
	ldp	x10, x9, [x20]
	str	w0, [x9, x8]
	str	wzr, [x10, x8]
	mov	x0, x20
	bl	_ExecStoreVirtualTuple
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_tuplesort_puttupleslot
	ldr	w0, [x19, #8]
	bl	_tuplesort_performsort
	mov	w21, #1
	str	w21, [x19, #4]
	ldr	w0, [x19, #8]
	mov	w1, #1
	mov	w2, #1
	mov	x3, x20
	mov	x4, #0
	bl	_tuplesort_gettupleslot
	cbz	x0, LBB0_13
; %bb.9:
	add	w22, w22, #1
	mov	w21, #1
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w21, w21, #1
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w0, [x19, #8]
	mov	w1, #1
	mov	w2, #1
	mov	x3, x20
	mov	x4, #0
	bl	_tuplesort_gettupleslot
	cbz	x0, LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x22
	bl	_slot_getattr
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	bl	_DatumGetInt32
	cbz	x0, LBB0_10
LBB0_13:
	mov	x0, x20
	bl	_ExecClearTuple
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AGG_CONTEXT_AGGREGATE,8,3      ; @AGG_CONTEXT_AGGREGATE
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrong number of arguments in hypothetical-set function"

	.no_dead_strip	_hypothetical_rank_common
.subsections_via_symbols
