	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tree_merge_arr                 ## -- Begin function tree_merge_arr
	.p2align	4, 0x90
_tree_merge_arr:                        ## @tree_merge_arr
	.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	%r8, %r14
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, %r12
	movl	$0, (%rsp)
	callq	_tree_merge_array
	movl	%eax, %ebx
	cmpl	$0, (%r14)
	je	LBB0_4
## %bb.1:
	movl	%r13d, %eax
	movslq	%ebx, %r13
	cltq
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	cmpq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	setl	%dil
	callq	_assert
	movq	(%r15), %rax
	movl	(%rax), %ecx
	movslq	%ebx, %rbx
	movl	%ecx, (%r12,%rbx,4)
	movl	4(%rax), %ecx
	leal	1(%rbx), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%r12,%rdx,4)
	addq	$8, %rax
	incq	%r13
	addl	$2, %ebx
	decl	(%r14)
	movq	%rax, (%r15)
	jne	LBB0_2
## %bb.3:
	movl	%r13d, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tree_merge_arr                 ; -- Begin function tree_merge_arr
	.p2align	2
_tree_merge_arr:                        ; @tree_merge_arr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	w6, #0
	bl	_tree_merge_array
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.1:
	sxtw	x23, w0
	sxtw	x22, w22
	lsl	w24, w0, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x23, x22
	cset	w0, lt
	bl	_assert
	ldr	x8, [x20]
	ldr	w9, [x8]
	str	w9, [x21, w24, sxtw #2]
	ldr	w9, [x8, #4]
	add	w10, w24, #1
	str	w9, [x21, w10, sxtw #2]
	ldr	w9, [x19]
	add	x8, x8, #8
	str	x8, [x20]
	add	x23, x23, #1
	add	w24, w24, #2
	subs	w8, w9, #1
	str	w8, [x19]
	b.ne	LBB0_2
; %bb.3:
	mov	x0, x23
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
