	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mergeonerun
_mergeonerun:                           ## @mergeonerun
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movl	(%rax,%rcx,4), %r14d
	callq	_beginmerge
	cmpq	$0, 16(%rbx)
	jle	LBB0_8
## %bb.1:
	leaq	-40(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_tuplesort_heap_delete_top
	cmpq	$0, 16(%rbx)
	jle	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%rbx), %rdx
	movl	(%rdx), %r12d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_WRITETUP
	movq	48(%rbx), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_RELEASE_SLAB_SLOT
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_mergereadnext
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, -40(%rbp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_tuplesort_heap_replace_top
	cmpq	$0, 16(%rbx)
	jg	LBB0_2
LBB0_8:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_markrunend
	movq	8(%rbx), %rax
	movq	40(%rbx), %rcx
	incl	(%rcx,%rax,4)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG,4,2                        ## @LOG
	.comm	_trace_sort,8,3                 ## @trace_sort
	.no_dead_strip	_mergeonerun
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mergeonerun
_mergeonerun:                           ; @mergeonerun
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldp	x8, x9, [x0]
	ldr	w20, [x8, x9, lsl #2]
	bl	_beginmerge
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.ge	LBB0_4
LBB0_1:
	mov	x0, x19
	mov	x1, x20
	bl	_markrunend
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #8]
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	add	w10, w10, #1
	str	w10, [x8, x9]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_tuplesort_heap_delete_top
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	cmp	x8, #0
	b.le	LBB0_1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x19, #48]
	ldr	w21, [x2]
	mov	x0, x19
	mov	x1, x20
	bl	_WRITETUP
	ldr	x8, [x19, #48]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_RELEASE_SLAB_SLOT
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_mergereadnext
	cbz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w21, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_tuplesort_heap_replace_top
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG,4,2                        ; @LOG
	.comm	_trace_sort,8,3                 ; @trace_sort
	.no_dead_strip	_mergeonerun
.subsections_via_symbols
