	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_get_packet_palette          ## -- Begin function ff_get_packet_palette
	.p2align	4, 0x90
_ff_get_packet_palette:                 ## @ff_get_packet_palette
	.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
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_av_packet_get_side_data
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	-44(%rbp), %edx
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_memcpy
	jmp	LBB0_8
LBB0_4:
	movq	_CONTAINS_PAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%r12d, (%rcx)
	jne	LBB0_9
## %bb.5:
	movq	_AVPALETTE_COUNT@GOTPCREL(%rip), %r15
	movl	$1, %eax
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	addl	4(%r13), %edi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	subl	(%rax), %edi
	addl	%ebx, %edi
	callq	_AV_RL32
	movl	%eax, (%r14,%r12,4)
	incq	%r12
	movslq	(%r15), %rax
	addl	$4, %ebx
	cmpq	%rax, %r12
	jl	LBB0_7
LBB0_8:
	movl	$1, %eax
	jmp	LBB0_9
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %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	_AVPALETTE_SIZE,4,2             ## @AVPALETTE_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid palette side data\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_CONTAINS_PAL,4,2               ## @CONTAINS_PAL
	.comm	_AVPALETTE_COUNT,4,2            ## @AVPALETTE_COUNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_get_packet_palette          ; -- Begin function ff_get_packet_palette
	.p2align	2
_ff_get_packet_palette:                 ; @ff_get_packet_palette
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x20, x1
	mov	x21, 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, x20
	bl	_av_packet_get_side_data
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w2, [sp, #12]
Lloh3:
	adrp	x8, _AVPALETTE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVPALETTE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_8
; %bb.2:
	mov	x1, x0
	mov	x0, x19
	bl	_memcpy
	b	LBB0_7
LBB0_3:
Lloh6:
	adrp	x8, _CONTAINS_PAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONTAINS_PAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_9
; %bb.4:
Lloh9:
	adrp	x21, _AVPALETTE_COUNT@GOTPAGE
Lloh10:
	ldr	x21, [x21, _AVPALETTE_COUNT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x22, #0
	mov	x23, #0
Lloh11:
	adrp	x24, _AVPALETTE_SIZE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _AVPALETTE_SIZE@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x20]
	ldr	w10, [x24]
	add	w8, w8, w9
	sub	w8, w8, w10
	add	w0, w22, w8
	bl	_AV_RL32
	str	w0, [x19, x22]
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #4
	cmp	x23, x8
	b.lt	LBB0_6
LBB0_7:
	mov	w0, #1
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh18:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.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	"Invalid palette side data\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_CONTAINS_PAL,4,2               ; @CONTAINS_PAL
	.comm	_AVPALETTE_COUNT,4,2            ; @AVPALETTE_COUNT
.subsections_via_symbols
