	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sort
_sort:                                  ## @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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_TAB_RW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_aux_getn
	cmpl	$2, %eax
	jl	LBB0_4
## %bb.1:
	movl	%eax, %r14d
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	(%rax), %r14d
	setl	%sil
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_luaL_argcheck
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_lua_isnoneornil
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_LUA_TFUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_luaL_checktype
LBB0_3:
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_lua_settop
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_auxsort
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TAB_RW,4,2                     ## @TAB_RW
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"array too big"

	.comm	_LUA_TFUNCTION,4,2              ## @LUA_TFUNCTION
	.no_dead_strip	_sort
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sort
_sort:                                  ; @sort
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _TAB_RW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TAB_RW@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_aux_getn
	cmp	w0, #2
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w1, lt
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_luaL_argcheck
	mov	x0, x19
	mov	w1, #2
	bl	_lua_isnoneornil
	cbnz	w0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _LUA_TFUNCTION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LUA_TFUNCTION@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #2
	bl	_luaL_checktype
LBB0_3:
	mov	x0, x19
	mov	w1, #2
	bl	_lua_settop
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	mov	w3, #0
	bl	_auxsort
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TAB_RW,4,2                     ; @TAB_RW
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"array too big"

	.comm	_LUA_TFUNCTION,4,2              ; @LUA_TFUNCTION
	.no_dead_strip	_sort
.subsections_via_symbols
