	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function matroska_parse_webvtt
_matroska_parse_webvtt:                 ## @matroska_parse_webvtt
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%r8d, %r8d
	jle	LBB0_1
## %bb.2:
	movl	%r8d, %r15d
	movl	%r8d, %r10d
	addq	%rcx, %r10
	xorl	%r14d, %r14d
	movq	%rcx, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	cmpb	$13, %al
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$10, %al
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	incl	%r14d
	cmpq	%r10, %rbx
	jb	LBB0_3
## %bb.7:
	movl	$-1, %r14d
	cmpq	%r10, %rbx
	jb	LBB0_9
	jmp	LBB0_1
LBB0_5:
	xorl	%esi, %esi
	cmpb	$13, %al
	sete	%sil
	addq	%rsi, %rbx
	cmpq	%r10, %rbx
	jae	LBB0_1
LBB0_9:
	cmpb	$10, (%rbx)
	jne	LBB0_1
## %bb.10:
	incq	%rbx
	cmpq	%r10, %rbx
	jae	LBB0_11
## %bb.12:
	xorl	%r12d, %r12d
	movq	%rbx, %rsi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%rsi), %eax
	cmpb	$13, %al
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpb	$10, %al
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%rsi
	incl	%r12d
	cmpq	%r10, %rsi
	jb	LBB0_13
## %bb.17:
	movl	$-1, %r12d
	cmpq	%r10, %rsi
	jb	LBB0_19
	jmp	LBB0_1
LBB0_11:
	movl	$-1, %r12d
	movq	%rbx, %rsi
	cmpq	%r10, %rsi
	jb	LBB0_19
	jmp	LBB0_1
LBB0_15:
	xorl	%r8d, %r8d
	cmpb	$13, %al
	sete	%r8b
	addq	%r8, %rsi
	cmpq	%r10, %rsi
	jae	LBB0_1
LBB0_19:
	cmpb	$10, (%rsi)
	jne	LBB0_1
## %bb.20:
	leaq	1(%rsi), %r8
	subq	%r8, %r10
	testl	%r10d, %r10d
	jle	LBB0_1
## %bb.21:
	movl	%r10d, %eax
	addl	%ecx, %r15d
	subl	%esi, %r15d
	decq	%rax
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=1
	decl	%r15d
	decq	%rax
	cmpl	$1, %r15d
	jle	LBB0_1
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	%eax, %esi
	movzbl	(%r8,%rsi), %esi
	cmpb	$13, %sil
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	cmpb	$10, %sil
	je	LBB0_24
## %bb.25:
	movq	%r8, -120(%rbp)                 ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%r9, -104(%rbp)                 ## 8-byte Spill
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	decl	%r15d
	leaq	-80(%rbp), %rdi
	movl	%r15d, %esi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_34
## %bb.26:
	movq	-80(%rbp), %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	testl	%r14d, %r14d
	jle	LBB0_29
## %bb.27:
	movq	_AV_PKT_DATA_WEBVTT_IDENTIFIER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdi
	movl	%r14d, %edx
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_33
## %bb.28:
	movq	%rax, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
LBB0_29:
	testl	%r12d, %r12d
	jle	LBB0_32
## %bb.30:
	movq	_AV_PKT_DATA_WEBVTT_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdi
	movl	%r12d, %edx
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_33
## %bb.31:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_memcpy
LBB0_32:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -56(%rbp)
	movq	16(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	24(%rbp), %eax
	movl	%eax, -72(%rbp)
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	leaq	4(%rsi), %rdi
	leaq	-80(%rbp), %rdx
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	callq	_ff_packet_list_put
	testl	%eax, %eax
	jns	LBB0_35
LBB0_33:
	leaq	-80(%rbp), %rdi
	callq	_av_packet_unref
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_34:
	movl	%eax, %r13d
	jmp	LBB0_35
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_35:
	movl	%r13d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_PKT_DATA_WEBVTT_IDENTIFIER,4,2 ## @AV_PKT_DATA_WEBVTT_IDENTIFIER
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_PKT_DATA_WEBVTT_SETTINGS,4,2 ## @AV_PKT_DATA_WEBVTT_SETTINGS
	.no_dead_strip	_matroska_parse_webvtt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function matroska_parse_webvtt
_matroska_parse_webvtt:                 ; @matroska_parse_webvtt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w4, #0
	b.le	LBB0_19
; %bb.1:
	mov	x20, x7
	mov	x21, x6
	mov	x22, x5
	mov	x24, x3
	mov	x23, x2
	mov	x19, x0
	mov	x25, #0
	mov	w9, w4
	add	x8, x3, x9
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x24, x25]
	cmp	w10, #13
	ccmp	w10, #10, #4, ne
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, #1
	add	x10, x24, x25
	cmp	x10, x8
	b.lo	LBB0_2
; %bb.4:
	mov	w25, #-1
	cmp	x10, x8
	b.lo	LBB0_6
	b	LBB0_19
LBB0_5:
	cmp	w10, #13
	cinc	x10, x24, eq
	add	x10, x10, x25
	cmp	x10, x8
	b.hs	LBB0_19
LBB0_6:
	ldrb	w11, [x10]
	cmp	w11, #10
	b.ne	LBB0_19
; %bb.7:
	add	x26, x10, #1
	cmp	x26, x8
	b.hs	LBB0_12
; %bb.8:
	mov	x27, #0
	mvn	x10, x10
	add	x9, x24, x9
	add	x10, x10, x9
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x26, x27]
	cmp	w11, #13
	ccmp	w11, #10, #4, ne
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x27, x27, #1
	cmp	x10, x27
	b.ne	LBB0_9
; %bb.11:
	mov	w27, #-1
	cmp	x9, x8
	b.lo	LBB0_14
	b	LBB0_19
LBB0_12:
	mov	w27, #-1
	mov	x9, x26
	cmp	x9, x8
	b.lo	LBB0_14
	b	LBB0_19
LBB0_13:
	cmp	w11, #13
	cinc	x9, x26, eq
	add	x9, x9, x27
	cmp	x9, x8
	b.hs	LBB0_19
LBB0_14:
	ldrb	w10, [x9]
	cmp	w10, #10
	b.ne	LBB0_19
; %bb.15:
	add	x28, x9, #1
	sub	x8, x8, x28
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.16:
	and	x10, x8, #0xffffffff
	add	w8, w4, w24
	sub	w8, w8, w9
	sub	x9, x10, #1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x28, w9, uxtw]
	cmp	w10, #13
	ccmp	w10, #10, #4, ne
	b.ne	LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	sub	w8, w8, #1
	sub	x9, x9, #1
	cmp	w8, #1
	b.gt	LBB0_17
LBB0_19:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_20:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_21:
	sub	w1, w8, #1
	add	x0, sp, #8
	str	w1, [sp, #4]                    ; 4-byte Folded Spill
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_20
; %bb.22:
	ldr	x0, [sp, #8]
	mov	x1, x28
	ldr	w2, [sp, #4]                    ; 4-byte Folded Reload
	bl	_memcpy
	cmp	w25, #1
	b.lt	LBB0_25
; %bb.23:
Lloh3:
	adrp	x8, _AV_PKT_DATA_WEBVTT_IDENTIFIER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_PKT_DATA_WEBVTT_IDENTIFIER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	x2, x25
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_29
; %bb.24:
	mov	x1, x24
	mov	x2, x25
	bl	_memcpy
LBB0_25:
	cmp	w27, #1
	b.lt	LBB0_28
; %bb.26:
Lloh6:
	adrp	x8, _AV_PKT_DATA_WEBVTT_SETTINGS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_PKT_DATA_WEBVTT_SETTINGS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	x2, x27
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_29
; %bb.27:
	mov	x1, x26
	mov	x2, x27
	bl	_memcpy
LBB0_28:
	ldr	w8, [x23]
	str	w8, [sp, #40]
	stp	x21, x22, [sp, #24]
	str	w20, [sp, #16]
	add	x0, x19, #4
	add	x2, sp, #8
	mov	x1, x19
	mov	w3, #0
	bl	_ff_packet_list_put
	mov	x8, x0
	mov	w0, #0
	tbz	w8, #31, LBB0_20
LBB0_29:
	add	x0, sp, #8
	bl	_av_packet_unref
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_PKT_DATA_WEBVTT_IDENTIFIER,4,2 ; @AV_PKT_DATA_WEBVTT_IDENTIFIER
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_PKT_DATA_WEBVTT_SETTINGS,4,2 ; @AV_PKT_DATA_WEBVTT_SETTINGS
	.no_dead_strip	_matroska_parse_webvtt
.subsections_via_symbols
