	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v308_encode_frame
_v308_encode_frame:                     ## @v308_encode_frame
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	imull	4(%rdi), %eax
	leal	(%rax,%rax,2), %edx
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movl	4(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_9
## %bb.2:
	movq	(%r12), %rax
	movq	16(%rax), %rcx
	movq	(%rax), %rdx
	movq	8(%rax), %rsi
	movq	(%r15), %rdi
	movl	(%rbx), %r9d
	movl	%r9d, %r11d
	andl	$-2, %r11d
	xorl	%r10d, %r10d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rax
	movslq	(%rax), %rbx
	leaq	(%rdx,%rbx,8), %rdx
	movslq	4(%rax), %rbx
	leaq	(%rsi,%rbx,8), %rsi
	movslq	8(%rax), %rax
	leaq	(%rcx,%rax,8), %rcx
	incl	%r10d
	cmpl	%r8d, %r10d
	je	LBB0_9
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%r9d, %r9d
	jle	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	cmpl	$1, %r9d
	je	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rcx,%rax,8), %rbx
	movq	%rbx, (%rdi)
	movq	(%rdx,%rax,8), %rbx
	movq	%rbx, 8(%rdi)
	movq	(%rsi,%rax,8), %rbx
	movq	%rbx, 16(%rdi)
	movq	8(%rcx,%rax,8), %rbx
	movq	%rbx, 24(%rdi)
	movq	8(%rdx,%rax,8), %rbx
	movq	%rbx, 32(%rdi)
	movq	8(%rsi,%rax,8), %rbx
	movq	%rbx, 40(%rdi)
	addq	$48, %rdi
	addq	$2, %rax
	cmpq	%rax, %r11
	jne	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r9b
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rcx,%rax,8), %rbx
	movq	%rbx, (%rdi)
	movq	(%rdx,%rax,8), %rbx
	movq	%rbx, 8(%rdi)
	movq	(%rsi,%rax,8), %rax
	movq	%rax, 16(%rdi)
	addq	$24, %rdi
	jmp	LBB0_8
LBB0_9:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r15)
	movl	$1, (%r14)
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_v308_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v308_encode_frame
_v308_encode_frame:                     ; @v308_encode_frame
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldp	w8, w9, [x0]
	mul	w8, w8, w9
	add	w2, w8, w8, lsl #1
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_19
; %bb.1:
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.2:
	mov	w9, #0
	ldr	x12, [x21]
	ldp	x11, x10, [x12, #8]
	ldr	x12, [x12]
	ldr	x17, [x20]
	ldr	w13, [x22]
	add	x14, x13, x13, lsl #1
	and	x15, x13, #0xfffffffe
	add	x16, x15, x15, lsl #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x17
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x17, [x21, #8]
	ldpsw	x1, x2, [x17]
	add	x12, x12, x1, lsl #3
	add	x11, x11, x2, lsl #3
	ldrsw	x17, [x17, #8]
	add	x10, x10, x17, lsl #3
	add	w9, w9, #1
	mov	x17, x0
	cmp	w9, w8
	b.eq	LBB0_18
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	cmp	w13, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w13, #1
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, #0
	b	LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, #0
	add	x3, x17, x14, lsl #3
	lsl	x2, x13, #3
	add	x4, x10, x2
	add	x0, x12, x2
	cmp	x17, x0
	ccmp	x12, x3, #2, lo
	cset	w0, lo
	add	x2, x11, x2
	cmp	x17, x2
	ccmp	x11, x3, #2, lo
	cset	w2, lo
	cmp	x10, x3
	ccmp	x17, x4, #2, lo
	b.lo	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w0, #0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w2, #0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x15
	mov	x2, x11
	mov	x3, x12
	mov	x4, x10
	add	x0, x17, x16, lsl #3
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	q0, [x4], #16
	ldr	q1, [x3], #16
	ldr	q2, [x2], #16
	st3.2d	{ v0, v1, v2 }, [x17], #48
	subs	x1, x1, #2
	b.ne	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x15
	cmp	x15, x13
	b.eq	LBB0_4
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x17
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	x3, x1, #3
	add	x17, x11, x3
	add	x2, x12, x3
	add	x3, x10, x3
	sub	x1, x13, x1
LBB0_16:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x4, [x3], #8
	str	x4, [x0]
	ldr	x4, [x2], #8
	str	x4, [x0, #8]
	ldr	x5, [x17], #8
	add	x4, x0, #24
	str	x5, [x0, #16]
	mov	x0, x4
	subs	x1, x1, #1
	b.ne	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x4
	b	LBB0_4
LBB0_18:
	mov	w0, #0
Lloh0:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	mov	w8, #1
	str	w8, [x19]
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_v308_encode_frame
.subsections_via_symbols
