	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function take_samples
_take_samples:                          ## @take_samples
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r14d
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movl	16(%rdi), %esi
	callq	_samples_ready
	movl	%eax, %edi
	callq	_av_assert1
	leaq	4(%r13), %rdi
	xorl	%ebx, %ebx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	callq	_ff_framequeue_peek
	cmpl	$0, 4(%r13)
	movl	(%rax), %r12d
	je	LBB0_1
LBB0_4:
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	movl	$0, %eax
	cmpl	%r14d, %r12d
	ja	LBB0_12
## %bb.5:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_ff_framequeue_queued_frames
	movl	$1, %ebx
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.6:
	movl	%r12d, %r14d
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	cmpl	-60(%rbp), %r12d                ## 4-byte Folded Reload
	jb	LBB0_4
## %bb.2:
	cmpl	%r14d, %r12d
	ja	LBB0_4
## %bb.3:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_ff_framequeue_take
	movq	%rax, (%r15)
	jmp	LBB0_22
LBB0_8:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_ff_framequeue_peek
	movq	%rax, %r15
	movl	(%rax), %r14d
	addl	%r12d, %r14d
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	ja	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	movq	%r13, %rdi
	callq	_ff_framequeue_queued_frames
	movl	%r14d, %r12d
	cmpl	%eax, %ebx
	jne	LBB0_10
LBB0_7:
	movq	%r15, -56(%rbp)
	movl	%r14d, %r15d
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_11:
	movl	%r12d, %eax
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
LBB0_12:
	movq	%r15, -56(%rbp)
	cmpl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	cmovael	%eax, %r14d
	movl	%r14d, %r15d
LBB0_13:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ff_get_audio_buffer
	movq	%rax, -104(%rbp)
	testq	%rax, %rax
	je	LBB0_24
## %bb.14:
	movq	%rax, %r14
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, %rdi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_av_frame_copy_props
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movl	8(%r12), %eax
	movl	%eax, 8(%r14)
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	je	LBB0_19
## %bb.17:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_ff_framequeue_take
	movq	%rax, -56(%rbp)
	movl	4(%r14), %edi
	movl	(%rax), %r8d
	movl	4(%rax), %esi
	movl	8(%r13), %eax
	movl	12(%r13), %r9d
	movl	%eax, (%rsp)
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_av_samples_copy
	movq	-56(%rbp), %rax
	addl	(%rax), %r15d
	leaq	-56(%rbp), %rdi
	callq	_av_frame_free
	decl	%ebx
	jne	LBB0_18
LBB0_19:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	subl	%r15d, %ebx
	jbe	LBB0_21
## %bb.20:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ff_framequeue_peek
	movq	%rax, -56(%rbp)
	movl	4(%r14), %edi
	movl	4(%rax), %esi
	movl	8(%r13), %eax
	movl	12(%r13), %r9d
	movl	%eax, (%rsp)
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	callq	_av_samples_copy
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_ff_framequeue_skip_samples
LBB0_21:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
LBB0_22:
	xorl	%r15d, %r15d
	jmp	LBB0_23
LBB0_24:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_15:
	movl	%eax, %r15d
	leaq	-104(%rbp), %rdi
	callq	_av_frame_free
LBB0_23:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_take_samples
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function take_samples
_take_samples:                          ; @take_samples
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x3
	mov	x25, x2
	mov	x26, x1
	mov	x20, x0
	ldr	w1, [x0, #16]
	bl	_samples_ready
	bl	_av_assert1
	add	x21, x20, #4
	mov	x0, x21
	mov	w1, #0
	bl	_ff_framequeue_peek
	ldr	w8, [x20, #4]
	ldr	w23, [x0]
	cmp	w8, #0
	ccmp	w23, w26, #0, eq
	ccmp	w23, w25, #2, hs
	b.ls	LBB0_18
; %bb.1:
	mov	x24, x0
	cmp	w23, w25
	b.ls	LBB0_4
; %bb.2:
	mov	w22, #0
	mov	w28, #0
	mov	x27, x24
LBB0_3:
	str	x27, [sp, #8]
	cmp	w28, w26
	csel	w23, w25, w28, lo
	b	LBB0_10
LBB0_4:
	mov	x0, x21
	bl	_ff_framequeue_queued_frames
	mov	w22, #1
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.5:
	mov	x27, x24
	b	LBB0_9
LBB0_6:
	mov	x28, x23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_ff_framequeue_peek
	mov	x27, x0
	ldr	w8, [x0]
	add	w23, w8, w28
	cmp	w23, w25
	b.hi	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, #1
	mov	x0, x21
	bl	_ff_framequeue_queued_frames
	mov	x28, x23
	cmp	w22, w0
	b.ne	LBB0_7
LBB0_9:
	str	x27, [sp, #8]
LBB0_10:
	mov	x0, x20
	mov	x1, x23
	bl	_ff_get_audio_buffer
	str	x0, [sp]
	cbz	x0, LBB0_17
; %bb.11:
	mov	x25, x0
	mov	x1, x24
	bl	_av_frame_copy_props
	tbnz	w0, #31, LBB0_19
; %bb.12:
	ldr	w8, [x24, #8]
	str	w8, [x25, #8]
	mov	w24, #0
	cbz	w22, LBB0_14
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_ff_framequeue_take
	str	x0, [sp, #8]
	ldr	w8, [x25, #4]
	ldp	w4, w1, [x0]
	ldp	w6, w5, [x20, #8]
	mov	x0, x8
	mov	x2, x24
	mov	w3, #0
	bl	_av_samples_copy
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	add	w24, w8, w24
	add	x0, sp, #8
	bl	_av_frame_free
	subs	w22, w22, #1
	b.ne	LBB0_13
LBB0_14:
	subs	w22, w23, w24
	b.ls	LBB0_16
; %bb.15:
	mov	x0, x21
	mov	w1, #0
	bl	_ff_framequeue_peek
	str	x0, [sp, #8]
	ldr	w8, [x25, #4]
	ldr	w1, [x0, #4]
	ldp	w6, w5, [x20, #8]
	mov	x0, x8
	mov	x2, x24
	mov	w3, #0
	mov	x4, x22
	bl	_av_samples_copy
	ldr	w2, [x20]
	mov	x0, x21
	mov	x1, x22
	bl	_ff_framequeue_skip_samples
LBB0_16:
	mov	w26, #0
	str	x25, [x19]
	b	LBB0_20
LBB0_17:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
LBB0_18:
	mov	x0, x21
	bl	_ff_framequeue_take
	mov	w26, #0
	str	x0, [x19]
	b	LBB0_20
LBB0_19:
	mov	x26, x0
	mov	x0, sp
	bl	_av_frame_free
LBB0_20:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_take_samples
.subsections_via_symbols
