	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buildIndexArray
_buildIndexArray:                       ## @buildIndexArray
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r13
	leal	(,%r14,8), %edi
	callq	_pg_malloc
	movq	%rax, %r15
	testl	%r14d, %r14d
	jle	LBB0_10
## %bb.1:
	movslq	%r12d, %rax
	movl	%r14d, %edx
	leaq	-1(%rdx), %rsi
	movl	%edx, %r8d
	andl	$7, %r8d
	cmpq	$7, %rsi
	jae	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	jmp	LBB0_5
LBB0_3:
	andl	$-8, %edx
	leaq	(,%rax,8), %rdi
	xorl	%esi, %esi
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, (%r15,%rsi,8)
	leaq	(%rbx,%rax), %rcx
	movq	%rcx, 8(%r15,%rsi,8)
	addq	%rax, %rcx
	movq	%rcx, 16(%r15,%rsi,8)
	addq	%rax, %rcx
	movq	%rcx, 24(%r15,%rsi,8)
	addq	%rax, %rcx
	movq	%rcx, 32(%r15,%rsi,8)
	addq	%rax, %rcx
	movq	%rcx, 40(%r15,%rsi,8)
	addq	%rax, %rcx
	movq	%rcx, 48(%r15,%rsi,8)
	addq	%rax, %rcx
	movq	%rcx, 56(%r15,%rsi,8)
	addq	$8, %rsi
	addq	%rdi, %rbx
	cmpq	%rsi, %rdx
	jne	LBB0_4
LBB0_5:
	testq	%r8, %r8
	je	LBB0_8
## %bb.6:
	leaq	(%r15,%rsi,8), %rdx
	imulq	%rax, %rsi
	addq	%rsi, %r13
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, (%rdx,%rsi,8)
	incq	%rsi
	addq	%rax, %r13
	cmpq	%rsi, %r8
	jne	LBB0_7
LBB0_8:
	cmpl	$2, %r14d
	jl	LBB0_10
## %bb.9:
	movq	_DOCatalogIdCompare@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$8, %edx
	callq	_qsort
LBB0_10:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DOCatalogIdCompare,4,2         ## @DOCatalogIdCompare
	.no_dead_strip	_buildIndexArray
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buildIndexArray
_buildIndexArray:                       ; @buildIndexArray
	.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	x22, x2
	mov	x19, x1
	mov	x21, x0
	lsl	w0, w1, #3
	bl	_pg_malloc
	mov	x20, x0
	cmp	w19, #1
	b.lt	LBB0_10
; %bb.1:
	sxtw	x8, w22
	mov	w9, w19
	cmp	w19, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x10, #0
	b	LBB0_6
LBB0_3:
	and	x10, x9, #0xfffffffc
	lsl	x11, x8, #1
	add	x12, x11, x8
	lsl	x13, x8, #2
	add	x14, x20, #16
	mov	x15, x10
	mov	x16, x21
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x17, x16, x8
	add	x0, x16, x11
	add	x1, x16, x12
	stp	x16, x17, [x14, #-16]
	stp	x0, x1, [x14], #32
	add	x16, x16, x13
	subs	x15, x15, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x10, x9
	b.eq	LBB0_8
LBB0_6:
	madd	x11, x10, x8, x21
	add	x12, x20, x10, lsl #3
	sub	x9, x9, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	x11, [x12], #8
	add	x11, x11, x8
	subs	x9, x9, #1
	b.ne	LBB0_7
LBB0_8:
	cmp	w19, #2
	b.lt	LBB0_10
; %bb.9:
Lloh0:
	adrp	x8, _DOCatalogIdCompare@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DOCatalogIdCompare@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #8
	bl	_qsort
LBB0_10:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DOCatalogIdCompare,4,2         ; @DOCatalogIdCompare
	.no_dead_strip	_buildIndexArray
.subsections_via_symbols
