	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function syncVideoWork
_syncVideoWork:                         ## @syncVideoWork
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rbx
	movq	(%rbx), %rcx
	cmpq	$0, 8(%rcx)
	je	LBB0_2
## %bb.1:
	movl	4(%rcx), %edi
LBB0_8:
	callq	_FlushBuffer
	movq	_HB_WORK_DONE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	(%rsi), %rax
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax)
	je	LBB0_5
## %bb.3:
	movq	%rdi, %r14
	movl	$1, (%rcx)
	movq	8(%rbx), %rdi
	callq	_flushStreamsLock
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	movq	_HB_WORK_DONE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rcx)
	je	LBB0_9
## %bb.4:
	movq	(%r14), %rcx
	movl	$1, (%rcx)
	jmp	LBB0_9
LBB0_5:
	movq	$0, (%rsi)
	movq	(%rbx), %rdi
	movq	%rax, %rsi
	callq	_QueueBuffer
	movq	(%rbx), %rdi
	callq	_Synchronize
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.7:
	movl	4(%rax), %edi
	jmp	LBB0_8
LBB0_6:
	movq	_HB_WORK_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_WORK_DONE,4,2               ## @HB_WORK_DONE
	.comm	_HB_BUF_FLAG_EOF,4,2            ## @HB_BUF_FLAG_EOF
	.comm	_HB_WORK_OK,4,2                 ## @HB_WORK_OK
	.no_dead_strip	_syncVideoWork
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function syncVideoWork
_syncVideoWork:                         ; @syncVideoWork
	.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
	ldr	x20, [x0, #8]
	ldr	x9, [x20]
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w0, [x9, #4]
LBB0_2:
	bl	_FlushBuffer
LBB0_3:
Lloh0:
	adrp	x8, _HB_WORK_DONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HB_WORK_DONE@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	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
LBB0_5:
	ldr	x8, [x1]
	ldr	w10, [x8]
Lloh2:
	adrp	x11, _HB_BUF_FLAG_EOF@GOTPAGE
Lloh3:
	ldr	x11, [x11, _HB_BUF_FLAG_EOF@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_8
; %bb.6:
	mov	x19, x0
	mov	w21, #1
	str	w21, [x9]
	ldr	x0, [x20, #8]
	bl	_flushStreamsLock
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.7:
	ldr	x8, [x19]
	str	w21, [x8]
	b	LBB0_3
LBB0_8:
	str	xzr, [x1]
	ldr	x0, [x20]
	mov	x1, x8
	bl	_QueueBuffer
	ldr	x0, [x20]
	bl	_Synchronize
	ldr	x8, [x20]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_10
; %bb.9:
	ldr	w0, [x8, #4]
	b	LBB0_2
LBB0_10:
Lloh5:
	adrp	x8, _HB_WORK_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HB_WORK_OK@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_WORK_DONE,4,2               ; @HB_WORK_DONE
	.comm	_HB_BUF_FLAG_EOF,4,2            ; @HB_BUF_FLAG_EOF
	.comm	_HB_WORK_OK,4,2                 ; @HB_WORK_OK
	.no_dead_strip	_syncVideoWork
.subsections_via_symbols
