	.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
	movl	(%rcx), %r13d
	cmpl	$3, %r13d
	jl	LBB0_23
## %bb.1:
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	8(%rcx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	(%rbx), %rax
	movq	_AV_CODEC_ID_MSCC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jne	LBB0_5
## %bb.4:
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	xorl	%ecx, 8(%rax)
	addq	$8, -80(%rbp)                   ## 8-byte Folded Spill
	addl	$-2, %r13d
LBB0_5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movq	_AV_PIX_FMT_PAL8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.6:
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-68(%rbp), %rdx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_av_packet_get_side_data
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	%rax, %r15
	movl	-68(%rbp), %ecx
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_10
## %bb.8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_AV_RL32
	orl	$-16777216, %eax                ## imm = 0xFF000000
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	addq	$16, %r15
	cmpq	$256, %r12                      ## imm = 0x100
	jne	LBB0_9
	jmp	LBB0_11
LBB0_2:
	movl	%eax, %r13d
	jmp	LBB0_23
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
LBB0_11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rax
	movq	8(%rax), %rdi
	movq	(%r14), %rsi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_12:
	leaq	24(%r14), %r15
	movq	%r15, %rdi
	callq	_inflateReset
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.15:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%r14)
	movl	%r13d, 24(%r14)
	movq	48(%r14), %rax
	rolq	$32, %rax
	movq	%rax, 32(%r14)
	movq	_Z_FINISH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_inflate
	movq	_Z_STREAM_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.17:
	movl	28(%r14), %edx
	movl	48(%r14), %esi
	leaq	-96(%rbp), %r13
	movq	%r13, %rdi
	callq	_bytestream2_init
	movq	8(%r14), %rsi
	movl	20(%r14), %edx
	leaq	-92(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_bytestream2_init_writer
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_rle_uncompress
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.18:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	16(%r15), %eax
	testl	%eax, %eax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_21
## %bb.19:
	movq	%r15, %r13
	xorl	%ebx, %ebx
	movl	$-1, %r15d
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rcx
	movq	24(%r12), %rdx
	addl	%r15d, %eax
	movslq	(%rcx), %rcx
	movslq	%eax, %rdi
	imulq	%rcx, %rdi
	addq	(%rdx), %rdi
	movl	20(%r13), %edx
	imull	16(%r14), %edx
	movl	%edx, %eax
	imull	%ebx, %eax
	movslq	%eax, %rsi
	shlq	$2, %rsi
	addq	8(%r14), %rsi
	callq	_memcpy
	incl	%ebx
	movl	16(%r13), %eax
	decl	%r15d
	cmpl	%ebx, %eax
	jg	LBB0_20
LBB0_21:
	movl	$1, 16(%r12)
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_14
LBB0_16:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %r13d
LBB0_23:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_MSCC,8,3           ## @AV_CODEC_ID_MSCC
	.comm	_AV_PIX_FMT_PAL8,8,3            ## @AV_PIX_FMT_PAL8
	.comm	_AV_PKT_DATA_PALETTE,4,2        ## @AV_PKT_DATA_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"

	.comm	_Z_OK,4,2                       ## @Z_OK
L_.str.1:                               ## @.str.1
	.asciz	"Inflate reset error: %d\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_Z_FINISH,4,2                   ## @Z_FINISH
	.comm	_Z_STREAM_END,4,2               ## @Z_STREAM_END
L_.str.2:                               ## @.str.2
	.asciz	"Inflate error: %d\n"

	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.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
	ldr	w23, [x3]
	cmp	w23, #3
	b.lt	LBB0_22
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x25, [x0, #24]
	ldr	x26, [x3, #8]
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _AV_CODEC_ID_MSCC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_ID_MSCC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	ldr	w10, [x8, #8]
	eor	w9, w10, w9
	str	w9, [x8, #8]
	add	x26, x26, #8
	sub	w23, w23, #2
LBB0_4:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _AV_PIX_FMT_PAL8@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_PIX_FMT_PAL8@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.5:
Lloh6:
	adrp	x8, _AV_PKT_DATA_PALETTE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_PKT_DATA_PALETTE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x20
	bl	_av_packet_get_side_data
Lloh9:
	adrp	x27, _AVPALETTE_SIZE@GOTPAGE
Lloh10:
	ldr	x27, [x27, _AVPALETTE_SIZE@GOTPAGEOFF]
	cbz	x0, LBB0_11
; %bb.6:
	ldr	w3, [sp, #4]
	ldr	w8, [x27]
	cmp	w3, w8
	b.ne	LBB0_10
; %bb.7:
	mov	x24, x0
	mov	x28, #0
	mov	w8, #1
	str	w8, [x22]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_AV_RL32
	orr	w8, w0, #0xff000000
	ldr	x9, [x25]
	str	w8, [x9, x28]
	add	x24, x24, #16
	add	x28, x28, #4
	cmp	x28, #1024
	b.ne	LBB0_8
	b	LBB0_11
LBB0_9:
	mov	x23, x0
	b	LBB0_22
LBB0_10:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_11:
	ldr	x8, [x22, #24]
	ldr	x0, [x8, #8]
	ldr	x1, [x25]
	ldr	w2, [x27]
	bl	_memcpy
LBB0_12:
	add	x24, x25, #24
	mov	x0, x24
	bl	_inflateReset
Lloh16:
	adrp	x8, _Z_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _Z_OK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_19
; %bb.13:
	str	x26, [x25, #40]
	str	w23, [x25, #24]
	ldr	d0, [x25, #48]
	rev64.2s	v0, v0
	str	d0, [x25, #32]
Lloh19:
	adrp	x8, _Z_FINISH@GOTPAGE
Lloh20:
	ldr	x8, [x8, _Z_FINISH@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_inflate
Lloh22:
	adrp	x8, _Z_STREAM_END@GOTPAGE
Lloh23:
	ldr	x8, [x8, _Z_STREAM_END@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.14:
	ldr	w1, [x25, #48]
	ldr	w2, [x25, #28]
	add	x0, sp, #12
	bl	_bytestream2_init
	ldr	x1, [x25, #8]
	ldr	w2, [x25, #20]
	add	x0, sp, #8
	bl	_bytestream2_init_writer
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_rle_uncompress
	mov	x23, x0
	cbnz	w0, LBB0_22
; %bb.15:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	w23, #0
	mov	w24, #-1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22, #24]
	ldr	x9, [x9]
	add	w8, w8, w24
	ldr	x10, [x22, #8]
	ldrsw	x10, [x10]
	sxtw	x8, w8
	madd	x0, x10, x8, x9
	ldr	x8, [x25, #8]
	ldr	w9, [x25, #16]
	ldr	w10, [x19, #20]
	mul	w2, w10, w9
	mul	w9, w2, w23
	add	x1, x8, w9, sxtw #2
	bl	_memcpy
	add	w23, w23, #1
	ldr	w8, [x19, #16]
	sub	w24, w24, #1
	cmp	w8, w23
	b.gt	LBB0_17
LBB0_18:
Lloh25:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
	mov	w9, #1
Lloh27:
	ldr	w8, [x8]
	stp	w9, w8, [x22, #16]
	str	w9, [x21]
	ldr	w23, [x20]
	b	LBB0_22
LBB0_19:
	mov	x3, x0
Lloh28:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x2, l_.str.1@PAGE
Lloh32:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_21
LBB0_20:
	mov	x3, x0
Lloh33:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x2, l_.str.2@PAGE
Lloh37:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_21:
	mov	x0, x19
	bl	_av_log
Lloh38:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh40:
	ldr	w23, [x8]
LBB0_22:
	mov	x0, x23
	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 AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_MSCC,8,3           ; @AV_CODEC_ID_MSCC
	.comm	_AV_PIX_FMT_PAL8,8,3            ; @AV_PIX_FMT_PAL8
	.comm	_AV_PKT_DATA_PALETTE,4,2        ; @AV_PKT_DATA_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"

	.comm	_Z_OK,4,2                       ; @Z_OK
l_.str.1:                               ; @.str.1
	.asciz	"Inflate reset error: %d\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_Z_FINISH,4,2                   ; @Z_FINISH
	.comm	_Z_STREAM_END,4,2               ; @Z_STREAM_END
l_.str.2:                               ; @.str.2
	.asciz	"Inflate error: %d\n"

	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.no_dead_strip	_decode_frame
.subsections_via_symbols
