	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_utf8_decode                 ## -- Begin function av_utf8_decode
	.p2align	4, 0x90
_av_utf8_decode:                        ## @av_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
	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	(%rsi), %r8
	xorl	%eax, %eax
	cmpq	%rdx, %r8
	jae	LBB0_27
## %bb.1:
	movq	%rsi, %r12
	movl	(%r8), %eax
	addq	$4, %r8
	cmpl	$253, %eax
	jg	LBB0_9
## %bb.2:
	movl	%eax, %esi
	andl	$192, %esi
	cmpl	$128, %esi
	je	LBB0_9
## %bb.3:
	movq	%rdi, %r15
	movl	%eax, %esi
	shrl	%esi
	andl	$64, %esi
	xorl	%r14d, %r14d
	testl	%esi, %eax
	je	LBB0_11
## %bb.4:
	movq	%r8, %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, %rbx
	jae	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %edi
	addl	$-128, %edi
	cmpl	$64, %edi
	jae	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %rbx
	shll	$6, %eax
	addl	%edi, %eax
	shll	$5, %esi
	incl	%r14d
	testl	%esi, %eax
	jne	LBB0_5
	jmp	LBB0_12
LBB0_9:
	movq	%r8, %rbx
LBB0_25:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_26:
	movq	%rbx, (%r12)
LBB0_27:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r8, (%r12)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_11:
	movq	%r8, %rbx
LBB0_12:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	leal	(%rsi,%rsi), %r13d
	decl	%r13d
	andl	%eax, %r13d
	xorl	%edi, %edi
	cmpl	$6, %r14d
	setb	%dil
	callq	_av_assert0
	movl	%r14d, %eax
	leaq	l___const.av_utf8_decode.overlong_encoding_mins(%rip), %rcx
	cmpl	(%rcx,%rax,4), %r13d
	jl	LBB0_25
## %bb.13:
	testl	%r13d, %r13d
	js	LBB0_25
## %bb.14:
	movl	%r13d, (%r15)
	cmpl	$1114112, %r13d                 ## imm = 0x110000
	jb	LBB0_17
## %bb.15:
	movq	_AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, (%rcx)
	jne	LBB0_20
LBB0_16:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_20
LBB0_17:
	xorl	%eax, %eax
	cmpl	$31, %r13d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	ja	LBB0_20
## %bb.18:
	cmpl	$13, %r13d
	ja	LBB0_28
## %bb.19:
	movl	$9728, %ecx                     ## imm = 0x2600
	btl	%r13d, %ecx
	jae	LBB0_28
LBB0_20:
	movl	%r13d, %ecx
	andl	$-2048, %ecx                    ## imm = 0xF800
	cmpl	$55296, %ecx                    ## imm = 0xD800
	jne	LBB0_23
## %bb.21:
	movq	_AV_UTF8_FLAG_ACCEPT_SURROGATES@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	jne	LBB0_23
## %bb.22:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_23:
	andl	$-2, %r13d
	cmpl	$65534, %r13d                   ## imm = 0xFFFE
	jne	LBB0_26
## %bb.24:
	movq	_AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	jne	LBB0_26
	jmp	LBB0_25
LBB0_28:
	movq	_AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	jne	LBB0_16
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.av_utf8_decode.overlong_encoding_mins
l___const.av_utf8_decode.overlong_encoding_mins:
	.long	0                               ## 0x0
	.long	128                             ## 0x80
	.long	2048                            ## 0x800
	.long	65536                           ## 0x10000
	.long	2097152                         ## 0x200000
	.long	67108864                        ## 0x4000000

	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES,4,2 ## @AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES
	.comm	_AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES,4,2 ## @AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES
	.comm	_AV_UTF8_FLAG_ACCEPT_SURROGATES,4,2 ## @AV_UTF8_FLAG_ACCEPT_SURROGATES
	.comm	_AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS,4,2 ## @AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_utf8_decode                 ; -- Begin function av_utf8_decode
	.p2align	2
_av_utf8_decode:                        ; @av_utf8_decode
	.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
	ldr	x9, [x1]
	cmp	x9, x2
	b.hs	LBB0_8
; %bb.1:
	mov	x19, x1
	ldr	w8, [x9], #4
	cmp	w8, #253
	b.gt	LBB0_9
; %bb.2:
	and	w10, w8, #0xc0
	cmp	w10, #128
	b.eq	LBB0_9
; %bb.3:
	mov	x20, x3
	mov	x21, x0
	lsr	w10, w8, #1
	and	w10, w10, #0x40
	tst	w8, w10
	b.eq	LBB0_14
; %bb.4:
	mov	w24, #0
	mov	x22, x9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x22, x2
	b.hs	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w11, [x22]
	sub	w11, w11, #128
	cmp	w11, #64
	b.hs	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #4
	add	w8, w11, w8, lsl #6
	lsl	w10, w10, #5
	add	w24, w24, #1
	tst	w8, w10
	b.ne	LBB0_5
	b	LBB0_15
LBB0_8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
	mov	x22, x9
LBB0_10:
Lloh0:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_11:
	str	x22, [x19]
LBB0_12:
	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
LBB0_13:
	str	x9, [x19]
Lloh3:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_14:
	mov	w24, #0
	mov	x22, x9
LBB0_15:
	lsl	w9, w10, #1
	sub	w9, w9, #1
	and	w23, w9, w8
	cmp	w24, #6
	cset	w0, lo
	bl	_av_assert0
Lloh6:
	adrp	x8, l___const.av_utf8_decode.overlong_encoding_mins@PAGE
Lloh7:
	add	x8, x8, l___const.av_utf8_decode.overlong_encoding_mins@PAGEOFF
	ldr	w8, [x8, w24, uxtw #2]
	cmp	w23, w8
	b.lt	LBB0_10
; %bb.16:
	tbnz	w23, #31, LBB0_10
; %bb.17:
	str	w23, [x21]
	cmp	w23, #272, lsl #12              ; =1114112
	b.lo	LBB0_20
; %bb.18:
Lloh8:
	adrp	x8, _AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_23
LBB0_19:
Lloh11:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_24
LBB0_20:
	cmp	w23, #31
	b.hi	LBB0_23
; %bb.21:
	cmp	w23, #13
	b.hi	LBB0_29
; %bb.22:
	mov	w8, #1
	lsl	w8, w8, w23
	mov	w9, #9728
	tst	w8, w9
	b.eq	LBB0_29
LBB0_23:
	mov	w0, #0
LBB0_24:
	lsr	w8, w23, #11
	cmp	w8, #27
	b.ne	LBB0_27
; %bb.25:
Lloh14:
	adrp	x8, _AV_UTF8_FLAG_ACCEPT_SURROGATES@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_UTF8_FLAG_ACCEPT_SURROGATES@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_27
; %bb.26:
Lloh17:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_27:
	mov	w8, #32767
	cmp	w8, w23, lsr #1
	b.ne	LBB0_11
; %bb.28:
Lloh20:
	adrp	x8, _AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_11
	b	LBB0_10
LBB0_29:
Lloh23:
	adrp	x8, _AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_19
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.av_utf8_decode.overlong_encoding_mins
l___const.av_utf8_decode.overlong_encoding_mins:
	.long	0                               ; 0x0
	.long	128                             ; 0x80
	.long	2048                            ; 0x800
	.long	65536                           ; 0x10000
	.long	2097152                         ; 0x200000
	.long	67108864                        ; 0x4000000

	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES,4,2 ; @AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES
	.comm	_AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES,4,2 ; @AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES
	.comm	_AV_UTF8_FLAG_ACCEPT_SURROGATES,4,2 ; @AV_UTF8_FLAG_ACCEPT_SURROGATES
	.comm	_AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS,4,2 ; @AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS
.subsections_via_symbols
