	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function screenpresso_decode_frame
_screenpresso_decode_frame:             ## @screenpresso_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movl	12(%r14), %eax
	movl	%eax, -48(%rbp)
	movl	(%rcx), %ecx
	cmpl	$2, %ecx
	jg	LBB0_2
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	jmp	LBB0_6
LBB0_2:
	movq	%rsi, %r15
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	sarl	$4, %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	8(%r12), %rdx
	movl	4(%rdx), %eax
	shrl	$2, %eax
	andl	$3, %eax
	leal	1(%rax), %r13d
	decl	%eax
	cmpl	$3, %eax
	jae	LBB0_5
## %bb.3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %r15d
	cltq
	leaq	l_switch.table.screenpresso_decode_frame(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	8(%r14), %edi
	addq	$8, %rdx
	movl	(%r12), %ecx
	addl	$-2, %ecx
	leaq	-48(%rbp), %rsi
	callq	_uncompress
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r13d, %ecx
LBB0_6:
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ff_reget_buffer
	testl	%eax, %eax
	js	LBB0_8
## %bb.10:
	movl	(%rbx), %edi
	imull	%r13d, %edi
	movl	$4, %esi
	callq	_FFALIGN
	movq	(%r14), %rcx
	movq	(%rcx), %rdx
	movq	8(%rcx), %rcx
	movq	(%rcx), %rdi
	movl	(%rdx), %esi
	testb	$1, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_13
## %bb.11:
	movl	8(%r14), %edx
	imull	(%rbx), %r13d
	movl	4(%rbx), %r9d
	movl	%eax, %ecx
	movl	%r13d, %r8d
	callq	_sum_delta_flipped
	movq	(%r14), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_8
## %bb.12:
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$4, %rbx
	jmp	LBB0_15
LBB0_13:
	movl	4(%rbx), %r9d
	leal	-1(%r9), %ecx
	imull	%esi, %ecx
	movslq	%ecx, %rcx
	addq	%rcx, %rdi
	negl	%esi
	movl	8(%r14), %edx
	imull	(%rbx), %r13d
	movl	%eax, %ecx
	movl	%r13d, %r8d
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_av_image_copy_plane
	movq	(%r14), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_av_frame_ref
	testl	%eax, %eax
	js	LBB0_8
## %bb.14:
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	$1, %eax
LBB0_15:
	movl	%eax, (%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	(%r12), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Packet too small (%d)\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Compression level %d\n"

	.comm	_AV_PIX_FMT_RGB555LE,4,2        ## @AV_PIX_FMT_RGB555LE
	.comm	_AV_PIX_FMT_BGR24,4,2           ## @AV_PIX_FMT_BGR24
	.comm	_AV_PIX_FMT_BGR0,4,2            ## @AV_PIX_FMT_BGR0
L_.str.2:                               ## @.str.2
	.asciz	"Invalid bits per pixel value (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Deflate error %d.\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ## @AV_PICTURE_TYPE_P
	.no_dead_strip	_screenpresso_decode_frame
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.screenpresso_decode_frame
l_switch.table.screenpresso_decode_frame:
	.quad	_AV_PIX_FMT_RGB555LE
	.quad	_AV_PIX_FMT_BGR24
	.quad	_AV_PIX_FMT_BGR0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function screenpresso_decode_frame
_screenpresso_decode_frame:             ; @screenpresso_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x22, x0
	ldr	x24, [x0, #16]
	ldr	w8, [x24, #12]
	str	w8, [sp, #12]
	ldr	w3, [x3]
	cmp	w3, #2
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	b	LBB0_6
LBB0_2:
	mov	x20, x2
	mov	x21, x1
Lloh5:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	asr	w3, w8, #4
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_av_log
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #4]
	ubfx	x9, x9, #2, #2
	add	w23, w9, #1
	sub	x9, x9, #1
	cmp	w9, #3
	b.hs	LBB0_5
; %bb.3:
	ldr	w25, [x8]
Lloh10:
	adrp	x10, l_switch.table.screenpresso_decode_frame@PAGE
Lloh11:
	add	x10, x10, l_switch.table.screenpresso_decode_frame@PAGEOFF
	ldr	x9, [x10, x9, lsl #3]
	ldr	w9, [x9]
	str	w9, [x22, #8]
	ldr	w0, [x24, #8]
	add	x2, x8, #8
	ldr	w8, [x19]
	sub	w3, w8, #2
	add	x1, sp, #12
	bl	_uncompress
	cbz	w0, LBB0_9
; %bb.4:
	mov	x3, x0
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.3@PAGE
Lloh16:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_av_log
Lloh17:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x3, x23
LBB0_6:
	bl	_av_log
Lloh24:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	x1, [x24]
	mov	x0, x22
	mov	w2, #0
	bl	_ff_reget_buffer
	tbnz	w0, #31, LBB0_8
; %bb.10:
	ldr	w8, [x22]
	mul	w0, w8, w23
	mov	w1, #4
	bl	_FFALIGN
	mov	x3, x0
	ldr	x8, [x24]
	ldp	x8, x9, [x8]
	ldr	x0, [x9]
	ldr	w1, [x8]
	tbnz	w25, #0, LBB0_13
; %bb.11:
	ldr	w2, [x24, #8]
	ldp	w8, w5, [x22]
	mul	w4, w8, w23
	bl	_sum_delta_flipped
	ldr	x1, [x24]
	mov	x0, x21
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_8
; %bb.12:
Lloh26:
	adrp	x8, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	add	x21, x21, #4
	b	LBB0_15
LBB0_13:
	ldp	w8, w5, [x22]
	sub	w9, w5, #1
	mul	w9, w9, w1
	add	x0, x0, w9, sxtw
	neg	w1, w1
	ldr	w2, [x24, #8]
	mul	w4, w8, w23
	bl	_av_image_copy_plane
	ldr	x1, [x24]
	mov	x0, x21
	bl	_av_frame_ref
	tbnz	w0, #31, LBB0_8
; %bb.14:
Lloh29:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	mov	w8, #1
LBB0_15:
	str	w8, [x21]
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x19]
	b	LBB0_8
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Packet too small (%d)\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Compression level %d\n"

	.comm	_AV_PIX_FMT_RGB555LE,4,2        ; @AV_PIX_FMT_RGB555LE
	.comm	_AV_PIX_FMT_BGR24,4,2           ; @AV_PIX_FMT_BGR24
	.comm	_AV_PIX_FMT_BGR0,4,2            ; @AV_PIX_FMT_BGR0
l_.str.2:                               ; @.str.2
	.asciz	"Invalid bits per pixel value (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Deflate error %d.\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_P,4,2          ; @AV_PICTURE_TYPE_P
	.no_dead_strip	_screenpresso_decode_frame
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.screenpresso_decode_frame
l_switch.table.screenpresso_decode_frame:
	.quad	_AV_PIX_FMT_RGB555LE
	.quad	_AV_PIX_FMT_BGR24
	.quad	_AV_PIX_FMT_BGR0

.subsections_via_symbols
