	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_frame
_encode_frame:                          ## @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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movl	(%rdi), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	4(%rdi), %ecx
	testb	$3, %cl
	je	LBB0_3
## %bb.1:
	movq	8(%rdi), %rax
	movq	_FF_COMPLIANCE_UNOFFICIAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jle	LBB0_3
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_AVERROR_EXPERIMENTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_21
LBB0_3:
	imull	16(%rdi), %ecx
	shll	$5, %ecx
	sarl	$2, %ecx
	movq	%rsi, %rbx
	movl	%ecx, %edx
	xorl	%ecx, %ecx
	movq	%rdi, %r15
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_21
## %bb.4:
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movl	(%rbx), %edx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %esi
	leaq	-72(%rbp), %rdi
	callq	_init_put_bits
	movl	16(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_20
## %bb.5:
	movq	%r15, %rdi
	movl	4(%r15), %eax
	xorl	%edx, %edx
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%rdi), %ecx
	movl	-76(%rbp), %edx                 ## 4-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%edx
	cmpl	%ecx, %edx
	jge	LBB0_20
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	testl	%eax, %eax
	jle	LBB0_19
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movq	(%rsi), %rcx
	movq	8(%rsi), %r9
	movq	(%rcx), %rsi
	movq	8(%rcx), %r8
	movslq	(%r9), %rbx
	movq	16(%rcx), %r10
	movslq	%edx, %rcx
	imulq	%rcx, %rbx
	leaq	(%rsi,%rbx,4), %r14
	andl	$1, %ecx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	8(%r9), %esi
	imull	%edx, %esi
	movslq	%esi, %rsi
	leaq	(%r10,%rsi,4), %rcx
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	movl	4(%r9), %ecx
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	imull	%edx, %ecx
	movslq	%ecx, %rcx
	leaq	(%r8,%rcx,4), %rcx
	movq	%rcx, -144(%rbp)                ## 8-byte Spill
	xorl	%edx, %edx
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %eax
	sarl	$29, %eax
	addl	12(%r14), %eax
	imull	$249, %eax, %edx
	sarl	$11, %edx
	leaq	-72(%rbp), %r15
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_put_bits
	movl	%r12d, %eax
	shrl	$26, %eax
	andl	$7, %eax
	addl	8(%r14), %eax
	imull	$249, %eax, %edx
	sarl	$11, %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_put_bits
	movl	%r12d, %eax
	shrl	$23, %eax
	andl	$7, %eax
	addl	4(%r14), %eax
	imull	$249, %eax, %edx
	sarl	$11, %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_put_bits
	movl	%r12d, %eax
	shrl	$20, %eax
	andl	$7, %eax
	addl	(%r14), %eax
	imull	$249, %eax, %edx
	sarl	$11, %edx
	movq	%r15, %rdi
	movl	$5, %esi
	callq	_put_bits
	addq	$16, %r14
	movl	%r12d, %eax
	shrl	$18, %eax
	andl	$3, %eax
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	addl	(%rcx,%r13,4), %eax
	imull	$253, %eax, %edx
	sarl	$10, %edx
	movq	%r15, %rdi
	movl	$6, %esi
	callq	_put_bits
	shrl	$16, %r12d
	andl	$3, %r12d
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	addl	(%rcx,%r13,4), %r12d
	imull	$253, %r12d, %edx
	sarl	$10, %edx
	movq	%r15, %rdi
	movl	$6, %esi
	callq	_put_bits
	addl	$4, %ebx
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	movl	4(%rdi), %eax
	incq	%r13
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	addl	$-4, %edx
	cmpl	%eax, %ebx
	jge	LBB0_18
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx), %ecx
	cmpl	$2, %ecx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	cmpl	$1, %ecx
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	testl	%ecx, %ecx
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	$1227489280, -68(%rbp)          ## 4-byte Folded Spill
                                        ## imm = 0x492A0000
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	imull	$1664525, %ecx, %ecx            ## imm = 0x19660D
	addl	$1013904223, %ecx               ## imm = 0x3C6EF35F
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	%r13d, %ecx
	andl	$1, %ecx
	leaq	_encode_frame.ordered_dither(%rip), %rdx
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	leaq	(%rdx,%rsi,8), %rdx
	movl	(%rdx,%rcx,4), %ecx
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=2
	leal	3(%rbx), %ecx
	cmpl	%eax, %ecx
	jl	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%rdi, %r15
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	4(%r15), %edx
	addl	-88(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_memcpy
	movq	%r12, %r14
	jmp	LBB0_17
LBB0_20:
	leaq	-72(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_flush_put_bits
	movq	%rbx, %rdi
	callq	_put_bits_count
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rdx)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rdx)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_23
## %bb.22:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @encode_frame.ordered_dither
_encode_frame.ordered_dither:
	.long	272629760                       ## 0x10400000
	.long	273612800                       ## 0x104f0000
	.long	3408527360                      ## 0xcb2a0000
	.long	3408199680                      ## 0xcb250000

	.comm	_FF_COMPLIANCE_UNOFFICIAL,8,3   ## @FF_COMPLIANCE_UNOFFICIAL
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Widths which are not a multiple of 4 might fail with some decoders, use vstrict=-1 / -strict -1 to use %d anyway.\n"

	.comm	_AVERROR_EXPERIMENTAL,4,2       ## @AVERROR_EXPERIMENTAL
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_frame
_encode_frame:                          ; @encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	str	x2, [sp, #16]                   ; 8-byte Folded Spill
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	ldr	x8, [x0, #24]
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	ldp	w25, w3, [x0]
	tst	w3, #0x3
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x9, _FF_COMPLIANCE_UNOFFICIAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FF_COMPLIANCE_UNOFFICIAL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh11:
	adrp	x8, _AVERROR_EXPERIMENTAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVERROR_EXPERIMENTAL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_3:
	ldr	w8, [x21, #16]
	mul	w8, w3, w8
	lsl	w9, w8, #5
	mov	w10, #3
	bfi	w10, w8, #5, #27
	cmp	w9, #0
	csel	w8, w10, w9, lt
	asr	w2, w8, #2
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_17
; %bb.4:
	stp	x20, x19, [sp]                  ; 16-byte Folded Spill
	ldr	w1, [x20, #8]
	ldr	w2, [x20]
	add	x0, sp, #52
	bl	_init_put_bits
	ldr	w9, [x21, #16]
	cmp	w9, #1
	b.lt	LBB0_16
; %bb.5:
	mov	w15, #0
	ldr	w8, [x21, #4]
	mov	w27, #249
	mov	w28, #253
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x21, #16]
	ldr	w15, [sp, #28]                  ; 4-byte Folded Reload
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w15, w15, #1
	cmp	w15, w9
	b.ge	LBB0_16
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w19, #0
	mov	w20, #0
	mov	x22, #0
	ldr	x10, [sp, #16]                  ; 8-byte Folded Reload
	ldp	x9, x10, [x10]
	ldp	x11, x12, [x9]
	ldp	w13, w14, [x10]
	mul	w13, w13, w15
	add	x23, x11, w13, sxtw #2
	ldr	x9, [x9, #16]
	ldr	w10, [x10, #8]
	mul	w10, w10, w15
	add	x26, x9, w10, sxtw #2
	mul	w9, w14, w15
	add	x24, x12, w9, sxtw #2
	str	w15, [sp, #28]                  ; 4-byte Folded Spill
	and	w9, w15, #0x1
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	w8, [x23, #12]
	add	w8, w8, w25, asr #29
	mul	w8, w8, w27
	asr	w2, w8, #11
	add	x0, sp, #52
	mov	w1, #5
	bl	_put_bits
	ldr	w8, [x23, #8]
	ubfx	w9, w25, #26, #3
	add	w8, w8, w9
	mul	w8, w8, w27
	asr	w2, w8, #11
	add	x0, sp, #52
	mov	w1, #5
	bl	_put_bits
	ldr	w8, [x23, #4]
	ubfx	w9, w25, #23, #3
	add	w8, w8, w9
	mul	w8, w8, w27
	asr	w2, w8, #11
	add	x0, sp, #52
	mov	w1, #5
	bl	_put_bits
	ldr	w8, [x23], #16
	ubfx	w9, w25, #20, #3
	add	w8, w8, w9
	mul	w8, w8, w27
	asr	w2, w8, #11
	add	x0, sp, #52
	mov	w1, #5
	bl	_put_bits
	ldr	w8, [x24, x22]
	ubfx	w9, w25, #18, #2
	add	w8, w8, w9
	mul	w8, w8, w28
	asr	w2, w8, #10
	add	x0, sp, #52
	mov	w1, #6
	bl	_put_bits
	ldr	w8, [x26, x22]
	ubfx	w9, w25, #16, #2
	add	w8, w8, w9
	mul	w8, w8, w28
	asr	w2, w8, #10
	add	x0, sp, #52
	mov	w1, #6
	bl	_put_bits
	ldr	w8, [x21, #4]
	add	x22, x22, #4
	sub	w20, w20, #4
	add	w19, w19, #1
	cmp	w22, w8
	b.ge	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	ldr	w9, [x9]
	cmp	w9, #2
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	w10, #26125
	movk	w10, #25, lsl #16
	mov	w11, #62303
	movk	w11, #15470, lsl #16
	madd	w10, w25, w10, w11
	cmp	w9, #0
	mov	w11, #1227489280
	csel	w11, w25, w11, ne
	cmp	w9, #1
	csel	w25, w10, w11, eq
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=2
	and	w9, w19, #0x1
Lloh14:
	adrp	x10, _encode_frame.ordered_dither@PAGE
Lloh15:
	add	x10, x10, _encode_frame.ordered_dither@PAGEOFF
	ldr	x11, [sp, #32]                  ; 8-byte Folded Reload
	add	x10, x10, x11, lsl #3
	ldr	w25, [x10, w9, uxtw #2]
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=2
	add	w9, w22, #3
	cmp	w9, w8
	b.lt	LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=2
	add	x0, sp, #56
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w8, [x21, #4]
	add	w2, w20, w8
	add	x0, sp, #56
	mov	x1, x23
	bl	_memcpy
	add	x23, sp, #56
	b	LBB0_10
LBB0_16:
	add	x0, sp, #52
	bl	_flush_put_bits
	add	x0, sp, #52
	bl	_put_bits_count
	mov	x8, x0
	mov	w0, #0
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	ldr	x10, [sp]                       ; 8-byte Folded Reload
	str	w8, [x10]
Lloh16:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x10, #4]
	orr	w8, w9, w8
	str	w8, [x10, #4]
	mov	w8, #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_17:
	ldr	x8, [sp, #72]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @encode_frame.ordered_dither
_encode_frame.ordered_dither:
	.long	272629760                       ; 0x10400000
	.long	273612800                       ; 0x104f0000
	.long	3408527360                      ; 0xcb2a0000
	.long	3408199680                      ; 0xcb250000

	.comm	_FF_COMPLIANCE_UNOFFICIAL,8,3   ; @FF_COMPLIANCE_UNOFFICIAL
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Widths which are not a multiple of 4 might fail with some decoders, use vstrict=-1 / -strict -1 to use %d anyway.\n"

	.comm	_AVERROR_EXPERIMENTAL,4,2       ; @AVERROR_EXPERIMENTAL
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_encode_frame
.subsections_via_symbols
