	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function str_read_packet
_str_read_packet:                       ## @str_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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	movq	_RAW_CD_SECTOR_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	%rbx, %r15
	callq	_avio_read
	cmpl	(%r14), %eax
	jne	LBB0_32
## %bb.1:
	leaq	28(%r13), %rax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	leaq	30(%r13), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	leaq	36(%r13), %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	leaq	40(%r13), %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	leaq	42(%r13), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	17(%r13), %r14d
	cmpq	$32, %r14
	jae	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	18(%r13), %ecx
	movq	_CDXA_TYPE_MASK@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	andb	%cl, %al
	cmpb	$-126, %al
	jge	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-160(%rbp), %rdi                ## 8-byte Reload
	callq	_AV_RL16
	movq	%rax, %rbx
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	callq	_AV_RL16
	movq	%rax, %r15
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	callq	_AV_RL32
	movl	%eax, %r9d
	testl	%eax, %eax
	js	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r15d, %ebx
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_VIDEO_DATA_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	imull	%r15d, %eax
	cmpl	%r9d, %eax
	jge	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_av_log
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	je	LBB0_6
## %bb.29:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_30
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r9d, -84(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %r13
	leaq	(%r14,%r14,4), %rcx
	cmpl	$0, 4(%r13,%rcx,8)
	movq	_VIDEO_DATA_CHUNK_SIZE@GOTPCREL(%rip), %r12
	jns	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, %r12
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	$15, %ecx
	callq	_avpriv_set_pts_info
	movl	16(%r13), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, 4(%rcx,%r12,8)
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r13), %rcx
	movl	%eax, 24(%rcx)
	movq	_AV_CODEC_ID_MDEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rcx)
	movl	$0, 16(%rcx)
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	callq	_AV_RL16
	movq	8(%r13), %rcx
	movq	%rax, 40(%rcx)
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	callq	_AV_RL16
	movq	8(%r13), %rcx
	movq	%rax, 32(%rcx)
	movq	%r12, %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	movq	_VIDEO_DATA_CHUNK_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%edx, %eax
	imull	%r15d, %eax
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	8(,%rcx,8), %rdi
	addq	%r13, %rdi
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	cmpl	%eax, 8(%r13,%rcx,8)
	je	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%r13, -120(%rbp)                ## 8-byte Spill
	cmpq	$0, 24(%r13,%rcx,8)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-104(%rbp), %r13                ## 8-byte Reload
	movq	%r13, %rdi
	callq	_av_packet_unref
	movl	(%r12), %esi
	imull	%r15d, %esi
	movq	%r13, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	jne	LBB0_32
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-120(%rbp), %r13                ## 8-byte Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	24(,%rax,8), %rax
	addq	%r13, %rax
	movq	(%rax), %rdi
	movl	(%r12), %edx
	imull	%r15d, %edx
	xorl	%esi, %esi
	callq	_memset
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_tell
	movq	_RAW_CD_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	shlq	$3, %r14
	leaq	(%r14,%r14,4), %rcx
	movl	%eax, 12(%r13,%rcx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	4(%rax,%rcx), %eax
	movl	%eax, 20(%r13,%rcx)
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	(%r12), %edx
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %eax
	imull	%ebx, %eax
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	24(%r13,%rcx,8), %rdi
	movq	_VIDEO_DATA_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	addq	-112(%rbp), %rsi                ## 8-byte Folded Reload
	movq	%rbx, %r14
	movq	%rcx, %rbx
	callq	_memcpy
	decl	%r15d
	cmpl	%r14d, %r15d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_24
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_RAW_CD_SECTOR_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movq	-112(%rbp), %r13                ## 8-byte Reload
	movq	%r13, %rsi
	callq	_avio_read
	cmpl	(%rbx), %eax
	je	LBB0_2
LBB0_32:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_33:
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_34:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_36
## %bb.35:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_34
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	leaq	(%r14,%r14,4), %rbx
	cmpl	$0, (%rax,%rbx,8)
	jns	LBB0_27
## %bb.7:
	movzbl	19(%r13), %r15d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	movq	%rax, %r14
	movl	16(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%rbx,8)
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	8(%r14), %rax
	movl	%ecx, 24(%rax)
	movq	_AV_CODEC_ID_ADPCM_XA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rax)
	movl	$0, 16(%rax)
	movl	%r15d, %ecx
	andl	$1, %ecx
	leal	1(%rcx), %esi
	movl	%esi, (%rax)
	testl	%ecx, %ecx
	jne	LBB0_9
## %bb.25:
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rcx
	jmp	LBB0_26
LBB0_24:
	leaq	24(,%rbx,8), %rax
	addq	%r13, %rax
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movl	%ecx, (%rdx)
	movups	16(%rdx), %xmm0
	movups	%xmm0, 16(%r15)
	movups	(%rdx), %xmm0
	movups	%xmm0, (%r15)
	movl	$-1, (%rdx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_34
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_9:
	movq	_AV_CH_LAYOUT_STEREO@GOTPCREL(%rip), %rcx
LBB0_26:
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	testb	$4, %r15b
	movl	$37800, %edx                    ## imm = 0x93A8
	movl	$18900, %ecx                    ## imm = 0x49D4
	cmovel	%edx, %ecx
	movl	%ecx, 4(%rax)
	movl	$128, 8(%rax)
	movw	$4032, %ax                      ## imm = 0xFC0
	xorl	%edx, %edx
	divw	%si
	movzwl	%ax, %edx
	movq	%r14, %rdi
	movl	$64, %esi
	callq	_avpriv_set_pts_info
	movl	$0, (%r14)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_27:
	movq	%r15, %rdi
	movl	$2304, %esi                     ## imm = 0x900
	callq	_av_new_packet
	testl	%eax, %eax
	jne	LBB0_32
## %bb.28:
	movq	16(%r15), %rdi
	addq	$24, %r13
	movq	%r13, %rsi
	movl	$2304, %edx                     ## imm = 0x900
	callq	_memcpy
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %eax
	movl	%eax, 12(%r15)
	movl	$1, 8(%r15)
	xorl	%eax, %eax
	jmp	LBB0_34
LBB0_36:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RAW_CD_SECTOR_SIZE,4,2         ## @RAW_CD_SECTOR_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_CDXA_TYPE_MASK,1,0             ## @CDXA_TYPE_MASK
	.comm	_VIDEO_DATA_CHUNK_SIZE,4,2      ## @VIDEO_DATA_CHUNK_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid parameters %d %d %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_MDEC,4,2           ## @AV_CODEC_ID_MDEC
L_.str.1:                               ## @.str.1
	.asciz	"mismatching sector_count\n"

	.comm	_VIDEO_DATA_HEADER_SIZE,4,2     ## @VIDEO_DATA_HEADER_SIZE
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ADPCM_XA,4,2       ## @AV_CODEC_ID_ADPCM_XA
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ## @AV_CH_LAYOUT_STEREO
	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"Unknown sector type %02X\n"

	.no_dead_strip	_str_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function str_read_packet
_str_read_packet:                       ; @str_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
	sub	sp, sp, #80
	stur	x1, [x29, #-136]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldp	x8, x22, [x0]
	stur	x0, [x29, #-96]                 ; 8-byte Folded Spill
	stur	x8, [x29, #-128]                ; 8-byte Folded Spill
Lloh3:
	adrp	x19, _RAW_CD_SECTOR_SIZE@GOTPAGE
Lloh4:
	ldr	x19, [x19, _RAW_CD_SECTOR_SIZE@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	x9, x2
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	mov	x0, x22
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_avio_read
	ldr	w8, [x19]
	cmp	w0, w8
	b.ne	LBB0_22
; %bb.1:
	add	x9, x20, #28
	add	x8, x20, #30
	stp	x8, x9, [x29, #-112]            ; 16-byte Folded Spill
	add	x8, x20, #36
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
	add	x8, x20, #40
	stur	x8, [x29, #-144]                ; 8-byte Folded Spill
Lloh7:
	adrp	x28, _VIDEO_DATA_CHUNK_SIZE@GOTPAGE
Lloh8:
	ldr	x28, [x28, _VIDEO_DATA_CHUNK_SIZE@GOTPAGEOFF]
	add	x8, x20, #42
	stur	x8, [x29, #-152]                ; 8-byte Folded Spill
	mov	w21, #40
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w26, [x20, #17]
	cmp	x26, #32
	b.hs	LBB0_26
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x20, #18]
Lloh9:
	adrp	x9, _CDXA_TYPE_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CDXA_TYPE_MASK@GOTPAGEOFF]
	ldrb	w9, [x9]
	and	w9, w9, w8
	sub	w10, w9, #128
	cmp	w10, #2
	b.hs	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	x0, [x29, #-104]                ; 8-byte Folded Reload
	bl	_AV_RL16
	mov	x23, x0
	ldur	x0, [x29, #-112]                ; 8-byte Folded Reload
	bl	_AV_RL16
	mov	x24, x0
	ldur	x0, [x29, #-120]                ; 8-byte Folded Reload
	bl	_AV_RL32
	mov	x19, x0
	tbnz	w0, #31, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w23, w24
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x28]
	mul	w8, w2, w24
	cmp	w8, w19
	b.ge	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	sub	sp, sp, #32
	stp	x24, x19, [sp, #8]
	str	x23, [sp]
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	add	sp, sp, #32
	b	LBB0_20
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w9, #130
	b.eq	LBB0_27
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh16:
	adrp	x9, _AV_LOG_WARNING@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x9]
	str	x8, [sp, #-16]!
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_av_log
	add	sp, sp, #16
	b	LBB0_20
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	x9, [x29, #-128]                ; 8-byte Folded Reload
	ldr	x25, [x9]
	madd	x9, x26, x21, x25
	ldr	w9, [x9, #4]
	tbnz	w9, #31, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w21, #40
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_33
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, x0
	mov	w1, #64
	mov	w2, #1
	mov	w3, #15
	bl	_avpriv_set_pts_info
	ldr	w8, [x27, #16]
	ldur	x25, [x29, #-128]               ; 8-byte Folded Reload
	ldr	x9, [x25]
	mov	w21, #40
	madd	x9, x26, x21, x9
	str	w8, [x9, #4]
Lloh21:
	adrp	x8, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x9, [x27, #8]
	str	w8, [x9, #24]
Lloh24:
	adrp	x8, _AV_CODEC_ID_MDEC@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_CODEC_ID_MDEC@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	stp	wzr, w8, [x9, #16]
	ldur	x0, [x29, #-144]                ; 8-byte Folded Reload
	bl	_AV_RL16
	ldr	x8, [x27, #8]
	str	x0, [x8, #40]
	ldur	x0, [x29, #-152]                ; 8-byte Folded Reload
	bl	_AV_RL16
	ldr	x8, [x27, #8]
	str	x0, [x8, #32]
	ldr	x25, [x25]
	ldr	w2, [x28]
	mul	w8, w2, w24
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	madd	x27, x26, x21, x25
	ldr	w9, [x27, #8]!
	cmp	w9, w8
	b.eq	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #40
	madd	x28, x26, x8, x25
	ldr	x8, [x28, #24]!
	cbz	x8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
Lloh30:
	adrp	x2, l_.str.1@PAGE
Lloh31:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x27
	bl	_av_packet_unref
Lloh32:
	adrp	x21, _VIDEO_DATA_CHUNK_SIZE@GOTPAGE
Lloh33:
	ldr	x21, [x21, _VIDEO_DATA_CHUNK_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	mul	w1, w8, w24
	mov	x0, x27
	bl	_av_new_packet
	cbnz	w0, LBB0_22
; %bb.18:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x28]
	ldr	w8, [x21]
	mul	w2, w8, w24
	mov	w1, #0
	bl	_memset
	mov	x0, x22
	bl	_avio_tell
Lloh34:
	adrp	x8, _RAW_CD_SECTOR_SIZE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RAW_CD_SECTOR_SIZE@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	sub	w8, w0, w8
	add	x9, x26, x26, lsl #2
	lsl	x9, x9, #3
	add	x10, x25, x9
	str	w8, [x10, #12]
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	ldr	x8, [x8]
	add	x8, x8, x9
	ldr	w8, [x8, #4]
	str	w8, [x10, #20]
	ldr	w2, [x21]
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w21, #40
	mov	w8, #40
	madd	x28, x26, x8, x25
	ldr	x8, [x28, #24]!
	mul	w9, w2, w23
	add	x0, x8, w9, sxtw #2
Lloh37:
	adrp	x8, _VIDEO_DATA_HEADER_SIZE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _VIDEO_DATA_HEADER_SIZE@GOTPAGEOFF]
Lloh39:
	ldrsw	x8, [x8]
	add	x1, x20, x8
	bl	_memcpy
	sub	w8, w24, #1
	cmp	w8, w23
	b.eq	LBB0_32
LBB0_20:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_avio_feof
	cbnz	x0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh40:
	adrp	x19, _RAW_CD_SECTOR_SIZE@GOTPAGE
Lloh41:
	ldr	x19, [x19, _RAW_CD_SECTOR_SIZE@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	x0, x22
	mov	x1, x20
	bl	_avio_read
	ldr	w8, [x19]
	cmp	w0, w8
Lloh42:
	adrp	x28, _VIDEO_DATA_CHUNK_SIZE@GOTPAGE
Lloh43:
	ldr	x28, [x28, _VIDEO_DATA_CHUNK_SIZE@GOTPAGEOFF]
	b.eq	LBB0_2
LBB0_22:
Lloh44:
	adrp	x8, _EIO@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_23:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_24:
	ldur	x8, [x29, #-88]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_34
; %bb.25:
	sub	sp, x29, #80
	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_26:
Lloh49:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh50:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	b	LBB0_24
LBB0_27:
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	ldr	x8, [x8]
	mov	w9, #40
	mul	x9, x26, x9
	ldr	w8, [x8, x9]
	tbz	w8, #31, LBB0_30
; %bb.28:
	ldrb	w22, [x20, #19]
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_33
; %bb.29:
	mov	x19, x0
	ldr	w8, [x0, #16]
	ldur	x9, [x29, #-128]                ; 8-byte Folded Reload
	ldr	x9, [x9]
	mov	w10, #40
	mul	x10, x26, x10
	str	w8, [x9, x10]
Lloh52:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh53:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh54:
	ldr	w11, [x8]
	ldr	x9, [x0, #8]
Lloh55:
	adrp	x10, _AV_CODEC_ID_ADPCM_XA@GOTPAGE
Lloh56:
	ldr	x10, [x10, _AV_CODEC_ID_ADPCM_XA@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x10]
	stp	w8, w11, [x9, #20]
	str	wzr, [x9, #16]
	tst	w22, #0x1
	mov	w8, #1
	cinc	w8, w8, ne
	str	w8, [x9]
Lloh58:
	adrp	x10, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh59:
	ldr	x10, [x10, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh60:
	adrp	x11, _AV_CH_LAYOUT_STEREO@GOTPAGE
Lloh61:
	ldr	x11, [x11, _AV_CH_LAYOUT_STEREO@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	str	w10, [x9, #12]
	tst	w22, #0x4
	mov	w10, #18900
	mov	w11, #37800
	csel	w3, w11, w10, eq
	mov	w10, #128
	stp	w3, w10, [x9, #4]
	mov	w9, #4032
	udiv	w2, w9, w8
	mov	w1, #64
	bl	_avpriv_set_pts_info
	str	wzr, [x19]
LBB0_30:
	ldur	x19, [x29, #-136]               ; 8-byte Folded Reload
	mov	x0, x19
	mov	w1, #2304
	bl	_av_new_packet
	cbnz	w0, LBB0_22
; %bb.31:
	ldr	x0, [x19, #16]
	add	x1, x20, #24
	mov	w2, #2304
	bl	_memcpy
	mov	w0, #0
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	ldr	x8, [x8]
	mov	w9, #40
	mul	x9, x26, x9
	ldr	w8, [x8, x9]
	mov	w9, #1
	stp	w9, w8, [x19, #8]
	b	LBB0_24
LBB0_32:
	mov	w0, #0
	str	w19, [x27]
	ldp	q0, q1, [x27]
	ldur	x8, [x29, #-136]                ; 8-byte Folded Reload
	stp	q0, q1, [x8]
	str	xzr, [x28]
	mov	w8, #-1
	str	w8, [x27]
	mov	w8, #40
	madd	x8, x26, x8, x25
	str	xzr, [x8, #32]
	b	LBB0_24
LBB0_33:
Lloh62:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh63:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_23
LBB0_34:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_RAW_CD_SECTOR_SIZE,4,2         ; @RAW_CD_SECTOR_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_CDXA_TYPE_MASK,1,0             ; @CDXA_TYPE_MASK
	.comm	_VIDEO_DATA_CHUNK_SIZE,4,2      ; @VIDEO_DATA_CHUNK_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid parameters %d %d %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_VIDEO,4,2         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_CODEC_ID_MDEC,4,2           ; @AV_CODEC_ID_MDEC
l_.str.1:                               ; @.str.1
	.asciz	"mismatching sector_count\n"

	.comm	_VIDEO_DATA_HEADER_SIZE,4,2     ; @VIDEO_DATA_HEADER_SIZE
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ADPCM_XA,4,2       ; @AV_CODEC_ID_ADPCM_XA
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ; @AV_CH_LAYOUT_STEREO
	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"Unknown sector type %02X\n"

	.no_dead_strip	_str_read_packet
.subsections_via_symbols
