	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_crtc_gamma_set
_nv50_crtc_gamma_set:                   ## @nv50_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, %r15
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	callq	_nouveau_crtc
	movq	%rax, %rbx
	addq	%r15, %r12
	movl	$256, %esi                      ## imm = 0x100
	movq	%r12, %rdi
	callq	_max
	cmpq	%r15, %rax
	jbe	LBB0_6
## %bb.1:
	movl	%eax, %edx
	subl	%r15d, %edx
	leaq	1(%r15), %rcx
	testb	$1, %dl
	je	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx,%r15,8), %rdx
	movq	16(%rbx), %rsi
	movq	%rdx, (%rsi,%r15,8)
	movq	(%r13,%r15,8), %rdx
	movq	8(%rbx), %rsi
	movq	%rdx, (%rsi,%r15,8)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx,%r15,8), %rdx
	movq	(%rbx), %rsi
	movq	%rdx, (%rsi,%r15,8)
	movq	%rcx, %r15
LBB0_3:
	cmpq	%rcx, %rax
	je	LBB0_6
## %bb.4:
	subq	%r15, %rax
	leaq	(,%r15,8), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%r15,8), %r8
	addq	$8, %r8
	leaq	8(,%r15,8), %r9
	addq	%r13, %r9
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%r15,8), %r10
	addq	$8, %r10
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%r10,%rdx,8), %rsi
	movq	16(%rbx), %rdi
	addq	%rcx, %rdi
	movq	%rsi, (%rdi,%rdx,8)
	movq	-8(%r9,%rdx,8), %rsi
	movq	8(%rbx), %rdi
	addq	%rcx, %rdi
	movq	%rsi, (%rdi,%rdx,8)
	movq	-8(%r8,%rdx,8), %rsi
	movq	(%rbx), %rdi
	addq	%rcx, %rdi
	movq	%rsi, (%rdi,%rdx,8)
	movq	(%r10,%rdx,8), %rsi
	movq	16(%rbx), %rdi
	addq	%rcx, %rdi
	movq	%rsi, 8(%rdi,%rdx,8)
	movq	(%r9,%rdx,8), %rsi
	movq	8(%rbx), %rdi
	addq	%rcx, %rdi
	movq	%rsi, 8(%rdi,%rdx,8)
	movq	(%r8,%rdx,8), %rsi
	movq	(%rbx), %rdi
	addq	%rcx, %rdi
	movq	%rsi, 8(%rdi,%rdx,8)
	addq	$2, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv50_crtc_lut_load             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nv50_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 nv50_crtc_gamma_set
_nv50_crtc_gamma_set:                   ; @nv50_crtc_gamma_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x25, x5
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	bl	_nouveau_crtc
	mov	x24, x0
	add	x0, x25, x19
	mov	w1, #256
	bl	_max
	cmp	x0, x19
	b.ls	LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x19, #3
	ldr	x9, [x23, x8]
	ldr	x10, [x24, #16]
	str	x9, [x10, x8]
	ldr	x9, [x21, x8]
	ldr	x10, [x24, #8]
	str	x9, [x10, x8]
	ldr	x9, [x20, x8]
	ldr	x10, [x24]
	str	x9, [x10, x8]
	add	x19, x19, #1
	cmp	x0, x19
	b.ne	LBB0_1
LBB0_2:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nv50_crtc_lut_load
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nv50_crtc_gamma_set
.subsections_via_symbols
