	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readutf8esc
_readutf8esc:                           ## @readutf8esc
	.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	_save_and_next
	xorl	%esi, %esi
	cmpb	$123, (%r14)
	sete	%sil
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_esccheck
	movq	%r14, %rdi
	callq	_gethexa
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_save_and_next
	movsbl	(%r14), %edi
	callq	_lisxdigit
	movl	$4, %r15d
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%r15d
	shlq	$4, %rbx
	movsbl	(%r14), %edi
	callq	_luaO_hexavalue
	addq	%rax, %rbx
	xorl	%esi, %esi
	cmpq	$1114112, %rbx                  ## imm = 0x110000
	setb	%sil
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_esccheck
	movq	%r14, %rdi
	callq	_save_and_next
	movsbl	(%r14), %edi
	callq	_lisxdigit
	testl	%eax, %eax
	jne	LBB0_2
LBB0_3:
	xorl	%esi, %esi
	cmpb	$125, (%r14)
	sete	%sil
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	callq	_esccheck
	movq	%r14, %rdi
	callq	_next
	movl	4(%r14), %edi
	movl	%r15d, %esi
	callq	_luaZ_buffremove
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing '{'"

L_.str.1:                               ## @.str.1
	.asciz	"UTF-8 value too large"

L_.str.2:                               ## @.str.2
	.asciz	"missing '}'"

	.no_dead_strip	_readutf8esc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readutf8esc
_readutf8esc:                           ; @readutf8esc
	.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	_save_and_next
	ldrb	w8, [x19]
	cmp	w8, #123
	cset	w1, eq
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_esccheck
	mov	x0, x19
	bl	_gethexa
	mov	x20, x0
	mov	x0, x19
	bl	_save_and_next
	ldrsb	w0, [x19]
	bl	_lisxdigit
	mov	w21, #4
	cbz	w0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w21, #1
	ldrsb	w0, [x19]
	bl	_luaO_hexavalue
	add	x20, x0, x20, lsl #4
	cmp	x20, #272, lsl #12              ; =1114112
	cset	w1, lo
	mov	x0, x19
	mov	x2, x22
	bl	_esccheck
	mov	x0, x19
	bl	_save_and_next
	ldrsb	w0, [x19]
	bl	_lisxdigit
	cbnz	w0, LBB0_2
LBB0_3:
	ldrb	w8, [x19]
	cmp	w8, #125
	cset	w1, eq
Lloh4:
	adrp	x2, l_.str.2@PAGE
Lloh5:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_esccheck
	mov	x0, x19
	bl	_next
	ldr	w0, [x19, #4]
	mov	x1, x21
	bl	_luaZ_buffremove
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing '{'"

l_.str.1:                               ; @.str.1
	.asciz	"UTF-8 value too large"

l_.str.2:                               ; @.str.2
	.asciz	"missing '}'"

	.no_dead_strip	_readutf8esc
.subsections_via_symbols
