	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_find_chunk
_avi_find_chunk:                        ## @avi_find_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_READ_FOURCC
	movq	%rax, %r12
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_READ_U32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_STREAM_STATUS
	cmpl	(%r13), %eax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%r15, %r12
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_AVI_SKIP_CHUNK
	movq	%rbx, %rdi
	callq	_STREAM_STATUS
	cmpl	(%r13), %eax
	je	LBB0_1
	jmp	LBB0_5
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
	movl	(%r13), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Chunk ID"

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

	.comm	_VC_CONTAINER_SUCCESS,4,2       ## @VC_CONTAINER_SUCCESS
	.no_dead_strip	_avi_find_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_chunk
_avi_find_chunk:                        ; @avi_find_chunk
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
Lloh2:
	adrp	x26, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh3:
	ldr	x26, [x26, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh4:
	adrp	x23, l_.str.1@PAGE
Lloh5:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_1:                                 ; =>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	x24, x0
	mov	x0, x21
	bl	_STREAM_STATUS
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	x25, x20
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_AVI_SKIP_CHUNK
	mov	x0, x21
	bl	_STREAM_STATUS
	ldr	w8, [x26]
	cmp	w0, w8
	b.eq	LBB0_1
	b	LBB0_5
LBB0_4:
	str	w24, [x19]
	ldr	w0, [x26]
LBB0_5:
	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
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Chunk ID"

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

	.comm	_VC_CONTAINER_SUCCESS,4,2       ; @VC_CONTAINER_SUCCESS
	.no_dead_strip	_avi_find_chunk
.subsections_via_symbols
