	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_read_packet
_avi_read_packet:                       ## @avi_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	8(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r12
	movq	_CONFIG_DV_DEMUXER@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	%r13, %rsi
	callq	_avpriv_dv_get_packet
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_59
	jmp	LBB0_5
LBB0_3:
	cmpl	$0, (%r12)
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ni_prepare_read
	testl	%eax, %eax
	js	LBB0_52
LBB0_5:
	movq	8(%r12), %rax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rcx
	movq	(%rcx,%rax,8), %rbx
	movq	24(%rbx), %r14
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_get_subtitle_pkt
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_59
## %bb.6:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_36 Depth 2
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %ecx
	movl	%ecx, %eax
	shll	$10, %eax
	cmpl	$32, %ecx
	cmovgel	%ecx, %eax
	cmpl	$2, %ecx
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%r14), %ebx
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_avio_tell
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 32(%rcx)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_av_get_packet
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_59
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, 32(%r14)
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shrl	%eax
	cmpl	%eax, (%r13)
	jae	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r15d, %ebx
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r13, %rdi
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	40(%r14), %esi
	movl	(%r15), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movq	$0, 32(%r14)
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rdx
	callq	_av_log
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_CONFIG_DV_DEMUXER@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	40(%r13), %rbx
	movq	8(%r13), %rdx
	movl	(%r13), %ecx
	movq	16(%r13), %r8
	movq	%r13, %rsi
	callq	_avpriv_dv_produce_packet
	movq	%rbx, 40(%r13)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 36(%r13)
	testl	%eax, %eax
	js	LBB0_26
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	subl	%r15d, 4(%r14)
	jne	LBB0_20
LBB0_45:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	$-1, 8(%r12)
	movq	$0, 24(%r14)
	cmpl	$0, (%r12)
	je	LBB0_46
	jmp	LBB0_57
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	movq	_AVMEDIA_TYPE_SUBTITLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, 16(%rax)
	je	LBB0_50
LBB0_23:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r14), %rsi
	movq	%rsi, 24(%r13)
	movslq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_29
## %bb.24:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rsi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rsi, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_28
LBB0_26:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_av_packet_unref
	subl	%r15d, 4(%r14)
	jne	LBB0_20
	jmp	LBB0_45
LBB0_27:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_28:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, 24(%r13)
LBB0_29:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%r12), %eax
	movl	%eax, 32(%r13)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_43
## %bb.30:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, 16(%rbx)
	je	LBB0_43
## %bb.31:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_AVSEEK_FLAG_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_av_index_search_timestamp
	testl	%eax, %eax
	js	LBB0_44
## %bb.32:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%rbx), %rdx
	movslq	%eax, %rsi
	shlq	$4, %rsi
	movq	(%rdx,%rsi), %rcx
	cmpq	8(%r14), %rcx
	jne	LBB0_44
## %bb.33:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rbx), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jne	LBB0_42
## %bb.34:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	$-1, -60(%rbp)
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	movq	_AV_CODEC_ID_MPEG4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_41
## %bb.35:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r13), %rbx
	movl	%r15d, %edi
	movl	$256, %esi                      ## imm = 0x100
	callq	_FFMIN
	cltq
	leaq	(%rbx,%rax,4), %r12
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r12, %rbx
	jae	LBB0_41
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=2
	movq	%rbx, %rdi
	movq	%r12, %rsi
	leaq	-60(%rbp), %rdx
	callq	_avpriv_find_start_code
	movq	%rax, %rbx
	cmpl	$438, -60(%rbp)                 ## imm = 0x1B6
	jne	LBB0_36
## %bb.38:                              ##   in Loop: Header=BB0_36 Depth=2
	cmpq	%r12, %rbx
	jae	LBB0_36
## %bb.39:                              ##   in Loop: Header=BB0_7 Depth=1
	testb	$-64, (%rbx)
	je	LBB0_41
## %bb.40:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_AVINDEX_KEYFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	andl	%eax, 8(%rcx,%rdx)
LBB0_41:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
LBB0_42:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_AVINDEX_KEYFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rdx,%rsi)
	je	LBB0_44
	.p2align	4, 0x90
LBB0_43:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 36(%r13)
LBB0_44:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_get_duration
	addq	%rax, 8(%r14)
	subl	%r15d, 4(%r14)
	je	LBB0_45
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_57
LBB0_46:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r13), %rax
	testq	%rax, %rax
	js	LBB0_53
## %bb.47:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rax, 16(%r14)
	jle	LBB0_53
## %bb.48:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_av_packet_unref
	movq	8(%r12), %rax
LBB0_49:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rcx
	movq	(%rcx,%rax,8), %rbx
	movq	24(%rbx), %r14
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_get_subtitle_pkt
	testq	%rax, %rax
	je	LBB0_7
	jmp	LBB0_58
LBB0_50:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_read_gab2_sub
	testq	%rax, %rax
	je	LBB0_23
## %bb.51:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	8(%r14)
	movq	$-1, 8(%r12)
	movl	$0, 4(%r14)
	movq	$-1, %rax
	jmp	LBB0_49
LBB0_52:
	movl	%eax, %r15d
	jmp	LBB0_59
LBB0_53:
	movq	$0, 16(%r14)
	xorl	%r15d, %r15d
	cmpl	$2, (%rbx)
	jl	LBB0_59
## %bb.54:
	cmpl	$2, 16(%r12)
	jl	LBB0_59
## %bb.55:
	movl	24(%r13), %edi
	movl	4(%rbx), %esi
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	movl	20(%r12), %ecx
	movl	%ecx, %edx
	subl	%eax, %edx
	movq	_AV_TIME_BASE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	addl	%esi, %esi
	cmpl	%esi, %edx
	jle	LBB0_60
## %bb.56:
	movl	$1, (%r12)
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	jmp	LBB0_59
LBB0_57:
	movq	$0, 16(%r14)
LBB0_58:
	xorl	%r15d, %r15d
LBB0_59:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_60:
	cmpl	%eax, %ecx
	jge	LBB0_59
## %bb.61:
	movl	%eax, 20(%r12)
	jmp	LBB0_59
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_DV_DEMUXER,8,3          ## @CONFIG_DV_DEMUXER
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_AV_PKT_DATA_PALETTE,4,2        ## @AV_PKT_DATA_PALETTE
	.comm	_AVPALETTE_SIZE,4,2             ## @AVPALETTE_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate data for palette\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AVMEDIA_TYPE_SUBTITLE,8,3      ## @AVMEDIA_TYPE_SUBTITLE
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AVSEEK_FLAG_ANY,4,2            ## @AVSEEK_FLAG_ANY
	.comm	_AV_CODEC_ID_MPEG4,8,3          ## @AV_CODEC_ID_MPEG4
	.comm	_AVINDEX_KEYFRAME,4,2           ## @AVINDEX_KEYFRAME
	.comm	_AV_TIME_BASE_Q,4,2             ## @AV_TIME_BASE_Q
	.comm	_AV_TIME_BASE,4,2               ## @AV_TIME_BASE
	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
L_.str.1:                               ## @.str.1
	.asciz	"Switching to NI mode, due to poor interleaving\n"

	.no_dead_strip	_avi_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_read_packet
_avi_read_packet:                       ; @avi_read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldp	x21, x28, [x0, #8]
Lloh0:
	adrp	x26, _CONFIG_DV_DEMUXER@GOTPAGE
Lloh1:
	ldr	x26, [x26, _CONFIG_DV_DEMUXER@GOTPAGEOFF]
	ldr	x8, [x26]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x0, [x28, #24]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, x20
	bl	_avpriv_dv_get_packet
	mov	x25, x0
	tbz	w0, #31, LBB0_52
	b	LBB0_5
LBB0_3:
	ldr	w8, [x28]
	cbz	w8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_ni_prepare_read
	tbnz	w0, #31, LBB0_46
LBB0_5:
	ldr	x8, [x28, #8]
	ldr	x9, [x19]
	ldr	x22, [x9, x8, lsl #3]
	ldr	x23, [x22, #24]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_get_subtitle_pkt
	cbz	x0, LBB0_7
LBB0_6:
	mov	w25, #0
	b	LBB0_52
LBB0_7:
Lloh2:
	adrp	x27, _INT_MAX@GOTPAGE
Lloh3:
	ldr	x27, [x27, _INT_MAX@GOTPAGEOFF]
Lloh4:
	adrp	x24, _AVPALETTE_SIZE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AVPALETTE_SIZE@GOTPAGEOFF]
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_29 Depth 2
	ldr	w8, [x27]
	ldp	w9, w10, [x23]
	lsl	w11, w9, #10
	cmp	w9, #32
	csel	w11, w11, w9, lt
	cmp	w9, #2
	csel	w8, w8, w11, lt
	cmp	w8, w10
	csel	w25, w8, w10, lt
	mov	x0, x21
	bl	_avio_tell
	str	w0, [x28, #32]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	bl	_av_get_packet
	mov	x25, x0
	tbnz	w0, #31, LBB0_52
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x23, #32]
	cbz	x8, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x27]
	cmp	w8, w9, lsr #1
	b.hs	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh6:
	adrp	x8, _AV_PKT_DATA_PALETTE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_PKT_DATA_PALETTE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x23, #40]
	ldr	w2, [x24]
	bl	_memcpy
	str	xzr, [x23, #32]
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x26]
	cbz	x8, LBB0_18
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x28, #24]
	cbz	x0, LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x24, [x20, #40]
	ldr	w3, [x20]
	ldp	x2, x4, [x20, #8]
	mov	x1, x20
	bl	_avpriv_dv_produce_packet
	str	x24, [x20, #40]
Lloh9:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #36]
	orr	w8, w9, w8
	str	w8, [x20, #36]
	tbz	w0, #31, LBB0_37
; %bb.16:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_av_packet_unref
	b	LBB0_37
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	ldr	x8, [x26]
	cbnz	x8, LBB0_14
LBB0_18:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22, #8]
	ldr	x9, [x8]
Lloh17:
	adrp	x10, _AVMEDIA_TYPE_SUBTITLE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _AVMEDIA_TYPE_SUBTITLE@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x8, #16]
	cbz	w8, LBB0_44
LBB0_20:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x1, [x23, #8]
	str	x1, [x20, #24]
	ldrsw	x8, [x23]
	cbz	w8, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_8 Depth=1
	sdiv	x8, x1, x8
	str	x8, [x20, #24]
LBB0_22:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x28, #8]
	str	w8, [x20, #32]
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_35
; %bb.23:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_35
; %bb.24:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh23:
	adrp	x8, _AVSEEK_FLAG_ANY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVSEEK_FLAG_ANY@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_av_index_search_timestamp
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_36
; %bb.25:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x10, [x22, #16]
	sxtw	x24, w0
	lsl	x8, x24, #4
	ldr	x8, [x10, x8]
	ldr	x9, [x23, #8]
	cmp	x8, x9
	b.ne	LBB0_36
; %bb.26:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22]
	sub	w8, w8, #1
	cmp	w24, w8
	b.ne	LBB0_34
; %bb.27:                               ;   in Loop: Header=BB0_8 Depth=1
	str	x10, [sp]                       ; 8-byte Folded Spill
	mov	w8, #-1
	str	w8, [sp, #12]
	ldr	x8, [x22, #8]
	ldr	x8, [x8, #8]
Lloh26:
	adrp	x9, _AV_CODEC_ID_MPEG4@GOTPAGE
Lloh27:
	ldr	x9, [x9, _AV_CODEC_ID_MPEG4@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_33
; %bb.28:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x26, [x20, #8]
	mov	x0, x25
	mov	w1, #256
	bl	_FFMIN
	add	x27, x26, w0, sxtw #2
LBB0_29:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x26, x27
	b.hs	LBB0_33
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=2
	add	x2, sp, #12
	mov	x0, x26
	mov	x1, x27
	bl	_avpriv_find_start_code
	mov	x26, x0
	ldr	w8, [sp, #12]
	cmp	w8, #438
	ccmp	x0, x27, #2, eq
	b.hs	LBB0_29
; %bb.31:                               ;   in Loop: Header=BB0_8 Depth=1
	ldrb	w8, [x26]
	tst	w8, #0xc0
	b.eq	LBB0_33
; %bb.32:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh29:
	adrp	x8, _AVINDEX_KEYFRAME@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AVINDEX_KEYFRAME@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x9, x9, x24, lsl #4
	ldr	w10, [x9, #8]
	bic	w8, w10, w8
	str	w8, [x9, #8]
LBB0_33:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh32:
	adrp	x26, _CONFIG_DV_DEMUXER@GOTPAGE
Lloh33:
	ldr	x26, [x26, _CONFIG_DV_DEMUXER@GOTPAGEOFF]
Lloh34:
	adrp	x27, _INT_MAX@GOTPAGE
Lloh35:
	ldr	x27, [x27, _INT_MAX@GOTPAGEOFF]
	ldr	x10, [sp]                       ; 8-byte Folded Reload
LBB0_34:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x10, x24, lsl #4
	ldr	w8, [x8, #8]
Lloh36:
	adrp	x9, _AVINDEX_KEYFRAME@GOTPAGE
Lloh37:
	ldr	x9, [x9, _AVINDEX_KEYFRAME@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_36
LBB0_35:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh39:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldr	w9, [x20, #36]
	orr	w8, w9, w8
	str	w8, [x20, #36]
LBB0_36:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x20]
	mov	x0, x23
	bl	_get_duration
	ldr	x8, [x23, #8]
	add	x8, x8, x0
	str	x8, [x23, #8]
LBB0_37:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x23, #4]
	subs	w8, w8, w25
	str	w8, [x23, #4]
Lloh42:
	adrp	x24, _AVPALETTE_SIZE@GOTPAGE
Lloh43:
	ldr	x24, [x24, _AVPALETTE_SIZE@GOTPAGEOFF]
	b.ne	LBB0_39
; %bb.38:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x8, #-1
	str	x8, [x28, #8]
	str	xzr, [x23, #24]
LBB0_39:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x28]
	cbnz	w8, LBB0_51
; %bb.40:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20, #16]
	tbnz	x8, #63, LBB0_47
; %bb.41:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x23, #16]
	cmp	x9, x8
	b.le	LBB0_47
; %bb.42:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_av_packet_unref
	ldr	x8, [x28, #8]
LBB0_43:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x19]
	ldr	x22, [x9, x8, lsl #3]
	ldr	x23, [x22, #24]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_get_subtitle_pkt
	cbz	x0, LBB0_8
	b	LBB0_6
LBB0_44:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_read_gab2_sub
	cbz	x0, LBB0_20
; %bb.45:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x23, #8]
	add	x8, x8, #1
	str	x8, [x23, #8]
	mov	x8, #-1
	str	x8, [x28, #8]
	str	wzr, [x23, #4]
	b	LBB0_43
LBB0_46:
	mov	x25, x0
	b	LBB0_52
LBB0_47:
	str	xzr, [x23, #16]
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.48:
	ldr	w8, [x28, #16]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.49:
	ldr	w0, [x20, #24]
	ldr	w1, [x22, #4]
Lloh44:
	adrp	x8, _AV_TIME_BASE_Q@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AV_TIME_BASE_Q@GOTPAGEOFF]
Lloh46:
	ldr	w2, [x8]
	bl	_av_rescale_q
	ldr	w8, [x28, #20]
	sub	w9, w8, w0
Lloh47:
	adrp	x10, _AV_TIME_BASE@GOTPAGE
Lloh48:
	ldr	x10, [x10, _AV_TIME_BASE@GOTPAGEOFF]
Lloh49:
	ldr	w10, [x10]
	cmp	w9, w10, lsl #1
	b.le	LBB0_53
; %bb.50:
	mov	w8, #1
	str	w8, [x28]
Lloh50:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
Lloh53:
	adrp	x2, l_.str.1@PAGE
Lloh54:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w25, #0
	b	LBB0_52
LBB0_51:
	mov	w25, #0
	str	xzr, [x23, #16]
LBB0_52:
	mov	x0, x25
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_53:
	cmp	w8, w0
	b.ge	LBB0_6
; %bb.54:
	mov	w25, #0
	str	w0, [x28, #20]
	b	LBB0_52
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_DV_DEMUXER,8,3          ; @CONFIG_DV_DEMUXER
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_AV_PKT_DATA_PALETTE,4,2        ; @AV_PKT_DATA_PALETTE
	.comm	_AVPALETTE_SIZE,4,2             ; @AVPALETTE_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate data for palette\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AVMEDIA_TYPE_SUBTITLE,8,3      ; @AVMEDIA_TYPE_SUBTITLE
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AVSEEK_FLAG_ANY,4,2            ; @AVSEEK_FLAG_ANY
	.comm	_AV_CODEC_ID_MPEG4,8,3          ; @AV_CODEC_ID_MPEG4
	.comm	_AVINDEX_KEYFRAME,4,2           ; @AVINDEX_KEYFRAME
	.comm	_AV_TIME_BASE_Q,4,2             ; @AV_TIME_BASE_Q
	.comm	_AV_TIME_BASE,4,2               ; @AV_TIME_BASE
	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
l_.str.1:                               ; @.str.1
	.asciz	"Switching to NI mode, due to poor interleaving\n"

	.no_dead_strip	_avi_read_packet
.subsections_via_symbols
