	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function memrange_sortmerge
_memrange_sortmerge:                    ## @memrange_sortmerge
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	movl	(%r14), %esi
	movq	_memrange_cmp@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %edx
	callq	_qsort
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.1:
	xorl	%r15d, %r15d
	cmpl	$1, %eax
	jne	LBB0_2
LBB0_10:
	incl	%r15d
	movl	%r15d, (%r14)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%r15d, %r15d
	movl	$1, %r12d
	movl	$24, %ebx
	movq	_MAX_REGISTER_SIZE@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	addq	$24, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rsi
	movslq	%r15d, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rsi,%rcx,8), %rdx
	cmpq	(%rsi,%rbx), %rdx
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rsi,%rbx), %rdi
	movq	16(%rsi,%rcx,8), %rdx
	subq	%rdx, %rdi
	cmpq	(%r13), %rdi
	jle	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r15d
	cmpq	%r15, %r12
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %rax
	leaq	(%rsi,%rax,8), %rdi
	addq	%rbx, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	(%r14), %eax
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rsi,%rbx), %rdi
	cmpq	%rdx, %rdi
	jle	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rsi,%rcx,8), %rcx
	addq	$16, %rcx
	movq	%rdi, (%rcx)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_memrange_cmp,4,2               ## @memrange_cmp
	.comm	_MAX_REGISTER_SIZE,8,3          ## @MAX_REGISTER_SIZE
	.no_dead_strip	_memrange_sortmerge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function memrange_sortmerge
_memrange_sortmerge:                    ; @memrange_sortmerge
	.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, x0
	ldr	x0, [x0, #8]
	ldr	w1, [x19]
Lloh0:
	adrp	x8, _memrange_cmp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _memrange_cmp@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	w2, #4
	bl	_qsort
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	b.ne	LBB0_5
; %bb.2:
	mov	w20, #0
LBB0_3:
	add	w8, w20, #1
	str	w8, [x19]
LBB0_4:
	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
LBB0_5:
	mov	x21, #0
	mov	w20, #0
	mov	w22, #1
	mov	w23, #24
Lloh3:
	adrp	x24, _MAX_REGISTER_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MAX_REGISTER_SIZE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	add	x21, x21, #24
	cmp	x22, w8, sxtw
	b.ge	LBB0_3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	mov	x10, x20
	sxtw	x10, w10
	smull	x11, w20, w23
	ldr	x12, [x9, x11]
	add	x11, x9, x21
	ldr	x13, [x11, #24]
	cmp	x12, x13
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x13, [x11, #32]
	madd	x11, x10, x23, x9
	ldr	x12, [x11, #16]!
	ldr	x14, [x24]
	sub	x13, x13, x12
	cmp	x13, x14
	b.le	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x20, x10, #1
	cmp	x22, w20, uxtw
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	madd	x0, x20, x23, x9
	add	x8, x9, x21
	add	x1, x8, #24
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x19]
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x9, x9, x21
	ldr	x9, [x9, #40]
	cmp	x9, x12
	b.le	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	str	x9, [x11]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_memrange_cmp,4,2               ; @memrange_cmp
	.comm	_MAX_REGISTER_SIZE,8,3          ; @MAX_REGISTER_SIZE
	.no_dead_strip	_memrange_sortmerge
.subsections_via_symbols
