	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cypress_program_display_gap
_cypress_program_display_gap:           ## @cypress_program_display_gap
	.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
	movq	%rdi, %r15
	movq	_CG_DISPLAY_GAP_CNTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_RREG32
	movq	_DISP1_GAP_MASK@GOTPCREL(%rip), %rcx
	movq	_DISP2_GAP_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	cmpl	$0, 4(%r15)
	movq	_R600_PM_DISPLAY_GAP_VBLANK_OR_WM@GOTPCREL(%rip), %r12
	movq	_R600_PM_DISPLAY_GAP_IGNORE@GOTPCREL(%rip), %r13
	movq	%r13, %rax
	cmovgq	%r12, %rax
	movl	(%rax), %edi
	callq	_DISP1_GAP
	orl	%eax, %ebx
	cmpl	$2, 4(%r15)
	cmovgeq	%r12, %r13
	movl	(%r13), %edi
	callq	_DISP2_GAP
	orl	%eax, %ebx
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_WREG32
	movq	_DCCG_DISP_SLOW_SELECT_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movl	4(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_8
## %bb.1:
	movl	%eax, %r14d
	movq	_DCCG_DISP1_SLOW_SELECT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edi
	andl	%r14d, %edi
	movq	_DCCG_DISP1_SLOW_SELECT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edi
	movl	8(%r15), %esi
	btl	%edi, %esi
	jb	LBB0_8
## %bb.2:
	movl	(%r15), %ecx
	xorl	%edi, %edi
	movl	$0, %edx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.3:
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	btl	%edx, %esi
	jb	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%edx
	cmpl	%edx, %ecx
	jne	LBB0_4
## %bb.6:
	movl	%ecx, %edx
LBB0_7:
	cmpl	%ecx, %edx
	cmovnel	%edx, %edi
	notl	%eax
	andl	%eax, %r14d
	callq	_DCCG_DISP1_SLOW_SELECT
	orl	%eax, %r14d
	movl	(%rbx), %edi
	movl	%r14d, %esi
	callq	_WREG32
	movl	4(%r15), %edx
LBB0_8:
	xorl	%esi, %esi
	testl	%edx, %edx
	setg	%sil
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cypress_notify_smc_display_change ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CG_DISPLAY_GAP_CNTL,4,2        ## @CG_DISPLAY_GAP_CNTL
	.comm	_DISP1_GAP_MASK,4,2             ## @DISP1_GAP_MASK
	.comm	_DISP2_GAP_MASK,4,2             ## @DISP2_GAP_MASK
	.comm	_R600_PM_DISPLAY_GAP_VBLANK_OR_WM,4,2 ## @R600_PM_DISPLAY_GAP_VBLANK_OR_WM
	.comm	_R600_PM_DISPLAY_GAP_IGNORE,4,2 ## @R600_PM_DISPLAY_GAP_IGNORE
	.comm	_DCCG_DISP_SLOW_SELECT_REG,4,2  ## @DCCG_DISP_SLOW_SELECT_REG
	.comm	_DCCG_DISP1_SLOW_SELECT_MASK,4,2 ## @DCCG_DISP1_SLOW_SELECT_MASK
	.comm	_DCCG_DISP1_SLOW_SELECT_SHIFT,4,2 ## @DCCG_DISP1_SLOW_SELECT_SHIFT
	.no_dead_strip	_cypress_program_display_gap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cypress_program_display_gap
_cypress_program_display_gap:           ; @cypress_program_display_gap
	.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	x19, x0
Lloh0:
	adrp	x20, _CG_DISPLAY_GAP_CNTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CG_DISPLAY_GAP_CNTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
Lloh2:
	adrp	x8, _DISP1_GAP_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DISP1_GAP_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x9, _DISP2_GAP_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DISP2_GAP_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w21, w0, w8
Lloh8:
	adrp	x22, _R600_PM_DISPLAY_GAP_VBLANK_OR_WM@GOTPAGE
Lloh9:
	ldr	x22, [x22, _R600_PM_DISPLAY_GAP_VBLANK_OR_WM@GOTPAGEOFF]
	ldr	w8, [x19, #4]
Lloh10:
	adrp	x23, _R600_PM_DISPLAY_GAP_IGNORE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _R600_PM_DISPLAY_GAP_IGNORE@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x22, x23, gt
	ldr	w0, [x8]
	bl	_DISP1_GAP
	orr	w21, w0, w21
	ldr	w8, [x19, #4]
	cmp	w8, #1
	csel	x8, x22, x23, gt
	ldr	w0, [x8]
	bl	_DISP2_GAP
	orr	w1, w21, w0
	ldr	w0, [x20]
	bl	_WREG32
Lloh12:
	adrp	x20, _DCCG_DISP_SLOW_SELECT_REG@GOTPAGE
Lloh13:
	ldr	x20, [x20, _DCCG_DISP_SLOW_SELECT_REG@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
Lloh14:
	adrp	x9, _DCCG_DISP1_SLOW_SELECT_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DCCG_DISP1_SLOW_SELECT_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w10, w9, w0
Lloh17:
	adrp	x11, _DCCG_DISP1_SLOW_SELECT_SHIFT@GOTPAGE
Lloh18:
	ldr	x11, [x11, _DCCG_DISP1_SLOW_SELECT_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	asr	w11, w10, w11
	ldr	w10, [x19, #8]
	lsr	w11, w10, w11
	tbnz	w11, #0, LBB0_9
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	w11, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w12, w10, w11
	tbnz	w12, #0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w11, w11, #1
	cmp	w8, w11
	b.ne	LBB0_4
; %bb.6:
	mov	x11, x8
	b	LBB0_8
LBB0_7:
	mov	w11, #0
LBB0_8:
	cmp	w11, w8
	csel	w8, wzr, w11, eq
	bic	w21, w0, w9
	mov	x0, x8
	bl	_DCCG_DISP1_SLOW_SELECT
	orr	w1, w0, w21
	ldr	w0, [x20]
	bl	_WREG32
	ldr	w8, [x19, #4]
LBB0_9:
	cmp	w8, #0
	cset	w1, gt
	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	_cypress_notify_smc_display_change
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CG_DISPLAY_GAP_CNTL,4,2        ; @CG_DISPLAY_GAP_CNTL
	.comm	_DISP1_GAP_MASK,4,2             ; @DISP1_GAP_MASK
	.comm	_DISP2_GAP_MASK,4,2             ; @DISP2_GAP_MASK
	.comm	_R600_PM_DISPLAY_GAP_VBLANK_OR_WM,4,2 ; @R600_PM_DISPLAY_GAP_VBLANK_OR_WM
	.comm	_R600_PM_DISPLAY_GAP_IGNORE,4,2 ; @R600_PM_DISPLAY_GAP_IGNORE
	.comm	_DCCG_DISP_SLOW_SELECT_REG,4,2  ; @DCCG_DISP_SLOW_SELECT_REG
	.comm	_DCCG_DISP1_SLOW_SELECT_MASK,4,2 ; @DCCG_DISP1_SLOW_SELECT_MASK
	.comm	_DCCG_DISP1_SLOW_SELECT_SHIFT,4,2 ; @DCCG_DISP1_SLOW_SELECT_SHIFT
	.no_dead_strip	_cypress_program_display_gap
.subsections_via_symbols
