	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkv_write_video_color
_mkv_write_video_color:                 ## @mkv_write_video_color
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$0, -52(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_27
## %bb.1:
	movq	(%rbx), %rdx
	movq	_AVCOL_TRC_UNSPECIFIED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_4
## %bb.2:
	movq	_AVCOL_TRC_NB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_4
## %bb.3:
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_put_ebml_uint
LBB0_4:
	movq	8(%rbx), %rdx
	movq	_AVCOL_SPC_UNSPECIFIED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_7
## %bb.5:
	movq	_AVCOL_SPC_NB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORMATRIXCOEFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_put_ebml_uint
LBB0_7:
	movq	16(%rbx), %rdx
	movq	_AVCOL_PRI_UNSPECIFIED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_10
## %bb.8:
	movq	_AVCOL_PRI_NB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_10
## %bb.9:
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORPRIMARIES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_put_ebml_uint
LBB0_10:
	movq	24(%rbx), %rdx
	movq	_AVCOL_RANGE_UNSPECIFIED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.11:
	movq	_AVCOL_RANGE_NB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_13
## %bb.12:
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORRANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_put_ebml_uint
LBB0_13:
	movq	32(%rbx), %rdx
	movq	_AVCHROMA_LOC_UNSPECIFIED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_16
## %bb.14:
	movq	_AVCHROMA_LOC_TOP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jg	LBB0_16
## %bb.15:
	leaq	-64(%rbp), %rdi
	leaq	-68(%rbp), %rsi
	callq	_avcodec_enum_to_chroma_pos
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-64(%rbp), %edx
	sarl	$7, %edx
	incl	%edx
	callq	_put_ebml_uint
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-68(%rbp), %edx
	sarl	$7, %edx
	incl	%edx
	callq	_put_ebml_uint
LBB0_16:
	movq	_AV_PKT_DATA_CONTENT_LIGHT_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	callq	_av_stream_get_side_data
	cmpl	$0, -52(%rbp)
	je	LBB0_18
## %bb.17:
	movq	%rax, %rbx
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORMAXCLL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	callq	_put_ebml_uint
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORMAXFALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	callq	_put_ebml_uint
LBB0_18:
	movq	_AV_PKT_DATA_MASTERING_DISPLAY_METADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	callq	_av_stream_get_side_data
	cmpl	$40, -52(%rbp)
	jne	LBB0_24
## %bb.19:
	movq	%rax, %rbx
	movq	-48(%rbp), %rdi
	movq	_MATROSKA_ID_VIDEOCOLORMASTERINGMETA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_start_ebml_master
	movl	%eax, %r15d
	cmpq	$0, 32(%rbx)
	je	LBB0_21
## %bb.20:
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_RY@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_GX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%rbx), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_GY@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%rbx), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_BX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%rbx), %rax
	movq	16(%rax), %rax
	movl	(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_BY@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%rbx), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_WHITEX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_WHITEY@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	16(%rbx), %rax
	movl	4(%rax), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
LBB0_21:
	cmpq	$0, 8(%rbx)
	je	LBB0_23
## %bb.22:
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	4(%rbx), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
	movq	-48(%rbp), %r12
	movq	_MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	(%rbx), %edi
	callq	_av_q2d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_put_ebml_float
LBB0_23:
	movq	-48(%rbp), %rdi
	movl	%r15d, %esi
	callq	_end_ebml_master
LBB0_24:
	movq	-48(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_avio_close_dyn_buf
	testl	%eax, %eax
	je	LBB0_26
## %bb.25:
	movl	%eax, %ebx
	movq	_MATROSKA_ID_VIDEOCOLOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_start_ebml_master
	movl	%eax, %r15d
	movq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_avio_write
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_end_ebml_master
LBB0_26:
	movq	-64(%rbp), %rdi
	callq	_av_free
	xorl	%eax, %eax
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVCOL_TRC_UNSPECIFIED,8,3      ## @AVCOL_TRC_UNSPECIFIED
	.comm	_AVCOL_TRC_NB,8,3               ## @AVCOL_TRC_NB
	.comm	_MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS,4,2 ## @MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS
	.comm	_AVCOL_SPC_UNSPECIFIED,8,3      ## @AVCOL_SPC_UNSPECIFIED
	.comm	_AVCOL_SPC_NB,8,3               ## @AVCOL_SPC_NB
	.comm	_MATROSKA_ID_VIDEOCOLORMATRIXCOEFF,4,2 ## @MATROSKA_ID_VIDEOCOLORMATRIXCOEFF
	.comm	_AVCOL_PRI_UNSPECIFIED,8,3      ## @AVCOL_PRI_UNSPECIFIED
	.comm	_AVCOL_PRI_NB,8,3               ## @AVCOL_PRI_NB
	.comm	_MATROSKA_ID_VIDEOCOLORPRIMARIES,4,2 ## @MATROSKA_ID_VIDEOCOLORPRIMARIES
	.comm	_AVCOL_RANGE_UNSPECIFIED,8,3    ## @AVCOL_RANGE_UNSPECIFIED
	.comm	_AVCOL_RANGE_NB,8,3             ## @AVCOL_RANGE_NB
	.comm	_MATROSKA_ID_VIDEOCOLORRANGE,4,2 ## @MATROSKA_ID_VIDEOCOLORRANGE
	.comm	_AVCHROMA_LOC_UNSPECIFIED,8,3   ## @AVCHROMA_LOC_UNSPECIFIED
	.comm	_AVCHROMA_LOC_TOP,8,3           ## @AVCHROMA_LOC_TOP
	.comm	_MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ,4,2 ## @MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ
	.comm	_MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT,4,2 ## @MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT
	.comm	_AV_PKT_DATA_CONTENT_LIGHT_LEVEL,4,2 ## @AV_PKT_DATA_CONTENT_LIGHT_LEVEL
	.comm	_MATROSKA_ID_VIDEOCOLORMAXCLL,4,2 ## @MATROSKA_ID_VIDEOCOLORMAXCLL
	.comm	_MATROSKA_ID_VIDEOCOLORMAXFALL,4,2 ## @MATROSKA_ID_VIDEOCOLORMAXFALL
	.comm	_AV_PKT_DATA_MASTERING_DISPLAY_METADATA,4,2 ## @AV_PKT_DATA_MASTERING_DISPLAY_METADATA
	.comm	_MATROSKA_ID_VIDEOCOLORMASTERINGMETA,4,2 ## @MATROSKA_ID_VIDEOCOLORMASTERINGMETA
	.comm	_MATROSKA_ID_VIDEOCOLOR_RX,4,2  ## @MATROSKA_ID_VIDEOCOLOR_RX
	.comm	_MATROSKA_ID_VIDEOCOLOR_RY,4,2  ## @MATROSKA_ID_VIDEOCOLOR_RY
	.comm	_MATROSKA_ID_VIDEOCOLOR_GX,4,2  ## @MATROSKA_ID_VIDEOCOLOR_GX
	.comm	_MATROSKA_ID_VIDEOCOLOR_GY,4,2  ## @MATROSKA_ID_VIDEOCOLOR_GY
	.comm	_MATROSKA_ID_VIDEOCOLOR_BX,4,2  ## @MATROSKA_ID_VIDEOCOLOR_BX
	.comm	_MATROSKA_ID_VIDEOCOLOR_BY,4,2  ## @MATROSKA_ID_VIDEOCOLOR_BY
	.comm	_MATROSKA_ID_VIDEOCOLOR_WHITEX,4,2 ## @MATROSKA_ID_VIDEOCOLOR_WHITEX
	.comm	_MATROSKA_ID_VIDEOCOLOR_WHITEY,4,2 ## @MATROSKA_ID_VIDEOCOLOR_WHITEY
	.comm	_MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX,4,2 ## @MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX
	.comm	_MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN,4,2 ## @MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN
	.comm	_MATROSKA_ID_VIDEOCOLOR,4,2     ## @MATROSKA_ID_VIDEOCOLOR
	.no_dead_strip	_mkv_write_video_color
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkv_write_video_color
_mkv_write_video_color:                 ; @mkv_write_video_color
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	add	x0, sp, #24
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_24
; %bb.1:
	ldr	x2, [x21]
Lloh0:
	adrp	x8, _AVCOL_TRC_UNSPECIFIED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVCOL_TRC_UNSPECIFIED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _AVCOL_TRC_NB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AVCOL_TRC_NB@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x2, x8
	ccmp	x2, x9, #0, ne
	b.ge	LBB0_3
; %bb.2:
	ldr	x0, [sp, #24]
Lloh6:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_put_ebml_uint
LBB0_3:
	ldr	x2, [x21, #8]
Lloh9:
	adrp	x8, _AVCOL_SPC_UNSPECIFIED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVCOL_SPC_UNSPECIFIED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _AVCOL_SPC_NB@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AVCOL_SPC_NB@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x2, x8
	ccmp	x2, x9, #0, ne
	b.ge	LBB0_5
; %bb.4:
	ldr	x0, [sp, #24]
Lloh15:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORMATRIXCOEFF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORMATRIXCOEFF@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_put_ebml_uint
LBB0_5:
	ldr	x2, [x21, #16]
Lloh18:
	adrp	x8, _AVCOL_PRI_UNSPECIFIED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVCOL_PRI_UNSPECIFIED@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _AVCOL_PRI_NB@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AVCOL_PRI_NB@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x2, x8
	ccmp	x2, x9, #0, ne
	b.ge	LBB0_7
; %bb.6:
	ldr	x0, [sp, #24]
Lloh24:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORPRIMARIES@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORPRIMARIES@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_put_ebml_uint
LBB0_7:
	ldr	x2, [x21, #24]
Lloh27:
	adrp	x8, _AVCOL_RANGE_UNSPECIFIED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AVCOL_RANGE_UNSPECIFIED@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x2, x8
	b.eq	LBB0_10
; %bb.8:
Lloh30:
	adrp	x8, _AVCOL_RANGE_NB@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AVCOL_RANGE_NB@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_10
; %bb.9:
	ldr	x0, [sp, #24]
Lloh33:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORRANGE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORRANGE@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_put_ebml_uint
LBB0_10:
	ldr	x2, [x21, #32]
Lloh36:
	adrp	x8, _AVCHROMA_LOC_UNSPECIFIED@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AVCHROMA_LOC_UNSPECIFIED@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	cmp	x2, x8
	b.eq	LBB0_13
; %bb.11:
Lloh39:
	adrp	x8, _AVCHROMA_LOC_TOP@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AVCHROMA_LOC_TOP@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	cmp	x2, x8
	b.gt	LBB0_13
; %bb.12:
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_avcodec_enum_to_chroma_pos
	ldr	x0, [sp, #24]
Lloh42:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	ldr	w8, [sp, #16]
	asr	w8, w8, #7
	add	w2, w8, #1
	bl	_put_ebml_uint
	ldr	x0, [sp, #24]
Lloh45:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	ldr	w8, [sp, #8]
	asr	w8, w8, #7
	add	w2, w8, #1
	bl	_put_ebml_uint
LBB0_13:
Lloh48:
	adrp	x8, _AV_PKT_DATA_CONTENT_LIGHT_LEVEL@GOTPAGE
Lloh49:
	ldr	x8, [x8, _AV_PKT_DATA_CONTENT_LIGHT_LEVEL@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_av_stream_get_side_data
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_15
; %bb.14:
	mov	x21, x0
	ldr	x0, [sp, #24]
Lloh51:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORMAXCLL@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORMAXCLL@GOTPAGEOFF]
Lloh53:
	ldr	w1, [x8]
	ldr	w2, [x21]
	bl	_put_ebml_uint
	ldr	x0, [sp, #24]
Lloh54:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORMAXFALL@GOTPAGE
Lloh55:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORMAXFALL@GOTPAGEOFF]
Lloh56:
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
	bl	_put_ebml_uint
LBB0_15:
Lloh57:
	adrp	x8, _AV_PKT_DATA_MASTERING_DISPLAY_METADATA@GOTPAGE
Lloh58:
	ldr	x8, [x8, _AV_PKT_DATA_MASTERING_DISPLAY_METADATA@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_av_stream_get_side_data
	ldr	w8, [sp, #12]
	cmp	w8, #40
	b.ne	LBB0_21
; %bb.16:
	mov	x20, x0
	ldr	x0, [sp, #24]
Lloh60:
	adrp	x8, _MATROSKA_ID_VIDEOCOLORMASTERINGMETA@GOTPAGE
Lloh61:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLORMASTERINGMETA@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_start_ebml_master
	mov	x21, x0
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_18
; %bb.17:
	ldr	x22, [sp, #24]
Lloh63:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_RX@GOTPAGE
Lloh64:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_RX@GOTPAGEOFF]
Lloh65:
	ldr	w23, [x8]
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh66:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_RY@GOTPAGE
Lloh67:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_RY@GOTPAGEOFF]
Lloh68:
	ldr	w23, [x8]
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh69:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_GX@GOTPAGE
Lloh70:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_GX@GOTPAGEOFF]
Lloh71:
	ldr	w23, [x8]
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #8]
	ldr	w0, [x8]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh72:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_GY@GOTPAGE
Lloh73:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_GY@GOTPAGEOFF]
Lloh74:
	ldr	w23, [x8]
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #4]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh75:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_BX@GOTPAGE
Lloh76:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_BX@GOTPAGEOFF]
Lloh77:
	ldr	w23, [x8]
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #16]
	ldr	w0, [x8]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh78:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_BY@GOTPAGE
Lloh79:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_BY@GOTPAGEOFF]
Lloh80:
	ldr	w23, [x8]
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #16]
	ldr	w0, [x8, #4]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh81:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_WHITEX@GOTPAGE
Lloh82:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_WHITEX@GOTPAGEOFF]
Lloh83:
	ldr	w23, [x8]
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh84:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_WHITEY@GOTPAGE
Lloh85:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_WHITEY@GOTPAGEOFF]
Lloh86:
	ldr	w23, [x8]
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #4]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
LBB0_18:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_20
; %bb.19:
	ldr	x22, [sp, #24]
Lloh87:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX@GOTPAGE
Lloh88:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX@GOTPAGEOFF]
Lloh89:
	ldr	w23, [x8]
	ldr	w0, [x20, #4]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
	ldr	x22, [sp, #24]
Lloh90:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN@GOTPAGE
Lloh91:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN@GOTPAGEOFF]
Lloh92:
	ldr	w23, [x8]
	ldr	w0, [x20]
	bl	_av_q2d
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_put_ebml_float
LBB0_20:
	ldr	x0, [sp, #24]
	mov	x1, x21
	bl	_end_ebml_master
LBB0_21:
	ldr	x0, [sp, #24]
	add	x1, sp, #16
	bl	_avio_close_dyn_buf
	cbz	w0, LBB0_23
; %bb.22:
	mov	x20, x0
Lloh93:
	adrp	x8, _MATROSKA_ID_VIDEOCOLOR@GOTPAGE
Lloh94:
	ldr	x8, [x8, _MATROSKA_ID_VIDEOCOLOR@GOTPAGEOFF]
Lloh95:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_start_ebml_master
	mov	x21, x0
	ldr	x1, [sp, #16]
	mov	x0, x19
	mov	x2, x20
	bl	_avio_write
	mov	x0, x19
	mov	x1, x21
	bl	_end_ebml_master
LBB0_23:
	ldr	x0, [sp, #16]
	bl	_av_free
	mov	w0, #0
LBB0_24:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.cfi_endproc
                                        ; -- End function
	.comm	_AVCOL_TRC_UNSPECIFIED,8,3      ; @AVCOL_TRC_UNSPECIFIED
	.comm	_AVCOL_TRC_NB,8,3               ; @AVCOL_TRC_NB
	.comm	_MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS,4,2 ; @MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS
	.comm	_AVCOL_SPC_UNSPECIFIED,8,3      ; @AVCOL_SPC_UNSPECIFIED
	.comm	_AVCOL_SPC_NB,8,3               ; @AVCOL_SPC_NB
	.comm	_MATROSKA_ID_VIDEOCOLORMATRIXCOEFF,4,2 ; @MATROSKA_ID_VIDEOCOLORMATRIXCOEFF
	.comm	_AVCOL_PRI_UNSPECIFIED,8,3      ; @AVCOL_PRI_UNSPECIFIED
	.comm	_AVCOL_PRI_NB,8,3               ; @AVCOL_PRI_NB
	.comm	_MATROSKA_ID_VIDEOCOLORPRIMARIES,4,2 ; @MATROSKA_ID_VIDEOCOLORPRIMARIES
	.comm	_AVCOL_RANGE_UNSPECIFIED,8,3    ; @AVCOL_RANGE_UNSPECIFIED
	.comm	_AVCOL_RANGE_NB,8,3             ; @AVCOL_RANGE_NB
	.comm	_MATROSKA_ID_VIDEOCOLORRANGE,4,2 ; @MATROSKA_ID_VIDEOCOLORRANGE
	.comm	_AVCHROMA_LOC_UNSPECIFIED,8,3   ; @AVCHROMA_LOC_UNSPECIFIED
	.comm	_AVCHROMA_LOC_TOP,8,3           ; @AVCHROMA_LOC_TOP
	.comm	_MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ,4,2 ; @MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ
	.comm	_MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT,4,2 ; @MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT
	.comm	_AV_PKT_DATA_CONTENT_LIGHT_LEVEL,4,2 ; @AV_PKT_DATA_CONTENT_LIGHT_LEVEL
	.comm	_MATROSKA_ID_VIDEOCOLORMAXCLL,4,2 ; @MATROSKA_ID_VIDEOCOLORMAXCLL
	.comm	_MATROSKA_ID_VIDEOCOLORMAXFALL,4,2 ; @MATROSKA_ID_VIDEOCOLORMAXFALL
	.comm	_AV_PKT_DATA_MASTERING_DISPLAY_METADATA,4,2 ; @AV_PKT_DATA_MASTERING_DISPLAY_METADATA
	.comm	_MATROSKA_ID_VIDEOCOLORMASTERINGMETA,4,2 ; @MATROSKA_ID_VIDEOCOLORMASTERINGMETA
	.comm	_MATROSKA_ID_VIDEOCOLOR_RX,4,2  ; @MATROSKA_ID_VIDEOCOLOR_RX
	.comm	_MATROSKA_ID_VIDEOCOLOR_RY,4,2  ; @MATROSKA_ID_VIDEOCOLOR_RY
	.comm	_MATROSKA_ID_VIDEOCOLOR_GX,4,2  ; @MATROSKA_ID_VIDEOCOLOR_GX
	.comm	_MATROSKA_ID_VIDEOCOLOR_GY,4,2  ; @MATROSKA_ID_VIDEOCOLOR_GY
	.comm	_MATROSKA_ID_VIDEOCOLOR_BX,4,2  ; @MATROSKA_ID_VIDEOCOLOR_BX
	.comm	_MATROSKA_ID_VIDEOCOLOR_BY,4,2  ; @MATROSKA_ID_VIDEOCOLOR_BY
	.comm	_MATROSKA_ID_VIDEOCOLOR_WHITEX,4,2 ; @MATROSKA_ID_VIDEOCOLOR_WHITEX
	.comm	_MATROSKA_ID_VIDEOCOLOR_WHITEY,4,2 ; @MATROSKA_ID_VIDEOCOLOR_WHITEY
	.comm	_MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX,4,2 ; @MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX
	.comm	_MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN,4,2 ; @MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN
	.comm	_MATROSKA_ID_VIDEOCOLOR,4,2     ; @MATROSKA_ID_VIDEOCOLOR
	.no_dead_strip	_mkv_write_video_color
.subsections_via_symbols
