	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function utf8dec_wchar
_utf8dec_wchar:                         ## @utf8dec_wchar
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movzbl	(%rsi), %ecx
	testb	%cl, %cl
	js	LBB0_2
## %bb.1:
	movl	%ecx, (%r14)
	movl	$1, %ebx
	jmp	LBB0_32
LBB0_2:
	movq	%rsi, %r12
	movl	%ecx, %esi
	andl	$-32, %esi
	movl	$2, %r15d
	movb	$1, %al
	cmpl	$192, %esi
	jne	LBB0_4
## %bb.3:
	movb	$1, %cl
LBB0_15:
	movb	$1, %r13b
	jmp	LBB0_16
LBB0_4:
	movl	%ecx, %esi
	andl	$-16, %esi
	cmpl	$224, %esi
	jne	LBB0_6
## %bb.5:
	movl	$3, %r15d
	jmp	LBB0_8
LBB0_6:
	movl	%ecx, %esi
	andl	$-8, %esi
	cmpl	$240, %esi
	jne	LBB0_9
## %bb.7:
	movl	$4, %r15d
LBB0_8:
	xorl	%r13d, %r13d
	movb	$1, %cl
	jmp	LBB0_16
LBB0_9:
	movl	%ecx, %esi
	andl	$-4, %esi
	cmpl	$248, %esi
	jne	LBB0_11
## %bb.10:
	movl	$5, %r15d
	jmp	LBB0_13
LBB0_11:
	andl	$-2, %ecx
	cmpl	$252, %ecx
	jne	LBB0_14
## %bb.12:
	movl	$6, %r15d
LBB0_13:
	xorl	%eax, %eax
	movb	$1, %cl
	xorl	%r13d, %r13d
LBB0_16:
	movslq	%r15d, %rsi
	movl	$-2, %ebx
	cmpq	%rdx, %rsi
	ja	LBB0_32
## %bb.17:
	andb	%al, %cl
	movl	$-1, %ebx
	cmpb	$1, %cl
	jne	LBB0_32
## %bb.18:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_utf8seq_is_overlong
	testq	%rax, %rax
	jne	LBB0_32
## %bb.19:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_utf8seq_is_surrogate
	testq	%rax, %rax
	jne	LBB0_32
## %bb.20:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_utf8seq_is_illegal
	testq	%rax, %rax
	jne	LBB0_32
## %bb.21:
	movl	$127, %eax
	movl	%r15d, %ecx
	shrl	%cl, %eax
	andb	(%r12), %al
	movzbl	%al, %edx
	movl	%edx, (%r14)
	cmpl	$3, %r15d
	movl	$2, %eax
	cmovgel	%r15d, %eax
	movzbl	1(%r12), %ecx
	cmpb	$-65, %cl
	jg	LBB0_32
## %bb.22:
	shll	$6, %edx
	andl	$63, %ecx
	orl	%edx, %ecx
	movl	%ecx, (%r14)
	testb	%r13b, %r13b
	jne	LBB0_31
## %bb.23:
	movzbl	2(%r12), %edx
	cmpb	$-65, %dl
	jg	LBB0_32
## %bb.24:
	shll	$6, %ecx
	andl	$63, %edx
	orl	%ecx, %edx
	movl	%edx, (%r14)
	cmpl	$3, %eax
	je	LBB0_31
## %bb.25:
	movzbl	3(%r12), %esi
	cmpb	$-65, %sil
	jg	LBB0_32
## %bb.26:
	shll	$6, %edx
	andl	$63, %esi
	orl	%edx, %esi
	movl	%esi, (%r14)
	cmpl	$4, %eax
	je	LBB0_31
## %bb.27:
	movzbl	4(%r12), %ecx
	cmpb	$-65, %cl
	jg	LBB0_32
## %bb.28:
	shll	$6, %esi
	andl	$63, %ecx
	orl	%esi, %ecx
	movl	%ecx, (%r14)
	cmpl	$5, %eax
	je	LBB0_31
## %bb.29:
	movzbl	5(%r12), %eax
	cmpb	$-65, %al
	jg	LBB0_32
## %bb.30:
	shll	$6, %ecx
	andl	$63, %eax
	orl	%ecx, %eax
	movl	%eax, (%r14)
LBB0_31:
	movl	%r15d, %ebx
LBB0_32:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	$-1, %r15d
	xorl	%ecx, %ecx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_utf8dec_wchar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function utf8dec_wchar
_utf8dec_wchar:                         ; @utf8dec_wchar
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldrsb	w9, [x1]
	and	w8, w9, #0xff
	tbnz	w9, #31, LBB0_3
; %bb.1:
	mov	w19, #1
LBB0_2:
	str	w8, [x20]
	b	LBB0_19
LBB0_3:
	mov	x21, x1
	and	w9, w8, #0xe0
	cmp	w9, #192
	b.ne	LBB0_5
; %bb.4:
	mov	w19, #2
	mov	w8, #1
	mov	w9, #1
	mov	w22, #1
	b	LBB0_11
LBB0_5:
	and	w9, w8, #0xf0
	cmp	w9, #224
	b.ne	LBB0_7
; %bb.6:
	mov	w22, #0
	mov	w19, #3
	b	LBB0_9
LBB0_7:
	and	w9, w8, #0xf8
	cmp	w9, #240
	b.ne	LBB0_10
; %bb.8:
	mov	w22, #0
	mov	w19, #4
LBB0_9:
	mov	w8, #1
	mov	w9, #1
	b	LBB0_11
LBB0_10:
	and	w9, w8, #0xfc
	mov	w10, #5
	mov	w11, #1
	and	w8, w8, #0xfe
	mov	w12, #-1
	mov	w13, #1
	mov	w14, #6
	mov	w15, #1
	cmp	w8, #252
	csel	w8, wzr, w15, ne
	csel	w13, w13, wzr, ne
	csel	w12, w12, w14, ne
	cmp	w9, #248
	csel	w8, w11, w8, eq
	csel	w9, wzr, w13, eq
	csel	w22, wzr, w13, eq
	csel	w19, w10, w12, eq
LBB0_11:
	sxtw	x10, w19
	cmp	x10, x2
	b.ls	LBB0_13
; %bb.12:
	mov	w19, #-2
	b	LBB0_19
LBB0_13:
	and	w8, w8, w9
	cmp	w8, #1
	b.ne	LBB0_18
; %bb.14:
	mov	x0, x21
	mov	x1, x19
	bl	_utf8seq_is_overlong
	cbnz	x0, LBB0_18
; %bb.15:
	mov	x0, x21
	mov	x1, x19
	bl	_utf8seq_is_surrogate
	cbnz	x0, LBB0_18
; %bb.16:
	mov	x0, x21
	mov	x1, x19
	bl	_utf8seq_is_illegal
	cbnz	x0, LBB0_18
; %bb.17:
	ldrb	w8, [x21]
	mov	w9, #127
	lsr	w9, w9, w19
	and	w9, w9, w8
	str	w9, [x20]
	mov	w8, #2
	cmp	w19, #2
	csel	w8, w19, w8, gt
	ldrsb	w10, [x21, #1]
	cmn	w10, #65
	b.le	LBB0_20
LBB0_18:
	mov	w19, #-1
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_20:
	and	w10, w10, #0xff
	and	w10, w10, #0x3f
	bfi	w10, w9, #6, #7
	str	w10, [x20]
	tbnz	w22, #0, LBB0_19
; %bb.21:
	ldrsb	w9, [x21, #2]
	cmn	w9, #65
	b.gt	LBB0_18
; %bb.22:
	and	w9, w9, #0xff
	and	w9, w9, #0x3f
	bfi	w9, w10, #6, #13
	str	w9, [x20]
	cmp	w8, #3
	b.eq	LBB0_19
; %bb.23:
	ldrsb	w10, [x21, #3]
	cmn	w10, #65
	b.gt	LBB0_18
; %bb.24:
	and	w10, w10, #0xff
	and	w10, w10, #0x3f
	bfi	w10, w9, #6, #19
	str	w10, [x20]
	cmp	w8, #4
	b.eq	LBB0_19
; %bb.25:
	ldrsb	w9, [x21, #4]
	cmn	w9, #65
	b.gt	LBB0_18
; %bb.26:
	and	w9, w9, #0xff
	and	w9, w9, #0x3f
	bfi	w9, w10, #6, #25
	str	w9, [x20]
	cmp	w8, #5
	b.eq	LBB0_19
; %bb.27:
	ldrsb	w8, [x21, #5]
	cmn	w8, #65
	b.gt	LBB0_18
; %bb.28:
	and	w8, w8, #0xff
	bfi	w8, w9, #6, #26
	b	LBB0_2
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_utf8dec_wchar
.subsections_via_symbols
