	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function str_byte
_str_byte:                              ## @str_byte
	.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	%rdi, %r12
	movl	$1, %ebx
	leaq	-48(%rbp), %rdx
	movl	$1, %esi
	callq	_luaL_checklstring
	movq	%rax, %r14
	movq	%r12, %rdi
	movl	$2, %esi
	movl	$1, %edx
	callq	_luaL_optinteger
	movq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_posrelat
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	$3, %esi
	movl	%eax, %edx
	callq	_luaL_optinteger
	movq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_posrelat
	cmpl	$2, %r15d
	cmovgel	%r15d, %ebx
	cltq
	movq	-48(%rbp), %rcx
	cmpq	%rax, %rcx
	cmovbl	%ecx, %eax
	xorl	%r15d, %r15d
	movl	%eax, %r13d
	subl	%ebx, %r13d
	jl	LBB0_6
## %bb.1:
	leal	1(%r13), %r15d
	cmpl	$2147483647, %eax               ## imm = 0x7FFFFFFF
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_luaL_error
LBB0_3:
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_luaL_checkstack
	testl	%r13d, %r13d
	js	LBB0_6
## %bb.4:
	decl	%ebx
	incl	%r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rbx
	movsbl	(%r14,%rbx), %edi
	callq	_uchar
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_lua_pushinteger
	incl	%ebx
	decq	%r13
	jne	LBB0_5
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"string slice too long"

	.no_dead_strip	_str_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function str_byte
_str_byte:                              ; @str_byte
	.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, x0
	add	x2, sp, #8
	mov	w1, #1
	bl	_luaL_checklstring
	mov	x20, x0
	mov	x0, x19
	mov	w1, #2
	mov	w2, #1
	bl	_luaL_optinteger
	ldr	x1, [sp, #8]
	bl	_posrelat
	mov	x21, x0
	mov	x0, x19
	mov	w1, #3
	mov	x2, x21
	bl	_luaL_optinteger
	ldr	x1, [sp, #8]
	bl	_posrelat
	cmp	w21, #1
	csinc	w22, w21, wzr, gt
	ldr	x8, [sp, #8]
	cmp	x8, w0, sxtw
	csel	w8, w8, w0, lo
	subs	w23, w8, w22
	b.ge	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_7
LBB0_2:
	add	w21, w23, #1
	mov	w9, #2147483647
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_luaL_error
LBB0_4:
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_luaL_checkstack
	tbnz	w23, #31, LBB0_7
; %bb.5:
	sub	w22, w22, #1
	add	w23, w23, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x20, w22, sxtw]
	bl	_uchar
	mov	x1, x0
	mov	x0, x19
	bl	_lua_pushinteger
	add	w22, w22, #1
	subs	x23, x23, #1
	b.ne	LBB0_6
LBB0_7:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"string slice too long"

	.no_dead_strip	_str_byte
.subsections_via_symbols
