	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rawvideo_writer_write
_rawvideo_writer_write:                 ## @rawvideo_writer_write
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	cmpq	$0, 8(%rbx)
	je	LBB0_11
## %bb.1:
	cmpl	$0, 16(%rbx)
	je	LBB0_2
LBB0_4:
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$5, %edx
	callq	_WRITE_BYTES
	cmpq	$0, (%rbx)
	je	LBB0_10
## %bb.6:
	movl	4(%r14), %ecx
	testl	%ecx, %ecx
	jne	LBB0_8
## %bb.7:
	movl	8(%r14), %ecx
LBB0_8:
	leaq	L_.str.1(%rip), %rdx
	leaq	-64(%rbp), %rdi
	movl	$32, %esi
	callq	_snprintf
	cmpl	$31, %eax
	ja	LBB0_10
## %bb.9:
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_WRITE_BYTES
LBB0_10:
	movq	%r15, %rdi
	movl	$10, %esi
	callq	__WRITE_U8
LBB0_11:
	movq	16(%r14), %rsi
	movl	8(%r14), %edx
	movq	%r15, %rdi
	callq	_WRITE_BYTES
	movq	%r15, %rdi
	callq	_STREAM_STATUS
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, %rdi
	callq	_rawvideo_write_header
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.3:
	cmpq	$0, 8(%rbx)
	jne	LBB0_4
	jmp	LBB0_11
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FRAME"

L_.str.1:                               ## @.str.1
	.asciz	" S%i"

	.no_dead_strip	_rawvideo_writer_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rawvideo_writer_write
_rawvideo_writer_write:                 ; @rawvideo_writer_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x8, [x0]
	ldr	x21, [x8]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_9
; %bb.1:
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_12
LBB0_2:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #5
	bl	_WRITE_BYTES
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.4:
	ldr	w3, [x20, #4]
	cbnz	w3, LBB0_6
; %bb.5:
	ldr	w3, [x20, #8]
LBB0_6:
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	w1, #32
	bl	_snprintf
	cmp	w0, #31
	b.hi	LBB0_8
; %bb.7:
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_WRITE_BYTES
LBB0_8:
	mov	x0, x19
	mov	w1, #10
	bl	__WRITE_U8
LBB0_9:
	ldr	x1, [x20, #16]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_WRITE_BYTES
	mov	x0, x19
	bl	_STREAM_STATUS
LBB0_10:
	ldr	x8, [sp, #40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	mov	x0, x19
	bl	_rawvideo_write_header
Lloh13:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.13:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_2
	b	LBB0_9
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FRAME"

l_.str.1:                               ; @.str.1
	.asciz	" S%i"

	.no_dead_strip	_rawvideo_writer_write
.subsections_via_symbols
