	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_WriteAVIHeader              ## -- Begin function CL_WriteAVIHeader
	.p2align	4, 0x90
_CL_WriteAVIHeader:                     ## @CL_WriteAVIHeader
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_bufIndex@GOTPCREL(%rip), %r14
	movq	$0, (%r14)
	movq	_afd@GOTPCREL(%rip), %rbx
	movq	$0, 72(%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_START_CHUNK
	leaq	L_.str.1(%rip), %rdi
	callq	_WRITE_STRING
	leaq	L_.str.2(%rip), %r15
	movq	%r15, %rdi
	callq	_START_CHUNK
	leaq	L_.str.3(%rip), %rdi
	callq	_WRITE_STRING
	leaq	L_.str.4(%rip), %rdi
	callq	_WRITE_STRING
	movl	$56, %edi
	callq	_WRITE_4BYTES
	movl	(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	8(%rbx), %edi
	imull	4(%rbx), %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movl	$272, %edi                      ## imm = 0x110
	callq	_WRITE_4BYTES
	movl	12(%rbx), %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	cmpq	$1, 56(%rbx)
	movl	$2, %edi
	sbbl	$0, %edi
	callq	_WRITE_4BYTES
	movl	4(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	16(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	20(%rbx), %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movq	%r15, %rdi
	callq	_START_CHUNK
	leaq	L_.str.5(%rip), %rdi
	callq	_WRITE_STRING
	leaq	L_.str.6(%rip), %rdi
	callq	_WRITE_STRING
	movl	$56, %edi
	callq	_WRITE_4BYTES
	leaq	L_.str.7(%rip), %rdi
	callq	_WRITE_STRING
	cmpq	$0, 64(%rbx)
	je	LBB0_2
## %bb.1:
	leaq	L_.str.8(%rip), %rdi
	callq	_WRITE_STRING
	jmp	LBB0_3
LBB0_2:
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
LBB0_3:
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movl	$1, %edi
	callq	_WRITE_4BYTES
	movl	8(%rbx), %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movl	12(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	4(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	$-1, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_2BYTES
	xorl	%edi, %edi
	callq	_WRITE_2BYTES
	movl	16(%rbx), %edi
	callq	_WRITE_2BYTES
	movl	20(%rbx), %edi
	callq	_WRITE_2BYTES
	leaq	L_.str.9(%rip), %rdi
	callq	_WRITE_STRING
	movl	$40, %edi
	callq	_WRITE_4BYTES
	movl	$40, %edi
	callq	_WRITE_4BYTES
	movl	16(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	20(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	$1, %edi
	callq	_WRITE_2BYTES
	movl	$24, %edi
	callq	_WRITE_2BYTES
	cmpq	$0, 64(%rbx)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.8(%rip), %rdi
	callq	_WRITE_STRING
	movl	20(%rbx), %edi
	imull	16(%rbx), %edi
	jmp	LBB0_6
LBB0_5:
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movl	16(%rbx), %eax
	imull	20(%rbx), %eax
	leal	(%rax,%rax,2), %edi
LBB0_6:
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%eax, %eax
	callq	_END_CHUNK
	cmpq	$0, 56(%rbx)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_START_CHUNK
	leaq	L_.str.5(%rip), %rdi
	callq	_WRITE_STRING
	leaq	L_.str.6(%rip), %rdi
	callq	_WRITE_STRING
	movl	$56, %edi
	callq	_WRITE_4BYTES
	leaq	L_.str.10(%rip), %rdi
	callq	_WRITE_STRING
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movl	32(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	36(%rbx), %edi
	imull	32(%rbx), %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movl	40(%rbx), %eax
	cltd
	idivl	32(%rbx)
	movl	%eax, %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_4BYTES
	movl	$-1, %edi
	callq	_WRITE_4BYTES
	movl	32(%rbx), %edi
	callq	_WRITE_4BYTES
	xorl	%edi, %edi
	callq	_WRITE_2BYTES
	xorl	%edi, %edi
	callq	_WRITE_2BYTES
	xorl	%edi, %edi
	callq	_WRITE_2BYTES
	xorl	%edi, %edi
	callq	_WRITE_2BYTES
	leaq	L_.str.9(%rip), %rdi
	callq	_WRITE_STRING
	movl	$18, %edi
	callq	_WRITE_4BYTES
	movl	44(%rbx), %edi
	callq	_WRITE_2BYTES
	movl	48(%rbx), %edi
	callq	_WRITE_2BYTES
	movl	36(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	36(%rbx), %edi
	imull	32(%rbx), %edi
	callq	_WRITE_4BYTES
	movl	32(%rbx), %edi
	callq	_WRITE_2BYTES
	movl	52(%rbx), %edi
	callq	_WRITE_2BYTES
	xorl	%edi, %edi
	callq	_WRITE_2BYTES
	xorl	%eax, %eax
	callq	_END_CHUNK
LBB0_8:
	xorl	%eax, %eax
	callq	_END_CHUNK
	movq	(%r14), %rax
	movq	%rax, 24(%rbx)
	leaq	L_.str.2(%rip), %rdi
	callq	_START_CHUNK
	leaq	L_.str.11(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WRITE_STRING                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bufIndex,8,3                   ## @bufIndex
	.comm	_afd,80,3                       ## @afd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RIFF"

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

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

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

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

L_.str.5:                               ## @.str.5
	.asciz	"strl"

L_.str.6:                               ## @.str.6
	.asciz	"strh"

L_.str.7:                               ## @.str.7
	.asciz	"vids"

L_.str.8:                               ## @.str.8
	.asciz	"MJPG"

L_.str.9:                               ## @.str.9
	.asciz	"strf"

L_.str.10:                              ## @.str.10
	.asciz	"auds"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_WriteAVIHeader              ; -- Begin function CL_WriteAVIHeader
	.p2align	2
_CL_WriteAVIHeader:                     ; @CL_WriteAVIHeader
	.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
Lloh0:
	adrp	x20, _bufIndex@GOTPAGE
Lloh1:
	ldr	x20, [x20, _bufIndex@GOTPAGEOFF]
	str	xzr, [x20]
Lloh2:
	adrp	x21, _afd@GOTPAGE
Lloh3:
	ldr	x21, [x21, _afd@GOTPAGEOFF]
	str	xzr, [x21, #72]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_START_CHUNK
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WRITE_STRING
Lloh8:
	adrp	x19, l_.str.2@PAGE
Lloh9:
	add	x19, x19, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_START_CHUNK
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_WRITE_STRING
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_WRITE_STRING
	mov	w0, #56
	bl	_WRITE_4BYTES
	ldr	w0, [x21]
	bl	_WRITE_4BYTES
	ldp	w8, w9, [x21, #4]
	mul	w0, w9, w8
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #272
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #12]
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	ldr	x8, [x21, #56]
	cmp	x8, #0
	mov	w8, #1
	cinc	w0, w8, ne
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #4]
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #16]
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #20]
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	x0, x19
	bl	_START_CHUNK
Lloh14:
	adrp	x0, l_.str.5@PAGE
Lloh15:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_WRITE_STRING
Lloh16:
	adrp	x0, l_.str.6@PAGE
Lloh17:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_WRITE_STRING
	mov	w0, #56
	bl	_WRITE_4BYTES
Lloh18:
	adrp	x0, l_.str.7@PAGE
Lloh19:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_WRITE_STRING
	ldr	x8, [x21, #64]
	cbz	x8, LBB0_2
; %bb.1:
Lloh20:
	adrp	x0, l_.str.8@PAGE
Lloh21:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_WRITE_STRING
	b	LBB0_3
LBB0_2:
	mov	w0, #0
	bl	_WRITE_4BYTES
LBB0_3:
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #1
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #8]
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #12]
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #4]
	bl	_WRITE_4BYTES
	mov	w0, #-1
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_2BYTES
	mov	w0, #0
	bl	_WRITE_2BYTES
	ldr	w0, [x21, #16]
	bl	_WRITE_2BYTES
	ldr	w0, [x21, #20]
	bl	_WRITE_2BYTES
Lloh22:
	adrp	x0, l_.str.9@PAGE
Lloh23:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_WRITE_STRING
	mov	w0, #40
	bl	_WRITE_4BYTES
	mov	w0, #40
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #16]
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #20]
	bl	_WRITE_4BYTES
	mov	w0, #1
	bl	_WRITE_2BYTES
	mov	w0, #24
	bl	_WRITE_2BYTES
	ldr	x8, [x21, #64]
	cbz	x8, LBB0_5
; %bb.4:
Lloh24:
	adrp	x0, l_.str.8@PAGE
Lloh25:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_WRITE_STRING
	ldp	w8, w9, [x21, #16]
	mul	w0, w9, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
	bl	_WRITE_4BYTES
	ldp	w8, w9, [x21, #16]
	mul	w8, w8, w9
	add	w0, w8, w8, lsl #1
LBB0_6:
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	bl	_END_CHUNK
	ldr	x8, [x21, #56]
	cbz	x8, LBB0_8
; %bb.7:
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_START_CHUNK
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_WRITE_STRING
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_WRITE_STRING
	mov	w0, #56
	bl	_WRITE_4BYTES
Lloh32:
	adrp	x0, l_.str.10@PAGE
Lloh33:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_WRITE_STRING
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #32]
	bl	_WRITE_4BYTES
	ldp	w8, w9, [x21, #32]
	mul	w0, w9, w8
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	ldr	w8, [x21, #40]
	ldr	w9, [x21, #32]
	sdiv	w0, w8, w9
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_4BYTES
	mov	w0, #-1
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #32]
	bl	_WRITE_4BYTES
	mov	w0, #0
	bl	_WRITE_2BYTES
	mov	w0, #0
	bl	_WRITE_2BYTES
	mov	w0, #0
	bl	_WRITE_2BYTES
	mov	w0, #0
	bl	_WRITE_2BYTES
Lloh34:
	adrp	x0, l_.str.9@PAGE
Lloh35:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_WRITE_STRING
	mov	w0, #18
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #44]
	bl	_WRITE_2BYTES
	ldr	w0, [x21, #48]
	bl	_WRITE_2BYTES
	ldr	w0, [x21, #36]
	bl	_WRITE_4BYTES
	ldp	w8, w9, [x21, #32]
	mul	w0, w9, w8
	bl	_WRITE_4BYTES
	ldr	w0, [x21, #32]
	bl	_WRITE_2BYTES
	ldr	w0, [x21, #52]
	bl	_WRITE_2BYTES
	mov	w0, #0
	bl	_WRITE_2BYTES
	bl	_END_CHUNK
LBB0_8:
	bl	_END_CHUNK
	ldr	x8, [x20]
	str	x8, [x21, #24]
Lloh36:
	adrp	x0, l_.str.2@PAGE
Lloh37:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_START_CHUNK
Lloh38:
	adrp	x0, l_.str.11@PAGE
Lloh39:
	add	x0, x0, l_.str.11@PAGEOFF
	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
	b	_WRITE_STRING
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_bufIndex,8,3                   ; @bufIndex
	.comm	_afd,80,3                       ; @afd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RIFF"

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

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

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

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

l_.str.5:                               ; @.str.5
	.asciz	"strl"

l_.str.6:                               ; @.str.6
	.asciz	"strh"

l_.str.7:                               ; @.str.7
	.asciz	"vids"

l_.str.8:                               ; @.str.8
	.asciz	"MJPG"

l_.str.9:                               ; @.str.9
	.asciz	"strf"

l_.str.10:                              ; @.str.10
	.asciz	"auds"

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

.subsections_via_symbols
