	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaS_new                       ## -- Begin function luaS_new
	.p2align	4, 0x90
_luaS_new:                              ## @luaS_new
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_point2uint
	movq	_STRCACHE_N@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%edx, %ebx
	movq	%r14, %rdi
	callq	_G
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %r12
	movq	_STRCACHE_M@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_22
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12,%rbx,8), %rdi
	callq	_getstr
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
## %bb.5:
	movl	%eax, %eax
	cmpl	$2, %eax
	jl	LBB0_22
## %bb.6:
	movl	$4294967294, %ecx               ## imm = 0xFFFFFFFE
	xorl	%r10d, %r10d
	movq	%rax, %rdx
	subq	$2, %rdx
	cmovaeq	%rdx, %r10
	incq	%r10
	cmpq	$4, %r10
	jae	LBB0_7
LBB0_20:
	addq	%rax, %rcx
	decq	%rax
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %edx
	movq	(%r12,%rdx,8), %rdx
	movl	%eax, %esi
	movq	%rdx, (%r12,%rsi,8)
	decq	%rcx
	leaq	-1(%rax), %rdx
	incq	%rax
	cmpq	$2, %rax
	movq	%rdx, %rax
	ja	LBB0_21
LBB0_22:
	movq	%r15, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_luaS_newlstr
	movq	%rax, (%r12)
	jmp	LBB0_23
LBB0_3:
	movq	(%r12,%rbx,8), %rax
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%edx, %edx
	movq	%rax, %rsi
	subq	$2, %rsi
	cmovaeq	%rsi, %rdx
	leal	-1(%rax), %edi
	cmpl	%edx, %edi
	jb	LBB0_20
## %bb.8:
	leal	-2(%rax), %esi
	cmpl	%edx, %esi
	jb	LBB0_20
## %bb.9:
	leaq	(%r12,%rdi,8), %rbx
	shlq	$3, %rdx
	movq	%rbx, %rdi
	subq	%rdx, %rdi
	cmpq	%rbx, %rdi
	ja	LBB0_20
## %bb.10:
	leaq	(%r12,%rsi,8), %rsi
	movq	%rsi, %rdi
	subq	%rdx, %rdi
	cmpq	%rsi, %rdi
	ja	LBB0_20
## %bb.11:
	leal	-2(%rax), %edx
	leaq	(%r12,%rdx,8), %rdx
	leal	-1(%rax), %esi
	leaq	(%r12,%rsi,8), %rsi
	subq	%rsi, %rdx
	cmpq	$32, %rdx
	jb	LBB0_20
## %bb.12:
	movq	%r10, %r8
	andq	$-4, %r8
	leaq	-4(%r8), %rdx
	movq	%rdx, %r9
	shrq	$2, %r9
	incq	%r9
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.14:
	movq	%r9, %rdi
	andq	$-2, %rdi
	leaq	(%rcx,%rax), %rdx
	addq	$-4, %rdx
	xorl	%r11d, %r11d
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leal	5(%rdx), %ebx
	leal	4(%rdx), %esi
	movups	-24(%r12,%rsi,8), %xmm0
	movups	-8(%r12,%rsi,8), %xmm1
	movups	%xmm1, -8(%r12,%rbx,8)
	movups	%xmm0, -24(%r12,%rbx,8)
	movl	%edx, %esi
	leal	1(%rdx), %ebx
	movups	-24(%r12,%rsi,8), %xmm0
	movups	-8(%r12,%rsi,8), %xmm1
	movups	%xmm1, -8(%r12,%rbx,8)
	movups	%xmm0, -24(%r12,%rbx,8)
	addq	$8, %r11
	addq	$-8, %rdx
	addq	$-2, %rdi
	jne	LBB0_15
	jmp	LBB0_16
LBB0_13:
	xorl	%r11d, %r11d
LBB0_16:
	testb	$1, %r9b
	je	LBB0_18
## %bb.17:
	movl	%eax, %edx
	subl	%r11d, %edx
	leal	(%rcx,%rdx), %esi
	addl	%ecx, %edx
	incl	%edx
	movups	-24(%r12,%rsi,8), %xmm0
	movups	-8(%r12,%rsi,8), %xmm1
	movups	%xmm1, -8(%r12,%rdx,8)
	movups	%xmm0, -24(%r12,%rdx,8)
LBB0_18:
	cmpq	%r8, %r10
	je	LBB0_22
## %bb.19:
	subq	%r8, %rax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_STRCACHE_N,4,2                 ## @STRCACHE_N
	.comm	_STRCACHE_M,4,2                 ## @STRCACHE_M
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaS_new                       ; -- Begin function luaS_new
	.p2align	2
_luaS_new:                              ; @luaS_new
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_point2uint
Lloh0:
	adrp	x8, _STRCACHE_N@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRCACHE_N@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	udiv	w9, w0, w8
	msub	w21, w9, w8, w0
	mov	x0, x20
	bl	_G
	ldr	x8, [x0]
	ldr	x21, [x8, w21, uxtw #3]
Lloh3:
	adrp	x22, _STRCACHE_M@GOTPAGE
Lloh4:
	ldr	x22, [x22, _STRCACHE_M@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21, x23, lsl #3]
	bl	_getstr
	mov	x1, x0
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_2
; %bb.4:
	and	x8, x8, #0xffffffff
	cmp	w8, #2
	b.lt	LBB0_12
; %bb.5:
	subs	x9, x8, #2
	csel	x9, xzr, x9, lo
	add	x9, x9, #1
	cmp	x9, #8
	b.lo	LBB0_11
; %bb.6:
	subs	x10, x8, #2
	csel	x10, xzr, x10, lo
	sub	w11, w8, #1
	sub	w12, w8, #2
	add	x13, x21, w11, uxtw #3
	lsl	x14, x10, #3
	sub	x15, x13, x14
	add	x16, x21, w12, uxtw #3
	sub	x14, x16, x14
	cmp	w11, w10
	ccmp	w12, w10, #0, hs
	ccmp	x15, x13, #2, hs
	ccmp	x14, x16, #2, ls
	b.hi	LBB0_11
; %bb.7:
	sub	w10, w8, #2
	add	x10, x21, w10, uxtw #3
	sub	w11, w8, #1
	add	x11, x21, w11, uxtw #3
	sub	x10, x10, x11
	cmp	x10, #64
	b.lo	LBB0_11
; %bb.8:
	and	x10, x9, #0xfffffffffffffff8
	sub	x11, x8, x10
	mov	w12, #-1
	add	x8, x8, x12
	mov	x12, x10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sub	w13, w8, #1
	add	x13, x21, w13, uxtw #3
	ldur	q0, [x13, #-8]
	ldur	q1, [x13, #-24]
	ldur	q2, [x13, #-40]
	ldur	q3, [x13, #-56]
	add	x13, x21, w8, uxtw #3
	stur	q0, [x13, #-8]
	stur	q1, [x13, #-24]
	stur	q2, [x13, #-40]
	stur	q3, [x13, #-56]
	sub	x8, x8, #8
	sub	x12, x12, #8
	cbnz	x12, LBB0_9
; %bb.10:
	mov	x8, x11
	cmp	x9, x10
	b.eq	LBB0_12
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	sub	w9, w8, #2
	sub	x10, x8, #1
	ldr	x9, [x21, w9, uxtw #3]
	str	x9, [x21, w10, uxtw #3]
	cmp	x8, #2
	mov	x8, x10
	b.hi	LBB0_11
LBB0_12:
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_luaS_newlstr
	str	x0, [x21]
	b	LBB0_14
LBB0_13:
	ldr	x0, [x21, x23, lsl #3]
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_STRCACHE_N,4,2                 ; @STRCACHE_N
	.comm	_STRCACHE_M,4,2                 ; @STRCACHE_M
.subsections_via_symbols
