	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_packet
_read_packet:                           ## @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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r15
	movq	(%r14), %r13
	shlq	$4, %r13
	addq	40(%r14), %r13
	cmpl	$0, 8(%r14)
	je	LBB0_7
## %bb.1:
	incq	16(%r14)
	movl	$0, 8(%r14)
	movq	%r15, %rdi
	callq	_avio_rl16
	cmpl	$43, %eax
	jl	LBB0_7
## %bb.2:
	movl	%eax, %r12d
	cmpq	$0, 32(%r14)
	jne	LBB0_5
## %bb.3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_avformat_new_stream
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_32
## %bb.4:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%rax), %rax
	movl	%ecx, (%rax)
LBB0_5:
	movq	%r15, %rdi
	movl	$26, %esi
	callq	_avio_skip
	movq	32(%r14), %rdx
	addl	$-26, %r12d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r12d, %ecx
	callq	_ff_voc_get_packet
	testl	%eax, %eax
	jle	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	movl	$1, (%rbx)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	jmp	LBB0_31
LBB0_7:
	movq	16(%r14), %rax
	cmpq	(%r13), %rax
	jae	LBB0_8
## %bb.11:
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	24(%r14), %rcx
	jmp	LBB0_18
LBB0_8:
	movq	(%r14), %rax
	cmpq	$510, %rax                      ## imm = 0x1FE
	ja	LBB0_10
## %bb.9:
	cmpl	$0, 28(%r13)
	je	LBB0_10
## %bb.14:
	movq	%rbx, %r12
	addq	$16, %r13
	incq	%rax
	movq	%rax, (%r14)
	movq	$0, 16(%r14)
	jmp	LBB0_15
LBB0_10:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_31
LBB0_12:
	movq	%rbx, %r12
LBB0_15:
	movl	8(%r13), %esi
	shll	$11, %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_avio_seek
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_avio_rl32
	movq	24(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	cmpq	$32, %rbx
	jne	LBB0_16
## %bb.17:
	movq	16(%r14), %rax
	movq	%r12, %rbx
LBB0_18:
	movl	8(%r13), %esi
	shll	$11, %esi
	addl	(%rcx,%rax,4), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_avio_seek
	movq	%r15, %rdi
	callq	_avio_rl16
	movl	%eax, %r13d
	leal	769(%r13), %esi
	movq	%rbx, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:
	movq	8(%rbx), %rsi
	movl	$0, (%rsi)
	leal	1(%r13), %eax
	movl	%eax, 4(%rbx)
	addq	$4, %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_avio_read
	cmpl	%r13d, %eax
	jge	LBB0_22
LBB0_21:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r12d
	jmp	LBB0_25
LBB0_19:
	movl	%eax, %r12d
	jmp	LBB0_31
LBB0_22:
	movq	%r15, %rdi
	callq	_avio_rl16
	testl	%eax, %eax
	je	LBB0_28
## %bb.23:
	cmpl	$768, %eax                      ## imm = 0x300
	jne	LBB0_24
## %bb.26:
	movq	_C93_HAS_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	orl	%eax, (%rcx)
	movslq	4(%rbx), %rax
	leaq	(%rcx,%rax,4), %rsi
	movq	%r15, %rdi
	movl	$768, %edx                      ## imm = 0x300
	callq	_avio_read
	cmpl	$767, %eax                      ## imm = 0x2FF
	jle	LBB0_21
## %bb.27:
	addl	$768, 4(%rbx)                   ## imm = 0x300
LBB0_28:
	movl	$0, (%rbx)
	movl	$1, 8(%r14)
	xorl	%r12d, %r12d
	cmpq	$0, (%r14)
	jne	LBB0_31
## %bb.29:
	cmpq	$0, 16(%r14)
	jne	LBB0_31
## %bb.30:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	movq	_C93_FIRST_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	orl	%eax, (%rcx)
	jmp	LBB0_31
LBB0_24:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_25:
	movq	%rbx, %rdi
	callq	_av_packet_unref
LBB0_31:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid palette size %u\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_C93_HAS_PALETTE,4,2            ## @C93_HAS_PALETTE
	.comm	_C93_FIRST_FRAME,4,2            ## @C93_FIRST_FRAME
	.no_dead_strip	_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_packet
_read_packet:                           ; @read_packet
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x21, x0
	ldp	x24, x20, [x0]
	ldr	x23, [x24, #40]
	ldr	x25, [x24]
	ldr	w8, [x24, #8]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	x8, [x24, #16]
	add	x8, x8, #1
	str	x8, [x24, #16]
	str	wzr, [x24, #8]
	mov	x0, x20
	bl	_avio_rl16
	cmp	w0, #43
	b.lt	LBB0_7
; %bb.2:
	mov	x22, x0
	ldr	x8, [x24, #32]
	cbnz	x8, LBB0_5
; %bb.3:
	mov	x0, x21
	mov	x1, #0
	bl	_avformat_new_stream
	str	x0, [x24, #32]
	cbz	x0, LBB0_31
; %bb.4:
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0]
	str	w8, [x9]
LBB0_5:
	mov	x0, x20
	mov	w1, #26
	bl	_avio_skip
	ldr	x2, [x24, #32]
	sub	w3, w22, #26
	mov	x0, x21
	mov	x1, x19
	bl	_ff_voc_get_packet
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x22, x0
	mov	w8, #1
	str	w8, [x19]
Lloh3:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	b	LBB0_30
LBB0_7:
	add	x22, x23, x25, lsl #4
	ldr	x8, [x24, #16]
	ldr	x9, [x22]
Lloh6:
	adrp	x23, _SEEK_SET@GOTPAGE
Lloh7:
	ldr	x23, [x23, _SEEK_SET@GOTPAGEOFF]
	cmp	x8, x9
	b.hs	LBB0_10
; %bb.8:
	cbz	x8, LBB0_13
; %bb.9:
	ldr	x9, [x24, #24]
	b	LBB0_16
LBB0_10:
	ldr	x8, [x24]
	cmp	x8, #510
	b.hi	LBB0_19
; %bb.11:
	ldr	w9, [x22, #28]
	cbz	w9, LBB0_19
; %bb.12:
	add	x22, x22, #16
	add	x8, x8, #1
	str	x8, [x24]
	str	xzr, [x24, #16]
LBB0_13:
	ldr	w8, [x22, #8]
	lsl	w1, w8, #11
	ldr	w2, [x23]
	mov	x0, x20
	bl	_avio_seek
	mov	x25, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_avio_rl32
	ldr	x9, [x24, #24]
	str	w0, [x9, x25]
	add	x25, x25, #4
	cmp	x25, #128
	b.ne	LBB0_14
; %bb.15:
	ldr	x8, [x24, #16]
LBB0_16:
	ldr	w10, [x22, #8]
	ldr	w8, [x9, x8, lsl #2]
	add	w1, w8, w10, lsl #11
	ldr	w2, [x23]
	mov	x0, x20
	bl	_avio_seek
	mov	x0, x20
	bl	_avio_rl16
	mov	x23, x0
	add	w1, w0, #769
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_20
; %bb.17:
	ldr	x1, [x19, #8]
	str	wzr, [x1], #4
	add	w8, w23, #1
	str	w8, [x19, #4]
	mov	x0, x20
	mov	x2, x23
	bl	_avio_read
	cmp	w0, w23
	b.ge	LBB0_21
LBB0_18:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
	b	LBB0_29
LBB0_19:
Lloh11:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	b	LBB0_30
LBB0_20:
	mov	x22, x0
	b	LBB0_30
LBB0_21:
	mov	x0, x20
	bl	_avio_rl16
	cbz	w0, LBB0_25
; %bb.22:
	mov	x3, x0
	cmp	w0, #768
	b.ne	LBB0_28
; %bb.23:
Lloh14:
	adrp	x8, _C93_HAS_PALETTE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _C93_HAS_PALETTE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	ldrsw	x8, [x19, #4]
	add	x1, x9, x8, lsl #2
	mov	x0, x20
	mov	w2, #768
	bl	_avio_read
	cmp	w0, #767
	b.le	LBB0_18
; %bb.24:
	ldr	w8, [x19, #4]
	add	w8, w8, #768
	str	w8, [x19, #4]
LBB0_25:
	mov	w22, #0
	str	wzr, [x19]
	mov	w8, #1
	str	w8, [x24, #8]
	ldr	x8, [x24]
	cbnz	x8, LBB0_30
; %bb.26:
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_32
; %bb.27:
	mov	w22, #0
	b	LBB0_30
LBB0_28:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh22:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
LBB0_29:
	mov	x0, x19
	bl	_av_packet_unref
LBB0_30:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_31:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_32:
	mov	w22, #0
Lloh28:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
Lloh31:
	adrp	x9, _C93_FIRST_FRAME@GOTPAGE
Lloh32:
	ldr	x9, [x9, _C93_FIRST_FRAME@GOTPAGEOFF]
	str	w8, [x19, #16]
Lloh33:
	ldr	w8, [x9]
	ldr	x9, [x19, #8]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	b	LBB0_30
	.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 AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid palette size %u\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_C93_HAS_PALETTE,4,2            ; @C93_HAS_PALETTE
	.comm	_C93_FIRST_FRAME,4,2            ; @C93_FIRST_FRAME
	.no_dead_strip	_read_packet
.subsections_via_symbols
