	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gather_merge_getnext
_gather_merge_getnext:                  ## @gather_merge_getnext
	.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
	movq	%rdi, %rbx
	cmpl	$0, 12(%rdi)
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	callq	_binaryheap_first
	movl	%eax, %edi
	callq	_DatumGetInt32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_gather_merge_readnext
	movl	8(%rbx), %r15d
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	%r14d, %edi
	callq	_Int32GetDatum
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_binaryheap_replace_first
	jmp	LBB0_5
LBB0_1:
	movq	%rbx, %rdi
	callq	_gather_merge_init
	jmp	LBB0_5
LBB0_4:
	movl	%r15d, %edi
	callq	_binaryheap_remove_first
LBB0_5:
	movl	8(%rbx), %edi
	callq	_binaryheap_empty
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_gather_merge_clear_tuples
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movl	8(%rbx), %edi
	callq	_binaryheap_first
	movl	%eax, %edi
	callq	_DatumGetInt32
	movq	(%rbx), %rcx
	cltq
	movq	(%rcx,%rax,8), %rax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gather_merge_getnext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gather_merge_getnext
_gather_merge_getnext:                  ; @gather_merge_getnext
	.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
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_binaryheap_first
	bl	_DatumGetInt32
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_gather_merge_readnext
	ldr	w21, [x19, #8]
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_Int32GetDatum
	mov	x1, x0
	mov	x0, x21
	bl	_binaryheap_replace_first
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_gather_merge_init
	b	LBB0_5
LBB0_4:
	mov	x0, x21
	bl	_binaryheap_remove_first
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_binaryheap_empty
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_gather_merge_clear_tuples
	mov	x0, #0
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_binaryheap_first
	bl	_DatumGetInt32
	ldr	x8, [x19]
	ldr	x0, [x8, w0, sxtw #3]
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gather_merge_getnext
.subsections_via_symbols
