	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_start_new_riff
_avi_start_new_riff:                    ## @avi_start_new_riff
	.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	16(%rdi), %r13
	incl	8(%r13)
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movl	(%rdi), %edx
	testl	%edx, %edx
	jle	LBB0_8
## %bb.1:
	movq	8(%rdi), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rsi
	jae	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	jmp	LBB0_5
LBB0_3:
	andl	$-4, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	movq	(%rdi), %rdi
	movl	16(%rdi), %ebx
	movl	%ebx, 8(%rdi)
	movq	$0, (%rdi)
	movq	8(%rcx,%rsi,8), %rdi
	movq	(%rdi), %rdi
	movl	16(%rdi), %ebx
	movl	%ebx, 8(%rdi)
	movq	$0, (%rdi)
	movq	16(%rcx,%rsi,8), %rdi
	movq	(%rdi), %rdi
	movl	16(%rdi), %ebx
	movl	%ebx, 8(%rdi)
	movq	$0, (%rdi)
	movq	24(%rcx,%rsi,8), %rdi
	movq	(%rdi), %rdi
	movl	16(%rdi), %ebx
	movl	%ebx, 8(%rdi)
	movq	$0, (%rdi)
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	movq	(%rsi), %rsi
	movl	16(%rsi), %edi
	movl	%edi, 8(%rsi)
	movq	$0, (%rsi)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_7
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_ff_start_tag
	movq	%rax, (%r13)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ffio_wfourcc
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_ff_start_tag
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ffio_wfourcc
	movq	%rbx, %rax
	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	"RIFF"

L_.str.1:                               ## @.str.1
	.asciz	"LIST"

	.no_dead_strip	_avi_start_new_riff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_start_new_riff
_avi_start_new_riff:                    ; @avi_start_new_riff
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	ldr	x22, [x0, #16]
	ldr	w8, [x22, #8]
	add	w8, w8, #1
	str	w8, [x22, #8]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	x9, [x0, #8]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.2:
	mov	x10, #0
	b	LBB0_6
LBB0_3:
	and	x10, x8, #0xfffffffe
	add	x11, x9, #8
	mov	x12, x10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x13, x14, [x11, #-8]
	ldr	x13, [x13]
	ldr	x14, [x14]
	ldr	w15, [x13, #16]
	ldr	w16, [x14, #16]
	str	w15, [x13, #8]
	str	w16, [x14, #8]
	str	xzr, [x13]
	str	xzr, [x14]
	add	x11, x11, #16
	subs	x12, x12, #2
	b.ne	LBB0_4
; %bb.5:
	cmp	x10, x8
	b.eq	LBB0_8
LBB0_6:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	ldr	x10, [x10]
	ldr	w11, [x10, #16]
	str	w11, [x10, #8]
	str	xzr, [x10]
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ff_start_tag
	str	x0, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_ffio_wfourcc
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_ff_start_tag
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	bl	_ffio_wfourcc
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RIFF"

l_.str.1:                               ; @.str.1
	.asciz	"LIST"

	.no_dead_strip	_avi_start_new_riff
.subsections_via_symbols
