	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffmpeg_push_audio_thread
_ffmpeg_push_audio_thread:              ## @ffmpeg_push_audio_thread
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_ffmpeg_audio_resample
	movq	(%r12), %r14
	movl	$1, %eax
	testq	%r14, %r14
	je	LBB0_10
## %bb.1:
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	%r14, %r13
	movq	(%r12), %r14
	cmpq	%r13, %r14
	jbe	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rsi
	subq	%rdi, %rax
	subq	%r13, %r14
	cmpq	%rax, %r14
	cmovaeq	%rax, %r14
	imulq	48(%rbx), %rsi
	movq	%rsi, %rdx
	imulq	%r14, %rdx
	imulq	%rsi, %rdi
	addq	40(%rbx), %rdi
	imulq	%r13, %rsi
	shlq	$2, %rsi
	addq	8(%r12), %rsi
	callq	_memcpy
	movq	8(%rbx), %rax
	addq	%r14, %rax
	movq	%rax, 8(%rbx)
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rbx), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_9
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_encode_audio
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rax
	addq	%rax, 24(%rbx)
	movq	$0, 8(%rbx)
	cmpq	$0, -48(%rbp)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rsi
	callq	_av_interleaved_write_frame
	testq	%rax, %rax
	jns	LBB0_8
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_9:
	movl	$1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ffmpeg_push_audio_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffmpeg_push_audio_thread
_ffmpeg_push_audio_thread:              ; @ffmpeg_push_audio_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_ffmpeg_audio_resample
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x22, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20]
	add	x22, x23, x22
	cmp	x8, x22
	b.ls	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x9, x10, [x21, #32]
	ldr	x9, [x9]
	ldp	x11, x12, [x21, #8]
	sub	x9, x9, x11
	sub	x8, x8, x22
	cmp	x8, x9
	csel	x23, x8, x9, lo
	ldr	x8, [x21, #48]
	mul	x8, x12, x8
	mul	x2, x8, x23
	mul	x9, x8, x22
	madd	x0, x8, x11, x10
	ldr	x8, [x20, #8]
	add	x1, x8, x9, lsl #2
	bl	_memcpy
	ldr	x8, [x21, #8]
	add	x8, x8, x23
	str	x8, [x21, #8]
	cbz	w19, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x21, #32]
	ldr	x9, [x9]
	cmp	x8, x9
	b.lo	LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #0
	bl	_encode_audio
	cbz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x21, #24]
	add	x8, x9, x8
	str	x8, [x21, #24]
	str	xzr, [x21, #8]
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	add	x1, sp, #8
	bl	_av_interleaved_write_frame
	tbz	x0, #63, LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	mov	w0, #1
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ffmpeg_push_audio_thread
.subsections_via_symbols
