	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _utf8_to_unicode
__utf8_to_unicode:                      ## @_utf8_to_unicode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.1:
	movzbl	(%rsi), %r8d
	testl	%r8d, %r8d
	je	LBB0_13
## %bb.2:
	leaq	__utf8_to_unicode.utf8_count(%rip), %rax
	movsbl	(%r8,%rax), %eax
	cmpl	%eax, %edx
	jge	LBB0_8
## %bb.3:
	cmpl	$2, %edx
	jl	LBB0_11
## %bb.4:
	movl	%edx, %r8d
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rsi,%rcx), %eax
	andb	$-64, %al
	cmpb	$-128, %al
	jne	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rcx
	cmpq	%rcx, %r8
	jne	LBB0_5
LBB0_11:
	movl	%edx, %ecx
LBB0_12:
	movq	_UNICODE_R_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	negl	%ecx
	movl	%ecx, %eax
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_8:
	leal	-1(%rax), %ecx
	cmpl	$3, %ecx
	ja	LBB0_14
## %bb.9:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_10:
	andl	$127, %r8d
	movl	%r8d, (%rdi)
	movl	$1, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_14:
	movl	%r8d, %eax
	andb	$-2, %al
	movl	$2, %ecx
	cmpb	$-64, %al
	je	LBB0_18
## %bb.15:
	leal	11(%r8), %r9d
	movl	$4, %ecx
	cmpb	$3, %r9b
	jb	LBB0_18
## %bb.16:
	andb	$-4, %r8b
	movl	$5, %ecx
	cmpb	$-8, %r8b
	je	LBB0_18
## %bb.17:
	xorl	%ecx, %ecx
	cmpb	$-4, %al
	sete	%cl
	leal	(%rcx,%rcx,4), %ecx
	incl	%ecx
LBB0_18:
	cmpl	%edx, %ecx
	cmovgel	%edx, %ecx
	cmpl	$2, %ecx
	jl	LBB0_12
## %bb.19:
	movl	%ecx, %r8d
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rsi,%rax), %edx
	andb	$-64, %dl
	cmpb	$-128, %dl
	jne	LBB0_32
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	incq	%rax
	cmpq	%rax, %r8
	jne	LBB0_20
	jmp	LBB0_12
LBB0_22:
	movzbl	1(%rsi), %eax
	movl	%eax, %edx
	andl	$-64, %edx
	movl	$1, %ecx
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.23:
	andl	$31, %r8d
	shll	$6, %r8d
	andl	$63, %eax
	orl	%r8d, %eax
	movl	%eax, (%rdi)
	movl	$2, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_24:
	movsbl	1(%rsi), %r9d
	movl	%r9d, %edx
	andl	$192, %edx
	movl	$1, %ecx
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.25:
	movzbl	2(%rsi), %esi
	movl	%esi, %edx
	andl	$-64, %edx
	movl	$2, %ecx
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.26:
	shll	$12, %r8d
	movzwl	%r8w, %ecx
	andl	$63, %r9d
	shll	$6, %r9d
	orl	%ecx, %r9d
	andl	$63, %esi
	orl	%r9d, %esi
	movl	$3, %ecx
	cmpl	$2048, %esi                     ## imm = 0x800
	jb	LBB0_12
	jmp	LBB0_31
LBB0_27:
	movsbl	1(%rsi), %r10d
	movl	%r10d, %edx
	andl	$192, %edx
	movl	$1, %ecx
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.28:
	movsbl	2(%rsi), %r9d
	movl	%r9d, %edx
	andl	$192, %edx
	movl	$2, %ecx
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.29:
	movzbl	3(%rsi), %esi
	movl	%esi, %edx
	andl	$-64, %edx
	movl	$3, %ecx
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.30:
	andl	$7, %r8d
	shll	$18, %r8d
	andl	$63, %r10d
	shll	$12, %r10d
	orl	%r8d, %r10d
	andl	$63, %r9d
	shll	$6, %r9d
	orl	%r10d, %r9d
	andl	$63, %esi
	orl	%r9d, %esi
	movl	$4, %ecx
	cmpl	$65536, %esi                    ## imm = 0x10000
	jb	LBB0_12
LBB0_31:
	movq	_UNICODE_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jle	LBB0_33
LBB0_32:
	movl	%eax, %ecx
	jmp	LBB0_12
LBB0_33:
	movl	%esi, (%rdi)
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_22
	.long	L0_0_set_24
	.long	L0_0_set_27
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @_utf8_to_unicode.utf8_count
__utf8_to_unicode.utf8_count:
	.ascii	"\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\004\004\004\004\004"
	.space	11

	.comm	_UNICODE_MAX,4,2                ## @UNICODE_MAX
	.comm	_UNICODE_R_CHAR,4,2             ## @UNICODE_R_CHAR
	.no_dead_strip	__utf8_to_unicode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _utf8_to_unicode
__utf8_to_unicode:                      ; @_utf8_to_unicode
	.cfi_startproc
; %bb.0:
	cbz	x2, LBB0_8
; %bb.1:
	ldrb	w9, [x1]
	cbz	w9, LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, __utf8_to_unicode.utf8_count@PAGE
Lloh1:
	add	x8, x8, __utf8_to_unicode.utf8_count@PAGEOFF
	ldrsb	w8, [x8, x9]
	cmp	w2, w8
	b.ge	LBB0_9
; %bb.3:
	cmp	w2, #2
	b.lt	LBB0_7
; %bb.4:
	and	x9, x2, #0xffffffff
	mov	w8, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x1, x8]
	and	w10, w10, #0xc0
	cmp	w10, #128
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_5
LBB0_7:
	mov	x8, x2
	b	LBB0_35
LBB0_8:
	mov	w8, #0
	mov	x0, x8
	ret
LBB0_9:
	sub	w10, w8, #1
	cmp	w10, #3
	b.hi	LBB0_16
; %bb.10:
Lloh2:
	adrp	x11, lJTI0_0@PAGE
Lloh3:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_11
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_11:
	and	w8, w9, #0x7f
	str	w8, [x0]
	mov	w8, #1
	mov	x0, x8
	ret
LBB0_12:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_35
LBB0_13:
	ldrsb	w10, [x1, #1]
	and	w11, w10, #0xc0
	cmp	w11, #128
	b.ne	LBB0_25
; %bb.14:
	ldrb	w11, [x1, #2]
	and	w12, w11, #0xc0
	cmp	w12, #128
	b.ne	LBB0_31
; %bb.15:
	ubfiz	w9, w9, #12, #4
	bfi	w9, w10, #6, #6
	bfxil	w9, w11, #0, #6
	cmp	w9, #2048
	b.lo	LBB0_33
	b	LBB0_34
LBB0_16:
	and	w8, w9, #0xfe
	cmp	w8, #192
	b.ne	LBB0_26
; %bb.17:
	mov	w8, #2
	b	LBB0_27
LBB0_18:
	ldrb	w8, [x1, #1]
	and	w10, w8, #0xc0
	cmp	w10, #128
	b.ne	LBB0_25
; %bb.19:
	and	w8, w8, #0x3f
	bfi	w8, w9, #6, #5
	str	w8, [x0]
	mov	w8, #2
	mov	x0, x8
	ret
LBB0_20:
	ldrsb	w10, [x1, #1]
	and	w11, w10, #0xc0
	cmp	w11, #128
	b.ne	LBB0_25
; %bb.21:
	ldrsb	w11, [x1, #2]
	and	w12, w11, #0xc0
	cmp	w12, #128
	b.ne	LBB0_31
; %bb.22:
	ldrb	w12, [x1, #3]
	and	w13, w12, #0xc0
	cmp	w13, #128
	b.ne	LBB0_33
; %bb.23:
	ubfiz	w9, w9, #18, #3
	bfi	w9, w10, #12, #6
	bfi	w9, w11, #6, #6
	bfxil	w9, w12, #0, #6
	cmp	w9, #16, lsl #12                ; =65536
	b.hs	LBB0_34
; %bb.24:
	mov	w8, #4
	b	LBB0_35
LBB0_25:
	mov	w8, #1
	b	LBB0_35
LBB0_26:
	add	w10, w9, #11
	and	w10, w10, #0xff
	mov	w11, #4
	and	w9, w9, #0xfc
	mov	w12, #5
	cmp	w8, #252
	mov	w8, #6
	csinc	w8, w8, wzr, eq
	cmp	w9, #248
	csel	w8, w12, w8, eq
	cmp	w10, #3
	csel	w8, w11, w8, lo
LBB0_27:
	cmp	w8, w2
	csel	w8, w8, w2, lt
	cmp	w8, #2
	b.lt	LBB0_35
; %bb.28:
	mov	w9, #1
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x1, x9]
	and	w10, w10, #0xc0
	cmp	w10, #128
	b.ne	LBB0_32
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_29
	b	LBB0_35
LBB0_31:
	mov	w8, #2
	b	LBB0_35
LBB0_32:
	mov	x8, x9
	b	LBB0_35
LBB0_33:
	mov	w8, #3
	b	LBB0_35
LBB0_34:
Lloh4:
	adrp	x10, _UNICODE_MAX@GOTPAGE
Lloh5:
	ldr	x10, [x10, _UNICODE_MAX@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	cmp	w9, w10
	b.le	LBB0_36
LBB0_35:
Lloh7:
	adrp	x9, _UNICODE_R_CHAR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _UNICODE_R_CHAR@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	str	w9, [x0]
	neg	w8, w8
	mov	x0, x8
	ret
LBB0_36:
	str	w9, [x0]
	mov	x0, x8
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_18-LBB0_11)>>2
	.byte	(LBB0_13-LBB0_11)>>2
	.byte	(LBB0_20-LBB0_11)>>2
                                        ; -- End function
__utf8_to_unicode.utf8_count:           ; @_utf8_to_unicode.utf8_count
	.ascii	"\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\002\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\003\004\004\004\004\004"
	.space	11

	.comm	_UNICODE_MAX,4,2                ; @UNICODE_MAX
	.comm	_UNICODE_R_CHAR,4,2             ; @UNICODE_R_CHAR
	.no_dead_strip	__utf8_to_unicode
.subsections_via_symbols
