	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function utf8_decode
_utf8_decode:                           ## @utf8_decode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movzbl	(%rdi), %r8d
	testb	%r8b, %r8b
	js	LBB0_1
## %bb.8:
	testq	%rsi, %rsi
	je	LBB0_10
LBB0_9:
	movl	%r8d, (%rsi)
LBB0_10:
	incq	%rdi
	movq	%rdi, %rax
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testb	$64, %r8b
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	1(%rdi,%r9), %r10d
	incq	%r9
	movl	%r10d, %r11d
	andl	$-64, %r11d
	shll	$6, %edx
	andl	$63, %r10d
	orl	%r10d, %edx
	addl	%r8d, %r8d
	addl	$5, %ecx
	cmpl	$128, %r11d
	je	LBB0_2
	jmp	LBB0_11
LBB0_4:
	andl	$127, %r8d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r8d
	xorl	%eax, %eax
	cmpl	$3, %r9d
	ja	LBB0_11
## %bb.5:
	orl	%edx, %r8d
	movq	_MAXUNICODE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r8d
	ja	LBB0_11
## %bb.6:
	movl	%r9d, %eax
	leaq	_utf8_decode.limits(%rip), %rcx
	cmpl	(%rcx,%rax,4), %r8d
	jbe	LBB0_12
## %bb.7:
	addq	%rax, %rdi
	testq	%rsi, %rsi
	jne	LBB0_9
	jmp	LBB0_10
LBB0_11:
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @utf8_decode.limits
_utf8_decode.limits:
	.long	255                             ## 0xff
	.long	127                             ## 0x7f
	.long	2047                            ## 0x7ff
	.long	65535                           ## 0xffff

	.comm	_MAXUNICODE,4,2                 ## @MAXUNICODE
	.no_dead_strip	_utf8_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function utf8_decode
_utf8_decode:                           ; @utf8_decode
	.cfi_startproc
; %bb.0:
	ldrsb	w8, [x0]
	and	w9, w8, #0xff
	tbnz	w8, #31, LBB0_5
; %bb.1:
	cbz	x1, LBB0_3
LBB0_2:
	str	w9, [x1]
LBB0_3:
	add	x8, x0, #1
LBB0_4:
	mov	x0, x8
	ret
LBB0_5:
	mov	w11, #0
	mov	x10, #0
	mov	w12, #0
	add	x8, x0, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	tbz	w9, #6, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w13, [x8, x10]
	add	x10, x10, #1
	and	w14, w13, #0xc0
	bfi	w13, w12, #6, #26
	lsl	w9, w9, #1
	add	w11, w11, #5
	mov	x12, x13
	cmp	w14, #128
	b.eq	LBB0_6
	b	LBB0_12
LBB0_8:
	mov	x8, #0
	cmp	w10, #3
	b.hi	LBB0_4
; %bb.9:
	and	w9, w9, #0x7f
	lsl	w9, w9, w11
	orr	w9, w9, w12
Lloh0:
	adrp	x11, _MAXUNICODE@GOTPAGE
Lloh1:
	ldr	x11, [x11, _MAXUNICODE@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	cmp	w9, w11
	b.hi	LBB0_4
; %bb.10:
Lloh3:
	adrp	x8, _utf8_decode.limits@PAGE
Lloh4:
	add	x8, x8, _utf8_decode.limits@PAGEOFF
	ldr	w8, [x8, w10, uxtw #2]
	cmp	w9, w8
	b.ls	LBB0_12
; %bb.11:
	add	x0, x0, w10, uxtw
	cbnz	x1, LBB0_2
	b	LBB0_3
LBB0_12:
	mov	x0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @utf8_decode.limits
_utf8_decode.limits:
	.long	255                             ; 0xff
	.long	127                             ; 0x7f
	.long	2047                            ; 0x7ff
	.long	65535                           ; 0xffff

	.comm	_MAXUNICODE,4,2                 ; @MAXUNICODE
	.no_dead_strip	_utf8_decode
.subsections_via_symbols
