	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffat_encode_callback
_ffat_encode_callback:                  ## @ffat_encode_callback
	.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
	movq	%rsi, %r14
	movq	8(%r8), %rbx
	cmpl	$0, 8(%rbx)
	je	LBB0_5
## %bb.1:
	movq	%r8, %r15
	movq	%rdx, %r13
	leaq	8(%rbx), %rdi
	callq	_ff_bufqueue_get
	movq	%rax, %r12
	movl	$1, (%r13)
	movl	(%r15), %eax
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r12), %r14d
	movl	4(%r15), %edi
	callq	_av_get_bytes_per_sample
	imull	%r14d, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	imull	(%r15), %eax
	movq	8(%r13), %rcx
	movl	%eax, 4(%rcx)
	movq	8(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx)
	movl	(%r12), %eax
	cmpl	%eax, (%r14)
	jle	LBB0_3
## %bb.2:
	movl	%eax, (%r14)
LBB0_3:
	movl	4(%rbx), %edi
	callq	_av_frame_unref
	movl	4(%rbx), %edi
	movq	%r12, %rsi
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_ff_bufqueue_add
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
	cmpq	$0, 16(%rbx)
	sete	%al
LBB0_6:
	movl	$0, (%r14)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ffat_encode_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffat_encode_callback
_ffat_encode_callback:                  ; @ffat_encode_callback
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	ldr	x21, [x4, #8]
	mov	x0, x21
	ldr	w8, [x0, #8]!
	cbz	w8, LBB0_5
; %bb.1:
	mov	x20, x4
	mov	x23, x2
	bl	_ff_bufqueue_get
	mov	x22, x0
	mov	w8, #1
	str	w8, [x23]
	ldr	x8, [x23, #8]
	ldp	w9, w0, [x20]
	str	w9, [x8]
	ldr	w24, [x22]
	bl	_av_get_bytes_per_sample
	mul	w8, w0, w24
	ldr	w9, [x20]
	mul	w8, w8, w9
	ldr	x9, [x23, #8]
	str	w8, [x9, #4]
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	str	w8, [x9, #8]
	ldr	w9, [x19]
	ldr	w8, [x22]
	cmp	w9, w8
	b.le	LBB0_3
; %bb.2:
	str	w8, [x19]
LBB0_3:
	ldr	w0, [x21, #4]
	bl	_av_frame_unref
	ldr	w0, [x21, #4]
	mov	x1, x22
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_ff_bufqueue_add
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	ldr	x8, [x21, #16]
	cmp	x8, #0
	cset	w0, eq
LBB0_6:
	str	wzr, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ffat_encode_callback
.subsections_via_symbols
