	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_color_spec
_encode_color_spec:                     ## @encode_color_spec
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	xorl	%edx, %edx
	cmpl	$0, 4(%rdi)
	sete	%dl
	movl	$1, %esi
	callq	_put_bits
	cmpl	$0, 4(%rbx)
	je	LBB0_1
## %bb.8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_put_vc2_ue_uint
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	(%r14), %rax
	movq	_AVCOL_PRI_BT470BG@GOTPCREL(%rip), %rcx
	movl	$2, %esi
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_AVCOL_PRI_SMPTE170M@GOTPCREL(%rip), %rcx
	movl	$1, %esi
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_AVCOL_PRI_SMPTE240M@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
LBB0_4:
	movq	%rbx, %rdi
	callq	_put_vc2_ue_uint
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	8(%r14), %rax
	movq	_AVCOL_SPC_RGB@GOTPCREL(%rip), %rcx
	movl	$3, %esi
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:
	movq	_AVCOL_SPC_YCOCG@GOTPCREL(%rip), %rcx
	movl	$2, %esi
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_AVCOL_SPC_BT470BG@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
LBB0_7:
	movq	%rbx, %rdi
	callq	_put_vc2_ue_uint
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	16(%r14), %rax
	movq	_AVCOL_TRC_BT1361_ECG@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	movq	_AVCOL_TRC_LINEAR@GOTPCREL(%rip), %rcx
	sete	%dl
	cmpq	(%rcx), %rax
	movl	$2, %esi
	cmovnel	%edx, %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_put_vc2_ue_uint                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVCOL_PRI_BT470BG,8,3          ## @AVCOL_PRI_BT470BG
	.comm	_AVCOL_PRI_SMPTE170M,8,3        ## @AVCOL_PRI_SMPTE170M
	.comm	_AVCOL_PRI_SMPTE240M,8,3        ## @AVCOL_PRI_SMPTE240M
	.comm	_AVCOL_SPC_RGB,8,3              ## @AVCOL_SPC_RGB
	.comm	_AVCOL_SPC_YCOCG,8,3            ## @AVCOL_SPC_YCOCG
	.comm	_AVCOL_SPC_BT470BG,8,3          ## @AVCOL_SPC_BT470BG
	.comm	_AVCOL_TRC_LINEAR,8,3           ## @AVCOL_TRC_LINEAR
	.comm	_AVCOL_TRC_BT1361_ECG,8,3       ## @AVCOL_TRC_BT1361_ECG
	.no_dead_strip	_encode_color_spec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_color_spec
_encode_color_spec:                     ; @encode_color_spec
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w8, [x0, #4]
	cmp	w8, #0
	cset	w2, eq
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	bl	_put_vc2_ue_uint
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _AVCOL_PRI_BT470BG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVCOL_PRI_BT470BG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w1, #2
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x9, _AVCOL_PRI_SMPTE170M@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AVCOL_PRI_SMPTE170M@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	w1, #1
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x9, _AVCOL_PRI_SMPTE240M@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AVCOL_PRI_SMPTE240M@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w1, eq
LBB0_7:
	mov	x0, x19
	bl	_put_vc2_ue_uint
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	ldr	x8, [x20, #8]
Lloh9:
	adrp	x9, _AVCOL_SPC_RGB@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AVCOL_SPC_RGB@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	w1, #3
	b	LBB0_12
LBB0_9:
Lloh12:
	adrp	x9, _AVCOL_SPC_YCOCG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AVCOL_SPC_YCOCG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	w1, #2
	b	LBB0_12
LBB0_11:
Lloh15:
	adrp	x9, _AVCOL_SPC_BT470BG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AVCOL_SPC_BT470BG@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w1, eq
LBB0_12:
	mov	x0, x19
	bl	_put_vc2_ue_uint
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
Lloh18:
	adrp	x8, _AVCOL_TRC_LINEAR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVCOL_TRC_LINEAR@GOTPAGEOFF]
	ldr	x9, [x20, #16]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x10, _AVCOL_TRC_BT1361_ECG@GOTPAGE
Lloh22:
	ldr	x10, [x10, _AVCOL_TRC_BT1361_ECG@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w10, eq
	cmp	x9, x8
	mov	w8, #2
	csel	w1, w8, w10, eq
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_put_vc2_ue_uint
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AVCOL_PRI_BT470BG,8,3          ; @AVCOL_PRI_BT470BG
	.comm	_AVCOL_PRI_SMPTE170M,8,3        ; @AVCOL_PRI_SMPTE170M
	.comm	_AVCOL_PRI_SMPTE240M,8,3        ; @AVCOL_PRI_SMPTE240M
	.comm	_AVCOL_SPC_RGB,8,3              ; @AVCOL_SPC_RGB
	.comm	_AVCOL_SPC_YCOCG,8,3            ; @AVCOL_SPC_YCOCG
	.comm	_AVCOL_SPC_BT470BG,8,3          ; @AVCOL_SPC_BT470BG
	.comm	_AVCOL_TRC_LINEAR,8,3           ; @AVCOL_TRC_LINEAR
	.comm	_AVCOL_TRC_BT1361_ECG,8,3       ; @AVCOL_TRC_BT1361_ECG
	.no_dead_strip	_encode_color_spec
.subsections_via_symbols
