	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function matroska_parse_cluster
_matroska_parse_cluster:                ## @matroska_parse_cluster
	.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	%rdi, %rbx
	leaq	16(%rdi), %r15
	xorl	%edi, %edi
	cmpl	$3, (%rbx)
	setl	%dil
	callq	_av_assert0
	movl	(%rbx), %eax
                                        ## implicit-def: $r12d
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.1:
	movq	_matroska_segment@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ebml_parse
	movl	%eax, %r12d
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.2:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_avio_tell
	addq	$-4, %rax
	movq	%rax, 16(%rbx)
	movq	_matroska_cluster_enter@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_ebml_parse
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_21
LBB0_3:
	movl	(%rbx), %eax
LBB0_4:
	testl	%eax, %eax
	je	LBB0_16
## %bb.5:
	cmpl	$2, %eax
	jne	LBB0_21
## %bb.6:
	leaq	32(%rbx), %r14
	movq	_matroska_cluster_parsing@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_ebml_parse
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:
	movq	72(%rbx), %rcx
	testq	%rcx, %rcx
	jle	LBB0_15
## %bb.8:
	cmpq	$0, 96(%rbx)
	je	LBB0_9
## %bb.10:
	movq	(%r14), %rax
	movq	_INT64_MIN@GOTPCREL(%rip), %rdx
	xorl	%r10d, %r10d
	cmpq	(%rdx), %rax
	sete	%r10b
	jmp	LBB0_11
LBB0_16:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_avio_feof
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_avio_r8
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_avio_feof
	testl	%eax, %eax
	je	LBB0_18
LBB0_19:
	movl	$1, 4(%rbx)
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %r12d
	jmp	LBB0_21
LBB0_9:
	movl	$-1, %r10d
LBB0_11:
	movl	48(%rbx), %r13d
	testl	%r13d, %r13d
	jle	LBB0_12
## %bb.13:
	movq	56(%rbx), %r11
	jmp	LBB0_14
LBB0_12:
	xorl	%r11d, %r11d
LBB0_14:
	movl	88(%rbx), %esi
	movl	84(%rbx), %edx
	movl	80(%rbx), %r8d
	movl	24(%rbx), %r9d
	movl	68(%rbx), %r15d
	movl	64(%rbx), %r12d
	movl	40(%rbx), %eax
	subq	$8, %rsp
	movq	%rbx, %rdi
	pushq	%rax
	pushq	16(%rbx)
	pushq	%r13
	pushq	%r12
	pushq	%r11
	pushq	%r10
	pushq	%r15
	callq	_matroska_parse_block
	addq	$64, %rsp
	movl	%eax, %r12d
LBB0_15:
	movq	_matroska_blockgroup@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_ebml_free
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
LBB0_21:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	8(%rbx), %rdi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_matroska_segment,4,2           ## @matroska_segment
	.comm	_matroska_cluster_enter,4,2     ## @matroska_cluster_enter
	.comm	_matroska_cluster_parsing,4,2   ## @matroska_cluster_parsing
	.comm	_INT64_MIN,8,3                  ## @INT64_MIN
	.comm	_matroska_blockgroup,4,2        ## @matroska_blockgroup
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"File extends beyond end of segment.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_matroska_parse_cluster
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function matroska_parse_cluster
_matroska_parse_cluster:                ; @matroska_parse_cluster
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	mov	x21, x0
	ldr	w8, [x21], #16
	cmp	w8, #3
	cset	w0, lt
	bl	_av_assert0
	mov	x20, x19
	ldr	w8, [x20], #32
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _matroska_segment@GOTPAGE
Lloh1:
	ldr	x8, [x8, _matroska_segment@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_ebml_parse
	mov	x22, x0
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_avio_tell
	sub	x8, x0, #4
	str	x8, [x19, #16]
Lloh3:
	adrp	x8, _matroska_cluster_enter@GOTPAGE
Lloh4:
	ldr	x8, [x8, _matroska_cluster_enter@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ebml_parse
	mov	x22, x0
	tbnz	w0, #31, LBB0_20
LBB0_3:
	ldr	w8, [x19]
	cbnz	w8, LBB0_9
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_avio_feof
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_avio_r8
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_avio_feof
	cbz	w0, LBB0_21
LBB0_6:
	mov	w8, #1
	str	w8, [x19, #4]
Lloh6:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_7:
	ldr	w22, [x8]
	b	LBB0_20
LBB0_8:
                                        ; implicit-def: $w22
	cbz	w8, LBB0_4
LBB0_9:
	cmp	w8, #2
	b.ne	LBB0_20
; %bb.10:
Lloh8:
	adrp	x8, _matroska_cluster_parsing@GOTPAGE
Lloh9:
	ldr	x8, [x8, _matroska_cluster_parsing@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ebml_parse
	mov	x22, x0
	tbnz	w0, #31, LBB0_19
; %bb.11:
	ldr	x3, [x19, #72]
	cmp	x3, #1
	b.lt	LBB0_19
; %bb.12:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _INT64_MIN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _INT64_MIN@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w7, eq
	b	LBB0_15
LBB0_14:
	mov	w7, #-1
LBB0_15:
	ldr	w8, [x19, #48]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.16:
	ldr	x9, [x19, #56]
	b	LBB0_18
LBB0_17:
	mov	x9, #0
LBB0_18:
	ldp	w2, w1, [x19, #84]
	ldr	w4, [x19, #80]
	ldr	w5, [x19, #24]
	ldp	w10, w6, [x19, #64]
	ldr	x11, [x19, #16]
	ldr	w12, [x19, #40]
	str	w12, [sp, #24]
	str	x11, [sp, #16]
	stp	w10, w8, [sp, #8]
	str	x9, [sp]
	mov	x0, x19
	bl	_matroska_parse_block
	mov	x22, x0
LBB0_19:
Lloh14:
	adrp	x8, _matroska_blockgroup@GOTPAGE
Lloh15:
	ldr	x8, [x8, _matroska_blockgroup@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_ebml_free
	mov	x0, x20
	mov	w1, #0
	mov	w2, #72
	bl	_memset
LBB0_20:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_21:
	ldr	x0, [x19, #8]
Lloh17:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh22:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_matroska_segment,4,2           ; @matroska_segment
	.comm	_matroska_cluster_enter,4,2     ; @matroska_cluster_enter
	.comm	_matroska_cluster_parsing,4,2   ; @matroska_cluster_parsing
	.comm	_INT64_MIN,8,3                  ; @INT64_MIN
	.comm	_matroska_blockgroup,4,2        ; @matroska_blockgroup
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"File extends beyond end of segment.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_matroska_parse_cluster
.subsections_via_symbols
