	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function is_legal_utf8
_is_legal_utf8:                         ## @is_legal_utf8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	xorl	%eax, %eax
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.1:
	testl	%esi, %esi
	je	LBB0_18
## %bb.2:
	leal	-1(%rsi), %edx
	cmpl	$3, %edx
	ja	LBB0_18
## %bb.3:
	movslq	%esi, %rcx
	addq	%rdi, %rcx
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_15:
	movb	(%rdi), %cl
LBB0_16:
	cmpb	$-62, %cl
	jge	LBB0_17
LBB0_18:
	popq	%rbp
	retq
LBB0_4:
	cmpb	$-65, -1(%rcx)
	jg	LBB0_18
## %bb.5:
	decq	%rcx
LBB0_6:
	cmpb	$-65, -1(%rcx)
	jg	LBB0_18
## %bb.7:
	decq	%rcx
LBB0_8:
	movb	-1(%rcx), %dl
	movb	(%rdi), %cl
	leal	32(%rcx), %esi
	cmpb	$20, %sil
	ja	LBB0_14
## %bb.9:
	movzbl	%sil, %esi
	leaq	LJTI0_1(%rip), %rdi
	movslq	(%rdi,%rsi,4), %rsi
	addq	%rdi, %rsi
	jmpq	*%rsi
LBB0_10:
	addb	$64, %dl
	movb	$-32, %cl
	cmpb	$-32, %dl
	jb	LBB0_18
	jmp	LBB0_17
LBB0_11:
	movb	$-19, %cl
	cmpb	$-97, %dl
	jg	LBB0_18
	jmp	LBB0_17
LBB0_12:
	addb	$64, %dl
	movb	$-16, %cl
	cmpb	$-48, %dl
	jb	LBB0_18
	jmp	LBB0_17
LBB0_13:
	movb	$-12, %cl
	cmpb	$-113, %dl
	jg	LBB0_18
LBB0_17:
	xorl	%eax, %eax
	cmpb	$-11, %cl
	setb	%al
	popq	%rbp
	retq
LBB0_14:
	cmpb	$-65, %dl
	jle	LBB0_16
	jmp	LBB0_18
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_4
.set L0_1_set_10, LBB0_10-LJTI0_1
.set L0_1_set_14, LBB0_14-LJTI0_1
.set L0_1_set_11, LBB0_11-LJTI0_1
.set L0_1_set_12, LBB0_12-LJTI0_1
.set L0_1_set_13, LBB0_13-LJTI0_1
LJTI0_1:
	.long	L0_1_set_10
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_11
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_12
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_14
	.long	L0_1_set_13
	.end_data_region
                                        ## -- End function
	.no_dead_strip	_is_legal_utf8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function is_legal_utf8
_is_legal_utf8:                         ; @is_legal_utf8
	.cfi_startproc
; %bb.0:
	mov	w8, #0
	cbz	x0, LBB0_21
; %bb.1:
	cbz	w1, LBB0_21
; %bb.2:
	sub	w9, w1, #1
	cmp	w9, #3
	b.hi	LBB0_20
; %bb.3:
	add	x8, x0, w1, sxtw
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
	ldrb	w8, [x0]
LBB0_5:
	mov	w9, #-62
	cmp	w9, w8, sxtb
	b.le	LBB0_18
	b	LBB0_20
LBB0_6:
	ldrsb	w9, [x8, #-1]!
	cmn	w9, #65
	b.gt	LBB0_20
LBB0_7:
	ldrsb	w9, [x8, #-1]!
	cmn	w9, #65
	b.gt	LBB0_20
LBB0_8:
	ldursb	w9, [x8, #-1]
	ldrb	w8, [x0]
	sub	w10, w8, #224
	cmp	w10, #20
	b.hi	LBB0_19
; %bb.9:
Lloh2:
	adrp	x11, lJTI0_1@PAGE
Lloh3:
	add	x11, x11, lJTI0_1@PAGEOFF
	adr	x12, LBB0_10
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_10:
	add	w8, w9, #64
	and	w8, w8, #0xff
	cmp	w8, #224
	b.lo	LBB0_20
; %bb.11:
	mov	w8, #224
	b	LBB0_18
LBB0_12:
	cmn	w9, #97
	b.gt	LBB0_20
; %bb.13:
	mov	w8, #237
	b	LBB0_18
LBB0_14:
	add	w8, w9, #64
	and	w8, w8, #0xff
	cmp	w8, #208
	b.lo	LBB0_20
; %bb.15:
	mov	w8, #240
	b	LBB0_18
LBB0_16:
	cmn	w9, #113
	b.gt	LBB0_20
; %bb.17:
	mov	w8, #244
LBB0_18:
	cmp	w8, #245
	cset	w0, lo
	ret
LBB0_19:
	cmn	w9, #65
	b.le	LBB0_5
LBB0_20:
	mov	w8, #0
LBB0_21:
	mov	x0, x8
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
lJTI0_1:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_12-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_14-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_16-LBB0_10)>>2
                                        ; -- End function
	.no_dead_strip	_is_legal_utf8
.subsections_via_symbols
