	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function beginmerge
_beginmerge:                            ## @beginmerge
	.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, %r14
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	sete	%dil
	callq	_Assert
	movq	8(%r14), %rdi
	movl	16(%r14), %edx
	shll	$2, %edx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_memset
	movl	20(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%r14), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rbx,8)
	setg	%dil
	callq	_Assert
	movq	32(%r14), %rax
	decq	(%rax,%rbx,8)
	movq	8(%r14), %rax
	movq	40(%r14), %rcx
	movslq	(%rcx,%rbx,4), %rcx
	movl	$1, (%rax,%rcx,4)
	incl	%r15d
	movl	20(%r14), %eax
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rcx
	movq	(%rcx,%rbx,8), %rdx
	testq	%rdx, %rdx
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	decq	%rdx
	movq	%rdx, (%rcx,%rbx,8)
	jmp	LBB0_5
LBB0_6:
	xorl	%edi, %edi
	testl	%r15d, %r15d
	setg	%dil
	callq	_Assert
	movl	%r15d, 48(%r14)
	cmpl	$0, 16(%r14)
	jle	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	leaq	-32(%rbp), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	cmpl	16(%r14), %ebx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_mergereadnext
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, -32(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_tuplesort_heap_insert
	jmp	LBB0_10
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_beginmerge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function beginmerge
_beginmerge:                            ; @beginmerge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
	ldr	x0, [x19, #8]
	ldr	w8, [x19, #16]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
	ldr	w8, [x19, #20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x21, #0
	mov	w20, #0
	mov	w22, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #32]
	lsl	x23, x21, #3
	ldr	x8, [x8, x23]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
	ldp	x8, x9, [x19, #32]
	ldr	x10, [x8, x23]
	sub	x10, x10, #1
	str	x10, [x8, x23]
	ldrsw	x8, [x9, x21, lsl #2]
	ldr	x9, [x19, #8]
	str	w22, [x9, x8, lsl #2]
	add	w20, w20, #1
	ldr	w8, [x19, #20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	ldr	x10, [x9, x21, lsl #3]
	subs	x10, x10, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x10, [x9, x21, lsl #3]
	b	LBB0_3
LBB0_6:
	mov	w20, #0
LBB0_7:
	cmp	w20, #0
	cset	w0, gt
	bl	_Assert
	str	w20, [x19, #48]
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.8:
	mov	w20, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19, #16]
	cmp	w20, w8
	b.ge	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_mergereadnext
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	str	w20, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_tuplesort_heap_insert
	b	LBB0_9
LBB0_12:
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_beginmerge
.subsections_via_symbols
