	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$2, %esi
	movl	$10, %edx
	callq	_luaL_optint
	cmpl	$10, %eax
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_luaL_checkany
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_lua_isnumber
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_lua_tonumber
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_lua_pushnumber
	jmp	LBB0_9
LBB0_3:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_luaL_checkstring
	movq	%rax, %r15
	movl	%ebx, %eax
	addl	$-2, %eax
	xorl	%esi, %esi
	cmpl	$35, %eax
	setb	%sil
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_luaL_argcheck
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_strtoul
	movq	-40(%rbp), %rbx
	cmpq	%rbx, %r15
	je	LBB0_8
## %bb.4:
	movq	%rax, %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %edi
	callq	_isspace
	incq	%rbx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	cmpb	$0, -1(%rbx)
	je	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	callq	_lua_pushnil
LBB0_9:
	movl	$1, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_lua_pushnumber
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.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
	mov	w2, #10
	bl	_luaL_optint
	cmp	w0, #10
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_checkany
	mov	x0, x19
	mov	w1, #1
	bl	_lua_isnumber
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_tonumber
	mov	x1, x0
	mov	x0, x19
	bl	_lua_pushnumber
	b	LBB0_8
LBB0_3:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_checkstring
	mov	x21, x0
	sub	w8, w20, #2
	cmp	w8, #35
	cset	w1, lo
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #2
	bl	_luaL_argcheck
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x20
	bl	_strtoul
	ldr	x22, [sp, #8]
	cmp	x21, x22
	b.eq	LBB0_7
; %bb.4:
	mov	x20, x0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w0, [x22], #1
	bl	_isspace
	cbnz	x0, LBB0_5
; %bb.6:
	ldurb	w8, [x22, #-1]
	cbz	w8, LBB0_9
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
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_lua_pushnumber
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"base out of range"

	.no_dead_strip	_luaB_tonumber
.subsections_via_symbols
