	.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
	pushq	%rax
	.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, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	(%rdi), %eax
	addl	$47, %eax
	cltq
	imulq	$715827883, %rax, %rax          ## imm = 0x2AAAAAAB
	movq	%rax, %rcx
	shrq	$63, %rcx
	shrq	$35, %rax
	addl	%ecx, %eax
	shll	$7, %eax
	leal	(%rax,%rax,2), %eax
	cltq
	imulq	$1431655766, %rax, %rcx         ## imm = 0x55555556
	movq	%rcx, %rax
	shrq	$63, %rax
	shrq	$32, %rcx
	addl	%eax, %ecx
	imull	4(%rdi), %ecx
	movl	%ecx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	8(%r15), %rsi
	movq	(%r12), %rax
	movq	_AV_PIX_FMT_YUV422P10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_v210_enc_10
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_av_log
	jmp	LBB0_15
LBB0_4:
	movq	_AV_PIX_FMT_YUV422P@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_v210_enc_8
LBB0_6:
	movq	_AV_FRAME_DATA_A53_CC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_av_frame_get_side_data
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %rbx
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.8:
	movq	_AV_PKT_DATA_A53_CC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_16
## %bb.9:
	movl	8(%rbx), %esi
	movq	(%rbx), %rdx
	movq	%rax, %rdi
	callq	_memcpy
LBB0_10:
	movq	_AV_FRAME_DATA_AFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_av_frame_get_side_data
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%rax, %rbx
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.12:
	movq	_AV_PKT_DATA_AFD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movl	8(%rbx), %esi
	movq	(%rbx), %rdx
	movq	%rax, %rdi
	callq	_memcpy
LBB0_14:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movl	$1, (%r14)
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error getting output packet.\n"

	.comm	_AV_PIX_FMT_YUV422P10,8,3       ## @AV_PIX_FMT_YUV422P10
	.comm	_AV_PIX_FMT_YUV422P,8,3         ## @AV_PIX_FMT_YUV422P
	.comm	_AV_FRAME_DATA_A53_CC,4,2       ## @AV_FRAME_DATA_A53_CC
	.comm	_AV_PKT_DATA_A53_CC,4,2         ## @AV_PKT_DATA_A53_CC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_FRAME_DATA_AFD,4,2          ## @AV_FRAME_DATA_AFD
	.comm	_AV_PKT_DATA_AFD,4,2            ## @AV_PKT_DATA_AFD
	.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:
	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, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldp	w8, w9, [x0]
	add	w8, w8, #47
	mov	w10, #43691
	movk	w10, #10922, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w10, asr #3
	add	w8, w8, w8, lsl #1
	lsl	w8, w8, #7
	mov	w10, #21846
	movk	w10, #21845, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w10
	mul	w2, w8, w9
	mov	x3, x2
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x1, [x20, #8]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _AV_PIX_FMT_YUV422P10@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PIX_FMT_YUV422P10@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x22
	mov	x2, x21
	bl	_v210_enc_10
	b	LBB0_6
LBB0_3:
	mov	x23, x0
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	bl	_av_log
	b	LBB0_15
LBB0_4:
Lloh8:
	adrp	x9, _AV_PIX_FMT_YUV422P@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_PIX_FMT_YUV422P@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x22
	mov	x2, x21
	bl	_v210_enc_8
LBB0_6:
Lloh11:
	adrp	x8, _AV_FRAME_DATA_A53_CC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_FRAME_DATA_A53_CC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_av_frame_get_side_data
	cbz	x0, LBB0_10
; %bb.7:
	mov	x22, x0
	ldr	x2, [x0]
	cbz	x2, LBB0_10
; %bb.8:
Lloh14:
	adrp	x8, _AV_PKT_DATA_A53_CC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_PKT_DATA_A53_CC@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_16
; %bb.9:
	ldr	w1, [x22, #8]
	ldr	x2, [x22]
	bl	_memcpy
LBB0_10:
Lloh17:
	adrp	x8, _AV_FRAME_DATA_AFD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_FRAME_DATA_AFD@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_av_frame_get_side_data
	cbz	x0, LBB0_14
; %bb.11:
	mov	x21, x0
	ldr	x2, [x0]
	cbz	x2, LBB0_14
; %bb.12:
Lloh20:
	adrp	x8, _AV_PKT_DATA_AFD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AV_PKT_DATA_AFD@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_16
; %bb.13:
	ldr	w1, [x21, #8]
	ldr	x2, [x21]
	bl	_memcpy
LBB0_14:
	mov	w23, #0
Lloh23:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	w8, #1
	str	w8, [x19]
LBB0_15:
	mov	x0, x23
	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
LBB0_16:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error getting output packet.\n"

	.comm	_AV_PIX_FMT_YUV422P10,8,3       ; @AV_PIX_FMT_YUV422P10
	.comm	_AV_PIX_FMT_YUV422P,8,3         ; @AV_PIX_FMT_YUV422P
	.comm	_AV_FRAME_DATA_A53_CC,4,2       ; @AV_FRAME_DATA_A53_CC
	.comm	_AV_PKT_DATA_A53_CC,4,2         ; @AV_PKT_DATA_A53_CC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_FRAME_DATA_AFD,4,2          ; @AV_FRAME_DATA_AFD
	.comm	_AV_PKT_DATA_AFD,4,2            ; @AV_PKT_DATA_AFD
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_encode_frame
.subsections_via_symbols
