	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_dm_update_plane_color_mgmt ## -- Begin function amdgpu_dm_update_plane_color_mgmt
	.p2align	4, 0x90
_amdgpu_dm_update_plane_color_mgmt:     ## @amdgpu_dm_update_plane_color_mgmt
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	je	LBB0_5
## %bb.1:
	movl	8(%rbx), %edi
	leaq	-32(%rbp), %rsi
	callq	___extract_blob_lut
	movq	%rax, %r14
	movq	-32(%rbp), %rax
	movq	_MAX_COLOR_LUT_ENTRIES@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_ASSERT
	movq	_TF_TYPE_DISTRIBUTED_POINTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rdi
	movl	%eax, 8(%rdi)
	cmpq	$0, (%rbx)
	jne	LBB0_2
## %bb.3:
	movq	_TRANSFER_FUNCTION_LINEAR@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	cmpq	$0, (%rbx)
	movq	_TF_TYPE_PREDEFINED@GOTPCREL(%rip), %rax
	cmoveq	_TF_TYPE_BYPASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TRANSFER_FUNCTION_SRGB@GOTPCREL(%rip), %rcx
	cmoveq	_TRANSFER_FUNCTION_LINEAR@GOTPCREL(%rip), %rcx
	movq	(%r15), %rdx
	movl	%eax, 8(%rdx)
	movq	(%rcx), %rax
	movq	%rax, (%rdx)
	jmp	LBB0_6
LBB0_2:
	movq	_TRANSFER_FUNCTION_SRGB@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %rax
	movq	%rax, (%rdi)
	movq	-32(%rbp), %rdx
	movq	%r14, %rsi
	callq	___set_input_tf
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_COLOR_LUT_ENTRIES,8,3      ## @MAX_COLOR_LUT_ENTRIES
	.comm	_TF_TYPE_DISTRIBUTED_POINTS,4,2 ## @TF_TYPE_DISTRIBUTED_POINTS
	.comm	_TRANSFER_FUNCTION_SRGB,8,3     ## @TRANSFER_FUNCTION_SRGB
	.comm	_TRANSFER_FUNCTION_LINEAR,8,3   ## @TRANSFER_FUNCTION_LINEAR
	.comm	_TF_TYPE_PREDEFINED,4,2         ## @TF_TYPE_PREDEFINED
	.comm	_TF_TYPE_BYPASS,4,2             ## @TF_TYPE_BYPASS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_dm_update_plane_color_mgmt ; -- Begin function amdgpu_dm_update_plane_color_mgmt
	.p2align	2
_amdgpu_dm_update_plane_color_mgmt:     ; @amdgpu_dm_update_plane_color_mgmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20, #8]
	add	x1, sp, #8
	bl	___extract_blob_lut
	mov	x21, x0
	ldr	x8, [sp, #8]
Lloh0:
	adrp	x9, _MAX_COLOR_LUT_ENTRIES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_COLOR_LUT_ENTRIES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_ASSERT
Lloh3:
	adrp	x8, _TF_TYPE_DISTRIBUTED_POINTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TF_TYPE_DISTRIBUTED_POINTS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x0, [x19]
	str	w8, [x0, #8]
Lloh6:
	adrp	x8, _TRANSFER_FUNCTION_LINEAR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRANSFER_FUNCTION_LINEAR@GOTPAGEOFF]
Lloh8:
	adrp	x9, _TRANSFER_FUNCTION_SRGB@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TRANSFER_FUNCTION_SRGB@GOTPAGEOFF]
	ldr	x10, [x20]
	cmp	x10, #0
	csel	x8, x8, x9, eq
	ldr	x8, [x8]
	str	x8, [x0]
	ldr	x2, [sp, #8]
	mov	x1, x21
	bl	___set_input_tf
	cbnz	w0, LBB0_4
	b	LBB0_3
LBB0_2:
	ldr	x8, [x20]
Lloh10:
	adrp	x9, _TF_TYPE_BYPASS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TF_TYPE_BYPASS@GOTPAGEOFF]
Lloh12:
	adrp	x10, _TF_TYPE_PREDEFINED@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TF_TYPE_PREDEFINED@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	ldr	x9, [x19]
Lloh14:
	adrp	x10, _TRANSFER_FUNCTION_LINEAR@GOTPAGE
Lloh15:
	ldr	x10, [x10, _TRANSFER_FUNCTION_LINEAR@GOTPAGEOFF]
	str	w8, [x9, #8]
Lloh16:
	adrp	x8, _TRANSFER_FUNCTION_SRGB@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TRANSFER_FUNCTION_SRGB@GOTPAGEOFF]
	csel	x8, x10, x8, eq
	ldr	x8, [x8]
	str	x8, [x9]
LBB0_3:
	mov	w0, #0
LBB0_4:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_COLOR_LUT_ENTRIES,8,3      ; @MAX_COLOR_LUT_ENTRIES
	.comm	_TF_TYPE_DISTRIBUTED_POINTS,4,2 ; @TF_TYPE_DISTRIBUTED_POINTS
	.comm	_TRANSFER_FUNCTION_SRGB,8,3     ; @TRANSFER_FUNCTION_SRGB
	.comm	_TRANSFER_FUNCTION_LINEAR,8,3   ; @TRANSFER_FUNCTION_LINEAR
	.comm	_TF_TYPE_PREDEFINED,4,2         ; @TF_TYPE_PREDEFINED
	.comm	_TF_TYPE_BYPASS,4,2             ; @TF_TYPE_BYPASS
.subsections_via_symbols
