	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_distinct_groups
_build_distinct_groups:                 ## @build_distinct_groups
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r15
	movl	%edi, %ebx
	callq	_count_distinct_groups
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	(,%rax,4), %edi
	callq	_palloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1, (%rax)
	xorl	%r14d, %r14d
	cmpl	$2, %ebx
	jl	LBB0_6
## %bb.1:
	movl	%ebx, %r12d
	decq	%r12
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r14d, %rax
	incl	%r14d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$0, 4(%rdx,%rax,4)
	incq	%rax
	xorl	%ecx, %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ecx
	movl	%ecx, (%rdx,%rax,4)
	decq	%r12
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rbx
	addq	$4, %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_multi_sort_compare
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_Assert
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_multi_sort_compare
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r14d, %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx,%rax,4), %ecx
	jmp	LBB0_5
LBB0_6:
	incl	%r14d
	xorl	%edi, %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	cmpl	%r15d, %r14d
	sete	%dil
	callq	_Assert
	movq	_compare_sort_item_count@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$4, %edx
	callq	_pg_qsort
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_compare_sort_item_count,4,2    ## @compare_sort_item_count
	.no_dead_strip	_build_distinct_groups
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_distinct_groups
_build_distinct_groups:                 ; @build_distinct_groups
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	bl	_count_distinct_groups
	mov	x20, x0
	lsl	w0, w0, #2
	bl	_palloc
	mov	x21, x0
	mov	w8, #1
	str	w8, [x0]
	cmp	w24, #2
	b.lt	LBB0_6
; %bb.1:
	mov	w26, #0
	mov	w8, w24
	sub	x25, x8, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #0
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	sxtw	x8, w26
	add	x8, x8, #1
	str	wzr, [x21, x8, lsl #2]
	mov	x26, x8
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w9, w9, #1
	str	w9, [x21, x8, lsl #2]
	add	x23, x23, #4
	subs	x25, x25, #1
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x24, x23, #4
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	bl	_multi_sort_compare
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_Assert
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	bl	_multi_sort_compare
	cbnz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x8, w26
	ldr	w9, [x21, w26, sxtw #2]
	b	LBB0_3
LBB0_6:
	mov	w26, #0
LBB0_7:
	add	w8, w26, #1
	cmp	w8, w20
	cset	w0, eq
	bl	_Assert
Lloh0:
	adrp	x8, _compare_sort_item_count@GOTPAGE
Lloh1:
	ldr	x8, [x8, _compare_sort_item_count@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	w2, #4
	bl	_pg_qsort
	str	w20, [x19]
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_compare_sort_item_count,4,2    ; @compare_sort_item_count
	.no_dead_strip	_build_distinct_groups
.subsections_via_symbols
