	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_find_next_data_chunk
_avi_find_next_data_chunk:              ## @avi_find_next_data_chunk
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %r12
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.2(%rip), %rsi
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	callq	_SKIP_FOURCC
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rbx
	movq	%r15, %rdi
	callq	_STREAM_STATUS
	cmpl	(%rbx), %eax
	jne	LBB0_24
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_READ_FOURCC
	movq	%rax, %r13
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_READ_U32
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_STREAM_STATUS
	movl	%eax, %r14d
	cmpl	(%rbx), %eax
	jne	LBB0_25
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$76, %edi
	movl	$73, %esi
	movl	$83, %edx
	movl	$84, %ecx
	callq	_VC_FOURCC
	cmpq	%rax, %r13
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	movl	$4, %edx
	callq	_PEEK_BYTES
	cmpl	$4, %eax
	jne	LBB0_22
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rbx
	movl	$114, %edi
	movl	$101, %esi
	movl	$99, %edx
	movl	$32, %ecx
	callq	_VC_FOURCC
	cmpq	%rax, %rbx
	je	LBB0_1
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rbx
	movl	$109, %edi
	movl	$111, %esi
	movl	$118, %edx
	movl	$105, %ecx
	callq	_VC_FOURCC
	cmpq	%rax, %rbx
	jne	LBB0_20
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	$82, %edi
	movl	$73, %esi
	movl	$70, %edx
	movl	$70, %ecx
	callq	_VC_FOURCC
	cmpq	%rax, %r13
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	leaq	-56(%rbp), %rsi
	movl	$4, %edx
	callq	_PEEK_BYTES
	cmpl	$4, %eax
	jne	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rbx
	movl	$65, %edi
	movl	$86, %esi
	movl	$73, %edx
	movl	$88, %ecx
	callq	_VC_FOURCC
	cmpq	%rax, %rbx
	jne	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rbx
	movq	%r13, %r12
	sarq	$16, %r12
	movl	$100, %edi
	movl	$99, %esi
	callq	_AVI_TWOCC
	cltq
	cmpq	%rax, %r12
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$100, %edi
	movl	$98, %esi
	callq	_AVI_TWOCC
	cltq
	cmpq	%rax, %r12
	je	LBB0_23
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$100, %edi
	movl	$100, %esi
	callq	_AVI_TWOCC
	cltq
	cmpq	%rax, %r12
	je	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$119, %edi
	movl	$98, %esi
	callq	_AVI_TWOCC
	cltq
	cmpq	%rax, %r12
	je	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, %rax
	orq	%r13, %rax
	je	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %r12
	movq	%r15, %rdi
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	callq	_AVI_SKIP_CHUNK
	jmp	LBB0_3
LBB0_22:
	movq	_VC_CONTAINER_ERROR_EOS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_25
LBB0_23:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	jmp	LBB0_25
LBB0_24:
	movl	%eax, %r14d
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,4,2       ## @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Chunk ID"

L_.str.1:                               ## @.str.1
	.asciz	"Chunk size"

	.comm	_VC_CONTAINER_ERROR_EOS,4,2     ## @VC_CONTAINER_ERROR_EOS
L_.str.2:                               ## @.str.2
	.asciz	"rec "

L_.str.3:                               ## @.str.3
	.asciz	"movi"

L_.str.4:                               ## @.str.4
	.asciz	"AVIX"

	.no_dead_strip	_avi_find_next_data_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_find_next_data_chunk
_avi_find_next_data_chunk:              ; @avi_find_next_data_chunk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x22, l_.str@PAGE
Lloh4:
	add	x22, x22, l_.str@PAGEOFF
Lloh5:
	adrp	x23, l_.str.1@PAGE
Lloh6:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh7:
	adrp	x26, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh8:
	ldr	x26, [x26, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh9:
	adrp	x24, l_.str.2@PAGE
Lloh10:
	add	x24, x24, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x27
	bl	_AVI_SKIP_CHUNK
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_STREAM_STATUS
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_READ_FOURCC
	mov	x25, x0
	mov	x0, x21
	mov	x1, x23
	bl	_READ_U32
	mov	x27, x0
	mov	x0, x21
	bl	_STREAM_STATUS
	mov	x28, x0
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_22
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #76
	mov	w1, #73
	mov	w2, #83
	mov	w3, #84
	bl	_VC_FOURCC
	cmp	x25, x0
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #16
	mov	x0, x21
	mov	w2, #4
	bl	_PEEK_BYTES
	cmp	w0, #4
	b.ne	LBB0_19
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x19, [sp, #16]
	mov	w0, #114
	mov	w1, #101
	mov	w2, #99
	mov	w3, #32
	bl	_VC_FOURCC
	cmp	x19, x0
	b.ne	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_SKIP_FOURCC
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #82
	mov	w1, #73
	mov	w2, #70
	mov	w3, #70
	bl	_VC_FOURCC
	cmp	x25, x0
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #16
	mov	x0, x21
	mov	w2, #4
	bl	_PEEK_BYTES
	cmp	w0, #4
	b.ne	LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x19, [sp, #16]
	mov	w0, #65
	mov	w1, #86
	mov	w2, #73
	mov	w3, #88
	bl	_VC_FOURCC
	cmp	x19, x0
	b.ne	LBB0_1
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_SKIP_FOURCC
	b	LBB0_2
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	asr	x19, x25, #16
	mov	w0, #100
	mov	w1, #99
	bl	_AVI_TWOCC
	cmp	x19, w0, sxtw
	b.eq	LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	mov	w1, #98
	bl	_AVI_TWOCC
	cmp	x19, w0, sxtw
	b.eq	LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	mov	w1, #100
	bl	_AVI_TWOCC
	cmp	x19, w0, sxtw
	b.eq	LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #119
	mov	w1, #98
	bl	_AVI_TWOCC
	cmp	x19, w0, sxtw
	b.eq	LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	orr	x8, x27, x25
	cbnz	x8, LBB0_1
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x19, [sp, #16]
	mov	w0, #109
	mov	w1, #111
	mov	w2, #118
	mov	w3, #105
	bl	_VC_FOURCC
	cmp	x19, x0
	b.ne	LBB0_1
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_SKIP_FOURCC
	b	LBB0_2
LBB0_19:
Lloh15:
	adrp	x8, _VC_CONTAINER_ERROR_EOS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_EOS@GOTPAGEOFF]
Lloh17:
	ldr	w28, [x8]
	b	LBB0_22
LBB0_20:
	str	x25, [x20]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x27, [x8]
	b	LBB0_22
LBB0_21:
	mov	x28, x0
LBB0_22:
	ldr	x8, [sp, #24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	mov	x0, x28
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,4,2       ; @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Chunk ID"

l_.str.1:                               ; @.str.1
	.asciz	"Chunk size"

	.comm	_VC_CONTAINER_ERROR_EOS,4,2     ; @VC_CONTAINER_ERROR_EOS
l_.str.2:                               ; @.str.2
	.asciz	"rec "

l_.str.3:                               ; @.str.3
	.asciz	"movi"

l_.str.4:                               ; @.str.4
	.asciz	"AVIX"

	.no_dead_strip	_avi_find_next_data_chunk
.subsections_via_symbols
