	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_WriteAVIVideoFrame          ## -- Begin function CL_WriteAVIVideoFrame
	.p2align	4, 0x90
_CL_WriteAVIVideoFrame:                 ## @CL_WriteAVIVideoFrame
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_afd@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	subl	4(%r13), %ebx
	movl	%esi, %edi
	movl	$2, %esi
	callq	_PADLEN
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	cmpl	$0, 32(%r13)
	je	LBB0_5
## %bb.1:
	movl	%eax, %r15d
	leal	10(%r14), %edi
	callq	_CL_CheckFileSize
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	addl	$-8, %ebx
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	leal	8(%r14), %r12d
	movq	_bufIndex@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	leaq	L_.str(%rip), %rdi
	callq	_WRITE_STRING
	movl	%r14d, %edi
	callq	_WRITE_4BYTES
	movq	_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	28(%r13), %edx
	movl	$8, %esi
	callq	_SafeFS_Write
	movl	28(%r13), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_SafeFS_Write
	movl	28(%r13), %edx
	leaq	-64(%rbp), %rdi
	movl	%r15d, %esi
	callq	_SafeFS_Write
	addl	%r15d, %r12d
	addl	%r12d, (%r13)
	incl	24(%r13)
	addl	%r12d, 8(%r13)
	cmpl	%r14d, 12(%r13)
	jge	LBB0_4
## %bb.3:
	movl	%r14d, 12(%r13)
LBB0_4:
	movq	_bufIndex@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	leaq	L_.str(%rip), %rdi
	callq	_WRITE_STRING
	movl	$16, %edi
	callq	_WRITE_4BYTES
	movl	%ebx, %edi
	callq	_WRITE_4BYTES
	movl	%r14d, %edi
	callq	_WRITE_4BYTES
	movq	_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	20(%r13), %edx
	movl	$16, %esi
	callq	_SafeFS_Write
	incl	16(%r13)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_afd,36,2                       ## @afd
	.comm	_bufIndex,8,3                   ## @bufIndex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"00dc"

	.comm	_buffer,8,3                     ## @buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_WriteAVIVideoFrame          ; -- Begin function CL_WriteAVIVideoFrame
	.p2align	2
_CL_WriteAVIVideoFrame:                 ; @CL_WriteAVIVideoFrame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x22, 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	x23, _afd@GOTPAGE
Lloh4:
	ldr	x23, [x23, _afd@GOTPAGEOFF]
	ldp	w20, w24, [x23]
	mov	x0, x1
	mov	w1, #2
	bl	_PADLEN
	stp	xzr, xzr, [sp, #8]
	ldr	w8, [x23, #32]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x21, x0
	add	w0, w19, #10
	bl	_CL_CheckFileSize
	cbnz	x0, LBB0_5
; %bb.2:
	sub	w8, w20, w24
	sub	w20, w8, #8
	add	w26, w19, #8
Lloh5:
	adrp	x25, _bufIndex@GOTPAGE
Lloh6:
	ldr	x25, [x25, _bufIndex@GOTPAGEOFF]
	str	xzr, [x25]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WRITE_STRING
	mov	x0, x19
	bl	_WRITE_4BYTES
Lloh9:
	adrp	x24, _buffer@GOTPAGE
Lloh10:
	ldr	x24, [x24, _buffer@GOTPAGEOFF]
	ldr	x0, [x24]
	ldr	w2, [x23, #28]
	mov	w1, #8
	bl	_SafeFS_Write
	ldr	w2, [x23, #28]
	mov	x0, x22
	mov	x1, x19
	bl	_SafeFS_Write
	ldr	w2, [x23, #28]
	add	x0, sp, #8
	mov	x1, x21
	bl	_SafeFS_Write
	ldr	w8, [x23]
	add	w9, w26, w21
	add	w8, w8, w9
	str	w8, [x23]
	ldr	w8, [x23, #24]
	add	w8, w8, #1
	str	w8, [x23, #24]
	ldp	w8, w10, [x23, #8]
	add	w8, w8, w9
	str	w8, [x23, #8]
	cmp	w10, w19
	b.ge	LBB0_4
; %bb.3:
	str	w19, [x23, #12]
LBB0_4:
	str	xzr, [x25]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WRITE_STRING
	mov	w0, #16
	bl	_WRITE_4BYTES
	mov	x0, x20
	bl	_WRITE_4BYTES
	mov	x0, x19
	bl	_WRITE_4BYTES
	ldr	x0, [x24]
	ldr	w2, [x23, #20]
	mov	w1, #16
	bl	_SafeFS_Write
	ldr	w8, [x23, #16]
	add	w8, w8, #1
	str	w8, [x23, #16]
LBB0_5:
	ldr	x8, [sp, #24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_afd,36,2                       ; @afd
	.comm	_bufIndex,8,3                   ; @bufIndex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"00dc"

	.comm	_buffer,8,3                     ; @buffer
.subsections_via_symbols
