	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AVIFILE_ParseIndex
_AVIFILE_ParseIndex:                    ## @AVIFILE_ParseIndex
	.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	%rcx, -48(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r12
	movq	_AVIERR_OK@GOTPCREL(%rip), %rax
	testq	%rdx, %rdx
	jle	LBB0_16
## %bb.3:
	movq	%r8, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	addq	$12, %rbx
	incq	%r12
	movq	_listtypeAVIRECORD@GOTPCREL(%rip), %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	addl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, -8(%rbx)
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r13), %rdx
	cltq
	movl	(%rdx,%rax,4), %edi
	movl	-12(%rbx), %r8d
	movl	-4(%rbx), %edx
	callq	_AVIFILE_AddFrame
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$16, %rbx
	decq	%r12
	cmpq	$1, %r12
	jle	LBB0_15
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_StreamFromFOURCC
	movl	(%rbx), %esi
	cmpl	(%r14), %esi
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$127, %eax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	12(%r13), %eax
	jg	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%r15)
	movl	-8(%rbx), %ecx
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	8(%r13), %ecx
	jge	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_FALSE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, (%r15)
	testq	%rdx, %rdx
	jne	LBB0_12
	jmp	LBB0_11
LBB0_1:
	movq	_AVIERR_BADPARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	_AVIERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_13:
	movq	_AVIERR_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_7:
	movq	_AVIERR_BADFORMAT@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIERR_BADPARAM,4,2            ## @AVIERR_BADPARAM
	.comm	_listtypeAVIRECORD,4,2          ## @listtypeAVIRECORD
	.comm	_AVIERR_BADFORMAT,4,2           ## @AVIERR_BADFORMAT
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_AVIERR_MEMORY,4,2              ## @AVIERR_MEMORY
	.comm	_AVIERR_OK,4,2                  ## @AVIERR_OK
	.no_dead_strip	_AVIFILE_ParseIndex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AVIFILE_ParseIndex
_AVIFILE_ParseIndex:                    ; @AVIFILE_ParseIndex
	.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
	cbz	x1, LBB0_12
; %bb.1:
	cmp	x2, #1
	b.lt	LBB0_13
; %bb.2:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x0
	add	x23, x1, #12
	add	x24, x2, #1
Lloh0:
	adrp	x26, _listtypeAVIRECORD@GOTPAGE
Lloh1:
	ldr	x26, [x26, _listtypeAVIRECORD@GOTPAGEOFF]
Lloh2:
	adrp	x25, _AVIERR_OK@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AVIERR_OK@GOTPAGEOFF]
Lloh4:
	adrp	x22, _AVIERR_BADFORMAT@GOTPAGE
Lloh5:
	ldr	x22, [x22, _AVIERR_BADFORMAT@GOTPAGEOFF]
Lloh6:
	adrp	x27, _AVIERR_MEMORY@GOTPAGE
Lloh7:
	ldr	x27, [x27, _AVIERR_MEMORY@GOTPAGEOFF]
Lloh8:
	adrp	x28, _FALSE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _FALSE@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w3, w3, w20
	stur	w3, [x23, #-8]
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8, w0, sxtw #2]
	ldur	w2, [x23, #-4]
	ldur	w4, [x23, #-12]
	bl	_AVIFILE_AddFrame
	bl	_FAILED
	cbnz	x0, LBB0_15
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #16
	sub	x24, x24, #1
	cmp	x24, #1
	b.le	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_StreamFromFOURCC
	ldr	w1, [x23]
	ldr	w8, [x26]
	cmp	w1, w8
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #127
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21, #12]
	cmp	w0, w8
	b.gt	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19]
	ldur	w3, [x23, #-8]
	cbz	x8, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21, #8]
	cmp	w3, w8
	b.ge	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x28]
	str	x8, [x19]
	cbnz	x8, LBB0_4
	b	LBB0_3
LBB0_12:
Lloh10:
	adrp	x22, _AVIERR_BADPARAM@GOTPAGE
Lloh11:
	ldr	x22, [x22, _AVIERR_BADPARAM@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
Lloh12:
	adrp	x22, _AVIERR_OK@GOTPAGE
Lloh13:
	ldr	x22, [x22, _AVIERR_OK@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	mov	x22, x25
	b	LBB0_16
LBB0_15:
	mov	x22, x27
LBB0_16:
	ldr	w0, [x22]
	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
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIERR_BADPARAM,4,2            ; @AVIERR_BADPARAM
	.comm	_listtypeAVIRECORD,4,2          ; @listtypeAVIRECORD
	.comm	_AVIERR_BADFORMAT,4,2           ; @AVIERR_BADFORMAT
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_AVIERR_MEMORY,4,2              ; @AVIERR_MEMORY
	.comm	_AVIERR_OK,4,2                  ; @AVIERR_OK
	.no_dead_strip	_AVIFILE_ParseIndex
.subsections_via_symbols
