	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function luaB_tonumber
_luaB_tonumber:                         ## @luaB_tonumber
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$2, %esi
	callq	_lua_isnoneornil
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_luaL_checkany
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_type
	movq	_LUA_TNUMBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_settop
	jmp	LBB0_8
LBB0_6:
	movl	$0, -28(%rbp)
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_luaL_checkinteger
	movl	%eax, %r14d
	movq	_LUA_TSTRING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_luaL_checktype
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_tolstring
	movq	%rax, %r15
	leal	-2(%r14), %eax
	xorl	%esi, %esi
	cmpl	$35, %eax
	setb	%sil
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_luaL_argcheck
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_b_str2int
	addq	-40(%rbp), %r15
	cmpq	%r15, %rax
	jne	LBB0_5
## %bb.7:
	movl	-28(%rbp), %esi
	movq	%rbx, %rdi
	callq	_lua_pushinteger
	jmp	LBB0_8
LBB0_3:
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_tolstring
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_lua_stringtonumber
	movq	-40(%rbp), %rcx
	incq	%rcx
	cmpq	%rcx, %rax
	je	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_lua_pushnil
LBB0_8:
	movl	$1, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LUA_TNUMBER,8,3                ## @LUA_TNUMBER
	.comm	_LUA_TSTRING,4,2                ## @LUA_TSTRING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"base out of range"

	.no_dead_strip	_luaB_tonumber
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function luaB_tonumber
_luaB_tonumber:                         ; @luaB_tonumber
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	mov	w1, #2
	bl	_lua_isnoneornil
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_checkany
	mov	x0, x19
	mov	w1, #1
	bl	_lua_type
Lloh0:
	adrp	x8, _LUA_TNUMBER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUA_TNUMBER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_settop
	b	LBB0_8
LBB0_3:
	str	wzr, [sp, #4]
	mov	x0, x19
	mov	w1, #2
	bl	_luaL_checkinteger
	mov	x20, x0
Lloh3:
	adrp	x8, _LUA_TSTRING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LUA_TSTRING@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_checktype
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #1
	bl	_lua_tolstring
	mov	x21, x0
	sub	w8, w20, #2
	cmp	w8, #35
	cset	w1, lo
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #2
	bl	_luaL_argcheck
	add	x2, sp, #4
	mov	x0, x21
	mov	x1, x20
	bl	_b_str2int
	ldr	x8, [sp, #8]
	add	x8, x21, x8
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.4:
	ldr	w1, [sp, #4]
	mov	x0, x19
	bl	_lua_pushinteger
	b	LBB0_8
LBB0_5:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #1
	bl	_lua_tolstring
	cbz	x0, LBB0_7
; %bb.6:
	mov	x1, x0
	mov	x0, x19
	bl	_lua_stringtonumber
	ldr	x8, [sp, #8]
	add	x8, x8, #1
	cmp	x0, x8
	b.eq	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_lua_pushnil
LBB0_8:
	mov	w0, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LUA_TNUMBER,8,3                ; @LUA_TNUMBER
	.comm	_LUA_TSTRING,4,2                ; @LUA_TSTRING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"base out of range"

	.no_dead_strip	_luaB_tonumber
.subsections_via_symbols
