	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sort_reserve_entries
_sort_reserve_entries:                  ## @sort_reserve_entries
	.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), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rdi, %r14
	movq	$-1, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rax
	incq	%rbx
	addl	$8, %edi
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	callq	_xmalloc
	movq	%rax, %r15
	movq	(%r14), %rax
	leaq	1(%rbx), %rsi
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r15, %rcx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, (%rcx)
	movq	(%rax), %rax
	addq	$8, %rcx
	testq	%rax, %rax
	jne	LBB0_5
LBB0_6:
	movq	_cmp_reserve_info@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$8, %edx
	callq	_qsort
	movq	(%r15), %rax
	movq	%rax, (%r14)
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.7:
	leaq	-1(%rbx), %rax
	cmpq	$3, %rax
	jae	LBB0_9
## %bb.8:
	xorl	%edx, %edx
	jmp	LBB0_11
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%ebx, %eax
	andl	$2147483644, %eax               ## imm = 0x7FFFFFFC
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15,%rcx,8), %rdx
	movq	8(%r15,%rcx,8), %rsi
	movq	%rsi, (%rdx)
	movq	8(%r15,%rcx,8), %rdx
	movq	16(%r15,%rcx,8), %rsi
	movq	%rsi, (%rdx)
	movq	16(%r15,%rcx,8), %rdx
	movq	24(%r15,%rcx,8), %rsi
	movq	%rsi, (%rdx)
	leaq	4(%rcx), %rdx
	movq	24(%r15,%rcx,8), %rsi
	movq	32(%r15,%rcx,8), %rcx
	movq	%rcx, (%rsi)
	movq	%rdx, %rcx
	cmpq	%rdx, %rax
	jne	LBB0_10
LBB0_11:
	testb	$3, %bl
	je	LBB0_14
## %bb.12:
	leaq	(%r15,%rdx,8), %rax
	addq	$8, %rax
	movl	%ebx, %ecx
	andl	$3, %ecx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%rax,%rdx,8), %rsi
	movq	(%rax,%rdx,8), %rdi
	movq	%rdi, (%rsi)
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_13
LBB0_14:
	movq	(%r15,%rbx,8), %rax
	movq	$0, (%rax)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cmp_reserve_info,4,2           ## @cmp_reserve_info
	.no_dead_strip	_sort_reserve_entries
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sort_reserve_entries
_sort_reserve_entries:                  ; @sort_reserve_entries
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_10
; %bb.1:
	mov	x19, x0
	mov	w0, #0
	mov	x21, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8]
	add	x21, x21, #1
	add	w0, w0, #8
	cbnz	x8, LBB0_2
; %bb.3:
	bl	_xmalloc
	mov	x20, x0
	ldr	x8, [x19]
	add	x1, x21, #1
	cbz	x8, LBB0_6
; %bb.4:
	mov	x9, x20
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	x8, [x9], #8
	ldr	x8, [x8]
	cbnz	x8, LBB0_5
LBB0_6:
Lloh0:
	adrp	x8, _cmp_reserve_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cmp_reserve_info@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w2, #8
	bl	_qsort
	ldr	x8, [x20]
	str	x8, [x19]
	cbz	w21, LBB0_9
; %bb.7:
	add	x8, x20, #8
	mov	x9, x21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x11, x10, [x8, #-8]
	str	x10, [x11]
	add	x8, x8, #8
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	x8, [x20, x21, lsl #3]
	str	xzr, [x8]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_free
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_cmp_reserve_info,4,2           ; @cmp_reserve_info
	.no_dead_strip	_sort_reserve_entries
.subsections_via_symbols
