	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_xing_toc
_read_xing_toc:                         ## @read_xing_toc
	.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	%rdi, %r12
	movq	24(%rdi), %rcx
	movq	_AVFMT_FLAG_FAST_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%rcx)
	setne	%cl
	testl	%eax, (%rdi)
	setne	%al
	orb	%cl, %al
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	setg	%r15b
	andb	%al, %r15b
	movq	%rsi, %rax
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	jne	LBB0_3
## %bb.1:
	movl	16(%r12), %edi
	callq	_avio_size
	movq	%rax, %rcx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_3:
	movq	_XING_TOC_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	movq	_XING_TOC_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %edi
	callq	_avio_r8
	testb	%r15b, %r15b
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %rcx
	movl	(%rcx), %r13d
	movl	%eax, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$256, %edx                      ## imm = 0x100
	callq	_av_rescale
	movl	%eax, %r14d
	movq	_XING_TOC_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_av_rescale
	movq	_AVINDEX_KEYFRAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movl	%r13d, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_av_add_index_entry
	jmp	LBB0_7
LBB0_8:
	testb	%r15b, %r15b
	je	LBB0_10
## %bb.9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVFMT_FLAG_FAST_SEEK,4,2       ## @AVFMT_FLAG_FAST_SEEK
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot determine file size, skipping TOC table.\n"

	.comm	_XING_TOC_COUNT,4,2             ## @XING_TOC_COUNT
	.comm	_AVINDEX_KEYFRAME,4,2           ## @AVINDEX_KEYFRAME
	.no_dead_strip	_read_xing_toc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_xing_toc
_read_xing_toc:                         ; @read_xing_toc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x20, x0
	ldr	x25, [x0, #24]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _AVFMT_FLAG_FAST_SEEK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVFMT_FLAG_FAST_SEEK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	x10, [x25, #8]
	tst	w9, w8
	ccmp	x10, #0, #0, eq
	ccmp	x2, #0, #4, ne
	cset	w26, gt
	cbz	x1, LBB0_2
; %bb.1:
	mov	x21, x1
	b	LBB0_4
LBB0_2:
	ldr	w0, [x20, #16]
	bl	_avio_size
	mov	x21, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
	mov	w26, #0
LBB0_4:
Lloh8:
	adrp	x27, _XING_TOC_COUNT@GOTPAGE
Lloh9:
	ldr	x27, [x27, _XING_TOC_COUNT@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:
	mov	w22, #0
Lloh10:
	adrp	x28, _AVINDEX_KEYFRAME@GOTPAGE
Lloh11:
	ldr	x28, [x28, _AVINDEX_KEYFRAME@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, #1
	ldr	w8, [x27]
	cmp	w22, w8
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #16]
	bl	_avio_r8
	cbz	w26, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #8]
	ldr	w23, [x8]
	mov	x1, x21
	mov	w2, #256
	bl	_av_rescale
	mov	x24, x0
	ldr	w2, [x27]
	mov	x0, x22
	mov	x1, x19
	bl	_av_rescale
	mov	x2, x0
	ldr	w5, [x28]
	mov	x0, x23
	mov	x1, x24
	mov	w3, #0
	mov	w4, #0
	bl	_av_add_index_entry
	b	LBB0_6
LBB0_9:
	cbz	w26, LBB0_11
; %bb.10:
	mov	w8, #1
	str	w8, [x25]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AVFMT_FLAG_FAST_SEEK,4,2       ; @AVFMT_FLAG_FAST_SEEK
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot determine file size, skipping TOC table.\n"

	.comm	_XING_TOC_COUNT,4,2             ; @XING_TOC_COUNT
	.comm	_AVINDEX_KEYFRAME,4,2           ; @AVINDEX_KEYFRAME
	.no_dead_strip	_read_xing_toc
.subsections_via_symbols
