	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mb_utf_validate
_mb_utf_validate:                       ## @mb_utf_validate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpb	$0, (%rdi)
	je	LBB0_26
## %bb.1:
	movq	%rdi, %r14
	movq	%rdi, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, (%r14)
	je	LBB0_24
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
	movq	%r14, %rdi
	callq	_utf_charcheck
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jle	LBB0_22
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rcx
	subq	%r14, %rcx
	je	LBB0_21
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rax), %r8d
	xorl	%r9d, %r9d
	cmpl	$31, %r8d
	jb	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$32, %rcx
	jb	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r8
	movq	%r8, %r9
	andq	$-32, %r9
	leaq	-32(%r9), %rcx
	movq	%rcx, %rdi
	shrq	$5, %rdi
	incq	%rdi
	movl	%edi, %esi
	andl	$3, %esi
	cmpq	$96, %rcx
	jae	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %eax
	addq	%rax, %r14
	movq	%r14, %rbx
	jmp	LBB0_23
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	andq	$-4, %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r14,%rdx), %xmm0
	movups	16(%r14,%rdx), %xmm1
	movups	%xmm0, (%rbx,%rdx)
	movups	%xmm1, 16(%rbx,%rdx)
	movups	32(%r14,%rdx), %xmm0
	movups	48(%r14,%rdx), %xmm1
	movups	%xmm0, 32(%rbx,%rdx)
	movups	%xmm1, 48(%rbx,%rdx)
	movups	64(%r14,%rdx), %xmm0
	movups	80(%r14,%rdx), %xmm1
	movups	%xmm0, 64(%rbx,%rdx)
	movups	%xmm1, 80(%rbx,%rdx)
	movups	96(%r14,%rdx), %xmm0
	movups	112(%r14,%rdx), %xmm1
	movups	%xmm0, 96(%rbx,%rdx)
	movups	%xmm1, 112(%rbx,%rdx)
	subq	$-128, %rdx
	addq	$-4, %rdi
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%rdx), %rdi
	addq	$16, %rdi
	addq	%r14, %rdx
	addq	$16, %rdx
	shlq	$5, %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rdx,%rcx), %xmm0
	movups	(%rdx,%rcx), %xmm1
	movups	%xmm0, -16(%rdi,%rcx)
	movups	%xmm1, (%rdi,%rcx)
	addq	$32, %rcx
	cmpq	%rcx, %rsi
	jne	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%r9, %r14
	addq	%r9, %rbx
	cmpq	%r9, %r8
	je	LBB0_23
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %esi
	subl	%r9d, %esi
	movl	%r9d, %edx
	notl	%edx
	addl	%eax, %edx
	andl	$7, %esi
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	negl	%esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r14), %ecx
	incq	%r14
	movb	%cl, (%rbx)
	incq	%rbx
	decq	%rdi
	cmpl	%edi, %esi
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	subl	%edi, %r9d
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$7, %edx
	jb	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	subl	%r9d, %eax
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r14), %ecx
	movb	%cl, (%rbx)
	movzbl	1(%r14), %ecx
	movb	%cl, 1(%rbx)
	movzbl	2(%r14), %ecx
	movb	%cl, 2(%rbx)
	movzbl	3(%r14), %ecx
	movb	%cl, 3(%rbx)
	movzbl	4(%r14), %ecx
	movb	%cl, 4(%rbx)
	movzbl	5(%r14), %ecx
	movb	%cl, 5(%rbx)
	movzbl	6(%r14), %ecx
	movb	%cl, 6(%rbx)
	movzbl	7(%r14), %ecx
	addq	$8, %r14
	movb	%cl, 7(%rbx)
	addq	$8, %rbx
	addl	$-8, %eax
	jne	LBB0_20
	jmp	LBB0_23
LBB0_24:
	cmpq	%r14, %rbx
	je	LBB0_26
## %bb.25:
	movb	$0, (%rbx)
LBB0_26:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mb_utf_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mb_utf_validate
_mb_utf_validate:                       ; @mb_utf_validate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldrb	w8, [x0]
	cbz	w8, LBB0_17
; %bb.1:
	mov	x19, x0
	mov	x20, x0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x19]
	cbz	w8, LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
	mov	x0, x19
	bl	_utf_charcheck
	subs	w9, w0, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	subs	x10, x20, x19
	b.eq	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #0
	cmp	w9, #63
	b.lo	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x10, #64
	b.lo	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x11, x9, #1
	and	x8, x11, #0x1ffffffc0
	add	x9, x19, x8
	add	x10, x20, x8
	add	x12, x19, #32
	add	x13, x20, #32
	mov	x14, x8
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	stp	q0, q1, [x13, #-32]
	stp	q2, q3, [x13], #64
	subs	x14, x14, #64
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x10
	mov	x19, x9
	cmp	x11, x8
	b.eq	LBB0_3
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x19, w0, uxtw
	mov	x19, x20
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x9, x19
	mov	x10, x20
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w0, w8
	mov	x19, x9
	mov	x20, x10
LBB0_14:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x19], #1
	strb	w9, [x20], #1
	subs	w8, w8, #1
	b.ne	LBB0_14
	b	LBB0_3
LBB0_15:
	cmp	x20, x19
	b.eq	LBB0_17
; %bb.16:
	strb	wzr, [x20]
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mb_utf_validate
.subsections_via_symbols
