	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function luaB_select
_luaB_select:                           ## @luaB_select
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_lua_gettop
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_lua_type
	movq	_LUA_TSTRING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movl	$1, %r15d
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_lua_tostring
	cmpb	$35, (%rax)
	jne	LBB0_3
## %bb.2:
	decl	%r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_lua_pushinteger
	jmp	LBB0_4
LBB0_3:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_luaL_checkinteger
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%r12d, %eax
	movl	%r12d, %ebx
	cmovll	%eax, %ebx
	leal	(%rax,%r12), %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %ebx
	xorl	%esi, %esi
	testl	%ebx, %ebx
	setg	%sil
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_luaL_argcheck
	subl	%ebx, %r12d
	movl	%r12d, %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LUA_TSTRING,8,3                ## @LUA_TSTRING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"index out of range"

	.no_dead_strip	_luaB_select
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function luaB_select
_luaB_select:                           ; @luaB_select
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_lua_gettop
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1
	bl	_lua_type
Lloh0:
	adrp	x8, _LUA_TSTRING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUA_TSTRING@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_tostring
	ldrb	w8, [x0]
	cmp	w8, #35
	b.ne	LBB0_3
; %bb.2:
	sub	w1, w20, #1
	mov	x0, x19
	bl	_lua_pushinteger
	mov	w0, #1
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_checkinteger
	add	w8, w0, w20
	cmp	w0, w20
	csel	w9, w0, w20, lt
	cmp	w0, #0
	csel	w21, w8, w9, lt
	cmp	w21, #0
	cset	w1, gt
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #1
	bl	_luaL_argcheck
	sub	w0, w20, w21
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LUA_TSTRING,8,3                ; @LUA_TSTRING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"index out of range"

	.no_dead_strip	_luaB_select
.subsections_via_symbols
