	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function icl_gamma_mode
_icl_gamma_mode:                        ## @icl_gamma_mode
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%ebx, %ebx
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_PRE_CSC_GAMMA_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	cmpq	$0, (%rdi)
	je	LBB0_3
## %bb.4:
	xorl	%r14d, %r14d
	cmpl	$0, 16(%rdi)
	jne	LBB0_6
## %bb.5:
	movq	_POST_CSC_GAMMA_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	callq	_crtc_state_is_legacy_gamma
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	movq	_GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movq	_GAMMA_MODE_MODE_8BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movq	_GAMMA_MODE_MODE_8BIT@GOTPCREL(%rip), %rax
LBB0_9:
	orl	%r14d, %ebx
LBB0_10:
	orl	(%rax), %ebx
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRE_CSC_GAMMA_ENABLE,4,2       ## @PRE_CSC_GAMMA_ENABLE
	.comm	_POST_CSC_GAMMA_ENABLE,4,2      ## @POST_CSC_GAMMA_ENABLE
	.comm	_GAMMA_MODE_MODE_8BIT,4,2       ## @GAMMA_MODE_MODE_8BIT
	.comm	_GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED,4,2 ## @GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED
	.no_dead_strip	_icl_gamma_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function icl_gamma_mode
_icl_gamma_mode:                        ; @icl_gamma_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _PRE_CSC_GAMMA_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRE_CSC_GAMMA_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	x10, x9, [x0]
	cmp	x9, #0
	csel	w19, wzr, w8, eq
Lloh3:
	adrp	x20, _GAMMA_MODE_MODE_8BIT@GOTPAGE
Lloh4:
	ldr	x20, [x20, _GAMMA_MODE_MODE_8BIT@GOTPAGEOFF]
	cbz	x10, LBB0_2
; %bb.1:
	ldr	w8, [x0, #16]
Lloh5:
	adrp	x9, _POST_CSC_GAMMA_ENABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _POST_CSC_GAMMA_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, wzr, eq
	orr	w19, w8, w19
	bl	_crtc_state_is_legacy_gamma
Lloh8:
	adrp	x8, _GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED@GOTPAGEOFF]
	cmp	x0, #0
	csel	x20, x8, x20, eq
LBB0_2:
	ldr	w8, [x20]
	orr	w0, w8, w19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PRE_CSC_GAMMA_ENABLE,4,2       ; @PRE_CSC_GAMMA_ENABLE
	.comm	_POST_CSC_GAMMA_ENABLE,4,2      ; @POST_CSC_GAMMA_ENABLE
	.comm	_GAMMA_MODE_MODE_8BIT,4,2       ; @GAMMA_MODE_MODE_8BIT
	.comm	_GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED,4,2 ; @GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED
	.no_dead_strip	_icl_gamma_mode
.subsections_via_symbols
