	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function matroska_deliver_packet
_matroska_deliver_packet:               ## @matroska_deliver_packet
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %rbx
	addq	$8, %rdi
	movq	16(%rbx), %r13
	leaq	4(%rbx), %rsi
	movq	%r15, %rdx
	callq	_ff_packet_list_get
	movq	(%r15), %r12
	shlq	$4, %r12
	xorl	%r14d, %r14d
	cmpq	$0, (%r13,%r12)
	je	LBB0_7
## %bb.3:
	leaq	(%r12,%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_AV_PKT_DATA_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	8(%r13,%r12), %esi
	movq	_AVPALETTE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_memcpy
	jmp	LBB0_6
LBB0_1:
	movl	$-1, %r14d
	jmp	LBB0_7
LBB0_4:
	movl	(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_7:
	movl	%r14d, %eax
	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	"Cannot append palette to packet\n"

	.no_dead_strip	_matroska_deliver_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function matroska_deliver_packet
_matroska_deliver_packet:               ; @matroska_deliver_packet
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldr	x8, [x0, #8]!
	cbz	x8, LBB0_4
; %bb.1:
	mov	x20, x1
	ldr	x22, [x19, #16]
	add	x1, x19, #4
	mov	x2, x20
	bl	_ff_packet_list_get
	ldr	x23, [x20]
	add	x21, x22, x23, lsl #4
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _AV_PKT_DATA_PALETTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_PKT_DATA_PALETTE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x24, _AVPALETTE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _AVPALETTE_SIZE@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_6
; %bb.3:
	add	x8, x22, x23, lsl #4
	ldr	w1, [x8, #8]
	ldr	w2, [x24]
	bl	_memcpy
	b	LBB0_7
LBB0_4:
	mov	w0, #-1
	b	LBB0_8
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
LBB0_7:
	mov	w0, #0
	str	xzr, [x21]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.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	"Cannot append palette to packet\n"

	.no_dead_strip	_matroska_deliver_packet
.subsections_via_symbols
