	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AVISplitter_done_process
_AVISplitter_done_process:              ## @AVISplitter_done_process
	.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
	cmpq	$0, 8(%rdi)
	jle	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movl	$16, %ebx
	movq	_WAIT_TIMEOUT@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, -8(%r14,%rbx)
	movl	-16(%r14,%rbx), %edi
	callq	_ResetEvent
	incq	%r12
	addq	$24, %rbx
	cmpq	8(%r15), %r12
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %r14
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movl	-16(%r14,%rbx), %edi
	callq	_SetEvent
	movq	(%r14,%rbx), %rdi
	movl	$100000, %esi                   ## imm = 0x186A0
	callq	_WaitForSingleObject
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	setne	%dil
	callq	_assert
	movq	(%r14,%rbx), %rdi
	callq	_CloseHandle
	movq	$0, (%r14,%rbx)
	movq	-8(%r14,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_IMediaSample_Release
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	jmp	LBB0_4
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	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	"Waiting for %u to terminate\n"

	.comm	_WAIT_TIMEOUT,8,3               ## @WAIT_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"All threads are now terminated\n"

	.comm	_S_OK,4,2                       ## @S_OK
	.no_dead_strip	_AVISplitter_done_process
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AVISplitter_done_process
_AVISplitter_done_process:              ; @AVISplitter_done_process
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x0, #8]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	mov	x22, #0
Lloh0:
	adrp	x23, _WAIT_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _WAIT_TIMEOUT@GOTPAGEOFF]
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [x25, #8]
	ldr	w0, [x24, x21]
	bl	_ResetEvent
	add	x22, x22, #1
	ldr	x8, [x19, #8]
	add	x21, x21, #24
	cmp	x22, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x19]
	str	x22, [sp]
	mov	x0, x20
	bl	_TRACE
	add	x25, x24, x21
	ldr	w0, [x25]
	bl	_SetEvent
	ldr	x0, [x25, #16]
	mov	w1, #34464
	movk	w1, #1, lsl #16
	bl	_WaitForSingleObject
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w0, ne
	bl	_assert
	ldr	x0, [x25, #16]
	bl	_CloseHandle
	str	xzr, [x25, #16]
	ldr	x0, [x25, #8]
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_IMediaSample_Release
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	b	LBB0_2
LBB0_5:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
Lloh6:
	adrp	x8, _S_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Waiting for %u to terminate\n"

	.comm	_WAIT_TIMEOUT,8,3               ; @WAIT_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"All threads are now terminated\n"

	.comm	_S_OK,4,2                       ; @S_OK
	.no_dead_strip	_AVISplitter_done_process
.subsections_via_symbols
