	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sortouts
_sortouts:                              ## @sortouts
	.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
	movl	(%rsi), %r14d
	cmpl	$2, %r14d
	jge	LBB0_1
## %bb.13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rsi, %r15
	leal	(,%r14,8), %edi
	callq	_MALLOC
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	%rax, %rbx
	movq	8(%r15), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, (%rbx,%rax,8)
	incq	%rax
	movq	8(%rcx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_3
LBB0_5:
	xorl	%edi, %edi
	cmpl	%r14d, %eax
	sete	%dil
	callq	_assert
	movq	_sortouts_cmp@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$8, %edx
	callq	_qsort
	movq	(%rbx), %rax
	movq	%rax, 8(%r15)
	movq	8(%rbx), %rcx
	movq	%rcx, 8(%rax)
	movq	$0, (%rax)
	movl	$1, %eax
	cmpl	$3, %r14d
	jl	LBB0_12
## %bb.6:
	decl	%r14d
	movl	%r14d, %r8d
	decq	%r8
	movl	$1, %ecx
	cmpl	$2, %r14d
	je	LBB0_9
## %bb.7:
	movq	%r8, %rdx
	andq	$-2, %rdx
	negq	%rdx
	movl	$1, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%rsi,8), %rcx
	movq	8(%rbx,%rsi,8), %rdi
	movq	%rdi, 8(%rcx)
	movq	-8(%rbx,%rsi,8), %rdi
	movq	%rdi, (%rcx)
	leaq	2(%rsi), %rcx
	movq	8(%rbx,%rsi,8), %rdi
	movq	16(%rbx,%rsi,8), %rax
	movq	%rax, 8(%rdi)
	movq	(%rbx,%rsi,8), %rax
	movq	%rax, (%rdi)
	leaq	(%rdx,%rsi), %rax
	addq	$2, %rax
	movq	%rcx, %rsi
	cmpq	$1, %rax
	jne	LBB0_8
LBB0_9:
	testb	$1, %r8b
	je	LBB0_11
## %bb.10:
	movq	(%rbx,%rcx,8), %rax
	movq	8(%rbx,%rcx,8), %rdx
	movq	%rdx, 8(%rax)
	movq	-8(%rbx,%rcx,8), %rcx
	movq	%rcx, (%rax)
LBB0_11:
	movl	%r14d, %eax
LBB0_12:
	movl	%eax, %ecx
	movq	(%rbx,%rcx,8), %rcx
	movq	$0, 8(%rcx)
	decl	%eax
	movq	(%rbx,%rax,8), %rax
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FREE                           ## TAILCALL
LBB0_14:
	movq	_REG_ESPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_NERR                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_ESPACE,4,2                 ## @REG_ESPACE
	.comm	_sortouts_cmp,4,2               ## @sortouts_cmp
	.no_dead_strip	_sortouts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sortouts
_sortouts:                              ; @sortouts
	.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	w20, [x1]
	cmp	w20, #2
	b.ge	LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x21, x1
	lsl	w0, w20, #3
	bl	_MALLOC
	cbz	x0, LBB0_6
; %bb.3:
	mov	x19, x0
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_7
; %bb.4:
	mov	x9, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	x8, [x19, x9, lsl #3]
	add	x9, x9, #1
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_5
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _REG_ESPACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_ESPACE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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	_NERR
LBB0_7:
	mov	w9, #0
LBB0_8:
	cmp	w9, w20
	cset	w0, eq
	bl	_assert
Lloh3:
	adrp	x8, _sortouts_cmp@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sortouts_cmp@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #8
	bl	_qsort
	ldr	x8, [x19]
	str	x8, [x21, #8]
	ldr	x9, [x19, #8]
	stp	xzr, x9, [x8]
	cmp	w20, #3
	b.lt	LBB0_11
; %bb.9:
	sub	w8, w20, #1
	add	x11, x19, #8
	sub	x9, x8, #1
	mov	x10, x11
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10, #8]!
	ldr	x13, [x11]
	str	x12, [x13, #8]
	ldur	x11, [x11, #-8]
	str	x11, [x13]
	mov	x11, x10
	subs	x9, x9, #1
	b.ne	LBB0_10
	b	LBB0_12
LBB0_11:
	mov	w8, #1
LBB0_12:
	ldr	x9, [x19, w8, uxtw #3]
	str	xzr, [x9, #8]
	sub	w8, w8, #1
	ldr	x8, [x19, w8, uxtw #3]
	str	x8, [x9]
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_ESPACE,4,2                 ; @REG_ESPACE
	.comm	_sortouts_cmp,4,2               ; @sortouts_cmp
	.no_dead_strip	_sortouts
.subsections_via_symbols
