	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_af_queue_remove             ## -- Begin function ff_af_queue_remove
	.p2align	4, 0x90
_ff_af_queue_remove:                    ## @ff_af_queue_remove
	.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	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r8
	cmpl	$0, (%rdi)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.3:
	movq	32(%r8), %rax
	movq	(%rax), %r13
	testq	%rbx, %rbx
	je	LBB0_8
LBB0_7:
	movl	24(%r8), %edi
	movl	%r13d, %esi
	callq	_ff_samples_to_time_base
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	%eax, (%rbx)
LBB0_8:
	testl	%r12d, %r12d
	sete	%r13b
	je	LBB0_9
## %bb.10:
	movb	%r13b, -41(%rbp)                ## 1-byte Spill
	xorl	%r14d, %r14d
	movl	$8, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	addl	%eax, %ebx
	incq	%r14
	addq	$16, %r15
	testl	%r12d, %r12d
	je	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r8), %rax
	cmpq	%rax, %r14
	setl	%r13b
	jge	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	32(%r8), %rax
	movq	(%rax,%r15), %rdi
	movl	%r12d, %esi
	callq	_FFMIN
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movslq	%eax, %rcx
	movq	32(%r8), %rdx
	subq	%rcx, (%rdx,%r15)
	subl	%ecx, %r12d
	movq	-8(%rdx,%r15), %rsi
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	%rcx, %rsi
	movq	%rsi, -8(%rdx,%r15)
	jmp	LBB0_14
LBB0_1:
	cmpq	$0, 40(%r8)
	je	LBB0_2
## %bb.4:
	movq	32(%r8), %rax
	jmp	LBB0_5
LBB0_9:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_17:
	movslq	%ebx, %rax
	subq	%rax, 8(%r8)
	testl	%r14d, %r14d
	jne	LBB0_16
## %bb.18:
	movb	-41(%rbp), %r13b                ## 1-byte Reload
LBB0_19:
	movq	32(%r8), %rdi
	xorl	%r14d, %r14d
	jmp	LBB0_20
LBB0_15:
	movslq	%ebx, %rax
	subq	%rax, 8(%r8)
	xorl	%r12d, %r12d
LBB0_16:
	movq	32(%r8), %rdi
	movslq	%r14d, %r14
	movq	%r14, %rax
	shlq	$4, %rax
	cmpq	$1, -8(%rax,%rdi)
	adcl	$-1, %r14d
LBB0_20:
	movslq	%r14d, %r15
	movq	%r15, %rsi
	shlq	$4, %rsi
	addq	%rdi, %rsi
	movl	(%r8), %edx
	subl	%r15d, %edx
	shll	$4, %edx
	callq	_memmove
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %eax
	movl	%eax, %ecx
	subl	%r15d, %ecx
	movl	%ecx, (%rdx)
	testb	%r13b, %r13b
	jne	LBB0_25
## %bb.21:
	xorl	%edi, %edi
	cmpl	%r14d, %eax
	sete	%dil
	callq	_av_assert0
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	xorl	%edi, %edi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	16(%rcx), %rax
	sete	%dil
	callq	_av_assert0
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	32(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	movq	(%rax), %rcx
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_24
## %bb.23:
	movslq	%r12d, %rdx
	addq	%rdx, %rcx
	movq	%rcx, (%rax)
LBB0_24:
	movl	24(%rsi), %edi
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %ecx
	callq	_av_log
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
LBB0_25:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_27
## %bb.26:
	movl	24(%rdx), %edi
	movl	%ebx, %esi
	callq	_ff_samples_to_time_base
	movl	%eax, (%r14)
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %r13
	movl	24(%r8), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %ecx
	callq	_av_log
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	testq	%rbx, %rbx
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Trying to remove %d samples, but the queue is empty\n"

	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Trying to remove %d more samples than there are in the queue\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_af_queue_remove             ; -- Begin function ff_af_queue_remove
	.p2align	2
_ff_af_queue_remove:                    ; @ff_af_queue_remove
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_9
; %bb.1:
	ldr	x8, [x20, #32]
	ldr	x23, [x8]
	cbz	x22, LBB0_3
LBB0_2:
	ldr	w0, [x20, #24]
	mov	x1, x23
	bl	_ff_samples_to_time_base
	str	w0, [x22]
LBB0_3:
	cmp	w21, #0
	cset	w23, eq
	cbz	w21, LBB0_11
; %bb.4:
	mov	x26, #0
	mov	x24, #0
	mov	w22, #0
Lloh0:
	adrp	x27, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _AV_NOPTS_VALUE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w0, w22
	add	x24, x24, #1
	add	x26, x26, #16
	cbz	w21, LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x20]
	cmp	x24, x8
	cset	w25, lt
	b.ge	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #32]
	add	x8, x8, x26
	ldr	x0, [x8, #8]
	mov	x1, x21
	bl	_FFMIN
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x9, w0
	ldr	x8, [x20, #32]
	add	x11, x8, x26
	ldp	x10, x12, [x11]
	sub	x12, x12, x9
	str	x12, [x11, #8]
	sub	w21, w21, w0
	ldr	x11, [x27]
	cmp	x10, x11
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x10, x9
	str	x9, [x8, x26]
	b	LBB0_5
LBB0_9:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_24
; %bb.10:
	ldr	x8, [x20, #32]
	b	LBB0_25
LBB0_11:
	mov	w22, #0
	b	LBB0_13
LBB0_12:
	ldr	x8, [x20, #8]
	sub	x8, x8, w22, sxtw
	str	x8, [x20, #8]
	cbnz	w24, LBB0_15
LBB0_13:
	mov	w24, #0
	ldr	x0, [x20, #32]
	b	LBB0_16
LBB0_14:
	ldr	x8, [x20, #8]
	sub	x8, x8, w22, sxtw
	str	x8, [x20, #8]
LBB0_15:
	ldr	x0, [x20, #32]
	add	x8, x0, w24, sxtw #4
	ldur	x8, [x8, #-8]
	cmp	x8, #0
	cset	w8, ne
	sub	w24, w24, w8
	mov	x23, x25
LBB0_16:
	add	x1, x0, w24, sxtw #4
	ldr	w8, [x20]
	sub	w8, w8, w24
	lsl	w2, w8, #4
	bl	_memmove
	ldr	w8, [x20]
	subs	w8, w8, w24
	str	w8, [x20]
	tbnz	w23, #0, LBB0_21
; %bb.17:
	cset	w0, eq
	bl	_av_assert0
	ldp	x8, x9, [x20, #8]
	cmp	x8, x9
	cset	w0, eq
	bl	_av_assert0
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_20
; %bb.18:
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _AV_NOPTS_VALUE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_20
; %bb.19:
	add	x9, x9, w21, sxtw
	str	x9, [x8]
LBB0_20:
	ldr	w0, [x20, #24]
Lloh5:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x3, x21
	bl	_av_log
LBB0_21:
	cbz	x19, LBB0_23
; %bb.22:
	ldr	w0, [x20, #24]
	mov	x1, x22
	bl	_ff_samples_to_time_base
	str	w0, [x19]
LBB0_23:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
Lloh10:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
LBB0_25:
	ldr	x23, [x8]
	ldr	w0, [x20, #24]
Lloh12:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x21
	bl	_av_log
	cbnz	x22, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Trying to remove %d samples, but the queue is empty\n"

	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Trying to remove %d more samples than there are in the queue\n"

.subsections_via_symbols
