	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g4x_update_gamma
_g4x_update_gamma:                      ## @g4x_update_gamma
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movl	8(%rdi), %edi
	callq	_to_intel_plane
	movq	%rax, %r14
	movl	4(%rax), %edi
	callq	_to_i915
	movq	(%rbx), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	(%r14), %ebx
	leaq	-64(%rbp), %rdi
	callq	_i9xx_plane_linear_gamma
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_DVSGAMC_G4X
	movl	-60(%rbp), %ecx
	movl	%ecx, %esi
	shll	$8, %esi
	orl	%ecx, %esi
	shll	$16, %ecx
	orl	%ecx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_DVSGAMC_G4X
	movl	-56(%rbp), %ecx
	movl	%ecx, %esi
	shll	$8, %esi
	orl	%ecx, %esi
	shll	$16, %ecx
	orl	%ecx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_DVSGAMC_G4X
	movl	-52(%rbp), %ecx
	movl	%ecx, %esi
	shll	$8, %esi
	orl	%ecx, %esi
	shll	$16, %ecx
	orl	%ecx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%ebx, %edi
	movl	$3, %esi
	callq	_DVSGAMC_G4X
	movl	-48(%rbp), %ecx
	movl	%ecx, %esi
	shll	$8, %esi
	orl	%ecx, %esi
	shll	$16, %ecx
	orl	%ecx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_DVSGAMC_G4X
	movl	-44(%rbp), %ecx
	movl	%ecx, %esi
	shll	$8, %esi
	orl	%ecx, %esi
	shll	$16, %ecx
	orl	%ecx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%ebx, %edi
	movl	$5, %esi
	callq	_DVSGAMC_G4X
	movl	-40(%rbp), %ecx
	movl	%ecx, %esi
	shll	$8, %esi
	orl	%ecx, %esi
	shll	$16, %ecx
	orl	%ecx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_g4x_update_gamma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g4x_update_gamma
_g4x_update_gamma:                      ; @g4x_update_gamma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	w0, [x0, #8]
	bl	_to_intel_plane
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w19, [x19]
	add	x0, sp, #8
	bl	_i9xx_plane_linear_gamma
	mov	x0, x19
	mov	w1, #0
	bl	_DVSGAMC_G4X
	ldr	w8, [sp, #12]
	orr	w9, w8, w8, lsl #8
	orr	w1, w9, w8, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	w1, #1
	bl	_DVSGAMC_G4X
	ldr	w8, [sp, #16]
	orr	w9, w8, w8, lsl #8
	orr	w1, w9, w8, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	w1, #2
	bl	_DVSGAMC_G4X
	ldr	w8, [sp, #20]
	orr	w9, w8, w8, lsl #8
	orr	w1, w9, w8, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	w1, #3
	bl	_DVSGAMC_G4X
	ldr	w8, [sp, #24]
	orr	w9, w8, w8, lsl #8
	orr	w1, w9, w8, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	w1, #4
	bl	_DVSGAMC_G4X
	ldr	w8, [sp, #28]
	orr	w9, w8, w8, lsl #8
	orr	w1, w9, w8, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	w1, #5
	bl	_DVSGAMC_G4X
	ldr	w8, [sp, #32]
	orr	w9, w8, w8, lsl #8
	orr	w1, w9, w8, lsl #16
	bl	_I915_WRITE_FW
LBB0_2:
	ldur	x8, [x29, #-24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_g4x_update_gamma
.subsections_via_symbols
