	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vid_read_packet
_vid_read_packet:                       ## @vid_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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_BVID_PALETTE_SIZE@GOTPCREL(%rip), %r13
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r12
	cmpl	$0, (%r12)
	jne	LBB0_12
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rbx
	movq	%rbx, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_avio_r8
                                        ## kill: def $eax killed $eax def $rax
	cmpb	$-125, %al
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	16(%r12), %r14
	cmpl	$0, 16(%r12)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	%r14, %rdi
	callq	_av_freep
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %edi
	callq	_av_malloc
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_19
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_avio_read
	cmpl	(%r13), %eax
	je	LBB0_1
## %bb.8:
	movq	%r14, %rdi
	callq	_av_freep
	jmp	LBB0_28
LBB0_9:
	leal	-128(%rax), %ecx
	cmpb	$6, %cl
	ja	LBB0_23
## %bb.10:
	movzbl	%cl, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_11:
	movzbl	%al, %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %r8
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_read_frame                     ## TAILCALL
LBB0_12:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_13:
	movq	%rbx, %rdi
	callq	_avio_rl16
	movq	%rbx, %rdi
	callq	_avio_r8
	movl	$256, %ecx                      ## imm = 0x100
	subl	%eax, %ecx
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	%ecx
	movl	%eax, 4(%r12)
LBB0_14:
	cmpl	$0, 12(%r12)
	jns	LBB0_17
## %bb.15:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_19
## %bb.16:
	movl	16(%rax), %ecx
	movl	%ecx, 12(%r12)
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	8(%rax), %rdx
	movl	%ecx, 24(%rdx)
	movq	_AV_CODEC_ID_PCM_U8@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rdx)
	movl	$1, (%rdx)
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rdx)
	movl	$8, 4(%rdx)
	movl	4(%r12), %ecx
	movl	%ecx, 8(%rdx)
	leal	(,%rcx,8), %esi
	movl	%esi, 12(%rdx)
	movl	$0, (%rax)
	movq	%rax, %rdi
	movl	$64, %esi
	movl	$1, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_avpriv_set_pts_info
LBB0_17:
	movq	%rbx, %rdi
	callq	_avio_rl16
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_av_get_packet
	cmpl	%r14d, %eax
	jne	LBB0_26
## %bb.18:
	movl	12(%r12), %eax
	movl	%eax, 8(%rbx)
	movl	%r14d, (%rbx)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_19:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_20:
	cmpl	$0, 8(%r12)
	je	LBB0_22
## %bb.21:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_22:
	movl	$1, (%r12)
	jmp	LBB0_28
LBB0_23:
	movzbl	%al, %ecx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	movl	%ecx, %r8d
	movl	%ecx, %r9d
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	testl	%eax, %eax
	js	LBB0_25
## %bb.27:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_28:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_23
	.long	L0_0_set_13
	.long	L0_0_set_20
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"discarding unused palette\n"

	.comm	_BVID_PALETTE_SIZE,4,2          ## @BVID_PALETTE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_PCM_U8,4,2         ## @AV_CODEC_ID_PCM_U8
	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"incomplete audio block\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
L_.str.2:                               ## @.str.2
	.asciz	"reached terminating character but not all frames read.\n"

L_.str.3:                               ## @.str.3
	.asciz	"unknown block (character = %c, decimal = %d, hex = %x)!!!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_vid_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vid_read_packet
lCPI0_0:
	.long	1                               ; 0x1
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vid_read_packet:                       ; @vid_read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _BVID_PALETTE_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BVID_PALETTE_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _AV_LOG_WARNING@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh4:
	adrp	x23, l_.str@PAGE
Lloh5:
	add	x23, x23, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x19, #8]
	ldr	w8, [x20]
	cbnz	w8, LBB0_12
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x22, [x19]
	mov	x0, x22
	bl	_avio_feof
	cbnz	x0, LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x22
	bl	_avio_r8
	and	w8, w0, #0xff
	cmp	w8, #131
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x20, #16]!
	cbz	w8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x23
	bl	_av_log
	mov	x0, x20
	bl	_av_freep
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x24]
	bl	_av_malloc
	str	w0, [x20]
	cbz	w0, LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x22
	bl	_avio_read
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_1
; %bb.8:
	mov	x0, x20
	bl	_av_freep
	b	LBB0_28
LBB0_9:
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_23
; %bb.10:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
	and	w3, w0, #0xff
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	mov	x4, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_read_frame
LBB0_12:
Lloh8:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
	b	LBB0_24
LBB0_13:
	mov	x0, x22
	bl	_avio_rl16
	mov	x0, x22
	bl	_avio_r8
	mov	w8, #256
	sub	w8, w8, w0
	mov	w9, #16960
	movk	w9, #15, lsl #16
	sdiv	w8, w9, w8
	str	w8, [x20, #4]
LBB0_14:
	ldr	w8, [x20, #12]
	tbz	w8, #31, LBB0_17
; %bb.15:
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_19
; %bb.16:
	ldr	w8, [x0, #16]
	str	w8, [x20, #12]
Lloh10:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
	str	w8, [x9, #24]
Lloh13:
	adrp	x8, _AV_CODEC_ID_PCM_U8@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_CODEC_ID_PCM_U8@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x10, lCPI0_0@PAGE
Lloh17:
	ldr	d0, [x10, lCPI0_0@PAGEOFF]
	str	d0, [x9]
Lloh18:
	adrp	x10, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh19:
	ldr	x10, [x10, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #16]
	ldr	w3, [x20, #4]
	lsl	w8, w3, #3
	stp	w3, w8, [x9, #8]
	str	wzr, [x0]
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
LBB0_17:
	mov	x0, x22
	bl	_avio_rl16
	mov	x23, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_av_get_packet
	cmp	w0, w23
	b.ne	LBB0_26
; %bb.18:
	mov	w0, #0
	ldr	w8, [x20, #12]
Lloh21:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
	str	w23, [x21]
Lloh23:
	ldr	w9, [x9]
	ldr	w10, [x21, #4]
	orr	w9, w10, w9
	stp	w9, w8, [x21, #4]
	b	LBB0_25
LBB0_19:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_29
LBB0_20:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_22
; %bb.21:
Lloh26:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x2, l_.str.2@PAGE
Lloh30:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_22:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_28
LBB0_23:
	and	w8, w0, #0xff
Lloh31:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh32:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x9]
	stp	x8, x8, [sp, #8]
	str	x8, [sp]
Lloh34:
	adrp	x2, l_.str.3@PAGE
Lloh35:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh36:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_24:
	ldr	w0, [x8]
LBB0_25:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_26:
	tbnz	w0, #31, LBB0_25
; %bb.27:
Lloh38:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str.1@PAGE
Lloh42:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_28:
Lloh43:
	adrp	x8, _EIO@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_29:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdrp	Lloh16, Lloh18
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh43, Lloh44
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_23-LBB0_11)>>2
	.byte	(LBB0_13-LBB0_11)>>2
	.byte	(LBB0_20-LBB0_11)>>2
	.byte	(LBB0_14-LBB0_11)>>2
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"discarding unused palette\n"

	.comm	_BVID_PALETTE_SIZE,4,2          ; @BVID_PALETTE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_PCM_U8,4,2         ; @AV_CODEC_ID_PCM_U8
	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"incomplete audio block\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
l_.str.2:                               ; @.str.2
	.asciz	"reached terminating character but not all frames read.\n"

l_.str.3:                               ; @.str.3
	.asciz	"unknown block (character = %c, decimal = %d, hex = %x)!!!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_vid_read_packet
.subsections_via_symbols
