	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_frame
_decode_frame:                          ## @decode_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-68(%rbp), %rdx
	movq	%rcx, %rdi
	callq	_av_packet_get_side_data
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	48(%r15), %r14
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_bytestream2_init
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_36
## %bb.1:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_bytestream2_peek_byte
	cmpl	$127, %eax
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	jne	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_bytestream2_skip
	movl	%r12d, %ebx
	andl	$129, %ebx
	shlq	$2, %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_bytestream2_get_be24
	orl	$-16777216, %eax                ## imm = 0xFF000000
	movq	(%r15), %rcx
	addq	%rbx, %rcx
	movl	%eax, (%rcx,%r13,4)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_bytestream2_skip
	incq	%r13
	cmpq	$127, %r13
	jne	LBB0_3
## %bb.4:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$-511, %esi                     ## imm = 0xFE01
	callq	_bytestream2_seek
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	-52(%rbp), %r12d                ## 4-byte Reload
LBB0_5:
	movq	_KMVC_KEYFRAME@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r12d, %eax
	setne	%cl
	movl	%ecx, (%r13)
	jne	LBB0_6
## %bb.7:
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movq	_KMVC_PALETTE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_12
## %bb.9:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, 4(%rax)
	cmpl	$0, 8(%r15)
	jle	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_bytestream2_get_be24
	orl	$-16777216, %eax                ## imm = 0xFF000000
	movq	(%r15), %rcx
	movl	%eax, 4(%rcx,%rbx,4)
	movslq	8(%r15), %rax
	incq	%rbx
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_12:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_16
## %bb.13:
	movl	-68(%rbp), %ecx
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_15
## %bb.14:
	movl	$1, 4(%rbx)
	movq	(%r15), %rdi
	movl	%ecx, %edx
	callq	_memcpy
LBB0_16:
	cmpq	$0, 56(%r15)
	je	LBB0_18
LBB0_17:
	movq	$0, 56(%r15)
	movl	$1, 4(%rbx)
LBB0_18:
	movq	8(%rbx), %rax
	movq	8(%rax), %rdi
	movq	(%r15), %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memcpy
	movq	%r14, %rdi
	callq	_bytestream2_get_byte
	cmpl	$8, %eax
	je	LBB0_21
## %bb.19:
	cmpl	$127, %eax
	jne	LBB0_20
LBB0_21:
	movq	16(%r15), %rdi
	xorl	%esi, %esi
	movl	$64000, %edx                    ## imm = 0xFA00
	callq	_memset
	movq	_KMVC_METHOD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	-52(%rbp), %ecx                 ## 4-byte Folded Reload
	cmpl	$2, %ecx
	jb	LBB0_27
## %bb.22:
	cmpl	$3, %ecx
	je	LBB0_37
## %bb.23:
	cmpl	$4, %ecx
	jne	LBB0_25
## %bb.24:
	movl	(%r12), %esi
	movl	4(%r12), %edx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_kmvc_decode_inter_8x8
	jmp	LBB0_28
LBB0_20:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %ecx
	jmp	LBB0_26
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	cmpq	$0, 56(%r15)
	jne	LBB0_17
	jmp	LBB0_18
LBB0_27:
	movq	16(%r15), %rdi
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r15), %rsi
	movl	$64000, %edx                    ## imm = 0xFA00
	callq	_memcpy
	jmp	LBB0_28
LBB0_37:
	movl	(%r12), %esi
	movl	4(%r12), %edx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_kmvc_decode_intra_8x8
LBB0_28:
	cmpl	$0, 4(%r12)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_31
## %bb.29:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %r14
	movq	8(%r15), %rax
	movq	(%rax), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_memcpy
	addq	$1280, %r14                     ## imm = 0x500
	movq	16(%r15), %rax
	movslq	(%rax), %rax
	leaq	(%r13,%rax,4), %r13
	incl	%ebx
	cmpl	4(%r12), %ebx
	jl	LBB0_30
LBB0_31:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rax
	movq	32(%rdx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_32
## %bb.33:
	movq	%rcx, 16(%rdx)
	movq	40(%rdx), %rax
	jmp	LBB0_34
LBB0_32:
	movq	40(%rdx), %rcx
	movq	%rcx, 16(%rdx)
LBB0_34:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 24(%rdx)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_35
LBB0_25:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
LBB0_26:
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rcx
LBB0_35:
	movl	(%rcx), %eax
LBB0_36:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_DATA_PALETTE,4,2        ## @AV_PKT_DATA_PALETTE
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_KMVC_KEYFRAME,4,2              ## @KMVC_KEYFRAME
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ## @AV_PICTURE_TYPE_P
	.comm	_KMVC_PALETTE,4,2               ## @KMVC_PALETTE
	.comm	_AVPALETTE_SIZE,4,2             ## @AVPALETTE_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Palette size %d is wrong\n"

L_.str.1:                               ## @.str.1
	.asciz	"Block size = %i\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_KMVC_METHOD,4,2                ## @KMVC_METHOD
L_.str.2:                               ## @.str.2
	.asciz	"Unknown compression method %i\n"

	.no_dead_strip	_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_frame
_decode_frame:                          ; @decode_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	x20, x2
	mov	x23, x1
	mov	x22, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _AV_PKT_DATA_PALETTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PKT_DATA_PALETTE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x3
	bl	_av_packet_get_side_data
	mov	x26, x0
	add	x24, x21, #48
	ldp	w2, w1, [x19]
	mov	x0, x24
	bl	_bytestream2_init
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_34
; %bb.1:
	mov	x0, x24
	bl	_bytestream2_get_byte
	mov	x25, x0
	mov	x0, x24
	bl	_bytestream2_peek_byte
	cmp	w0, #127
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x24
	mov	w1, #3
	bl	_bytestream2_skip
	mov	x27, #0
	mov	w8, #129
	and	w8, w25, w8
	lsl	x28, x8, #2
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_bytestream2_get_be24
	orr	w8, w0, #0xff000000
	ldr	x9, [x21]
	add	x9, x9, x28
	str	w8, [x9, x27]
	mov	x0, x24
	mov	w1, #1
	bl	_bytestream2_skip
	add	x27, x27, #4
	cmp	x27, #508
	b.ne	LBB0_3
; %bb.4:
Lloh3:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x24
	mov	w1, #-511
	bl	_bytestream2_seek
LBB0_5:
Lloh6:
	adrp	x8, _KMVC_KEYFRAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KMVC_KEYFRAME@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w25
	cset	w8, ne
	str	w8, [x23]
Lloh9:
	adrp	x8, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
Lloh11:
	adrp	x9, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x23, #24]
Lloh13:
	adrp	x8, _KMVC_PALETTE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _KMVC_PALETTE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w25
	b.eq	LBB0_9
; %bb.6:
	mov	w8, #1
	str	w8, [x23, #4]
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x27, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_bytestream2_get_be24
	orr	w8, w0, #0xff000000
	ldr	x9, [x21]
	add	x9, x9, x27, lsl #2
	str	w8, [x9, #4]
	ldrsw	x8, [x21, #8]
	add	x27, x27, #1
	cmp	x27, x8
	b.lt	LBB0_8
LBB0_9:
	cbz	x26, LBB0_12
; %bb.10:
	ldr	w3, [sp, #12]
Lloh16:
	adrp	x8, _AVPALETTE_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AVPALETTE_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w3, w8
	b.ne	LBB0_21
; %bb.11:
	mov	w8, #1
	str	w8, [x23, #4]
	ldr	x0, [x21]
	mov	x1, x26
	mov	x2, x3
	bl	_memcpy
LBB0_12:
	ldr	x8, [x21, #56]
	cbz	x8, LBB0_14
LBB0_13:
	str	xzr, [x21, #56]
	mov	w8, #1
	str	w8, [x23, #4]
LBB0_14:
	ldr	x8, [x23, #8]
	ldr	x0, [x8, #8]
	ldr	x1, [x21]
	mov	w2, #1024
	bl	_memcpy
	mov	x0, x24
	bl	_bytestream2_get_byte
	cmp	w0, #8
	b.eq	LBB0_16
; %bb.15:
	mov	x3, x0
	cmp	w0, #127
	b.ne	LBB0_20
LBB0_16:
	ldr	x0, [x21, #16]
	mov	w1, #0
	mov	w2, #64000
	bl	_memset
Lloh19:
	adrp	x8, _KMVC_METHOD@GOTPAGE
Lloh20:
	ldr	x8, [x8, _KMVC_METHOD@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w3, w8, w25
	cmp	w3, #2
	b.lo	LBB0_22
; %bb.17:
	cmp	w3, #3
	b.eq	LBB0_23
; %bb.18:
	cmp	w3, #4
	b.ne	LBB0_31
; %bb.19:
	ldp	w1, w2, [x22]
	mov	x0, x21
	bl	_kmvc_decode_inter_8x8
	b	LBB0_24
LBB0_20:
Lloh22:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x2, l_.str.1@PAGE
Lloh26:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_32
LBB0_21:
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x2, l_.str@PAGE
Lloh31:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	bl	_av_log
	ldr	x8, [x21, #56]
	cbnz	x8, LBB0_13
	b	LBB0_14
LBB0_22:
	ldp	x0, x1, [x21, #16]
	mov	w2, #64000
	bl	_memcpy
	b	LBB0_24
LBB0_23:
	ldp	w1, w2, [x22]
	mov	x0, x21
	bl	_kmvc_decode_intra_8x8
LBB0_24:
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.25:
	mov	w26, #0
	ldr	x24, [x21, #16]
	ldr	x8, [x23, #8]
	ldr	x25, [x8]
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x22]
	mov	x0, x25
	mov	x1, x24
	bl	_memcpy
	add	x24, x24, #1280
	ldr	x8, [x23, #16]
	ldrsw	x8, [x8]
	add	x25, x25, x8, lsl #2
	add	w26, w26, #1
	ldr	w8, [x22, #4]
	cmp	w26, w8
	b.lt	LBB0_26
LBB0_27:
	ldr	x8, [x21, #16]
	ldr	x9, [x21, #32]
	cmp	x8, x9
	b.eq	LBB0_29
; %bb.28:
	str	x9, [x21, #16]
	ldr	x8, [x21, #40]
	b	LBB0_30
LBB0_29:
	ldr	x9, [x21, #40]
	str	x9, [x21, #16]
LBB0_30:
	str	x8, [x21, #24]
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_33
LBB0_31:
Lloh32:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x2, l_.str.2@PAGE
Lloh36:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_32:
	mov	x0, x22
	bl	_av_log
Lloh37:
	adrp	x19, _AVERROR_INVALIDDATA@GOTPAGE
Lloh38:
	ldr	x19, [x19, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_33:
	ldr	w0, [x19]
LBB0_34:
	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
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_DATA_PALETTE,4,2        ; @AV_PKT_DATA_PALETTE
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_KMVC_KEYFRAME,4,2              ; @KMVC_KEYFRAME
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ; @AV_PICTURE_TYPE_P
	.comm	_KMVC_PALETTE,4,2               ; @KMVC_PALETTE
	.comm	_AVPALETTE_SIZE,4,2             ; @AVPALETTE_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Palette size %d is wrong\n"

l_.str.1:                               ; @.str.1
	.asciz	"Block size = %i\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_KMVC_METHOD,4,2                ; @KMVC_METHOD
l_.str.2:                               ; @.str.2
	.asciz	"Unknown compression method %i\n"

	.no_dead_strip	_decode_frame
.subsections_via_symbols
