	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function yae_flush
_yae_flush:                             ## @yae_flush
	.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, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_yae_curr_frag
	movq	%rax, %r12
	movq	_YAE_FLUSH_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
	cmpq	$0, 32(%r13)
	je	LBB0_17
## %bb.1:
	movq	(%r13), %rcx
	movq	(%rcx), %rax
	movq	(%r12), %rsi
	movq	8(%r12), %rdi
	movq	(%rsi), %rdx
	addq	%rdi, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_3
## %bb.2:
	addq	8(%rsi), %rdi
	cmpq	%rdi, 8(%rcx)
	je	LBB0_17
LBB0_3:
	cmpq	%rax, %rdx
	jge	LBB0_7
## %bb.4:
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_yae_load_frag
	cmpq	$0, 32(%r13)
	je	LBB0_7
## %bb.5:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_yae_downmix
	movl	24(%r13), %edi
	movl	24(%r12), %esi
	callq	_av_rdft_calc
	movq	%r13, %rdi
	callq	_yae_adjust_position
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_yae_load_frag
LBB0_7:
	movq	(%r12), %rax
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	8(%r13), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	movl	8(%r12), %esi
	callq	_FFMIN
	movslq	%eax, %rbx
	addq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	8(%rax), %rdi
	cmpq	%rbx, %rdi
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_yae_overlap_add
	testq	%rax, %rax
	je	LBB0_8
	jmp	LBB0_12
LBB0_10:
	movq	(%r12), %rcx
	movq	8(%r12), %rdx
	addq	(%rcx), %rdx
	cmpq	(%rax), %rdx
	jge	LBB0_13
## %bb.11:
	movq	%r13, %rdi
	callq	_yae_advance_to_next_frag
	jmp	LBB0_12
LBB0_13:
	movq	%rbx, %rsi
	callq	_FFMAX
	movq	%rax, %rbx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rcx
	movq	8(%rcx), %rdx
	movq	8(%r12), %rcx
	addq	%rdx, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rcx
	setge	%cl
	subq	%rdx, %rbx
	setge	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_av_assert0
	movq	16(%r13), %rdi
	imulq	%rdi, %rbx
	shlq	$2, %rbx
	addq	16(%r12), %rbx
	movq	(%r14), %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	subl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	imull	%eax, %edi
	subq	%r12, %r15
	shrq	$2, %r15
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r15d, %esi
	callq	_FFMIN
	movl	%eax, %r15d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movslq	%r15d, %rax
	leaq	(%r12,%rax,4), %rcx
	movq	16(%r13), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_14
## %bb.15:
	cqto
	idivq	%rsi
	jmp	LBB0_16
LBB0_14:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_16:
	movq	(%r13), %rdx
	addq	%rax, 8(%rdx)
	movq	%rcx, (%r14)
	movq	(%r13), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, 8(%rax)
	jne	LBB0_12
LBB0_17:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_YAE_FLUSH_OUTPUT,4,2           ## @YAE_FLUSH_OUTPUT
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_yae_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function yae_flush
_yae_flush:                             ; @yae_flush
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_yae_curr_frag
Lloh0:
	adrp	x8, _YAE_FLUSH_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _YAE_FLUSH_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_13
; %bb.1:
	mov	x22, x0
	ldr	x10, [x19]
	ldr	x8, [x10]
	ldp	x11, x12, [x0]
	ldr	x9, [x11]
	add	x9, x12, x9
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x10, [x10, #8]
	ldr	x11, [x11, #8]
	add	x11, x11, x12
	cmp	x10, x11
	b.eq	LBB0_13
LBB0_3:
	cmp	x9, x8
	b.ge	LBB0_7
; %bb.4:
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_yae_load_frag
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x22
	bl	_yae_downmix
	ldr	w0, [x19, #24]
	ldr	w1, [x22, #24]
	bl	_av_rdft_calc
	mov	x0, x19
	bl	_yae_adjust_position
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_yae_load_frag
LBB0_7:
	ldr	x8, [x22]
	ldr	x23, [x8, #8]
	ldr	w8, [x19, #8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
	ldr	w1, [x22, #8]
	bl	_FFMIN
	add	x23, x23, w0, sxtw
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	cmp	x0, x23
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_yae_overlap_add
	cbz	x0, LBB0_8
	b	LBB0_14
LBB0_10:
	ldp	x9, x10, [x22]
	ldr	x9, [x9]
	ldr	x8, [x8]
	add	x9, x10, x9
	cmp	x9, x8
	b.ge	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_yae_advance_to_next_frag
	b	LBB0_14
LBB0_12:
	mov	x1, x23
	bl	_FFMAX
	mov	x23, x0
	ldp	x8, x9, [x22]
	ldr	x8, [x8, #8]
	add	x25, x9, x8
	subs	x24, x0, x8
	ccmp	x25, x0, #8, ge
	cset	w0, ge
	bl	_av_assert0
	ldr	x8, [x22, #16]
	ldr	x9, [x19, #16]
	mul	x10, x9, x24
	add	x22, x8, x10, lsl #2
	ldr	x24, [x20]
	sub	w8, w25, w23
	mul	w0, w9, w8
	sub	x8, x21, x24
	lsr	x1, x8, #2
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_FFMIN
	mov	x21, x0
	mov	x0, x24
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	sxtw	x8, w21
	add	x9, x24, w21, sxtw #2
	ldr	x10, [x19, #16]
	sdiv	x8, x8, x10
	ldr	x10, [x19]
	ldr	x11, [x10, #8]
	add	x8, x11, x8
	str	x8, [x10, #8]
	str	x9, [x20]
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	cmp	x8, x25
	b.ne	LBB0_14
LBB0_13:
	mov	w0, #0
	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	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh3:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_YAE_FLUSH_OUTPUT,4,2           ; @YAE_FLUSH_OUTPUT
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_yae_flush
.subsections_via_symbols
