	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fts_sort
_fts_sort:                              ## @fts_sort
	.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	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	cmpl	%edx, (%rdi)
	jge	LBB0_1
## %bb.15:
	leal	40(%r14), %eax
	movl	%eax, (%r15)
	movq	8(%r15), %rdi
	leal	320(,%r14,8), %esi
	callq	_reallocf
	movq	%rax, %rdi
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	jne	LBB0_2
## %bb.16:
	movl	$0, (%r15)
	jmp	LBB0_17
LBB0_1:
	movq	8(%r15), %rdi
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, (%rdi)
	addq	$8, %rdi
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_3
## %bb.4:
	movq	8(%r15), %rdi
LBB0_5:
	movq	_fts_compar@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movl	$8, %edx
	callq	_qsort
	movq	8(%r15), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rcx
	cmpl	$1, %r14d
	je	LBB0_14
## %bb.6:
	movq	8(%rax), %rcx
	addq	$8, %rax
	movq	%rcx, (%rbx)
	movl	%r14d, %ecx
	addl	$-2, %ecx
	je	LBB0_13
## %bb.7:
	leal	-3(%r14), %r8d
	testb	$3, %cl
	je	LBB0_11
## %bb.8:
	addb	$2, %r14b
	movzbl	%r14b, %r9d
	andl	$3, %r9d
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rdx
	movq	8(%rax), %rsi
	addq	$8, %rax
	movq	%rsi, (%rdx)
	incq	%rdi
	cmpl	%edi, %r9d
	jne	LBB0_9
## %bb.10:
	subl	%edi, %ecx
LBB0_11:
	cmpl	$3, %r8d
	jb	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rdx
	movq	8(%rax), %rsi
	movq	%rsi, (%rdx)
	movq	8(%rax), %rdx
	movq	16(%rax), %rsi
	movq	%rsi, (%rdx)
	movq	16(%rax), %rdx
	movq	24(%rax), %rsi
	movq	%rsi, (%rdx)
	movq	24(%rax), %rdx
	movq	32(%rax), %rsi
	addq	$32, %rax
	movq	%rsi, (%rdx)
	addl	$-4, %ecx
	jne	LBB0_12
LBB0_13:
	movq	(%rax), %rcx
LBB0_14:
	movq	$0, (%rcx)
LBB0_17:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fts_compar,4,2                 ## @fts_compar
	.no_dead_strip	_fts_sort
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fts_sort
_fts_sort:                              ; @fts_sort
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, w2
	b.ge	LBB0_3
; %bb.1:
	add	w8, w20, #40
	str	w8, [x21]
	ldr	x0, [x21, #8]
	lsl	w1, w8, #3
	bl	_reallocf
	str	x0, [x21, #8]
	cbnz	x0, LBB0_4
; %bb.2:
	str	wzr, [x21]
	b	LBB0_12
LBB0_3:
	ldr	x0, [x21, #8]
LBB0_4:
	cbz	x19, LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	x19, [x0], #8
	ldr	x19, [x19]
	cbnz	x19, LBB0_5
; %bb.6:
	ldr	x0, [x21, #8]
LBB0_7:
Lloh0:
	adrp	x8, _fts_compar@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fts_compar@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x1, x20
	mov	w2, #8
	bl	_qsort
	ldr	x8, [x21, #8]
	ldr	x19, [x8]
	mov	x9, x19
	cmp	w20, #1
	b.eq	LBB0_11
; %bb.8:
	ldr	x9, [x8, #8]!
	str	x9, [x19]
	subs	w9, w20, #2
	b.eq	LBB0_10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8]
	ldr	x11, [x8, #8]!
	str	x11, [x10]
	subs	w9, w9, #1
	b.ne	LBB0_9
LBB0_10:
	ldr	x9, [x8]
LBB0_11:
	str	xzr, [x9]
LBB0_12:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_fts_compar,4,2                 ; @fts_compar
	.no_dead_strip	_fts_sort
.subsections_via_symbols
