	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_color_lut_check            ## -- Begin function drm_color_lut_check
	.p2align	4, 0x90
_drm_color_lut_check:                   ## @drm_color_lut_check
	.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
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.1:
	movl	%esi, %r13d
	testl	%esi, %esi
	je	LBB0_19
## %bb.2:
	movq	%rdi, %r14
	movq	(%rdi), %r12
	callq	_drm_color_lut_size
	testl	%eax, %eax
	jle	LBB0_19
## %bb.3:
	leaq	16(%r12), %rbx
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movq	%r14, %rdi
	callq	_drm_color_lut_size
	cltq
	addq	$24, %rbx
	cmpq	%rax, %r15
	jge	LBB0_15
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DRM_COLOR_LUT_EQUAL_CHANNELS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-16(%rbx), %rax
	cmpq	-8(%rbx), %rax
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	(%rbx), %rax
	jne	LBB0_14
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	testq	%r15, %r15
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_DRM_COLOR_LUT_NON_DECREASING@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-16(%rbx), %rcx
	leal	-1(%r15), %eax
	leaq	(%rax,%rax,2), %rax
	cmpq	(%r12,%rax,8), %rcx
	jl	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rcx
	cmpq	16(%r12,%rax,8), %rcx
	jl	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-8(%rbx), %rcx
	cmpq	8(%r12,%rax,8), %rcx
	jge	LBB0_4
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_18
LBB0_14:
	leaq	L_.str(%rip), %rdi
LBB0_18:
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_15:
	xorl	%r15d, %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_COLOR_LUT_EQUAL_CHANNELS,4,2 ## @DRM_COLOR_LUT_EQUAL_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"All LUT entries must have equal r/g/b\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_COLOR_LUT_NON_DECREASING,4,2 ## @DRM_COLOR_LUT_NON_DECREASING
L_.str.1:                               ## @.str.1
	.asciz	"LUT entries must never decrease.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_color_lut_check            ; -- Begin function drm_color_lut_check
	.p2align	2
_drm_color_lut_check:                   ; @drm_color_lut_check
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	mov	w0, #0
	cbz	x20, LBB0_16
; %bb.1:
	mov	x19, x1
	cbz	w1, LBB0_16
; %bb.2:
	ldr	x22, [x20]
	mov	x0, x20
	bl	_drm_color_lut_size
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.3:
	mov	x23, #0
Lloh0:
	adrp	x25, _DRM_COLOR_LUT_EQUAL_CHANNELS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DRM_COLOR_LUT_EQUAL_CHANNELS@GOTPAGEOFF]
Lloh2:
	adrp	x26, _DRM_COLOR_LUT_NON_DECREASING@GOTPAGE
Lloh3:
	ldr	x26, [x26, _DRM_COLOR_LUT_NON_DECREASING@GOTPAGEOFF]
	add	x27, x22, #16
	mov	w28, #24
Lloh4:
	adrp	x24, l_.str.1@PAGE
Lloh5:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh6:
	adrp	x21, l_.str@PAGE
Lloh7:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	mov	x0, x20
	bl	_drm_color_lut_size
	add	x27, x27, #24
	cmp	x23, w0, sxtw
	b.ge	LBB0_15
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	tst	w8, w19
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x8, x9, [x27, #-16]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	cbz	x23, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	tst	w8, w19
	b.eq	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldur	x9, [x27, #-16]
	sub	w8, w23, #1
	umull	x10, w8, w28
	ldr	x10, [x22, x10]
	cmp	x9, x10
	b.lt	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x27]
	madd	x10, x8, x28, x22
	ldr	x10, [x10, #16]
	cmp	x9, x10
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldur	x9, [x27, #-8]
	madd	x8, x8, x28, x22
	ldr	x8, [x8, #8]
	cmp	x9, x8
	b.ge	LBB0_4
LBB0_13:
	mov	x21, x24
LBB0_14:
	mov	x0, x21
	bl	_DRM_DEBUG_KMS
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_COLOR_LUT_EQUAL_CHANNELS,4,2 ; @DRM_COLOR_LUT_EQUAL_CHANNELS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"All LUT entries must have equal r/g/b\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_COLOR_LUT_NON_DECREASING,4,2 ; @DRM_COLOR_LUT_NON_DECREASING
l_.str.1:                               ; @.str.1
	.asciz	"LUT entries must never decrease.\n"

.subsections_via_symbols
