	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mem_regions                    ## -- Begin function mem_regions
	.p2align	4, 0x90
_mem_regions:                           ## @mem_regions
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_npregions@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
LBB0_19:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.20:
	movq	_pregions@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rcx)
LBB0_21:
	testq	%r15, %r15
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_23
## %bb.22:
	movq	_aregions@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_23:
	testq	%rdx, %rdx
	je	LBB0_25
## %bb.24:
	movq	_npregions@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
LBB0_25:
	testq	%rcx, %rcx
	je	LBB0_27
## %bb.26:
	movq	_naregions@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
LBB0_27:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_plat_obj@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_pregions@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	_aregions@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	_naregions@GOTPCREL(%rip), %r12
	movq	_npregions@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdx
	movq	%r12, %r8
	callq	_PLATFORM_MEM_REGIONS
	movq	(%r15), %rdi
	movl	(%rbx), %esi
	movq	_mr_cmp@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	$8, %edx
	callq	_qsort
	movq	(%r14), %rdi
	movl	(%r12), %esi
	movl	(%rbx), %ecx
	movl	$8, %edx
	callq	_qsort
	movl	(%r12), %edx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	jne	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_10 Depth 3
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %edx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jle	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$8, %r12d
	movl	$2, %ebx
	xorl	%ecx, %ecx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	movslq	%edx, %rax
	addq	$8, %r12
	incl	%ebx
	cmpq	%rax, %rcx
	jge	LBB0_13
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_10 Depth 3
	movq	%rcx, %r15
	movq	(%r14), %rdi
	incq	%rcx
	cmpq	$0, (%rdi,%r15,8)
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movslq	%edx, %rax
	cmpq	%rax, %rcx
	jge	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r13d
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rdi,%r12)
	je	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	leaq	(%rdi,%r15,8), %rsi
	addq	%r12, %rdi
	callq	_memr_overlap
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r14), %rdi
	leaq	(%rdi,%r15,8), %rsi
	addq	%r12, %rdi
	callq	_memr_merge
	movq	(%r14), %rax
	movq	$0, (%rax,%r12)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	_naregions@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%r13d, %edx
	jle	LBB0_11
## %bb.28:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	(%r14), %rdi
	addq	$8, %r12
	incl	%r13d
	cmpq	$0, (%rdi,%r12)
	jne	LBB0_8
	jmp	LBB0_10
LBB0_14:
	testl	%edx, %edx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_19
## %bb.15:
	xorl	%eax, %eax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	incl	%eax
	cmpl	%eax, %edx
	jle	LBB0_19
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rcx
	movslq	%eax, %rbx
	cmpq	$0, (%rcx,%rbx,8)
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	leaq	(%rcx,%rbx,8), %rdi
	leaq	(%rcx,%rbx,8), %rsi
	addq	$8, %rsi
	movl	%ebx, %eax
	notl	%eax
	addl	%eax, %edx
	shll	$3, %edx
	callq	_memcpy
	movq	_naregions@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	decl	%edx
	movl	%edx, (%rax)
	decl	%ebx
	movl	%ebx, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_npregions,4,2                  ## @npregions
	.comm	_plat_obj,4,2                   ## @plat_obj
	.comm	_pregions,8,3                   ## @pregions
	.comm	_aregions,8,3                   ## @aregions
	.comm	_naregions,4,2                  ## @naregions
	.comm	_mr_cmp,4,2                     ## @mr_cmp
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mem_regions                    ; -- Begin function mem_regions
	.p2align	2
_mem_regions:                           ; @mem_regions
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x26, x0
Lloh0:
	adrp	x22, _npregions@GOTPAGE
Lloh1:
	ldr	x22, [x22, _npregions@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_10
LBB0_1:
	cbz	x26, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _pregions@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pregions@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x26]
LBB0_3:
	cbz	x23, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _aregions@GOTPAGE
Lloh6:
	ldr	x8, [x8, _aregions@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_5:
	cbz	x21, LBB0_7
; %bb.6:
	ldr	w8, [x22]
	str	w8, [x21]
LBB0_7:
	cbz	x20, LBB0_9
; %bb.8:
Lloh8:
	adrp	x8, _naregions@GOTPAGE
Lloh9:
	ldr	x8, [x8, _naregions@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	stp	x26, x23, [sp]                  ; 16-byte Folded Spill
	stp	x21, x20, [sp, #16]             ; 16-byte Folded Spill
Lloh11:
	adrp	x8, _plat_obj@GOTPAGE
Lloh12:
	ldr	x8, [x8, _plat_obj@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x19, _pregions@GOTPAGE
Lloh15:
	ldr	x19, [x19, _pregions@GOTPAGEOFF]
	ldr	x1, [x19]
Lloh16:
	adrp	x25, _aregions@GOTPAGE
Lloh17:
	ldr	x25, [x25, _aregions@GOTPAGEOFF]
	ldr	x3, [x25]
Lloh18:
	adrp	x24, _naregions@GOTPAGE
Lloh19:
	ldr	x24, [x24, _naregions@GOTPAGEOFF]
	mov	x2, x22
	mov	x4, x24
	bl	_PLATFORM_MEM_REGIONS
	ldr	x0, [x19]
	ldr	w1, [x22]
Lloh20:
	adrp	x19, _mr_cmp@GOTPAGE
Lloh21:
	ldr	x19, [x19, _mr_cmp@GOTPAGEOFF]
	ldr	w3, [x19]
	mov	w2, #8
	bl	_qsort
	ldr	x0, [x25]
	ldr	w1, [x24]
	ldr	w3, [x19]
	mov	w2, #8
	bl	_qsort
	ldr	w8, [x24]
Lloh22:
	adrp	x27, _TRUE@GOTPAGE
Lloh23:
	ldr	x27, [x27, _TRUE@GOTPAGEOFF]
	mov	x9, x8
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x9
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w10, [x27]
	mov	x9, x0
	cmp	w28, w10
	b.ne	LBB0_23
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
                                        ;       Child Loop BB0_18 Depth 3
Lloh24:
	adrp	x10, _FALSE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _FALSE@GOTPAGEOFF]
Lloh26:
	ldr	w28, [x10]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x20, #0
	mov	w23, #2
	mov	w26, #8
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	add	x26, x26, #8
	add	w23, w23, #1
	mov	x9, x8
	mov	x20, x22
	mov	x0, x8
	cmp	x22, w8, sxtw
	b.ge	LBB0_12
LBB0_16:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_18 Depth 3
	ldr	x10, [x25]
	ldr	x11, [x10, x20, lsl #3]
	add	x22, x20, #1
	sxtw	x9, w9
	cmp	x11, #0
	ccmp	x22, x9, #0, ne
	b.ge	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	mov	x21, x23
	mov	x19, x26
LBB0_18:                                ;   Parent Loop BB0_13 Depth=1
                                        ;     Parent Loop BB0_16 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x0, x10, x19
	ldr	x8, [x0]
	cbz	x8, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=3
	add	x1, x10, x20, lsl #3
	bl	_memr_overlap
	cbz	w0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=3
	ldr	x8, [x25]
	add	x0, x8, x19
	add	x1, x8, x20, lsl #3
	bl	_memr_merge
	ldr	x8, [x25]
	str	xzr, [x8, x19]
	ldr	w28, [x27]
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=3
	ldr	w8, [x24]
	cmp	w8, w21
	b.le	LBB0_15
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=3
	ldr	x10, [x25]
	add	x19, x19, #8
	add	w21, w21, #1
	b	LBB0_18
LBB0_23:
	cmp	w8, #1
	ldp	x21, x20, [sp, #16]             ; 16-byte Folded Reload
Lloh27:
	adrp	x22, _npregions@GOTPAGE
Lloh28:
	ldr	x22, [x22, _npregions@GOTPAGEOFF]
	ldp	x26, x23, [sp]                  ; 16-byte Folded Reload
	b.lt	LBB0_1
; %bb.24:
	mov	w19, #0
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	w19, w19, #1
	cmp	w8, w19
	b.le	LBB0_1
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	add	x0, x9, w19, sxtw #3
	ldr	x10, [x0]
	cbnz	x10, LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	sxtw	x10, w19
	add	x9, x9, x10, lsl #3
	add	x1, x9, #8
	mvn	w9, w19
	add	w8, w8, w9
	lsl	w2, w8, #3
	bl	_memcpy
	ldr	w8, [x24]
	sub	w8, w8, #1
	str	w8, [x24]
	sub	w19, w19, #1
	b	LBB0_25
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_npregions,4,2                  ; @npregions
	.comm	_plat_obj,4,2                   ; @plat_obj
	.comm	_pregions,8,3                   ; @pregions
	.comm	_aregions,8,3                   ; @aregions
	.comm	_naregions,4,2                  ; @naregions
	.comm	_mr_cmp,4,2                     ; @mr_cmp
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
