	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avui_encode_frame
_avui_encode_frame:                     ## @avui_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rdi, %r13
	movq	(%rdi), %r12
	movq	_AV_FIELD_PROGRESSIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%eax, %eax
	cmpq	%r14, %r12
	setg	%al
	movl	8(%rdi), %ecx
	cmpl	$486, %ecx                      ## imm = 0x1E6
	movl	$10, %edx
	movl	$16, %edi
	cmovel	%edx, %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	addl	%edi, %ecx
	imull	12(%r13), %ecx
	shll	$3, %eax
	leal	(%rax,%rcx,2), %ecx
	movq	%r13, %rdi
	movq	%rsi, %rbx
	movl	%ecx, %edx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movq	%rbx, %rdx
	movq	8(%rbx), %rbx
	movl	$2, %ecx
	cmpq	%r14, %r12
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.2:
	movq	%r14, %rax
	jmp	LBB0_4
LBB0_3:
	movl	12(%r13), %edx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	imull	%r14d, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movslq	12(%r13), %rax
	movl	%r14d, %ecx
	imulq	%rax, %rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rcx,4), %rbx
	movl	$1, %ecx
LBB0_4:
	xorl	%edx, %edx
	movl	%ecx, %esi
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	incl	%edx
	cmpl	%ecx, %edx
	movq	%r12, %r15
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_12
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	%edx, %r14d
	cmpq	%rax, %r12
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %r14d
	subl	%edx, %r14d
	cmpl	$486, 8(%r13)                   ## imm = 0x1E6
	cmovnel	%edx, %r14d
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movslq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	12(%r13), %eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	imull	%r12d, %eax
	movq	%rdx, %r15
	leal	(%rax,%rdx,4), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	12(%r13), %edx
	movl	%edx, %eax
	imull	%r12d, %eax
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	leal	(%rax,%r15,4), %eax
	cltq
	leaq	(%rbx,%rax,4), %rbx
	cmpl	$0, 8(%r13)
	jle	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	%r14d, %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	imulq	%rax, %rcx
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %r14
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	%edx, %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	(%r12), %rax
	movslq	(%rax), %rax
	imulq	%rsi, %rax
	leaq	(%r14,%rax,4), %r14
	movslq	12(%r13), %rdx
	leaq	(%rbx,%rdx,8), %rbx
	addl	%ecx, %r15d
	cmpl	8(%r13), %r15d
	jl	LBB0_10
	jmp	LBB0_11
LBB0_12:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_13:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_FIELD_PROGRESSIVE,8,3       ## @AV_FIELD_PROGRESSIVE
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_avui_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avui_encode_frame
_avui_encode_frame:                     ; @avui_encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x27, [x0]
Lloh0:
	adrp	x8, _AV_FIELD_PROGRESSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_FIELD_PROGRESSIVE@GOTPAGEOFF]
Lloh2:
	ldr	x28, [x8]
	cmp	x27, x28
	cset	w8, gt
	mov	w9, #16
	mov	w10, #10
	ldp	w11, w12, [x0, #8]
	cmp	w11, #486
	csel	w26, w10, w9, eq
	add	w9, w26, w11
	mul	w9, w12, w9
	lsl	w9, w9, #1
	add	w2, w9, w8, lsl #3
	mov	x3, x2
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_15
; %bb.1:
	ldr	x23, [x20, #8]
	cmp	x27, x28
	b.le	LBB0_3
; %bb.2:
	mov	w25, #2
	b	LBB0_4
LBB0_3:
	ldr	w8, [x22, #12]
	mul	w2, w8, w26
	mov	x0, x23
	mov	w1, #0
	bl	_memset
	ldr	w8, [x22, #12]
	mul	w8, w8, w26
	add	x23, x23, w8, sxtw #2
	mov	w25, #1
LBB0_4:
	cmp	x27, x28
	stp	x20, x19, [sp]                  ; 16-byte Folded Spill
	b.le	LBB0_6
; %bb.5:
	ldr	w8, [x22, #8]
	cmp	w8, #486
	cset	w19, eq
	b	LBB0_7
LBB0_6:
	mov	w19, #0
LBB0_7:
	ldp	x9, x8, [x21]
	ldr	x20, [x8]
	ldr	w24, [x9]
	ldr	w8, [x22, #12]
	mul	w2, w8, w26
	mov	x0, x23
	mov	w1, #0
	bl	_memset
	ldp	w9, w8, [x22, #8]
	mul	w10, w8, w26
	add	x23, x23, w10, sxtw #2
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x9, x19
	mov	w19, #0
	mul	w9, w24, w9
	add	x24, x20, w9, sxtw #2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w2, w8, #1
	mov	x0, x23
	mov	x1, x24
	bl	_memcpy
	ldr	x8, [x21]
	ldr	w8, [x8]
	mul	w8, w8, w25
	add	x24, x24, w8, sxtw #2
	ldp	w9, w8, [x22, #8]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x23, x23, x8, lsl #3
	add	w19, w19, w25
	cmp	w19, w9
	b.lt	LBB0_9
LBB0_10:
	cmp	x27, x28
	b.le	LBB0_14
; %bb.11:
	ldp	w8, w9, [x22, #8]
	cmp	w8, #486
	cset	w19, ne
	ldp	x10, x8, [x21]
	ldr	x20, [x8]
	ldr	w24, [x10]
	orr	w28, wzr, #0x4
	madd	w2, w9, w26, w28
	mov	x0, x23
	mov	w1, #0
	bl	_memset
	ldr	w8, [x22, #8]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	w27, #0
	ldr	w8, [x22, #12]
	madd	w9, w8, w26, w28
	add	x23, x23, w9, sxtw #2
	mul	w9, w24, w19
	add	x24, x20, w9, sxtw #2
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	lsl	w2, w8, #1
	mov	x0, x23
	mov	x1, x24
	bl	_memcpy
	ldr	x8, [x21]
	ldr	w8, [x8]
	mul	w8, w8, w25
	add	x24, x24, w8, sxtw #2
	ldp	w9, w8, [x22, #8]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x23, x23, x8, lsl #3
	add	w27, w27, w25
	cmp	w27, w9
	b.lt	LBB0_13
LBB0_14:
	mov	w0, #0
Lloh3:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x10, [sp]                       ; 8-byte Folded Reload
	ldr	w9, [x10]
	orr	w8, w9, w8
	str	w8, [x10]
	mov	w8, #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_FIELD_PROGRESSIVE,8,3       ; @AV_FIELD_PROGRESSIVE
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_avui_encode_frame
.subsections_via_symbols
