	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_crtc_gamma_set
_intel_crtc_gamma_set:                  ## @intel_crtc_gamma_set
	.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
	movl	%r8d, %r13d
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %rbx
	addl	%r8d, %r9d
	cmpl	$256, %r9d                      ## imm = 0x100
	movl	$256, %r15d                     ## imm = 0x100
	cmovll	%r9d, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_to_intel_crtc
	movl	%r15d, %r9d
	subl	%r13d, %r9d
	jle	LBB0_5
## %bb.1:
	movq	(%rax), %rcx
	movq	8(%rax), %rdx
	movq	16(%rax), %rax
	movslq	%r13d, %rsi
	movslq	%r15d, %r10
	movq	%rsi, %r8
	notq	%r8
	testb	$1, %r9b
	je	LBB0_3
## %bb.2:
	movl	(%rbx,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, (%rcx,%rsi,4)
	movl	(%r12,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, (%rdx,%rsi,4)
	movl	(%r14,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, (%rax,%rsi,4)
	incq	%rsi
LBB0_3:
	addq	%r10, %r8
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, (%rcx,%rsi,4)
	movl	(%r12,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, (%rdx,%rsi,4)
	movl	(%r14,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, (%rax,%rsi,4)
	movl	4(%rbx,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, 4(%rcx,%rsi,4)
	movl	4(%r12,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, 4(%rdx,%rsi,4)
	movl	4(%r14,%rsi,4), %edi
	sarl	$8, %edi
	movl	%edi, 4(%rax,%rsi,4)
	addq	$2, %rsi
	cmpq	%rsi, %r10
	jne	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_crtc_load_lut            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_intel_crtc_gamma_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_crtc_gamma_set
_intel_crtc_gamma_set:                  ; @intel_crtc_gamma_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	add	w8, w5, w4
	mov	w9, #256
	cmp	w8, #256
	csel	w24, w8, w9, lt
	bl	_to_intel_crtc
	cmp	w24, w22
	b.le	LBB0_3
; %bb.1:
	mov	x8, #0
	ldp	x10, x12, [x0]
	sxtw	x15, w22
	sxtw	x16, w24
	sbfiz	x14, x22, #2, #32
	add	x9, x23, x14
	add	x10, x10, x14
	ldr	x17, [x0, #16]
	add	x11, x21, x14
	add	x12, x12, x14
	add	x13, x20, x14
	add	x14, x17, x14
	sub	x15, x16, x15
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x16, x8, #2
	ldr	w17, [x9, x16]
	asr	w17, w17, #8
	str	w17, [x10, x16]
	ldr	w17, [x11, x16]
	asr	w17, w17, #8
	str	w17, [x12, x16]
	ldr	w17, [x13, x16]
	asr	w17, w17, #8
	str	w17, [x14, x16]
	add	x8, x8, #1
	cmp	x15, x8
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_intel_crtc_load_lut
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_intel_crtc_gamma_set
.subsections_via_symbols
