	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dumptuples
_dumptuples:                            ## @dumptuples
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	(%rdi), %eax
	cmpl	4(%rdi), %eax
	jge	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_LACKMEM
	orl	%r14d, %eax
	je	LBB0_8
LBB0_2:
	movq	8(%r12), %rax
	movq	_TSS_BUILDRUNS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	16(%r12), %rax
	movq	_INT_MAX@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	16(%r12), %rax
LBB0_4:
	incq	%rax
	movq	%rax, 16(%r12)
	movq	%r12, %rdi
	callq	_tuplesort_sort_memtuples
	movl	(%r12), %r15d
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.5:
	shlq	$2, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	movq	56(%r12), %rcx
	movl	(%rcx,%rax,4), %esi
	movq	72(%r12), %rdx
	addq	%rbx, %rdx
	movq	%r12, %rdi
	callq	_WRITETUP
	decl	(%r12)
	addq	$4, %rbx
	cmpq	%rbx, %r15
	jne	LBB0_6
LBB0_7:
	movl	64(%r12), %edi
	callq	_MemoryContextReset
	movq	24(%r12), %rax
	movq	56(%r12), %rcx
	movl	(%rcx,%rax,4), %esi
	movq	%r12, %rdi
	callq	_markrunend
	movq	24(%r12), %rax
	movq	48(%r12), %rcx
	incl	(%rcx,%rax,4)
	movq	40(%r12), %rcx
	decl	(%rcx,%rax,4)
	testl	%r14d, %r14d
	je	LBB0_9
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_selectnewtape                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TSS_BUILDRUNS,8,3              ## @TSS_BUILDRUNS
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot have more than %d runs for an external sort"

	.comm	_LOG,4,2                        ## @LOG
	.comm	_trace_sort,8,3                 ## @trace_sort
	.no_dead_strip	_dumptuples
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dumptuples
_dumptuples:                            ; @dumptuples
	.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	x20, x1
	mov	x19, x0
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.ge	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_LACKMEM
	orr	w8, w0, w20
	cbz	w8, LBB0_8
LBB0_2:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _TSS_BUILDRUNS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TSS_BUILDRUNS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x22, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x22, [x22, _INT_MAX@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
Lloh8:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_errcode
	ldr	x1, [x22]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
	ldr	x8, [x19, #16]
LBB0_4:
	add	x8, x8, #1
	str	x8, [x19, #16]
	mov	x0, x19
	bl	_tuplesort_sort_memtuples
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
	lsl	x22, x8, #2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #56]
	ldr	x9, [x19, #24]
	ldr	w1, [x8, x9, lsl #2]
	ldr	x8, [x19, #72]
	add	x2, x8, x21
	mov	x0, x19
	bl	_WRITETUP
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	add	x21, x21, #4
	cmp	x22, x21
	b.ne	LBB0_6
LBB0_7:
	ldr	w0, [x19, #64]
	bl	_MemoryContextReset
	ldr	x8, [x19, #56]
	ldr	x9, [x19, #24]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_markrunend
	ldr	x8, [x19, #24]
	lsl	x8, x8, #2
	ldp	x10, x9, [x19, #40]
	ldr	w11, [x9, x8]
	add	w11, w11, #1
	str	w11, [x9, x8]
	ldr	w9, [x10, x8]
	sub	w9, w9, #1
	str	w9, [x10, x8]
	cbz	w20, LBB0_9
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
LBB0_9:
	mov	x0, x19
	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	_selectnewtape
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TSS_BUILDRUNS,8,3              ; @TSS_BUILDRUNS
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot have more than %d runs for an external sort"

	.comm	_LOG,4,2                        ; @LOG
	.comm	_trace_sort,8,3                 ; @trace_sort
	.no_dead_strip	_dumptuples
.subsections_via_symbols
