	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AVISplitter_first_request
_AVISplitter_first_request:             ## @AVISplitter_first_request
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	$0, -64(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, 8(%rbx)
	jle	LBB0_20
## %bb.1:
	movl	$52, %r15d
	xorl	%r12d, %r12d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movb	%bl, %r14b
	incq	%r12
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movslq	8(%r13), %rax
	addq	$56, %r15
	cmpq	%rax, %r12
	jge	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rbx
	xorl	%edi, %edi
	cmpq	$0, -28(%rbx,%r15)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, -64(%rbp)
	sete	%dil
	callq	_assert
	movl	(%rbx,%r15), %edi
	callq	_ResetEvent
	movl	-8(%rbx,%r15), %eax
	movl	%eax, -4(%rbx,%r15)
	movq	-44(%rbx,%r15), %rax
	movq	%rax, -52(%rbx,%r15)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbx,%r15)
	testl	%r14d, %r14d
	movq	_S_OK@GOTPCREL(%rip), %rbx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$-1, -44(%rbp)
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movl	$10000, %esi                    ## imm = 0x2710
	leaq	-64(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_IAsyncReader_WaitForNext
	xorl	%edi, %edi
	cmpl	(%rbx), %eax
	sete	%dil
	callq	_assert
	movl	-64(%rbp), %edi
	callq	_assert
	movq	-64(%rbp), %rsi
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	callq	_AVISplitter_Sample
	movq	-64(%rbp), %rdi
	callq	_IMediaSample_Release
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_AVISplitter_next_request
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_TRACE
	xorl	%r14d, %r14d
	cmpl	(%rbx), %r13d
	sete	%bl
	movq	_S_FALSE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_AVISplitter_SendEndOfFile
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_VFW_E_NOT_CONNECTED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	testl	%eax, %eax
	jg	LBB0_12
	jmp	LBB0_20
LBB0_10:
	movq	_S_OK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	testl	%eax, %eax
	jle	LBB0_20
LBB0_12:
	movl	$24, %r15d
	leaq	L_.str.2(%rip), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	testq	%rcx, %rcx
	je	LBB0_16
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	$0, (%rax,%r15)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	movslq	8(%r14), %rax
	addq	$56, %r15
	cmpq	%rax, %rbx
	jge	LBB0_20
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	$0, 8(%rax,%r15)
	movq	-24(%rax,%r15), %rcx
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpq	-8(%rax,%r15), %rcx
	jge	LBB0_18
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$16, %edi
	callq	_CoTaskMemAlloc
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, 8(%rax)
	movl	%ebx, (%rax)
	movq	_AVISplitter_thread_reader@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movq	%rax, %rcx
	xorl	%r8d, %r8d
	leaq	-44(%rbp), %r9
	callq	_CreateThread
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%r15)
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_TRACE
	jmp	LBB0_19
LBB0_20:
	movl	%r13d, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.3(%rip), %rdi
	movl	%r13d, %esi
	callq	_ERR
LBB0_22:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S_OK,4,2                       ## @S_OK
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p)->()\n"

	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"-->%08x\n"

	.comm	_S_FALSE,4,2                    ## @S_FALSE
	.comm	_VFW_E_NOT_CONNECTED,4,2        ## @VFW_E_NOT_CONNECTED
	.comm	_AVISplitter_thread_reader,4,2  ## @AVISplitter_thread_reader
L_.str.2:                               ## @.str.2
	.asciz	"Created stream %u thread 0x%08x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Horsemen of the apocalypse came to bring error 0x%08x\n"

	.no_dead_strip	_AVISplitter_first_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AVISplitter_first_request
_AVISplitter_first_request:             ; @AVISplitter_first_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x23, _S_OK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _S_OK@GOTPAGEOFF]
	ldr	w20, [x23]
	str	xzr, [sp, #24]
Lloh2:
	adrp	x8, _FALSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh4:
	ldr	w27, [x8]
	str	x0, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x24, #0
	mov	x21, #0
Lloh7:
	adrp	x25, _TRUE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _TRUE@GOTPAGEOFF]
Lloh9:
	adrp	x26, _S_FALSE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _S_FALSE@GOTPAGEOFF]
	mov	w28, #-1
Lloh11:
	adrp	x22, l_.str.1@PAGE
Lloh12:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	add	x24, x24, #56
	cmp	x21, x8
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x20, x8, x24
	ldr	x8, [x20, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [sp, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x20, #52]
	bl	_ResetEvent
	ldr	w8, [x20, #44]
	str	w8, [x20, #48]
	ldr	x8, [x20, #8]
	str	x8, [x20]
	ldr	w8, [x25]
	str	w8, [x20, #40]
	cbz	w27, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w28, [sp, #20]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	add	x2, sp, #24
	add	x3, sp, #20
	mov	w1, #10000
	bl	_IAsyncReader_WaitForNext
	ldr	w8, [x23]
	cmp	w0, w8
	cset	w0, eq
	bl	_assert
	ldr	w0, [sp, #24]
	bl	_assert
	ldr	x1, [sp, #24]
	ldr	w2, [sp, #20]
	mov	x0, x19
	bl	_AVISplitter_Sample
	ldr	x0, [sp, #24]
	bl	_IMediaSample_Release
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_AVISplitter_next_request
	mov	x20, x0
	str	x20, [sp]
	mov	x0, x22
	bl	_TRACE
	ldr	w8, [x23]
	cmp	w20, w8
	cset	w27, eq
	ldr	w8, [x26]
	cmp	w20, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_AVISplitter_SendEndOfFile
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_FAILED
	cbz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh13:
	adrp	x8, _VFW_E_NOT_CONNECTED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VFW_E_NOT_CONNECTED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w20, w8
	b.eq	LBB0_2
; %bb.9:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.ge	LBB0_11
	b	LBB0_19
LBB0_10:
	ldr	w20, [x23]
	cmp	w8, #1
	b.lt	LBB0_19
LBB0_11:
	mov	x22, #0
	mov	x23, #0
Lloh16:
	adrp	x24, _AVISplitter_thread_reader@GOTPAGE
Lloh17:
	ldr	x24, [x24, _AVISplitter_thread_reader@GOTPAGEOFF]
Lloh18:
	adrp	x21, l_.str.2@PAGE
Lloh19:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=1
	cbz	x9, LBB0_18
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x8, x8, x22
	str	xzr, [x8, #24]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19, #8]
	add	x22, x22, #56
	cmp	x23, x8
	b.ge	LBB0_19
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_SUCCEEDED
	cbz	x0, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x19]
	add	x10, x8, x22
	ldr	x11, [x10, #32]
	ldr	x9, [x10]
	cbz	x11, LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x10, [x10, #16]
	cmp	x9, x10
	b.ge	LBB0_13
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w0, #16
	bl	_CoTaskMemAlloc
	mov	x3, x0
	str	x19, [x0, #8]
	str	w23, [x0]
	ldr	w2, [x24]
	add	x5, sp, #20
	mov	x0, #0
	mov	w1, #0
	mov	w4, #0
	bl	_CreateThread
	ldr	x8, [x19]
	add	x8, x8, x22
	str	x0, [x8, #24]
	ldr	w8, [sp, #20]
	stp	x23, x8, [sp]
	mov	x0, x21
	bl	_TRACE
	b	LBB0_14
LBB0_19:
	mov	x0, x20
	bl	_FAILED
	cbz	x0, LBB0_21
; %bb.20:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_ERR
LBB0_21:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_S_OK,4,2                       ; @S_OK
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p)->()\n"

	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"-->%08x\n"

	.comm	_S_FALSE,4,2                    ; @S_FALSE
	.comm	_VFW_E_NOT_CONNECTED,4,2        ; @VFW_E_NOT_CONNECTED
	.comm	_AVISplitter_thread_reader,4,2  ; @AVISplitter_thread_reader
l_.str.2:                               ; @.str.2
	.asciz	"Created stream %u thread 0x%08x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Horsemen of the apocalypse came to bring error 0x%08x\n"

	.no_dead_strip	_AVISplitter_first_request
.subsections_via_symbols
