	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffmpeg_flush_audio
_ffmpeg_flush_audio:                    ## @ffmpeg_flush_audio
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_fifo_read_avail
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r15
	movq	$0, -32(%rbp)
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_fifo_read
	movslq	4(%rbx), %rcx
	shlq	$2, %rcx
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_2
## %bb.3:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_4
LBB0_2:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_4:
	movq	%rax, -48(%rbp)
	movq	%r14, -40(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ffmpeg_push_audio_thread
LBB0_5:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_encode_audio
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:
	cmpl	$0, -48(%rbp)
	je	LBB0_11
## %bb.7:
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_av_interleaved_write_frame
	testq	%rax, %rax
	js	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_encode_audio
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, -48(%rbp)
	jne	LBB0_8
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ffmpeg_flush_audio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffmpeg_flush_audio
_ffmpeg_flush_audio:                    ; @ffmpeg_flush_audio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_fifo_read_avail
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
	str	xzr, [sp, #24]
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	x2, x21
	bl	_fifo_read
	ldrsw	x8, [x19, #4]
	lsl	x8, x8, #2
	udiv	x8, x21, x8
	stp	x8, x20, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_ffmpeg_push_audio_thread
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1
	bl	_encode_audio
	cbz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_av_interleaved_write_frame
	tbz	x0, #63, LBB0_2
LBB0_5:
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ffmpeg_flush_audio
.subsections_via_symbols
