	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gather_merge_readnext
_gather_merge_readnext:                 ## @gather_merge_readnext
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_1
## %bb.9:
	movl	%esi, %ebx
	movq	16(%r14), %rax
	movslq	%esi, %r13
	leaq	-1(%r13), %rcx
	shlq	$5, %rcx
	movq	8(%rax,%rcx), %rsi
	cmpq	%rsi, (%rax,%rcx)
	jle	LBB0_11
## %bb.10:
	leaq	(%rax,%rcx), %rdx
	addq	$8, %rdx
	movq	24(%rax,%rcx), %rax
	leaq	1(%rsi), %rcx
	movq	%rcx, (%rdx)
	movl	(%rax,%rsi,4), %r12d
	jmp	LBB0_14
LBB0_1:
	cmpl	$0, (%r14)
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	callq	_outerPlanState
	movq	24(%r14), %rcx
	movq	32(%r14), %rbx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.5:
	movq	(%rcx), %rcx
	jmp	LBB0_6
LBB0_11:
	xorl	%r15d, %r15d
	cmpq	$0, 16(%rax,%rcx)
	jne	LBB0_15
## %bb.12:
	addq	%rax, %rcx
	addq	$16, %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_gm_readnext_tuple
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_HeapTupleIsValid
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_load_tuple_array
LBB0_14:
	movl	%r12d, %edi
	callq	_HeapTupleIsValid
	movl	%eax, %edi
	callq	_Assert
	movq	8(%r14), %rax
	movq	(%rax,%r13,8), %rsi
	movl	$1, %r15d
	movl	%r12d, %edi
	movl	$1, %edx
	callq	_ExecStoreHeapTuple
	jmp	LBB0_15
LBB0_2:
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_4:
	xorl	%ecx, %ecx
LBB0_6:
	movq	%rcx, (%rbx)
	movq	%rax, %rdi
	callq	_ExecProcNode
	movq	%rax, %r15
	movq	$0, (%rbx)
	movq	%rax, %rdi
	callq	_TupIsNull
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	$0, (%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_7:
	movq	8(%r14), %rax
	movq	%r15, (%rax)
	movl	$1, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gather_merge_readnext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gather_merge_readnext
_gather_merge_readnext:                 ; @gather_merge_readnext
	.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
	mov	x19, x0
	cbz	w1, LBB0_4
; %bb.1:
	mov	x20, x1
	ldr	x8, [x19, #16]
	sxtw	x22, w20
	sub	x9, x22, #1
	lsl	x11, x9, #5
	add	x10, x8, x11
	ldr	x12, [x8, x11]
	ldr	x11, [x10, #8]!
	cmp	x12, x11
	b.le	LBB0_9
; %bb.2:
	add	x8, x8, x9, lsl #5
	ldr	x8, [x8, #24]
	add	x9, x11, #1
	str	x9, [x10]
	ldr	w21, [x8, x11, lsl #2]
LBB0_3:
	mov	x0, x21
	bl	_HeapTupleIsValid
	bl	_Assert
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x22, lsl #3]
	mov	w20, #1
	mov	x0, x21
	mov	w2, #1
	bl	_ExecStoreHeapTuple
	b	LBB0_11
LBB0_4:
	ldr	w8, [x19]
	cbz	w8, LBB0_10
; %bb.5:
	mov	x0, x19
	bl	_outerPlanState
	ldp	x8, x21, [x19, #24]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x8, [x8]
LBB0_7:
	str	x8, [x21]
	bl	_ExecProcNode
	mov	x20, x0
	str	xzr, [x21]
	bl	_TupIsNull
	cbz	w0, LBB0_14
; %bb.8:
	mov	w20, #0
	str	wzr, [x19]
	b	LBB0_11
LBB0_9:
	add	x3, x8, x9, lsl #5
	ldr	x8, [x3, #16]!
	cbz	x8, LBB0_12
LBB0_10:
	mov	w20, #0
LBB0_11:
	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
	ret
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_gm_readnext_tuple
	mov	x21, x0
	bl	_HeapTupleIsValid
	cbz	w0, LBB0_10
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_load_tuple_array
	b	LBB0_3
LBB0_14:
	ldr	x8, [x19, #8]
	str	x20, [x8]
	mov	w20, #1
	b	LBB0_11
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gather_merge_readnext
.subsections_via_symbols
