	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function utf8_to_uv
_utf8_to_uv:                            ## @utf8_to_uv
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movzbl	(%rsi), %r12d
	testb	$-128, %r12b
	jne	LBB0_2
## %bb.1:
	movq	$1, (%r15)
	jmp	LBB0_27
LBB0_2:
	movq	%rsi, %rbx
	testb	$64, %r12b
	jne	LBB0_4
## %bb.3:
	movq	$1, (%r15)
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mrb_raise
LBB0_4:
	testb	$32, %r12b
	jne	LBB0_6
## %bb.5:
	andl	$31, %r12d
	movl	$2, %r13d
	jmp	LBB0_15
LBB0_6:
	testb	$16, %r12b
	jne	LBB0_8
## %bb.7:
	andl	$15, %r12d
	movl	$3, %r13d
	jmp	LBB0_15
LBB0_8:
	testb	$8, %r12b
	jne	LBB0_10
## %bb.9:
	andl	$7, %r12d
	movl	$4, %r13d
	jmp	LBB0_15
LBB0_10:
	testb	$4, %r12b
	jne	LBB0_12
## %bb.11:
	andl	$3, %r12d
	movl	$5, %r13d
	jmp	LBB0_15
LBB0_12:
	testb	$2, %r12b
	jne	LBB0_14
## %bb.13:
	andl	$1, %r12d
	movl	$6, %r13d
	jmp	LBB0_15
LBB0_14:
	movq	$1, (%r15)
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mrb_raise
	movl	$1, %r13d
LBB0_15:
	cmpq	(%r15), %r13
	jle	LBB0_17
## %bb.16:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r13, %rdi
	callq	_mrb_fixnum_value
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rdi
	callq	_mrb_fixnum_value
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	callq	_mrb_raisef
LBB0_17:
	movq	%r13, (%r15)
	cmpq	$1, %r13
	je	LBB0_18
## %bb.19:
	movl	$1, %r14d
	subq	%r13, %r14
	incq	%rbx
	leaq	L_.str(%rip), %r13
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	andl	$63, %eax
	shlq	$6, %r12
	orq	%rax, %r12
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%rbx
	incq	%r14
	je	LBB0_24
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	movl	%eax, %ecx
	andl	$-64, %ecx
	cmpl	$128, %ecx
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	addq	%r14, (%r15)
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_mrb_raise
	jmp	LBB0_23
LBB0_24:
	movq	(%r15), %rax
	decq	%rax
	jmp	LBB0_25
LBB0_18:
	xorl	%eax, %eax
LBB0_25:
	movq	_utf8_limits@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx,%rax,8), %r12
	jae	LBB0_27
## %bb.26:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mrb_raise
LBB0_27:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E_ARGUMENT_ERROR,4,2           ## @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malformed UTF-8 character"

L_.str.1:                               ## @.str.1
	.asciz	"malformed UTF-8 character (expected %S bytes, given %S bytes)"

	.comm	_utf8_limits,8,3                ## @utf8_limits
L_.str.2:                               ## @.str.2
	.asciz	"redundant UTF-8 sequence"

	.no_dead_strip	_utf8_to_uv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function utf8_to_uv
_utf8_to_uv:                            ; @utf8_to_uv
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	ldrb	w19, [x1]
	tbnz	w19, #7, LBB0_2
; %bb.1:
	mov	w8, #1
	str	x8, [x21]
	b	LBB0_37
LBB0_2:
	mov	x22, x1
	mov	x20, x0
	tbnz	w19, #6, LBB0_4
; %bb.3:
	mov	w8, #1
	str	x8, [x21]
Lloh0:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
LBB0_4:
	tbnz	w19, #5, LBB0_6
; %bb.5:
	and	x19, x19, #0x1f
	mov	w23, #2
	b	LBB0_15
LBB0_6:
	tbnz	w19, #4, LBB0_8
; %bb.7:
	and	x19, x19, #0xf
	mov	w23, #3
	b	LBB0_15
LBB0_8:
	tbnz	w19, #3, LBB0_10
; %bb.9:
	and	x19, x19, #0x7
	mov	w23, #4
	b	LBB0_15
LBB0_10:
	tbnz	w19, #2, LBB0_12
; %bb.11:
	and	x19, x19, #0x3
	mov	w23, #5
	b	LBB0_15
LBB0_12:
	tbnz	w19, #1, LBB0_14
; %bb.13:
	and	x19, x19, #0x1
	mov	w23, #6
	b	LBB0_15
LBB0_14:
	mov	w23, #1
	str	x23, [x21]
Lloh5:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
LBB0_15:
	ldr	x8, [x21]
	cmp	x23, x8
	b.le	LBB0_17
; %bb.16:
Lloh10:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w24, [x8]
	mov	x0, x23
	bl	_mrb_fixnum_value
	mov	x25, x0
	ldr	x0, [x21]
	bl	_mrb_fixnum_value
	mov	x4, x0
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x24
	mov	x3, x25
	bl	_mrb_raisef
LBB0_17:
	str	x23, [x21]
	subs	x8, x23, #1
	b.eq	LBB0_35
; %bb.18:
	sub	x24, x23, #2
	ldrb	w9, [x22, #1]
	and	w10, w9, #0xc0
	cmp	w10, #128
	b.ne	LBB0_20
; %bb.19:
	and	x8, x9, #0x3f
	bfi	x8, x19, #6, #8
	mov	x19, x8
	cbnz	x24, LBB0_21
	b	LBB0_34
LBB0_20:
	ldr	x9, [x21]
	sub	x8, x9, x8
	str	x8, [x21]
Lloh15:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
	cbz	x24, LBB0_34
LBB0_21:
	sub	x25, x23, #3
	ldrb	w8, [x22, #2]
	and	w9, w8, #0xc0
	cmp	w9, #128
	b.ne	LBB0_23
; %bb.22:
	and	x8, x8, #0x3f
	bfi	x8, x19, #6, #14
	mov	x19, x8
	cbnz	x25, LBB0_24
	b	LBB0_34
LBB0_23:
	ldr	x8, [x21]
	sub	x8, x8, x24
	str	x8, [x21]
Lloh20:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str@PAGE
Lloh24:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
	cbz	x25, LBB0_34
LBB0_24:
	sub	x24, x23, #4
	ldrb	w8, [x22, #3]
	and	w9, w8, #0xc0
	cmp	w9, #128
	b.ne	LBB0_26
; %bb.25:
	and	x8, x8, #0x3f
	bfi	x8, x19, #6, #20
	mov	x19, x8
	cbnz	x24, LBB0_27
	b	LBB0_34
LBB0_26:
	ldr	x8, [x21]
	sub	x8, x8, x25
	str	x8, [x21]
Lloh25:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x2, l_.str@PAGE
Lloh29:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
	cbz	x24, LBB0_34
LBB0_27:
	sub	x23, x23, #5
	ldrb	w8, [x22, #4]
	and	w9, w8, #0xc0
	cmp	w9, #128
	b.ne	LBB0_29
; %bb.28:
	and	x8, x8, #0x3f
	bfi	x8, x19, #6, #26
	mov	x19, x8
	b	LBB0_30
LBB0_29:
	ldr	x8, [x21]
	sub	x8, x8, x24
	str	x8, [x21]
Lloh30:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x2, l_.str@PAGE
Lloh34:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
LBB0_30:
	cbz	x23, LBB0_34
; %bb.31:
	ldrb	w8, [x22, #5]
	and	w9, w8, #0xc0
	cmp	w9, #128
	b.ne	LBB0_33
; %bb.32:
	and	x8, x8, #0x3f
	bfi	x8, x19, #6, #32
	mov	x19, x8
	b	LBB0_34
LBB0_33:
	ldr	x8, [x21]
	sub	x8, x8, x23
	str	x8, [x21]
Lloh35:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x2, l_.str@PAGE
Lloh39:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
LBB0_34:
	ldr	x8, [x21]
	sub	x8, x8, #1
LBB0_35:
Lloh40:
	adrp	x9, _utf8_limits@GOTPAGE
Lloh41:
	ldr	x9, [x9, _utf8_limits@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	ldr	x8, [x9, x8, lsl #3]
	cmp	x19, x8
	b.hs	LBB0_37
; %bb.36:
Lloh43:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x2, l_.str.2@PAGE
Lloh47:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_mrb_raise
LBB0_37:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_E_ARGUMENT_ERROR,4,2           ; @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malformed UTF-8 character"

l_.str.1:                               ; @.str.1
	.asciz	"malformed UTF-8 character (expected %S bytes, given %S bytes)"

	.comm	_utf8_limits,8,3                ; @utf8_limits
l_.str.2:                               ; @.str.2
	.asciz	"redundant UTF-8 sequence"

	.no_dead_strip	_utf8_to_uv
.subsections_via_symbols
