	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ty_read_header
_ty_read_header:                        ## @ty_read_header
	.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, %r15
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r12)
	movq	%rax, 40(%r12)
	movq	%rax, 32(%r12)
	movq	_CHUNK_PEEK_COUNT@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	cmpl	(%r13), %r14d
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	28(%r12), %esi
	movq	_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_read
	movl	28(%r12), %esi
	movq	%r15, %rdi
	callq	_analyze_chunk
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	movq	_TIVO_SERIES_UNKNOWN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rdx
	movq	_TIVO_AUDIO_UNKNOWN@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r12), %rdx
	movq	_TIVO_TYPE_UNKNOWN@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_8
LBB0_9:
	cmpq	%rcx, %rax
	jne	LBB0_10
	jmp	LBB0_12
LBB0_1:
	movq	(%r12), %rax
	movq	_TIVO_SERIES_UNKNOWN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_12
LBB0_10:
	movq	8(%r12), %rax
	movq	_TIVO_AUDIO_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	16(%r12), %rax
	movq	_TIVO_TYPE_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
LBB0_12:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_4:
	movl	%eax, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%rax), %rdx
	movl	%ecx, 4(%rdx)
	movq	_AV_CODEC_ID_MPEG2VIDEO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	movq	_AVSTREAM_PARSE_FULL_RAW@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	%rcx, 8(%rax)
	movq	%rax, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	$90000, %ecx                    ## imm = 0x15F90
	callq	_avpriv_set_pts_info
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_15
## %bb.17:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	(%rax), %rcx
	movl	%edx, 4(%rcx)
	movq	8(%r12), %rdx
	movq	_TIVO_AUDIO_MPEG@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_19
## %bb.18:
	movq	_AV_CODEC_ID_MP2@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	(%rbx), %rsi
	movq	%rsi, 8(%rax)
	jmp	LBB0_20
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_19:
	movq	_AV_CODEC_ID_AC3@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_20:
	movl	%edx, (%rcx)
	movq	%rax, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	$90000, %ecx                    ## imm = 0x15F90
	callq	_avpriv_set_pts_info
	movl	$1, 24(%r12)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_avio_seek
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_CHUNK_PEEK_COUNT,4,2           ## @CHUNK_PEEK_COUNT
	.comm	_CHUNK_SIZE,4,2                 ## @CHUNK_SIZE
	.comm	_TIVO_SERIES_UNKNOWN,8,3        ## @TIVO_SERIES_UNKNOWN
	.comm	_TIVO_AUDIO_UNKNOWN,8,3         ## @TIVO_AUDIO_UNKNOWN
	.comm	_TIVO_TYPE_UNKNOWN,8,3          ## @TIVO_TYPE_UNKNOWN
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_MPEG2VIDEO,4,2     ## @AV_CODEC_ID_MPEG2VIDEO
	.comm	_AVSTREAM_PARSE_FULL_RAW,8,3    ## @AVSTREAM_PARSE_FULL_RAW
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_TIVO_AUDIO_MPEG,8,3            ## @TIVO_AUDIO_MPEG
	.comm	_AV_CODEC_ID_MP2,4,2            ## @AV_CODEC_ID_MP2
	.comm	_AV_CODEC_ID_AC3,4,2            ## @AV_CODEC_ID_AC3
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.no_dead_strip	_ty_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ty_read_header
_ty_read_header:                        ; @ty_read_header
	.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	x20, x0
	ldp	x19, x21, [x0]
Lloh0:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stp	x8, x8, [x21, #40]
	str	x8, [x21, #32]
Lloh3:
	adrp	x22, _CHUNK_PEEK_COUNT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CHUNK_PEEK_COUNT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #0
	b.le	LBB0_8
; %bb.1:
	mov	w23, #0
Lloh5:
	adrp	x24, _CHUNK_SIZE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CHUNK_SIZE@GOTPAGEOFF]
Lloh7:
	adrp	x25, _TIVO_SERIES_UNKNOWN@GOTPAGE
Lloh8:
	ldr	x25, [x25, _TIVO_SERIES_UNKNOWN@GOTPAGEOFF]
Lloh9:
	adrp	x26, _TIVO_AUDIO_UNKNOWN@GOTPAGE
Lloh10:
	ldr	x26, [x26, _TIVO_AUDIO_UNKNOWN@GOTPAGEOFF]
Lloh11:
	adrp	x27, _TIVO_TYPE_UNKNOWN@GOTPAGE
Lloh12:
	ldr	x27, [x27, _TIVO_TYPE_UNKNOWN@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	ldr	w10, [x22]
	cmp	w23, w10
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21, #28]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_avio_read
	ldr	w1, [x21, #28]
	mov	x0, x20
	bl	_analyze_chunk
	tbnz	w0, #31, LBB0_20
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x21, #8]
	ldr	x11, [x26]
	cmp	x10, x11
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x21, #16]
	ldr	x11, [x27]
	cmp	x10, x11
	b.eq	LBB0_2
LBB0_7:
	cmp	x8, x9
	b.ne	LBB0_9
	b	LBB0_11
LBB0_8:
	ldr	x8, [x21]
Lloh13:
	adrp	x9, _TIVO_SERIES_UNKNOWN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TIVO_SERIES_UNKNOWN@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
LBB0_9:
	ldr	x8, [x21, #8]
Lloh16:
	adrp	x9, _TIVO_AUDIO_UNKNOWN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TIVO_AUDIO_UNKNOWN@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
	ldr	x8, [x21, #16]
Lloh19:
	adrp	x9, _TIVO_TYPE_UNKNOWN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _TIVO_TYPE_UNKNOWN@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
LBB0_11:
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_13:
	mov	x0, x20
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_17
; %bb.14:
Lloh24:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	x9, [x0]
Lloh27:
	adrp	x10, _AV_CODEC_ID_MPEG2VIDEO@GOTPAGE
Lloh28:
	ldr	x10, [x10, _AV_CODEC_ID_MPEG2VIDEO@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
Lloh30:
	adrp	x22, _AVSTREAM_PARSE_FULL_RAW@GOTPAGE
Lloh31:
	ldr	x22, [x22, _AVSTREAM_PARSE_FULL_RAW@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x0, #8]
	mov	w1, #64
	mov	w2, #1
	mov	w3, #24464
	movk	w3, #1, lsl #16
	bl	_avpriv_set_pts_info
	mov	x0, x20
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_17
; %bb.15:
Lloh32:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x8]
	ldr	x8, [x0]
	str	w9, [x8, #4]
	ldr	x9, [x21, #8]
Lloh35:
	adrp	x10, _TIVO_AUDIO_MPEG@GOTPAGE
Lloh36:
	ldr	x10, [x10, _TIVO_AUDIO_MPEG@GOTPAGEOFF]
Lloh37:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_18
; %bb.16:
Lloh38:
	adrp	x9, _AV_CODEC_ID_MP2@GOTPAGE
Lloh39:
	ldr	x9, [x9, _AV_CODEC_ID_MP2@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	ldr	x10, [x22]
	str	x10, [x0, #8]
	b	LBB0_19
LBB0_17:
Lloh41:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_18:
Lloh43:
	adrp	x9, _AV_CODEC_ID_AC3@GOTPAGE
Lloh44:
	ldr	x9, [x9, _AV_CODEC_ID_AC3@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
LBB0_19:
	str	w9, [x8]
	mov	w20, #1
	mov	w1, #64
	mov	w2, #1
	mov	w3, #24464
	movk	w3, #1, lsl #16
	bl	_avpriv_set_pts_info
	str	w20, [x21, #24]
Lloh46:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh47:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh48:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_avio_seek
	mov	w0, #0
LBB0_20:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_CHUNK_PEEK_COUNT,4,2           ; @CHUNK_PEEK_COUNT
	.comm	_CHUNK_SIZE,4,2                 ; @CHUNK_SIZE
	.comm	_TIVO_SERIES_UNKNOWN,8,3        ; @TIVO_SERIES_UNKNOWN
	.comm	_TIVO_AUDIO_UNKNOWN,8,3         ; @TIVO_AUDIO_UNKNOWN
	.comm	_TIVO_TYPE_UNKNOWN,8,3          ; @TIVO_TYPE_UNKNOWN
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_MPEG2VIDEO,4,2     ; @AV_CODEC_ID_MPEG2VIDEO
	.comm	_AVSTREAM_PARSE_FULL_RAW,8,3    ; @AVSTREAM_PARSE_FULL_RAW
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_TIVO_AUDIO_MPEG,8,3            ; @TIVO_AUDIO_MPEG
	.comm	_AV_CODEC_ID_MP2,4,2            ; @AV_CODEC_ID_MP2
	.comm	_AV_CODEC_ID_AC3,4,2            ; @AV_CODEC_ID_AC3
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.no_dead_strip	_ty_read_header
.subsections_via_symbols
