	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UTF8_getc                      ## -- Begin function UTF8_getc
	.p2align	4, 0x90
_UTF8_getc:                             ## @UTF8_getc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movzbl	(%rdi), %ebx
	testb	$-128, %bl
	jne	LBB0_4
## %bb.3:
	andl	$127, %ebx
	movl	$1, %edi
	movq	%rbx, %rsi
LBB0_34:
	movq	%rsi, (%rdx)
	movl	%edi, %eax
	jmp	LBB0_35
LBB0_1:
	xorl	%eax, %eax
LBB0_35:
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movl	%ebx, %eax
	andl	$-32, %eax
	cmpl	$192, %eax
	jne	LBB0_8
## %bb.5:
	movl	$-1, %eax
	cmpl	$2, %esi
	jb	LBB0_35
## %bb.6:
	movzbl	1(%rdi), %esi
	movl	%esi, %ecx
	andb	$-64, %cl
	movl	$-3, %eax
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.7:
	andl	$31, %ebx
	shlq	$6, %rbx
	andl	$63, %esi
	orq	%rbx, %rsi
	movl	$2, %edi
	movl	$-4, %eax
	cmpq	$128, %rsi
	jae	LBB0_34
	jmp	LBB0_35
LBB0_8:
	movl	%ebx, %eax
	andl	$-16, %eax
	cmpl	$224, %eax
	jne	LBB0_13
## %bb.9:
	movl	$-1, %eax
	cmpl	$3, %esi
	jb	LBB0_35
## %bb.10:
	movzbl	1(%rdi), %r8d
	movl	%r8d, %ecx
	andb	$-64, %cl
	movl	$-3, %eax
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.11:
	movzbl	2(%rdi), %esi
	movl	%esi, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.12:
	shll	$12, %ebx
	movzwl	%bx, %eax
	andl	$63, %r8d
	shlq	$6, %r8
	orq	%rax, %r8
	andl	$63, %esi
	orq	%r8, %rsi
	movl	$3, %edi
	movl	$-4, %eax
	cmpq	$2048, %rsi                     ## imm = 0x800
	jae	LBB0_34
	jmp	LBB0_35
LBB0_13:
	movl	%ebx, %eax
	andl	$-8, %eax
	cmpl	$240, %eax
	jne	LBB0_19
## %bb.14:
	movl	$-1, %eax
	cmpl	$4, %esi
	jb	LBB0_35
## %bb.15:
	movzbl	1(%rdi), %r8d
	movl	%r8d, %ecx
	andb	$-64, %cl
	movl	$-3, %eax
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.16:
	movzbl	2(%rdi), %r9d
	movl	%r9d, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.17:
	movzbl	3(%rdi), %esi
	movl	%esi, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.18:
	andl	$7, %ebx
	shlq	$18, %rbx
	andl	$63, %r8d
	shlq	$12, %r8
	orq	%rbx, %r8
	andl	$63, %r9d
	shlq	$6, %r9
	orq	%r8, %r9
	andl	$63, %esi
	orq	%r9, %rsi
	movl	$4, %edi
	movl	$-4, %eax
	cmpq	$65536, %rsi                    ## imm = 0x10000
	jae	LBB0_34
	jmp	LBB0_35
LBB0_19:
	movl	%ebx, %eax
	andl	$-4, %eax
	cmpl	$248, %eax
	jne	LBB0_26
## %bb.20:
	movl	$-1, %eax
	cmpl	$5, %esi
	jb	LBB0_35
## %bb.21:
	movzbl	1(%rdi), %r8d
	movl	%r8d, %ecx
	andb	$-64, %cl
	movl	$-3, %eax
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.22:
	movzbl	2(%rdi), %r9d
	movl	%r9d, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.23:
	movzbl	3(%rdi), %r10d
	movl	%r10d, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.24:
	movzbl	4(%rdi), %esi
	movl	%esi, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.25:
	andl	$3, %ebx
	shlq	$24, %rbx
	andl	$63, %r8d
	shlq	$18, %r8
	orq	%rbx, %r8
	andl	$63, %r9d
	shlq	$12, %r9
	orq	%r8, %r9
	andl	$63, %r10d
	shlq	$6, %r10
	orq	%r9, %r10
	andl	$63, %esi
	orq	%r10, %rsi
	movl	$5, %edi
	movl	$-4, %eax
	cmpq	$2097152, %rsi                  ## imm = 0x200000
	jae	LBB0_34
	jmp	LBB0_35
LBB0_26:
	movl	%ebx, %ecx
	andl	$-2, %ecx
	movl	$-2, %eax
	cmpl	$252, %ecx
	jne	LBB0_35
## %bb.27:
	movl	$-1, %eax
	cmpl	$6, %esi
	jb	LBB0_35
## %bb.28:
	movzbl	1(%rdi), %r8d
	movl	%r8d, %ecx
	andb	$-64, %cl
	movl	$-3, %eax
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.29:
	movzbl	2(%rdi), %r9d
	movl	%r9d, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.30:
	movzbl	3(%rdi), %r10d
	movl	%r10d, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.31:
	movzbl	4(%rdi), %r11d
	movl	%r11d, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.32:
	movzbl	5(%rdi), %esi
	movl	%esi, %ecx
	andb	$-64, %cl
	cmpb	$-128, %cl
	jne	LBB0_35
## %bb.33:
	andl	$1, %ebx
	shlq	$30, %rbx
	andl	$63, %r8d
	shlq	$24, %r8
	orq	%rbx, %r8
	andl	$63, %r9d
	shlq	$18, %r9
	orq	%r8, %r9
	andl	$63, %r10d
	shlq	$12, %r10
	orq	%r9, %r10
	andl	$63, %r11d
	shlq	$6, %r11
	orq	%r10, %r11
	andl	$63, %esi
	orq	%r11, %rsi
	movl	$6, %edi
	movl	$-4, %eax
	cmpq	$67108864, %rsi                 ## imm = 0x4000000
	jae	LBB0_34
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UTF8_getc                      ; -- Begin function UTF8_getc
	.p2align	2
_UTF8_getc:                             ; @UTF8_getc
	.cfi_startproc
; %bb.0:
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.1:
	ldrb	w8, [x0]
	tbnz	w8, #7, LBB0_4
; %bb.2:
	and	x8, x8, #0x7f
	mov	w0, #1
	str	x8, [x2]
	ret
LBB0_3:
	mov	w0, #0
	ret
LBB0_4:
	and	w9, w8, #0xe0
	cmp	w9, #192
	b.ne	LBB0_7
; %bb.5:
	cmp	w1, #2
	b.hs	LBB0_10
; %bb.6:
	mov	w0, #-1
	ret
LBB0_7:
	and	w9, w8, #0xf0
	cmp	w9, #224
	b.ne	LBB0_13
; %bb.8:
	cmp	w1, #3
	b.hs	LBB0_16
; %bb.9:
	mov	w0, #-1
	ret
LBB0_10:
	ldrb	w9, [x0, #1]
	and	w10, w9, #0xc0
	cmp	w10, #128
	b.ne	LBB0_47
; %bb.11:
	lsl	w8, w8, #6
	and	x8, x8, #0x7c0
	and	w9, w9, #0x3f
	orr	x8, x9, x8
	cmp	x8, #128
	b.hs	LBB0_23
; %bb.12:
	mov	w0, #-4
	ret
LBB0_13:
	and	w9, w8, #0xf8
	cmp	w9, #240
	b.ne	LBB0_20
; %bb.14:
	cmp	w1, #4
	b.hs	LBB0_24
; %bb.15:
	mov	w0, #-1
	ret
LBB0_16:
	ldrb	w9, [x0, #1]
	and	w10, w9, #0xc0
	cmp	w10, #128
	b.ne	LBB0_47
; %bb.17:
	ldrb	w10, [x0, #2]
	and	w11, w10, #0xc0
	cmp	w11, #128
	b.ne	LBB0_47
; %bb.18:
	lsl	w8, w8, #12
	and	x8, x8, #0xf000
	and	w9, w9, #0x3f
	bfi	x8, x9, #6, #6
	and	w9, w10, #0x3f
	orr	x8, x8, x9
	cmp	x8, #2048
	b.hs	LBB0_39
; %bb.19:
	mov	w0, #-4
	ret
LBB0_20:
	and	w9, w8, #0xfc
	cmp	w9, #248
	b.ne	LBB0_29
; %bb.21:
	cmp	w1, #5
	b.hs	LBB0_32
; %bb.22:
	mov	w0, #-1
	ret
LBB0_23:
	mov	w0, #2
	str	x8, [x2]
	ret
LBB0_24:
	ldrb	w9, [x0, #1]
	and	w10, w9, #0xc0
	cmp	w10, #128
	b.ne	LBB0_47
; %bb.25:
	ldrb	w10, [x0, #2]
	and	w11, w10, #0xc0
	cmp	w11, #128
	b.ne	LBB0_47
; %bb.26:
	ldrb	w11, [x0, #3]
	and	w12, w11, #0xc0
	cmp	w12, #128
	b.ne	LBB0_47
; %bb.27:
	lsl	w8, w8, #18
	and	x8, x8, #0x1c0000
	and	w9, w9, #0x3f
	bfi	x8, x9, #12, #6
	and	w9, w10, #0x3f
	bfi	x8, x9, #6, #6
	and	w9, w11, #0x3f
	orr	x8, x8, x9
	cmp	x8, #16, lsl #12                ; =65536
	b.hs	LBB0_48
; %bb.28:
	mov	w0, #-4
	ret
LBB0_29:
	and	w9, w8, #0xfe
	cmp	w9, #252
	b.ne	LBB0_38
; %bb.30:
	cmp	w1, #6
	b.hs	LBB0_40
; %bb.31:
	mov	w0, #-1
	ret
LBB0_32:
	ldrb	w9, [x0, #1]
	and	w10, w9, #0xc0
	cmp	w10, #128
	b.ne	LBB0_47
; %bb.33:
	ldrb	w10, [x0, #2]
	and	w11, w10, #0xc0
	cmp	w11, #128
	b.ne	LBB0_47
; %bb.34:
	ldrb	w11, [x0, #3]
	and	w12, w11, #0xc0
	cmp	w12, #128
	b.ne	LBB0_47
; %bb.35:
	ldrb	w12, [x0, #4]
	and	w13, w12, #0xc0
	cmp	w13, #128
	b.ne	LBB0_47
; %bb.36:
	lsl	w8, w8, #24
	and	x8, x8, #0x3000000
	and	w9, w9, #0x3f
	bfi	x8, x9, #18, #6
	and	w9, w10, #0x3f
	bfi	x8, x9, #12, #6
	and	w9, w11, #0x3f
	bfi	x8, x9, #6, #6
	and	w9, w12, #0x3f
	orr	x8, x8, x9
	cmp	x8, #512, lsl #12               ; =2097152
	b.hs	LBB0_49
; %bb.37:
	mov	w0, #-4
	ret
LBB0_38:
	mov	w0, #-2
	ret
LBB0_39:
	mov	w0, #3
	str	x8, [x2]
	ret
LBB0_40:
	ldrb	w9, [x0, #1]
	and	w10, w9, #0xc0
	cmp	w10, #128
	b.ne	LBB0_47
; %bb.41:
	ldrb	w10, [x0, #2]
	and	w11, w10, #0xc0
	cmp	w11, #128
	b.ne	LBB0_47
; %bb.42:
	ldrb	w11, [x0, #3]
	and	w12, w11, #0xc0
	cmp	w12, #128
	b.ne	LBB0_47
; %bb.43:
	ldrb	w12, [x0, #4]
	and	w13, w12, #0xc0
	cmp	w13, #128
	b.ne	LBB0_47
; %bb.44:
	ldrb	w13, [x0, #5]
	and	w14, w13, #0xc0
	cmp	w14, #128
	b.ne	LBB0_47
; %bb.45:
	lsl	w8, w8, #30
	and	x8, x8, #0x40000000
	and	w9, w9, #0x3f
	bfi	x8, x9, #24, #6
	and	w9, w10, #0x3f
	bfi	x8, x9, #18, #6
	and	w9, w11, #0x3f
	bfi	x8, x9, #12, #6
	and	w9, w12, #0x3f
	bfi	x8, x9, #6, #6
	and	w9, w13, #0x3f
	orr	x8, x8, x9
	lsr	x9, x8, #26
	cbnz	x9, LBB0_50
; %bb.46:
	mov	w0, #-4
	ret
LBB0_47:
	mov	w0, #-3
	ret
LBB0_48:
	mov	w0, #4
	str	x8, [x2]
	ret
LBB0_49:
	mov	w0, #5
	str	x8, [x2]
	ret
LBB0_50:
	mov	w0, #6
	str	x8, [x2]
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
