	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function program_gamut_remap
_program_gamut_remap:                   ## @program_gamut_remap
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.1:
	movq	_GAMUT_REMAP_BYPASS@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	je	LBB0_11
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	$128, %edx
	je	LBB0_3
## %bb.4:
	cmpl	$129, %edx
	je	LBB0_7
## %bb.5:
	cmpl	$130, %edx
	jne	LBB0_8
## %bb.6:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, -40(%rbp)
	movq	_CM_GAMUT_REMAP_C11_C12@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG
	movq	%rax, -48(%rbp)
	movq	_CM_GAMUT_REMAP_C33_C34@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG
	movq	%rax, -56(%rbp)
	movl	$1, %r15d
	jmp	LBB0_10
LBB0_11:
	movq	_CM_GAMUT_REMAP_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CM_GAMUT_REMAP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_SET                        ## TAILCALL
LBB0_3:
	movl	$3, %r15d
	jmp	LBB0_9
LBB0_7:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, -40(%rbp)
	movq	_CM_COMA_C11_C12@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG
	movq	%rax, -48(%rbp)
	movq	_CM_COMA_C33_C34@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG
	movq	%rax, -56(%rbp)
	movl	$2, %r15d
	jmp	LBB0_10
LBB0_8:
	xorl	%r15d, %r15d
LBB0_9:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, -40(%rbp)
	movq	_CM_COMB_C11_C12@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG
	movq	%rax, -48(%rbp)
	movq	_CM_COMB_C33_C34@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG
	movq	%rax, -56(%rbp)
LBB0_10:
	movl	(%rbx), %edi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rsi
	callq	_cm_helper_program_color_matrices
	movq	_CM_GAMUT_REMAP_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CM_GAMUT_REMAP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r15d, %ecx
	callq	_REG_SET
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GAMUT_REMAP_BYPASS,4,2         ## @GAMUT_REMAP_BYPASS
	.comm	_CM_GAMUT_REMAP_CONTROL,4,2     ## @CM_GAMUT_REMAP_CONTROL
	.comm	_CM_GAMUT_REMAP_MODE,4,2        ## @CM_GAMUT_REMAP_MODE
	.comm	_CM_GAMUT_REMAP_C11_C12,4,2     ## @CM_GAMUT_REMAP_C11_C12
	.comm	_CM_GAMUT_REMAP_C33_C34,4,2     ## @CM_GAMUT_REMAP_C33_C34
	.comm	_CM_COMA_C11_C12,4,2            ## @CM_COMA_C11_C12
	.comm	_CM_COMA_C33_C34,4,2            ## @CM_COMA_C33_C34
	.comm	_CM_COMB_C11_C12,4,2            ## @CM_COMB_C11_C12
	.comm	_CM_COMB_C33_C34,4,2            ## @CM_COMB_C33_C34
	.no_dead_strip	_program_gamut_remap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function program_gamut_remap
_program_gamut_remap:                   ; @program_gamut_remap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	cbz	x1, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _GAMUT_REMAP_BYPASS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GAMUT_REMAP_BYPASS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.eq	LBB0_6
; %bb.2:
	mov	x19, x1
	mov	x20, x0
	cmp	w2, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w2, #129
	b.eq	LBB0_8
; %bb.4:
	cmp	w2, #130
	b.ne	LBB0_9
; %bb.5:
	ldp	x9, x8, [x20, #8]
	ldr	d0, [x8]
	ldr	d1, [x9]
	mov.d	v1[1], v0[0]
	str	q1, [sp, #16]
Lloh3:
	adrp	x8, _CM_GAMUT_REMAP_C11_C12@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CM_GAMUT_REMAP_C11_C12@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_REG
	str	x0, [sp, #8]
Lloh6:
	adrp	x8, _CM_GAMUT_REMAP_C33_C34@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CM_GAMUT_REMAP_C33_C34@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_REG
	str	x0, [sp]
	mov	w21, #1
	b	LBB0_11
LBB0_6:
Lloh9:
	adrp	x8, _CM_GAMUT_REMAP_CONTROL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CM_GAMUT_REMAP_CONTROL@GOTPAGEOFF]
Lloh11:
	adrp	x9, _CM_GAMUT_REMAP_MODE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CM_GAMUT_REMAP_MODE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	ldr	w2, [x9]
	mov	w1, #0
	mov	w3, #0
	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
	add	sp, sp, #80
	b	_REG_SET
LBB0_7:
	mov	w21, #3
	b	LBB0_10
LBB0_8:
	ldp	x9, x8, [x20, #8]
	ldr	d0, [x8]
	ldr	d1, [x9]
	mov.d	v1[1], v0[0]
	str	q1, [sp, #16]
Lloh15:
	adrp	x8, _CM_COMA_C11_C12@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CM_COMA_C11_C12@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_REG
	str	x0, [sp, #8]
Lloh18:
	adrp	x8, _CM_COMA_C33_C34@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CM_COMA_C33_C34@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_REG
	str	x0, [sp]
	mov	w21, #2
	b	LBB0_11
LBB0_9:
	mov	w21, #0
LBB0_10:
	ldp	x9, x8, [x20, #8]
	ldr	d0, [x8]
	ldr	d1, [x9]
	mov.d	v1[1], v0[0]
	str	q1, [sp, #16]
Lloh21:
	adrp	x8, _CM_COMB_C11_C12@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CM_COMB_C11_C12@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_REG
	str	x0, [sp, #8]
Lloh24:
	adrp	x8, _CM_COMB_C33_C34@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CM_COMB_C33_C34@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_REG
	str	x0, [sp]
LBB0_11:
	ldr	w0, [x20]
	mov	x2, sp
	mov	x1, x19
	bl	_cm_helper_program_color_matrices
Lloh27:
	adrp	x8, _CM_GAMUT_REMAP_CONTROL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CM_GAMUT_REMAP_CONTROL@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x8, _CM_GAMUT_REMAP_MODE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CM_GAMUT_REMAP_MODE@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, x21
	bl	_REG_SET
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GAMUT_REMAP_BYPASS,4,2         ; @GAMUT_REMAP_BYPASS
	.comm	_CM_GAMUT_REMAP_CONTROL,4,2     ; @CM_GAMUT_REMAP_CONTROL
	.comm	_CM_GAMUT_REMAP_MODE,4,2        ; @CM_GAMUT_REMAP_MODE
	.comm	_CM_GAMUT_REMAP_C11_C12,4,2     ; @CM_GAMUT_REMAP_C11_C12
	.comm	_CM_GAMUT_REMAP_C33_C34,4,2     ; @CM_GAMUT_REMAP_C33_C34
	.comm	_CM_COMA_C11_C12,4,2            ; @CM_COMA_C11_C12
	.comm	_CM_COMA_C33_C34,4,2            ; @CM_COMA_C33_C34
	.comm	_CM_COMB_C11_C12,4,2            ; @CM_COMB_C11_C12
	.comm	_CM_COMB_C33_C34,4,2            ; @CM_COMB_C33_C34
	.no_dead_strip	_program_gamut_remap
.subsections_via_symbols
