	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_du_crtc_gamma_set          ## -- Begin function vmw_du_crtc_gamma_set
	.p2align	4, 0x90
_vmw_du_crtc_gamma_set:                 ## @vmw_du_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r13
	movl	(%rdi), %edi
	callq	_vmw_priv
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_3
## %bb.1:
	movq	%r15, %rcx
	movl	%r14d, %eax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_DRM_DEBUG
	movl	%r12d, %r14d
	movq	_SVGA_PALETTE_BASE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	%r14, %rsi
	movl	(%r13), %edx
	sarl	$8, %edx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_vmw_write
	movq	(%rbx), %rax
	leaq	(%r14,%rax), %rsi
	incq	%rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	sarl	$8, %edx
	movq	%r13, %rdi
	callq	_vmw_write
	movq	(%rbx), %rax
	leaq	(%r14,%rax), %rsi
	addq	$2, %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edx
	sarl	$8, %edx
	movq	%r13, %rdi
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	callq	_vmw_write
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	$3, %r12
	incl	%r15d
	addq	$4, %rbx
	addq	$4, %rcx
	addq	$4, %r13
	cmpq	%r12, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d r/g/b = 0x%04x / 0x%04x / 0x%04x\n"

	.comm	_SVGA_PALETTE_BASE,8,3          ## @SVGA_PALETTE_BASE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_du_crtc_gamma_set          ; -- Begin function vmw_du_crtc_gamma_set
	.p2align	2
_vmw_du_crtc_gamma_set:                 ; @vmw_du_crtc_gamma_set
	.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	x24, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	ldr	w0, [x0]
	bl	_vmw_priv
	cmp	w24, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, x0
	mov	w23, #0
	mov	x25, #0
	mov	w8, w24
	add	x26, x8, w24, uxtw #1
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
Lloh2:
	adrp	x27, _SVGA_PALETTE_BASE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _SVGA_PALETTE_BASE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	ldr	w3, [x20]
	ldr	w4, [x19]
	mov	x0, x24
	mov	x1, x23
	bl	_DRM_DEBUG
	ldr	x8, [x27]
	and	x28, x25, #0xffffffff
	add	x1, x8, x28
	ldr	w8, [x21], #4
	asr	w2, w8, #8
	mov	x0, x22
	bl	_vmw_write
	ldr	x8, [x27]
	add	x8, x28, x8
	add	x1, x8, #1
	ldr	w8, [x20], #4
	asr	w2, w8, #8
	mov	x0, x22
	bl	_vmw_write
	ldr	x8, [x27]
	add	x8, x28, x8
	add	x1, x8, #2
	ldr	w8, [x19], #4
	asr	w2, w8, #8
	mov	x0, x22
	bl	_vmw_write
	add	x25, x25, #3
	add	w23, w23, #1
	cmp	x26, x25
	b.ne	LBB0_2
LBB0_3:
	mov	w0, #0
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d r/g/b = 0x%04x / 0x%04x / 0x%04x\n"

	.comm	_SVGA_PALETTE_BASE,8,3          ; @SVGA_PALETTE_BASE
.subsections_via_symbols
