	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setcmap_new_gamma_lut
_setcmap_new_gamma_lut:                 ## @setcmap_new_gamma_lut
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_25
## %bb.1:
	movq	%rsi, %r15
	movl	4(%rsi), %eax
	addl	(%rsi), %eax
	cmpl	%r12d, %eax
	jle	LBB0_2
LBB0_25:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_2:
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	leal	(,%r12,8), %eax
	leal	(%rax,%rax,2), %esi
	xorl	%edx, %edx
	callq	_drm_property_create_blob
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_24
## %bb.3:
	movq	(%r14), %r9
	movl	(%r15), %edi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.6:
	movq	8(%rbx), %r11
	movslq	(%rbx), %rsi
	leaq	(%r11,%rsi,8), %r13
	leaq	(,%rsi,8), %r10
	addq	%r13, %r10
	testl	%edi, %edi
	jle	LBB0_14
## %bb.7:
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	cmpl	$1, %edi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_9
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_4:
	cmpl	%r12d, 4(%r15)
	je	LBB0_21
## %bb.5:
	movq	8(%rbx), %r11
	movslq	(%rbx), %rax
	leaq	(%r11,%rax,8), %r13
	leaq	(,%rax,8), %r10
	addq	%r13, %r10
	jmp	LBB0_14
LBB0_9:
	movl	%edi, %r9d
	andl	$-2, %r9d
	leaq	8(%r11), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	40(%rax), %rdx
	movq	%rsi, %rax
	shlq	$4, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%rdi), %r8
	movq	%r8, -24(%rdx)
	movq	-8(%rdi,%rsi,8), %rcx
	movq	%rcx, -32(%rdx)
	movq	-8(%rdi,%rax), %rcx
	movq	%rcx, -40(%rdx)
	movq	(%rdi), %rcx
	movq	%rcx, (%rdx)
	movq	(%rdi,%rsi,8), %rcx
	movq	%rcx, -8(%rdx)
	movq	(%rdi,%rax), %rcx
	movq	%rcx, -16(%rdx)
	addq	$2, %rbx
	addq	$16, %rdi
	addq	$48, %rdx
	cmpq	%rbx, %r9
	jne	LBB0_10
LBB0_11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testb	$1, %dil
	jne	LBB0_13
## %bb.12:
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	jmp	LBB0_14
LBB0_13:
	movq	(%r11,%rbx,8), %rax
	leaq	(%rbx,%rbx,2), %rcx
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	%rax, 16(%r9,%rcx,8)
	movq	(%r13,%rbx,8), %rax
	movq	%rax, 8(%r9,%rcx,8)
	movq	(%r10,%rbx,8), %rax
	movq	%rax, (%r9,%rcx,8)
LBB0_14:
	movl	4(%r15), %ebx
	leal	(%rbx,%rdi), %ecx
	cmpl	%r12d, %ecx
	jge	LBB0_20
## %bb.15:
	movslq	%ecx, %rax
	movl	%r12d, %edx
	subl	%ecx, %edx
	movq	%rax, %rcx
	notq	%rcx
	testb	$1, %dl
	je	LBB0_17
## %bb.16:
	movq	(%r11,%rax,8), %rdx
	leaq	(%rax,%rax,2), %rsi
	movq	%rdx, 16(%r9,%rsi,8)
	movq	(%r13,%rax,8), %rdx
	movq	%rdx, 8(%r9,%rsi,8)
	movq	(%r10,%rax,8), %rdx
	movq	%rdx, (%r9,%rsi,8)
	incq	%rax
LBB0_17:
	addq	%r12, %rcx
	je	LBB0_20
## %bb.18:
	leaq	(%rax,%rax,2), %rcx
	leaq	(%r9,%rcx,8), %rcx
	addq	$40, %rcx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r11,%rax,8), %rdx
	movq	%rdx, -24(%rcx)
	movq	(%r13,%rax,8), %rdx
	movq	%rdx, -32(%rcx)
	movq	(%r10,%rax,8), %rdx
	movq	%rdx, -40(%rcx)
	movq	8(%r11,%rax,8), %rdx
	movq	%rdx, (%rcx)
	movq	8(%r13,%rax,8), %rdx
	movq	%rdx, -8(%rcx)
	movq	8(%r10,%rax,8), %rdx
	movq	%rdx, -16(%rcx)
	addq	$2, %rax
	addq	$48, %rcx
	cmpq	%r12, %rax
	jl	LBB0_19
LBB0_20:
	movl	%ebx, %r12d
LBB0_21:
	testl	%r12d, %r12d
	jle	LBB0_24
## %bb.22:
	movslq	%edi, %rdi
	movq	24(%r15), %r8
	movq	8(%r15), %rcx
	movq	16(%r15), %rdx
	movl	%r12d, %esi
	leaq	(%rdi,%rdi,2), %rdi
	leaq	(%r9,%rdi,8), %rdi
	addq	$16, %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r8,%rbx,8), %rax
	movq	%rax, (%rdi)
	movq	(%rdx,%rbx,8), %rax
	movq	%rax, -8(%rdi)
	movq	(%rcx,%rbx,8), %rax
	movq	%rax, -16(%rdi)
	incq	%rbx
	addq	$24, %rdi
	cmpq	%rbx, %rsi
	jne	LBB0_23
LBB0_24:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_setcmap_new_gamma_lut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setcmap_new_gamma_lut
_setcmap_new_gamma_lut:                 ; @setcmap_new_gamma_lut
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w22, [x0]
	cbz	w22, LBB0_2
; %bb.1:
	mov	x20, x1
	ldp	w8, w9, [x1]
	add	w8, w9, w8
	cmp	w8, w22
	b.le	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_3:
	mov	x21, x0
	ldr	x0, [x0, #16]
	add	w8, w22, w22, lsl #1
	lsl	w1, w8, #3
	mov	x2, #0
	bl	_drm_property_create_blob
	mov	x19, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_33
; %bb.4:
	ldr	x8, [x19]
	ldr	w13, [x20]
	sxtw	x9, w13
	cbz	w13, LBB0_8
; %bb.5:
	ldr	x10, [x21, #8]
	ldrsw	x15, [x21]
	lsl	x16, x15, #3
	add	x11, x10, x16
	add	x12, x11, x16
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.6:
	cmp	w13, #1
	b.ne	LBB0_10
; %bb.7:
	mov	x14, #0
	b	LBB0_16
LBB0_8:
	ldr	w10, [x20, #4]
	mov	x13, x22
	cmp	w10, w22
	b.eq	LBB0_28
; %bb.9:
	ldr	x10, [x21, #8]
	ldrsw	x11, [x21]
	lsl	x12, x11, #3
	add	x11, x10, x12
	add	x12, x11, x12
	b	LBB0_18
LBB0_10:
	mov	x14, #0
	mov	w17, #24
	madd	x1, x13, x17, x8
	add	x17, x15, x13
	add	x17, x10, x17, lsl #3
	add	x0, x10, x13, lsl #3
	cmp	x8, x17
	ccmp	x11, x1, #2, lo
	cset	w17, lo
	cmp	x8, x0
	ccmp	x10, x1, #2, lo
	cset	w0, lo
	cmp	x12, x1
	add	x1, x13, x15, lsl #1
	add	x1, x10, x1, lsl #3
	ccmp	x8, x1, #2, lo
	b.lo	LBB0_16
; %bb.11:
	tbnz	w17, #0, LBB0_16
; %bb.12:
	tbnz	w0, #0, LBB0_16
; %bb.13:
	and	x14, x13, #0xfffffffe
	mov	x17, x14
	mov	x0, x8
	mov	x1, x10
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	q2, [x1]
	ldr	q1, [x1, x16]
	ldr	q0, [x1, x15, lsl #4]
	st3.2d	{ v0, v1, v2 }, [x0], #48
	add	x1, x1, #16
	subs	x17, x17, #2
	b.ne	LBB0_14
; %bb.15:
	cmp	x14, x13
	b.eq	LBB0_18
LBB0_16:
	mov	w15, #24
	mul	x15, x14, x15
	add	x15, x8, x15
	add	x15, x15, #16
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	lsl	x16, x14, #3
	ldr	x17, [x10, x16]
	str	x17, [x15]
	ldr	x17, [x11, x16]
	stur	x17, [x15, #-8]
	ldr	x16, [x12, x16]
	stur	x16, [x15, #-16]
	add	x14, x14, #1
	add	x15, x15, #24
	cmp	x13, x14
	b.ne	LBB0_17
LBB0_18:
	ldr	w13, [x20, #4]
	add	w15, w13, w9
	cmp	w15, w22
	b.ge	LBB0_28
; %bb.19:
	sxtw	x14, w22
	sxtw	x15, w15
	sub	x16, x14, x15
	cmp	x16, #2
	b.lo	LBB0_26
; %bb.20:
	mov	w17, #24
	mul	x0, x15, x17
	add	x1, x8, x0
	madd	x2, x14, x17, x8
	lsl	x3, x15, #3
	lsl	x0, x14, #3
	add	x4, x12, x0
	add	x17, x11, x3
	add	x5, x10, x3
	add	x6, x11, x0
	cmp	x1, x6
	ccmp	x17, x2, #2, lo
	cset	w17, lo
	add	x0, x10, x0
	cmp	x1, x0
	ccmp	x5, x2, #2, lo
	cset	w0, lo
	add	x5, x12, x3
	cmp	x5, x2
	ccmp	x1, x4, #2, lo
	b.lo	LBB0_26
; %bb.21:
	tbnz	w17, #0, LBB0_26
; %bb.22:
	tbnz	w0, #0, LBB0_26
; %bb.23:
	and	x17, x16, #0xfffffffffffffffe
	add	x0, x17, x15
	add	x1, x10, x3
	add	x2, x11, x3
	add	x3, x12, x3
	mov	w4, #24
	mul	x15, x15, x4
	add	x15, x8, x15
	mov	x4, x17
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	q2, [x1], #16
	ldr	q1, [x2], #16
	ldr	q0, [x3], #16
	st3.2d	{ v0, v1, v2 }, [x15], #48
	subs	x4, x4, #2
	b.ne	LBB0_24
; %bb.25:
	mov	x15, x0
	cmp	x16, x17
	b.eq	LBB0_28
LBB0_26:
	mov	w16, #24
	mul	x16, x15, x16
	add	x16, x8, x16
	add	x16, x16, #8
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	lsl	x17, x15, #3
	ldr	x0, [x10, x17]
	str	x0, [x16, #8]
	ldr	x0, [x11, x17]
	str	x0, [x16]
	ldr	x17, [x12, x17]
	stur	x17, [x16, #-8]
	add	x15, x15, #1
	add	x16, x16, #24
	cmp	x15, x14
	b.lt	LBB0_27
LBB0_28:
	cmp	w13, #1
	b.lt	LBB0_33
; %bb.29:
	ldp	x10, x12, [x20, #16]
	mov	w14, w13
	ldr	x11, [x20, #8]
	cmp	w13, #1
	b.ne	LBB0_34
; %bb.30:
	mov	x13, #0
LBB0_31:
	sub	x14, x14, x13
	lsl	x15, x13, #3
	add	x12, x12, x15
	add	x9, x13, x9
	mov	w13, #24
	mul	x9, x9, x13
	add	x8, x8, x9
	add	x8, x8, #8
	add	x9, x11, x15
	add	x10, x10, x15
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x12], #8
	str	x11, [x8, #8]
	ldr	x11, [x10], #8
	str	x11, [x8]
	ldr	x11, [x9], #8
	stur	x11, [x8, #-8]
	add	x8, x8, #24
	subs	x14, x14, #1
	b.ne	LBB0_32
LBB0_33:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_34:
	mov	x13, #0
	mov	w15, #24
	mul	x16, x9, x15
	add	x17, x8, x16
	add	x16, x9, x14
	mul	x15, x16, x15
	add	x0, x8, x15
	lsl	x1, x14, #3
	add	x15, x10, x1
	cmp	x17, x15
	ccmp	x10, x0, #2, lo
	cset	w15, lo
	add	x16, x11, x1
	cmp	x17, x16
	ccmp	x11, x0, #2, lo
	cset	w16, lo
	cmp	x12, x0
	add	x0, x12, x1
	ccmp	x17, x0, #2, lo
	b.lo	LBB0_31
; %bb.35:
	tbnz	w15, #0, LBB0_31
; %bb.36:
	tbnz	w16, #0, LBB0_31
; %bb.37:
	and	x13, x14, #0xfffffffe
	mov	w15, #24
	mul	x15, x9, x15
	add	x15, x8, x15
	mov	x16, x13
	mov	x17, x11
	mov	x0, x10
	mov	x1, x12
LBB0_38:                                ; =>This Inner Loop Header: Depth=1
	ldr	q2, [x1], #16
	ldr	q1, [x0], #16
	ldr	q0, [x17], #16
	st3.2d	{ v0, v1, v2 }, [x15], #48
	subs	x16, x16, #2
	b.ne	LBB0_38
; %bb.39:
	cmp	x13, x14
	b.ne	LBB0_31
	b	LBB0_33
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_setcmap_new_gamma_lut
.subsections_via_symbols
