	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function auxsort
_auxsort:                               ## @auxsort
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%esi, %edx
	jle	LBB0_22
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %r14
	cmpl	%r12d, %r14d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_22
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r12d, %edx
	callq	_lua_geti
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_lua_geti
	movq	%r13, %rdi
	movl	$-1, %esi
	movl	$-2, %edx
	callq	_sort_comp
	movq	%r13, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_set2
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$2, %esi
	callq	_lua_pop
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %ebx
	subl	%r12d, %ebx
	cmpl	$1, %ebx
	je	LBB0_22
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_RANLIMIT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %edi
	movl	%r14d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_choosePivot
	movl	%eax, %r15d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	leal	(%r14,%r12), %eax
	movl	%eax, %r15d
	shrl	$31, %r15d
	addl	%eax, %r15d
	sarl	%r15d
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	callq	_lua_geti
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r12d, %edx
	callq	_lua_geti
	movq	%r13, %rdi
	movl	$-2, %esi
	movl	$-1, %edx
	callq	_sort_comp
	movq	%r13, %rdi
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %esi
	movl	%r12d, %edx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %esi
	callq	_lua_pop
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_lua_geti
	movq	%r13, %rdi
	movl	$-1, %esi
	movl	$-2, %edx
	callq	_sort_comp
	movq	%r13, %rdi
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %esi
	movl	%r14d, %edx
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	callq	_set2
	cmpl	$2, %ebx
	je	LBB0_22
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	callq	_lua_geti
	movq	%r13, %rdi
	movl	$-1, %esi
	callq	_lua_pushvalue
	movq	%r12, %rbx
	movq	%r14, %r12
	decl	%r14d
	movq	%r13, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_lua_geti
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_set2
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_partition
	movq	%rbx, %rsi
	movl	%eax, %ebx
	movl	%eax, %r14d
	subl	%esi, %r14d
	movl	%r12d, %r15d
	subl	%eax, %r15d
	cmpl	%r15d, %r14d
	jge	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rbx), %edx
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_auxsort
	incl	%ebx
	movl	%ebx, %edx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, %r14
	leal	1(%rbx), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_auxsort
	movq	%r14, %rdx
	decl	%ebx
	movl	%ebx, %r12d
	movl	%r15d, %r14d
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rbx
	movl	%r12d, %eax
	subl	%edx, %eax
	leal	127(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$7, %ecx
	cmpl	%r14d, %ecx
	movq	%rdx, %r12
	jle	LBB0_2
## %bb.21:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_l_randomizePivot
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$2, %esi
	callq	_lua_pop
	cmpl	$2, %ebx
	jne	LBB0_17
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RANLIMIT,4,2                   ## @RANLIMIT
	.no_dead_strip	_auxsort
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function auxsort
_auxsort:                               ; @auxsort
	.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
	cmp	w2, w1
	b.le	LBB0_21
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _RANLIMIT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _RANLIMIT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w21, w22
	b.le	LBB0_21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x22
	bl	_lua_geti
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	bl	_lua_geti
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #-2
	bl	_sort_comp
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_set2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #2
	bl	_lua_pop
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w24, w21, w22
	cmp	w24, #1
	b.eq	LBB0_21
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	cmp	w24, w8
	ccmp	w20, #0, #4, ge
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w21, w22
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w23, w8, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_choosePivot
	mov	x23, x0
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x23
	bl	_lua_geti
	mov	x0, x19
	mov	w1, #1
	mov	x2, x22
	bl	_lua_geti
	mov	x0, x19
	mov	w1, #-2
	mov	w2, #-1
	bl	_sort_comp
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_lua_pop
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	bl	_lua_geti
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #-2
	bl	_sort_comp
	cbz	x0, LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_set2
	cmp	w24, #2
	b.eq	LBB0_21
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x23
	bl	_lua_geti
	mov	x0, x19
	mov	w1, #-1
	bl	_lua_pushvalue
	sub	w24, w21, #1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x24
	bl	_lua_geti
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_set2
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_partition
	mov	x23, x0
	sub	w24, w0, w22
	sub	w26, w21, w0
	cmp	w24, w26
	b.ge	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	w2, w23, #1
	mov	x0, x19
	mov	x1, x22
	mov	x3, x20
	bl	_auxsort
	add	w22, w23, #1
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w1, w23, #1
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_auxsort
	sub	w21, w23, #1
	mov	x24, x26
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w21, w22
	add	w9, w8, #127
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w24, w8, asr #7
	b.ge	LBB0_2
; %bb.19:                               ;   in Loop: Header=BB0_3 Depth=1
	bl	_l_randomizePivot
	mov	x20, x0
	b	LBB0_2
LBB0_20:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #2
	bl	_lua_pop
	cmp	w24, #2
	b.ne	LBB0_15
LBB0_21:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RANLIMIT,4,2                   ; @RANLIMIT
	.no_dead_strip	_auxsort
.subsections_via_symbols
