	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function SampleGrabber_callback
LCPI0_0:
	.quad	0x3e7ad7f29abcaf48              ## double 9.9999999999999995E-8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_SampleGrabber_callback:                ## @SampleGrabber_callback
	.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	%rsi, %r13
	movq	%rdi, %r14
	cmpq	$0, (%rdi)
	js	LBB0_11
## %bb.1:
	movq	$0, -48(%rbp)
	movq	%r13, %rdi
	callq	_IMediaSample_GetActualDataLength
	testq	%rax, %rax
	js	LBB0_11
## %bb.2:
	movq	%rax, %r15
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_IMediaSample_GetPointer
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	cmoveq	%rax, %r15
	leaq	16(%r14), %r12
	movq	%r12, %rdi
	callq	_EnterCriticalSection
	cmpq	%r15, (%r14)
	je	LBB0_8
## %bb.4:
	movq	24(%r14), %rdi
	callq	_CoTaskMemFree
	testq	%r15, %r15
	je	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	callq	_CoTaskMemAlloc
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	movq	%rax, 24(%r14)
	movq	%r15, (%r14)
LBB0_8:
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movq	24(%r14), %rdi
	movq	-48(%rbp), %rsi
	movq	%r15, %rdx
	callq	_CopyMemory
LBB0_10:
	movq	%r12, %rdi
	callq	_LeaveCriticalSection
LBB0_11:
	cmpl	$0, 12(%r14)
	je	LBB0_25
## %bb.12:
	leaq	-60(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_IMediaSample_GetTime
	movl	%eax, %edi
	callq	_SUCCEEDED
	xorpd	%xmm0, %xmm0
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	xorps	%xmm0, %xmm0
	cvtsi2sdl	-60(%rbp), %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
LBB0_14:
	movl	8(%r14), %esi
	cmpl	$-1, %esi
	je	LBB0_25
## %bb.15:
	cmpl	$1, %esi
	je	LBB0_20
## %bb.16:
	testl	%esi, %esi
	jne	LBB0_24
## %bb.17:
	movq	%r13, %rdi
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	callq	_IMediaSample_AddRef
	movq	%rax, %rbx
	movl	12(%r14), %edi
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movq	%r13, %rsi
	callq	_ISampleGrabberCB_SampleCB
	movq	%r13, %rdi
	callq	_IMediaSample_Release
	incl	%eax
	movslq	%eax, %r15
	movq	%r15, %rcx
	subq	%rbx, %rcx
	je	LBB0_25
## %bb.18:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_ERR
	subq	%r15, %rbx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_IMediaSample_Release
	incq	%rbx
	jne	LBB0_19
	jmp	LBB0_25
LBB0_20:
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	$0, -48(%rbp)
	movq	%r13, %rdi
	callq	_IMediaSample_GetActualDataLength
	testq	%rax, %rax
	je	LBB0_25
## %bb.21:
	movq	%rax, %rbx
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_IMediaSample_GetPointer
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_25
## %bb.22:
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_25
## %bb.23:
	movl	12(%r14), %edi
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movq	%rbx, %rdx
	callq	_ISampleGrabberCB_BufferCB
	jmp	LBB0_25
LBB0_24:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
	movl	$-1, 8(%r14)
LBB0_25:
	addq	$24, %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	"(%p) Callback referenced sample %p by %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"unsupported method %d\n"

	.no_dead_strip	_SampleGrabber_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function SampleGrabber_callback
_SampleGrabber_callback:                ; @SampleGrabber_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -56
	.cfi_offset b9, -64
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	tbnz	x8, #63, LBB0_11
; %bb.1:
	str	xzr, [sp]
	mov	x0, x20
	bl	_IMediaSample_GetActualDataLength
	tbnz	x0, #63, LBB0_11
; %bb.2:
	mov	x21, x0
	mov	x1, sp
	mov	x0, x20
	bl	_IMediaSample_GetPointer
	bl	_SUCCEEDED
	cbz	x0, LBB0_11
; %bb.3:
	ldr	x8, [sp]
	cmp	x8, #0
	csel	x22, xzr, x21, eq
	add	x21, x19, #16
	mov	x0, x21
	bl	_EnterCriticalSection
	ldr	x8, [x19]
	cmp	x8, x22
	b.eq	LBB0_8
; %bb.4:
	ldr	x0, [x19, #24]
	bl	_CoTaskMemFree
	cbz	x22, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_CoTaskMemAlloc
	b	LBB0_7
LBB0_6:
	mov	x0, #0
LBB0_7:
	str	x0, [x19, #24]
	str	x22, [x19]
LBB0_8:
	cbz	x22, LBB0_10
; %bb.9:
	ldr	x0, [x19, #24]
	ldr	x1, [sp]
	mov	x2, x22
	bl	_CopyMemory
LBB0_10:
	mov	x0, x21
	bl	_LeaveCriticalSection
LBB0_11:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_23
; %bb.12:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x20
	bl	_IMediaSample_GetTime
	bl	_SUCCEEDED
	ldr	s0, [sp, #12]
	sshll.2d	v0, v0, #0
	scvtf	d0, d0
	mov	x8, #44872
	movk	x8, #39612, lsl #16
	movk	x8, #55282, lsl #32
	movk	x8, #15994, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	cmp	x0, #0
	movi	d1, #0000000000000000
	fcsel	d8, d1, d0, eq
	ldr	w1, [x19, #8]
	cmn	w1, #1
	b.eq	LBB0_23
; %bb.13:
	cmp	w1, #1
	b.eq	LBB0_18
; %bb.14:
	cbnz	w1, LBB0_22
; %bb.15:
	mov	x0, x20
	bl	_IMediaSample_AddRef
	mov	x21, x0
	ldr	w0, [x19, #12]
	fmov	d0, d8
	mov	x1, x20
	bl	_ISampleGrabberCB_SampleCB
	mov	x0, x20
	bl	_IMediaSample_Release
	add	w8, w0, #1
	sxtw	x22, w8
	subs	x3, x22, x21
	b.eq	LBB0_23
; %bb.16:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_ERR
	sub	x19, x21, x22
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_IMediaSample_Release
	adds	x19, x19, #1
	b.lo	LBB0_17
	b	LBB0_23
LBB0_18:
	str	xzr, [sp]
	mov	x0, x20
	bl	_IMediaSample_GetActualDataLength
	cbz	x0, LBB0_23
; %bb.19:
	mov	x21, x0
	mov	x1, sp
	mov	x0, x20
	bl	_IMediaSample_GetPointer
	bl	_SUCCEEDED
	cbz	x0, LBB0_23
; %bb.20:
	ldr	x1, [sp]
	cbz	x1, LBB0_23
; %bb.21:
	ldr	w0, [x19, #12]
	fmov	d0, d8
	mov	x2, x21
	bl	_ISampleGrabberCB_BufferCB
	b	LBB0_23
LBB0_22:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
	mov	w8, #-1
	str	w8, [x19, #8]
LBB0_23:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p) Callback referenced sample %p by %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"unsupported method %d\n"

	.no_dead_strip	_SampleGrabber_callback
.subsections_via_symbols
