	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv_crtc_gamma_set
_nv_crtc_gamma_set:                     ## @nv_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, %r15
	movq	%rdx, %r12
	movq	%rsi, %rbx
	addl	%r8d, %r9d
	cmpl	$256, %r9d                      ## imm = 0x100
	movl	$256, %r14d                     ## imm = 0x100
	cmovll	%r9d, %r14d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_nouveau_crtc
	movl	%r14d, %edi
	subl	%r13d, %edi
	jle	LBB0_5
## %bb.1:
	movslq	%r13d, %rcx
	movslq	%r14d, %rdx
	movq	%rcx, %rsi
	notq	%rsi
	testb	$1, %dil
	je	LBB0_3
## %bb.2:
	movq	(%rbx,%rcx,8), %r8
	movq	24(%rax), %rdi
	movq	%r8, (%rdi,%rcx,8)
	movq	(%r12,%rcx,8), %r8
	movq	16(%rax), %rdi
	movq	%r8, (%rdi,%rcx,8)
	movq	(%r15,%rcx,8), %r8
	movq	8(%rax), %rdi
	movq	%r8, (%rdi,%rcx,8)
	incq	%rcx
LBB0_3:
	addq	%rdx, %rsi
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%rcx,8), %rsi
	movq	24(%rax), %rdi
	movq	%rsi, (%rdi,%rcx,8)
	movq	(%r12,%rcx,8), %rsi
	movq	16(%rax), %rdi
	movq	%rsi, (%rdi,%rcx,8)
	movq	(%r15,%rcx,8), %rsi
	movq	8(%rax), %rdi
	movq	%rsi, (%rdi,%rcx,8)
	movq	8(%rbx,%rcx,8), %rsi
	movq	24(%rax), %rdi
	movq	%rsi, 8(%rdi,%rcx,8)
	movq	8(%r12,%rcx,8), %rsi
	movq	16(%rax), %rdi
	movq	%rsi, 8(%rdi,%rcx,8)
	movq	8(%r15,%rcx,8), %rsi
	movq	8(%rax), %rdi
	movq	%rsi, 8(%rdi,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_4
LBB0_5:
	cmpl	$0, 32(%rax)
	je	LBB0_6
## %bb.7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv_crtc_gamma_load             ## TAILCALL
LBB0_6:
	movq	$0, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nv_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 nv_crtc_gamma_set
_nv_crtc_gamma_set:                     ; @nv_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	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	add	w8, w5, w4
	mov	w9, #256
	cmp	w8, #256
	csel	w24, w8, w9, lt
	bl	_nouveau_crtc
	cmp	w24, w23
	b.le	LBB0_3
; %bb.1:
	sxtw	x8, w23
	sxtw	x9, w24
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x10, x8, #3
	ldr	x11, [x22, x10]
	ldr	x12, [x0, #24]
	str	x11, [x12, x10]
	ldr	x11, [x21, x10]
	ldr	x12, [x0, #16]
	str	x11, [x12, x10]
	ldr	x11, [x20, x10]
	ldr	x12, [x0, #8]
	str	x11, [x12, x10]
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_2
LBB0_3:
	ldr	w8, [x0, #32]
	cbz	w8, LBB0_5
; %bb.4:
	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	_nv_crtc_gamma_load
LBB0_5:
	str	xzr, [x0]
	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
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nv_crtc_gamma_set
.subsections_via_symbols
