	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function smc_decode_frame
LCPI0_0:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_smc_decode_frame:                      ## @smc_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, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	8(%rcx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %r12d
	movq	(%rdi), %rbx
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rcx, %rdi
	callq	_av_packet_get_side_data
	movq	16(%rbx), %rcx
	movq	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	paddd	LCPI0_0(%rip), %xmm0
	movdqa	%xmm0, %xmm1
	psrad	$31, %xmm1
	psrld	$30, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$2, %xmm1
	movd	%xmm1, %ecx
	pextrd	$1, %xmm1, %edx
	imull	%ecx, %edx
	leal	1023(%rdx), %ecx
	testl	%edx, %edx
	cmovnsl	%edx, %ecx
	sarl	$10, %ecx
	cmpl	(%r15), %ecx
	jle	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_9
LBB0_2:
	movq	%rax, %r15
	leaq	12(%rbx), %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_bytestream2_init
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ff_reget_buffer
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%r15, %rsi
	testq	%r15, %r15
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_8
## %bb.5:
	movl	-44(%rbp), %ecx
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_7
## %bb.6:
	movq	(%rbx), %rcx
	movl	$1, (%rcx)
	movl	8(%rbx), %edi
	movl	(%rax), %edx
	callq	_memcpy
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %r12d
	jmp	LBB0_9
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_av_log
LBB0_8:
	movq	%rbx, %rdi
	callq	_smc_decode_stream
	movl	$1, (%r15)
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_av_frame_ref
	testl	%eax, %eax
	cmovsl	%eax, %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$24, %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	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.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"

	.no_dead_strip	_smc_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smc_decode_frame
_smc_decode_frame:                      ; @smc_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	x26, x3
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x25, [x3, #8]
	ldr	w19, [x3]
	ldr	x22, [x0]
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
	ldr	x8, [x22, #16]
	ldp	w9, w8, [x8]
	add	w10, w9, #3
	add	w9, w9, #6
	cmp	w10, #0
	csel	w9, w9, w10, lt
	asr	w9, w9, #2
	add	w10, w8, #3
	add	w8, w8, #6
	cmp	w10, #0
	csel	w8, w8, w10, lt
	asr	w8, w8, #2
	mul	w8, w8, w9
	add	w9, w8, #1023
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ldr	w9, [x26]
	cmp	w9, w8, asr #10
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_2:
	mov	x24, x0
	add	x0, x22, #12
	mov	x1, x25
	mov	x2, x19
	bl	_bytestream2_init
	ldr	x1, [x22]
	mov	x0, x23
	mov	w2, #0
	bl	_ff_reget_buffer
	tbnz	w0, #31, LBB0_8
; %bb.3:
	cbz	x24, LBB0_7
; %bb.4:
	ldr	w3, [sp, #12]
Lloh6:
	adrp	x8, _AVPALETTE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVPALETTE_SIZE@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w3, w9
	b.ne	LBB0_6
; %bb.5:
	ldr	x9, [x22]
	mov	w10, #1
	str	w10, [x9]
	ldr	w0, [x22, #8]
	ldr	w2, [x8]
	mov	x1, x24
	bl	_memcpy
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	bl	_av_log
LBB0_7:
	mov	x0, x22
	bl	_smc_decode_stream
	mov	w8, #1
	str	w8, [x21]
	ldr	x1, [x22]
	mov	x0, x20
	bl	_av_frame_ref
	cmp	w0, #0
	csel	w0, w0, w19, lt
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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_DATA_PALETTE,4,2        ; @AV_PKT_DATA_PALETTE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.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"

	.no_dead_strip	_smc_decode_frame
.subsections_via_symbols
