	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spatial_activate
_spatial_activate:                      ## @spatial_activate
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %rax
	movq	(%rax), %r14
	movq	8(%rdi), %r15
	movq	16(%rdi), %rax
	movq	(%rax), %r13
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_FF_FILTER_FORWARD_STATUS_BACK
	movl	8(%r15), %edi
	callq	_av_audio_fifo_size
	cmpq	(%r15), %rax
	jge	LBB0_4
## %bb.1:
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ff_inlink_consume_frame
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	je	LBB0_4
## %bb.3:
	movq	-48(%rbp), %rax
	movq	16(%rax), %rcx
	movq	%rcx, 32(%r15)
	movq	$0, 24(%r15)
	movl	8(%r15), %edi
	movq	(%rax), %rdx
	movq	8(%rax), %rsi
	callq	_av_audio_fifo_write
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
LBB0_4:
	movl	8(%r15), %edi
	callq	_av_audio_fifo_size
	movq	(%r15), %rsi
	cmpq	%rsi, %rax
	jl	LBB0_11
## %bb.5:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_ff_get_audio_buffer
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r13
	movq	24(%r15), %rax
	movq	32(%r15), %rcx
	addq	%rax, %rcx
	movq	%rcx, 16(%r13)
	addq	16(%r15), %rax
	movq	%rax, 24(%r15)
	movl	8(%r15), %ebx
	movq	8(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_av_audio_fifo_size
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	callq	_FFMIN
	movl	%ebx, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_av_audio_fifo_peek
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	(%r13), %rax
	xorl	%edi, %edi
	cmpq	(%r15), %rax
	sete	%dil
	callq	_av_assert0
	movq	(%r12), %rax
	movq	_run_channel_fft@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	movl	$2, %r8d
	callq	*(%rax)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_draw_spatial
	movl	%eax, %ebx
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
	movl	8(%r15), %edi
	movq	16(%r15), %rsi
	callq	_av_audio_fifo_drain
	testl	%ebx, %ebx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_17
LBB0_11:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_FF_FILTER_FORWARD_STATUS
	movq	%r13, %rdi
	callq	_ff_outlink_frame_wanted
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movl	8(%r15), %edi
	callq	_av_audio_fifo_size
	cmpq	(%r15), %rax
	jge	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_ff_inlink_request_frame
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_14:
	movl	8(%r15), %edi
	callq	_av_audio_fifo_size
	cmpq	(%r15), %rax
	jge	LBB0_15
## %bb.16:
	movq	_FFERROR_NOT_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_15:
	movq	%r12, %rdi
	movl	$10, %esi
	callq	_ff_filter_set_ready
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_9:
	movl	%eax, %ebx
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_run_channel_fft,4,2            ## @run_channel_fft
	.comm	_FFERROR_NOT_READY,4,2          ## @FFERROR_NOT_READY
	.no_dead_strip	_spatial_activate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spatial_activate
_spatial_activate:                      ; @spatial_activate
	.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
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x20, [x8]
	ldp	x26, x8, [x0, #8]
	ldr	x21, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_FF_FILTER_FORWARD_STATUS_BACK
	ldr	w0, [x26, #8]
	bl	_av_audio_fifo_size
	ldr	x8, [x26]
	cmp	x0, x8
	b.ge	LBB0_4
; %bb.1:
	str	xzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_ff_inlink_consume_frame
	mov	x23, x0
	tbnz	w0, #31, LBB0_16
; %bb.2:
	cbz	w23, LBB0_4
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	x9, [x8, #16]
	stp	xzr, x9, [x26, #24]
	ldr	w0, [x26, #8]
	ldp	x2, x1, [x8]
	bl	_av_audio_fifo_write
	add	x0, sp, #8
	bl	_av_frame_free
LBB0_4:
	ldr	w0, [x26, #8]
	bl	_av_audio_fifo_size
	ldr	x1, [x26]
	cmp	x0, x1
	b.lt	LBB0_8
; %bb.5:
	mov	x0, x20
	bl	_ff_get_audio_buffer
	str	x0, [sp, #8]
	cbz	x0, LBB0_14
; %bb.6:
	mov	x22, x0
	ldp	x9, x8, [x26, #24]
	add	x8, x9, x8
	str	x8, [x0, #16]
	ldr	x8, [x26, #16]
	add	x8, x8, x9
	str	x8, [x26, #24]
	ldr	w23, [x26, #8]
	ldr	x24, [x0, #8]
	ldr	x25, [x26]
	mov	x0, x23
	bl	_av_audio_fifo_size
	mov	x1, x0
	mov	x0, x25
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_av_audio_fifo_peek
	tbnz	w0, #31, LBB0_15
; %bb.7:
	ldr	x8, [x22]
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w0, eq
	bl	_av_assert0
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _run_channel_fft@GOTPAGE
Lloh1:
	ldr	x9, [x9, _run_channel_fft@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x19
	mov	x2, x22
	mov	x3, #0
	mov	w4, #2
	blr	x8
	mov	x0, x20
	mov	x1, x22
	bl	_draw_spatial
	mov	x23, x0
	add	x0, sp, #8
	bl	_av_frame_free
	ldr	w0, [x26, #8]
	ldr	x1, [x26, #16]
	bl	_av_audio_fifo_drain
	cmp	w23, #1
	b.lt	LBB0_16
LBB0_8:
	mov	x0, x20
	mov	x1, x21
	bl	_FF_FILTER_FORWARD_STATUS
	mov	x0, x21
	bl	_ff_outlink_frame_wanted
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w0, [x26, #8]
	bl	_av_audio_fifo_size
	ldr	x8, [x26]
	cmp	x0, x8
	b.ge	LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_ff_inlink_request_frame
	mov	w23, #0
	b	LBB0_16
LBB0_11:
	ldr	w0, [x26, #8]
	bl	_av_audio_fifo_size
	ldr	x8, [x26]
	cmp	x0, x8
	b.ge	LBB0_13
; %bb.12:
Lloh3:
	adrp	x8, _FFERROR_NOT_READY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FFERROR_NOT_READY@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	b	LBB0_16
LBB0_13:
	mov	x0, x19
	mov	w1, #10
	bl	_ff_filter_set_ready
	mov	w23, #0
	b	LBB0_16
LBB0_14:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x23, x0
	b	LBB0_16
LBB0_15:
	mov	x23, x0
	add	x0, sp, #8
	bl	_av_frame_free
LBB0_16:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_run_channel_fft,4,2            ; @run_channel_fft
	.comm	_FFERROR_NOT_READY,4,2          ; @FFERROR_NOT_READY
	.no_dead_strip	_spatial_activate
.subsections_via_symbols
