	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ty_read_packet
_ty_read_packet:                        ## @ty_read_packet
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	8(%rdi), %r13
	movq	%r15, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_1
LBB0_12:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %r14
	testq	%r14, %r14
	jne	LBB0_3
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:
	movq	%rax, %r12
	shlq	$4, %r12
	movq	(%r14,%r12), %rcx
	incq	%rax
	movq	%rax, (%r13)
	testq	%rcx, %rcx
	jg	LBB0_9
## %bb.2:
	testq	%r14, %r14
	je	LBB0_5
LBB0_3:
	cmpq	$0, 32(%r13)
	jne	LBB0_5
## %bb.4:
	movq	(%r13), %rax
	cmpq	8(%r13), %rax
	jb	LBB0_8
	.p2align	4, 0x90
LBB0_5:
	movq	%rbx, %rdi
	callq	_get_chunk
	testq	%rax, %rax
	js	LBB0_12
## %bb.6:
	cmpq	$0, 8(%r13)
	je	LBB0_12
## %bb.7:
	movq	(%r13), %rax
	movq	24(%r13), %r14
	jmp	LBB0_8
LBB0_9:
	addq	16(%r13), %rcx
	movq	_CHUNK_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jg	LBB0_10
## %bb.11:
	movq	%r15, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_12
## %bb.15:
	leaq	(%r14,%r12), %rsi
	movl	8(%r14,%r12), %edx
	cmpl	$5, %edx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	ja	LBB0_16
## %bb.24:
	movl	$46, %eax
	btl	%edx, %eax
	jb	LBB0_21
LBB0_16:
	movq	%rbx, %rdi
	cmpl	$129, %edx
	je	LBB0_19
## %bb.17:
	cmpl	$128, %edx
	jne	LBB0_20
## %bb.18:
	movq	%r14, %rdx
	callq	_demux_video
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_22
LBB0_19:
	movq	%r14, %rdx
	callq	_demux_audio
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_22
LBB0_20:
	movq	%rsi, %r12
	leaq	L_.str(%rip), %rsi
	callq	_ff_dlog
	movq	%r12, %rsi
LBB0_21:
	movq	(%rsi), %rax
	addq	%rax, 16(%r13)
LBB0_22:
	xorl	%eax, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jg	LBB0_14
## %bb.23:
	movq	24(%r13), %r14
	testq	%r14, %r14
	jne	LBB0_3
	jmp	LBB0_5
LBB0_10:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_CHUNK_SIZE,8,3                 ## @CHUNK_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid record type 0x%02x\n"

	.no_dead_strip	_ty_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ty_read_packet
_ty_read_packet:                        ; @ty_read_packet
	.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, x1
	mov	x20, x0
	ldp	x21, x25, [x0]
	mov	x0, x21
	bl	_avio_feof
	cbz	x0, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
LBB0_3:
	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
LBB0_4:
	mov	w23, #0
Lloh2:
	adrp	x26, _CHUNK_SIZE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _CHUNK_SIZE@GOTPAGEOFF]
	mov	w28, #46
	ldr	x22, [x25, #24]
	cbnz	x22, LBB0_7
	b	LBB0_9
LBB0_5:
	add	x24, x22, x27, lsl #4
	ldr	x8, [x24]
	add	x9, x27, #1
	str	x9, [x25]
	cmp	x8, #1
	b.ge	LBB0_12
; %bb.6:
	cbz	x22, LBB0_9
LBB0_7:
	ldr	x8, [x25, #32]
	cbnz	x8, LBB0_9
; %bb.8:
	ldp	x27, x8, [x25]
	cmp	x27, x8
	b.lo	LBB0_5
LBB0_9:
	mov	x0, x20
	bl	_get_chunk
	tbnz	x0, #63, LBB0_1
; %bb.10:
	ldr	x8, [x25, #8]
	cbz	x8, LBB0_1
; %bb.11:
	ldr	x22, [x25, #24]
	ldr	x27, [x25]
	b	LBB0_5
LBB0_12:
	ldr	x9, [x25, #16]
	ldr	x10, [x26]
	add	x8, x9, x8
	cmp	x8, x10
	b.gt	LBB0_23
; %bb.13:
	mov	x0, x21
	bl	_avio_feof
	cbnz	x0, LBB0_1
; %bb.14:
	add	x8, x22, x27, lsl #4
	ldr	w2, [x8, #8]
	cmp	w2, #5
	mov	w8, #1
	lsl	w8, w8, w2
	and	w8, w8, w28
	ccmp	w8, #0, #4, ls
	b.ne	LBB0_20
; %bb.15:
	mov	x0, x20
	cmp	w2, #129
	b.eq	LBB0_18
; %bb.16:
	cmp	w2, #128
	b.ne	LBB0_19
; %bb.17:
	mov	x1, x24
	mov	x2, x19
	bl	_demux_video
	mov	x23, x0
	b	LBB0_21
LBB0_18:
	mov	x1, x24
	mov	x2, x19
	bl	_demux_audio
	mov	x23, x0
	b	LBB0_21
LBB0_19:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ff_dlog
LBB0_20:
	ldr	x8, [x24]
	ldr	x9, [x25, #16]
	add	x8, x9, x8
	str	x8, [x25, #16]
LBB0_21:
	mov	w0, #0
	cmp	w23, #0
	b.gt	LBB0_3
; %bb.22:
	ldr	x22, [x25, #24]
	cbnz	x22, LBB0_7
	b	LBB0_9
LBB0_23:
Lloh6:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_CHUNK_SIZE,8,3                 ; @CHUNK_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid record type 0x%02x\n"

	.no_dead_strip	_ty_read_packet
.subsections_via_symbols
