	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sort_and_merge_range_set       ## -- Begin function sort_and_merge_range_set
	.p2align	4, 0x90
_sort_and_merge_range_set:              ## @sort_and_merge_range_set
	.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
	movq	8(%rdi), %rdi
	movl	(%r14), %esi
	movq	_range_cmp@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_QSORT
	movl	(%r14), %r8d
	testq	%r8, %r8
	je	LBB0_1
## %bb.2:
	movq	8(%r14), %rcx
	movq	%r8, %r9
	shlq	$4, %r9
	xorl	%esi, %esi
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %edx
	shlq	$4, %rdx
	movq	%rax, (%rcx,%rdx)
	movq	%rdi, 8(%rcx,%rdx)
	incl	%r15d
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$16, %rsi
	cmpq	%rsi, %r9
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi), %rax
	movq	8(%rcx,%rsi), %rdi
	cmpq	%rdi, %rax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%r15), %edx
	shlq	$4, %rdx
	movq	8(%rcx,%rdx), %rbx
	cmpq	%rbx, %rax
	jg	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rdi, %rbx
	jge	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rcx,%rdx), %rax
	addq	$8, %rax
	movq	%rdi, (%rax)
	jmp	LBB0_9
LBB0_1:
	xorl	%r15d, %r15d
LBB0_10:
	xorl	%edi, %edi
	cmpl	%r8d, %r15d
	setbe	%dil
	callq	_assert
	movl	%r15d, (%r14)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_range_set_check_invariants     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_range_cmp,4,2                  ## @range_cmp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sort_and_merge_range_set       ; -- Begin function sort_and_merge_range_set
	.p2align	2
_sort_and_merge_range_set:              ; @sort_and_merge_range_set
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldr	w1, [x19]
Lloh0:
	adrp	x8, _range_cmp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _range_cmp@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_QSORT
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.1:
	mov	w20, #0
	ldr	x9, [x19, #8]
	add	x10, x9, #8
	mov	x11, x8
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x14, x9, w20, uxtw #4
	stp	x13, x12, [x14]
	add	w20, w20, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #16
	subs	x11, x11, #1
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x13, x12, [x10, #-8]
	cmp	x13, x12
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w20, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w14, w20, #1
	add	x14, x9, w14, uxtw #4
	ldr	x15, [x14, #8]!
	cmp	x13, x15
	b.gt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x15, x12
	b.ge	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x12, [x14]
	b	LBB0_3
LBB0_9:
	mov	w20, #0
LBB0_10:
	cmp	w20, w8
	cset	w0, ls
	bl	_assert
	str	w20, [x19]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_range_set_check_invariants
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_range_cmp,4,2                  ; @range_cmp
.subsections_via_symbols
