	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chv_cgm_mode
_chv_cgm_mode:                          ## @chv_cgm_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_crtc_state_is_legacy_gamma
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_8
## %bb.1:
	xorl	%ecx, %ecx
	cmpq	$0, 16(%rbx)
	movl	$0, %edx
	je	LBB0_3
## %bb.2:
	movq	_CGM_PIPE_MODE_DEGAMMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_3:
	cmpq	$0, 8(%rbx)
	movl	$0, %eax
	je	LBB0_5
## %bb.4:
	movq	_CGM_PIPE_MODE_CSC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	orl	%edx, %eax
	cmpq	$0, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	_CGM_PIPE_MODE_GAMMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_7:
	orl	%ecx, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CGM_PIPE_MODE_DEGAMMA,4,2      ## @CGM_PIPE_MODE_DEGAMMA
	.comm	_CGM_PIPE_MODE_CSC,4,2          ## @CGM_PIPE_MODE_CSC
	.comm	_CGM_PIPE_MODE_GAMMA,4,2        ## @CGM_PIPE_MODE_GAMMA
	.no_dead_strip	_chv_cgm_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chv_cgm_mode
_chv_cgm_mode:                          ; @chv_cgm_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
	mov	x19, x0
	bl	_crtc_state_is_legacy_gamma
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _CGM_PIPE_MODE_DEGAMMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CGM_PIPE_MODE_DEGAMMA@GOTPAGEOFF]
	ldp	x10, x9, [x19, #8]
Lloh2:
	ldr	w8, [x8]
	cmp	x9, #0
	csel	w8, wzr, w8, eq
Lloh3:
	adrp	x9, _CGM_PIPE_MODE_CSC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CGM_PIPE_MODE_CSC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	x11, [x19]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _CGM_PIPE_MODE_GAMMA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CGM_PIPE_MODE_GAMMA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x11, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CGM_PIPE_MODE_DEGAMMA,4,2      ; @CGM_PIPE_MODE_DEGAMMA
	.comm	_CGM_PIPE_MODE_CSC,4,2          ; @CGM_PIPE_MODE_CSC
	.comm	_CGM_PIPE_MODE_GAMMA,4,2        ; @CGM_PIPE_MODE_GAMMA
	.no_dead_strip	_chv_cgm_mode
.subsections_via_symbols
