	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function utf8_to_ucn
_utf8_to_ucn:                           ## @utf8_to_ucn
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movzbl	(%rsi), %r8d
	testb	$-128, %r8b
	jne	LBB0_1
## %bb.10:
	andl	$127, %r8d
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	movl	%r8d, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rcx,%rcx), %edx
	decq	%rax
	testb	$64, %cl
	movl	%edx, %ecx
	jne	LBB0_2
## %bb.3:
	movq	%rax, %rcx
	notq	%rcx
	movl	$63, %edx
	shrq	%cl, %rdx
	andl	%edx, %r8d
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	incq	%rsi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rsi), %r9d
	movl	%r9d, %edx
	andl	$-64, %edx
	cmpl	$128, %edx
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r8, %rdx
	shlq	$6, %rdx
	andl	$63, %r9d
	movq	%r9, %r8
	orq	%rdx, %r8
	incq	%rsi
	decl	%ecx
	jne	LBB0_6
## %bb.8:
	negq	%rax
	jmp	LBB0_9
LBB0_4:
	movl	$1, %eax
LBB0_9:
	movw	$21852, (%rdi)                  ## imm = 0x555C
	movl	%r8d, %edx
	shrl	$28, %edx
	leaq	L_.str(%rip), %rcx
	movb	(%rdx,%rcx), %dl
	movb	%dl, 2(%rdi)
	movl	%r8d, %edx
	shrl	$24, %edx
	andl	$15, %edx
	movb	(%rdx,%rcx), %dl
	movb	%dl, 3(%rdi)
	movl	%r8d, %edx
	shrl	$20, %edx
	andl	$15, %edx
	movb	(%rdx,%rcx), %dl
	movb	%dl, 4(%rdi)
	movl	%r8d, %edx
	shrl	$16, %edx
	andl	$15, %edx
	movb	(%rdx,%rcx), %dl
	movb	%dl, 5(%rdi)
	movl	%r8d, %edx
	shrl	$12, %edx
	andl	$15, %edx
	movb	(%rdx,%rcx), %dl
	movb	%dl, 6(%rdi)
	movl	%r8d, %edx
	shrl	$8, %edx
	andl	$15, %edx
	movb	(%rdx,%rcx), %dl
	movb	%dl, 7(%rdi)
	movl	%r8d, %edx
	shrl	$4, %edx
	andl	$15, %edx
	movb	(%rdx,%rcx), %dl
	movb	%dl, 8(%rdi)
	andl	$15, %r8d
	movb	(%r8,%rcx), %cl
	movb	%cl, 9(%rdi)
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0123456789abcdef"

	.no_dead_strip	_utf8_to_ucn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function utf8_to_ucn
_utf8_to_ucn:                           ; @utf8_to_ucn
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldrb	w9, [x1]
	tbnz	w9, #7, LBB0_2
; %bb.1:
	mov	x8, #0
	and	x9, x9, #0x7f
	b	LBB0_10
LBB0_2:
	mov	x8, #0
	mov	x10, x9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x11, x10
	lsl	w10, w10, #1
	sub	x8, x8, #1
	tbnz	w11, #6, LBB0_3
; %bb.4:
	mvn	x10, x8
	mov	w11, #63
	lsr	x11, x11, x10
	and	x9, x11, x9
	cmn	w8, #1
	b.eq	LBB0_9
; %bb.5:
	add	x11, x1, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x11]
	and	w13, w12, #0xc0
	cmp	w13, #128
	b.ne	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bfi	x12, x9, #6, #58
	mov	x9, x12
	add	x11, x11, #1
	subs	w10, w10, #1
	b.ne	LBB0_6
; %bb.8:
	neg	x8, x8
	b	LBB0_10
LBB0_9:
	mov	w8, #1
LBB0_10:
	mov	w10, #21852
	strh	w10, [x0]
	ubfx	x10, x9, #28, #4
Lloh0:
	adrp	x11, l_.str@PAGE
Lloh1:
	add	x11, x11, l_.str@PAGEOFF
	ldrb	w10, [x11, x10]
	strb	w10, [x0, #2]
	ubfx	x10, x9, #24, #4
	ldrb	w10, [x11, x10]
	strb	w10, [x0, #3]
	ubfx	x10, x9, #20, #4
	ldrb	w10, [x11, x10]
	strb	w10, [x0, #4]
	ubfx	x10, x9, #16, #4
	ldrb	w10, [x11, x10]
	strb	w10, [x0, #5]
	ubfx	x10, x9, #12, #4
	ldrb	w10, [x11, x10]
	strb	w10, [x0, #6]
	ubfx	x10, x9, #8, #4
	ldrb	w10, [x11, x10]
	strb	w10, [x0, #7]
	ubfx	x10, x9, #4, #4
	ldrb	w10, [x11, x10]
	strb	w10, [x0, #8]
	and	x9, x9, #0xf
	ldrb	w9, [x11, x9]
	strb	w9, [x0, #9]
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	_abort
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0123456789abcdef"

	.no_dead_strip	_utf8_to_ucn
.subsections_via_symbols
