	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function gather_merge_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_gather_merge_init:                     ## @gather_merge_init
	.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	%rdi, %r15
	movl	(%rdi), %r12d
	movl	32(%rdi), %esi
	movq	_GatherMerge@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_castNode
	xorl	%edi, %edi
	cmpl	(%rax), %r12d
	setle	%dil
	callq	_Assert
	movq	16(%r15), %rax
	movq	$0, (%rax)
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.1:
	movl	$8, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movl	$0, -8(%rax,%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax,%r14)
	movq	16(%r15), %rax
	movq	8(%rax,%rbx,8), %rdi
	incq	%rbx
	callq	_ExecClearTuple
	addq	$24, %r14
	cmpq	%rbx, %r12
	jne	LBB0_2
LBB0_3:
	movl	12(%r15), %edi
	callq	_binaryheap_reset
	leal	1(%r12), %r14d
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	js	LBB0_16
LBB0_5:
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	cmpl	$0, 4(%r15)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_10
## %bb.6:
	movq	16(%r15), %rax
	movq	(%rax), %rdi
	callq	_TupIsNull
	movq	%r15, %rdi
	xorl	%esi, %esi
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_gather_merge_readnext
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	12(%r15), %r12d
	xorl	%edi, %edi
	callq	_Int32GetDatum
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_binaryheap_add_unordered
LBB0_10:
	testl	%ebx, %ebx
	je	LBB0_16
LBB0_11:
	movl	$1, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_12
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	callq	_load_tuple_array
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	addq	$24, %r13
	cmpq	%rbx, %r14
	je	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	24(%r15), %rax
	cmpl	$0, (%rax,%r13)
	jne	LBB0_22
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	16(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_TupIsNull
	movq	%r15, %rdi
	movl	%ebx, %esi
	testq	%rax, %rax
	je	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_gather_merge_readnext
	testq	%rax, %rax
	je	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	12(%r15), %r12d
	movl	%ebx, %edi
	callq	_Int32GetDatum
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_binaryheap_add_unordered
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_9:
	callq	_load_tuple_array
	testl	%ebx, %ebx
	jne	LBB0_11
	.p2align	4, 0x90
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	testl	%r12d, %r12d
	jle	LBB0_24
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	$1, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_18 Depth=2
	incq	%rbx
	cmpq	%r14, %rbx
	je	LBB0_24
LBB0_18:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r15), %rax
	leaq	(%rbx,%rbx,2), %rcx
	cmpl	$0, -24(%rax,%rcx,8)
	jne	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=2
	movq	16(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_TupIsNull
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	testl	%r12d, %r12d
	jns	LBB0_5
	jmp	LBB0_16
LBB0_24:
	movl	12(%r15), %edi
	callq	_binaryheap_build
	movl	$1, 8(%r15)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GatherMerge,4,2                ## @GatherMerge
	.no_dead_strip	_gather_merge_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gather_merge_init
_gather_merge_init:                     ; @gather_merge_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	w23, [x0]
Lloh0:
	adrp	x8, _GatherMerge@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GatherMerge@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #32]
	bl	_castNode
	ldr	w8, [x0]
	cmp	w23, w8
	cset	w0, le
	bl	_Assert
	ldr	x8, [x19, #16]
	str	xzr, [x8]
	cmp	w23, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
	add	x8, x23, x23, lsl #1
	lsl	x21, x8, #3
	mov	w22, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	add	x8, x8, x20
	str	wzr, [x8]
	stp	xzr, xzr, [x8, #8]
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x22]
	bl	_ExecClearTuple
	add	x20, x20, #24
	add	x22, x22, #8
	cmp	x21, x20
	b.ne	LBB0_2
LBB0_3:
	ldr	w0, [x19, #12]
	bl	_binaryheap_reset
	add	w24, w23, #1
	mov	w20, #1
	mov	w25, #24
	tbnz	w23, #31, LBB0_17
LBB0_4:
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_8
; %bb.5:
	ldr	x8, [x19, #16]
	ldr	x0, [x8]
	bl	_TupIsNull
	cbz	x0, LBB0_16
; %bb.6:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_gather_merge_readnext
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w21, [x19, #12]
	mov	w0, #0
	bl	_Int32GetDatum
	mov	x1, x0
	mov	x0, x21
	bl	_binaryheap_add_unordered
LBB0_8:
	cbz	w23, LBB0_17
LBB0_9:
	mov	x26, #0
	mov	w21, #1
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_load_tuple_array
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #1
	add	x26, x26, #24
	cmp	x24, x21
	b.eq	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	bl	_CHECK_FOR_INTERRUPTS
	ldr	x8, [x19, #24]
	ldr	w8, [x8, x26]
	cbnz	w8, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21, lsl #3]
	bl	_TupIsNull
	cbz	x0, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_gather_merge_readnext
	cbz	x0, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w22, [x19, #12]
	mov	x0, x21
	bl	_Int32GetDatum
	mov	x1, x0
	mov	x0, x22
	bl	_binaryheap_add_unordered
	b	LBB0_11
LBB0_16:
	mov	x0, x19
	mov	w1, #0
	bl	_load_tuple_array
	cbnz	w23, LBB0_9
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	cmp	w23, #1
	b.lt	LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	w20, #1
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	add	x20, x20, #1
	cmp	x20, x24
	b.eq	LBB0_23
LBB0_20:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #24]
	madd	x8, x20, x25, x8
	ldur	w8, [x8, #-24]
	cbnz	w8, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x20, lsl #3]
	bl	_TupIsNull
	cbz	x0, LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	w20, #0
	tbz	w23, #31, LBB0_4
	b	LBB0_17
LBB0_23:
	ldr	w0, [x19, #12]
	bl	_binaryheap_build
	mov	w8, #1
	str	w8, [x19, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GatherMerge,4,2                ; @GatherMerge
	.no_dead_strip	_gather_merge_init
.subsections_via_symbols
