	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function forlimit
_forlimit:                              ## @forlimit
	.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
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	$0, (%rcx)
	shrq	$63, %rdx
	incl	%edx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_luaV_tointeger
	movl	$1, %r15d
	testl	%eax, %eax
	je	LBB0_1
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_tonumber
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	-44(%rbp), %esi
	xorl	%edi, %edi
	callq	_luai_numlt
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_LUA_MAXINTEGER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	testq	%r12, %r12
	jns	LBB0_7
	jmp	LBB0_5
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_4:
	movq	_LUA_MININTEGER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	testq	%r12, %r12
	js	LBB0_7
LBB0_5:
	movl	$1, (%r14)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_LUA_MAXINTEGER,8,3             ## @LUA_MAXINTEGER
	.comm	_LUA_MININTEGER,8,3             ## @LUA_MININTEGER
	.no_dead_strip	_forlimit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function forlimit
_forlimit:                              ; @forlimit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	str	wzr, [x3]
	cmp	x2, #0
	mov	w23, #1
	cinc	w2, w23, lt
	bl	_luaV_tointeger
	cbnz	w0, LBB0_8
; %bb.1:
	add	x1, sp, #12
	mov	x0, x22
	bl	_tonumber
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w1, [sp, #12]
	mov	w0, #0
	bl	_luai_numlt
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _LUA_MAXINTEGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUA_MAXINTEGER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x21]
	tbz	x20, #63, LBB0_7
	b	LBB0_6
LBB0_4:
	mov	w23, #0
	b	LBB0_8
LBB0_5:
Lloh3:
	adrp	x8, _LUA_MININTEGER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LUA_MININTEGER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x21]
	tbnz	x20, #63, LBB0_7
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
LBB0_7:
	mov	w23, #1
LBB0_8:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LUA_MAXINTEGER,8,3             ; @LUA_MAXINTEGER
	.comm	_LUA_MININTEGER,8,3             ; @LUA_MININTEGER
	.no_dead_strip	_forlimit
.subsections_via_symbols
