	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_rune
_read_rune:                             ## @read_rune
	.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	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movsbl	(%rsi), %edi
	callq	_count_leading_ones
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cltq
	addq	%r13, %rax
	cmpq	%r12, %rax
	jbe	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_4:
	cmpl	$2, %r15d
	jl	LBB0_9
## %bb.5:
	movl	%r15d, %ebx
	movl	$1, %r14d
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	cmpq	%r14, %rbx
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r13,%r14), %eax
	andb	$-64, %al
	cmpb	$-128, %al
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_error
	jmp	LBB0_8
LBB0_9:
	cmpl	$2, %r15d
	je	LBB0_13
## %bb.10:
	cmpl	$3, %r15d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_14
## %bb.11:
	cmpl	$4, %r15d
	jne	LBB0_15
## %bb.12:
	movb	2(%r13), %al
	movb	3(%r13), %cl
	shlb	$6, %al
	andb	$63, %cl
	orb	%al, %cl
	movb	%cl, (%rdx)
	movl	$4, %eax
	jmp	LBB0_16
LBB0_1:
	movb	(%r13), %al
	movb	%al, (%rbx)
	movl	$1, %eax
	jmp	LBB0_16
LBB0_13:
	movb	(%r13), %al
	movb	1(%r13), %cl
	shlb	$6, %al
	andb	$63, %cl
	orb	%al, %cl
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	%cl, (%rax)
	movl	$2, %eax
	jmp	LBB0_16
LBB0_14:
	movb	1(%r13), %al
	movb	2(%r13), %cl
	shlb	$6, %al
	andb	$63, %cl
	orb	%al, %cl
	movb	%cl, (%rdx)
	movl	$3, %eax
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str(%rip), %rdi
	callq	_error
                                        ## implicit-def: $eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid UTF-8 sequence"

L_.str.1:                               ## @.str.1
	.asciz	"invalid UTF-8 continuation byte"

	.no_dead_strip	_read_rune
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_rune
_read_rune:                             ; @read_rune
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldrsb	w0, [x1]
	bl	_count_leading_ones
	cbz	w0, LBB0_12
; %bb.1:
	mov	x21, x0
	add	x8, x20, w0, sxtw
	cmp	x8, x22
	b.ls	LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_3:
	cmp	w21, #2
	b.lt	LBB0_8
; %bb.4:
	mov	w8, w21
	add	x23, x20, #1
	sub	x24, x8, #1
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	subs	x24, x24, #1
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x23]
	and	w8, w8, #0xc0
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_error
	b	LBB0_5
LBB0_8:
	cmp	w21, #2
	b.eq	LBB0_13
; %bb.9:
	cmp	w21, #3
	b.eq	LBB0_14
; %bb.10:
	cmp	w21, #4
	b.ne	LBB0_15
; %bb.11:
	ldrb	w8, [x20, #2]
	ldrb	w9, [x20, #3]
	bfi	w9, w8, #6, #26
	strb	w9, [x19]
	mov	w0, #4
	b	LBB0_16
LBB0_12:
	ldrb	w8, [x20]
	strb	w8, [x19]
	mov	w0, #1
	b	LBB0_16
LBB0_13:
	ldrb	w8, [x20]
	ldrb	w9, [x20, #1]
	bfi	w9, w8, #6, #26
	strb	w9, [x19]
	mov	w0, #2
	b	LBB0_16
LBB0_14:
	ldrb	w8, [x20, #1]
	ldrb	w9, [x20, #2]
	bfi	w9, w8, #6, #26
	strb	w9, [x19]
	mov	w0, #3
	b	LBB0_16
LBB0_15:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
                                        ; implicit-def: $w0
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid UTF-8 sequence"

l_.str.1:                               ; @.str.1
	.asciz	"invalid UTF-8 continuation byte"

	.no_dead_strip	_read_rune
.subsections_via_symbols
