	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_grouptailpos
_update_grouptailpos:                   ## @update_grouptailpos
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	40(%rdi), %r15
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, %r14d
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.3:
	movl	4(%rbx), %eax
	xorl	%edi, %edi
	cmpl	12(%rbx), %eax
	setle	%dil
	callq	_Assert
	movl	48(%rbx), %edi
	movl	52(%rbx), %esi
	callq	_tuplestore_select_read_pointer
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	4(%rbx), %esi
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%esi
	movl	%esi, 4(%rbx)
	movq	%rbx, %rdi
	callq	_spool_tuples
	movl	16(%rbx), %ecx
	movl	48(%rbx), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_tuplestore_gettupleslot
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	4(%rbx), %esi
	cmpl	12(%rbx), %esi
	jle	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%rbx), %esi
	movl	24(%rbx), %edx
	movq	%rbx, %rdi
	callq	_are_peers
	testl	%eax, %eax
	jne	LBB0_4
LBB0_8:
	movl	16(%rbx), %edi
	callq	_ExecClearTuple
	jmp	LBB0_9
LBB0_2:
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_spool_tuples
	movl	8(%rbx), %eax
	movl	%eax, 4(%rbx)
LBB0_9:
	movl	$1, (%rbx)
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MemoryContextSwitchTo          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_update_grouptailpos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_grouptailpos
_update_grouptailpos:                   ; @update_grouptailpos
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	ldp	x8, x21, [x0, #32]
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	mov	x20, x0
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.3:
	ldr	w8, [x19, #4]
	ldr	w9, [x19, #12]
	cmp	w8, w9
	cset	w0, le
	bl	_Assert
	ldp	w0, w1, [x19, #48]
	bl	_tuplestore_select_read_pointer
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w8, [x19, #4]
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w1, w8, #1
	str	w1, [x19, #4]
	mov	x0, x19
	bl	_spool_tuples
	ldr	w0, [x19, #48]
	ldr	w3, [x19, #16]
	mov	w1, #1
	mov	w2, #1
	bl	_tuplestore_gettupleslot
	cbz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x19, #4]
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.le	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x19, #16]
	ldr	w2, [x19, #24]
	mov	x0, x19
	bl	_are_peers
	cbnz	w0, LBB0_4
LBB0_8:
	ldr	w0, [x19, #16]
	bl	_ExecClearTuple
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	mov	w1, #-1
	bl	_spool_tuples
	ldr	w8, [x19, #8]
	str	w8, [x19, #4]
LBB0_10:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_MemoryContextSwitchTo
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_update_grouptailpos
.subsections_via_symbols
