	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skylake_get_pfit_config
_skylake_get_pfit_config:               ## @skylake_get_pfit_config
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	callq	_to_i915
	cmpl	$0, (%r15)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_PS_SCALER_EN@GOTPCREL(%rip), %r12
	movq	_PS_PLANE_SEL_MASK@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpl	(%r15), %ebx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %edi
	movl	%ebx, %esi
	callq	_SKL_PS_CTRL
	movl	%eax, %edi
	callq	_I915_READ
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, (%r13)
	jne	LBB0_4
## %bb.6:
	movl	$1, (%r14)
	movl	4(%r15), %edi
	movl	%ebx, %esi
	callq	_SKL_PS_WIN_POS
	movl	%eax, %edi
	callq	_I915_READ
	movq	%rax, 16(%r14)
	movl	4(%r15), %edi
	movl	%ebx, %esi
	callq	_SKL_PS_WIN_SZ
	movl	%eax, %edi
	callq	_I915_READ
	movq	%rax, 8(%r14)
	movq	32(%r14), %rax
	movl	$1, (%rax,%rbx,4)
	movl	%ebx, 24(%r14)
	movq	_SKL_CRTC_INDEX@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	orl	%eax, 28(%r14)
	jmp	LBB0_7
LBB0_5:
	movl	$-1, 24(%r14)
	movq	_SKL_CRTC_INDEX@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$-2, %eax
	roll	%cl, %eax
	andl	%eax, 28(%r14)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PS_SCALER_EN,4,2               ## @PS_SCALER_EN
	.comm	_PS_PLANE_SEL_MASK,4,2          ## @PS_PLANE_SEL_MASK
	.comm	_SKL_CRTC_INDEX,4,2             ## @SKL_CRTC_INDEX
	.no_dead_strip	_skylake_get_pfit_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skylake_get_pfit_config
_skylake_get_pfit_config:               ; @skylake_get_pfit_config
	.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, x1
	mov	x21, x0
	ldr	x0, [x0, #8]
	bl	_to_i915
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x20, #0
Lloh0:
	adrp	x22, _PS_SCALER_EN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PS_SCALER_EN@GOTPAGEOFF]
Lloh2:
	adrp	x23, _PS_PLANE_SEL_MASK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PS_PLANE_SEL_MASK@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	add	x20, x20, #1
	cmp	w20, w8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #4]
	mov	x1, x20
	bl	_SKL_PS_CTRL
	bl	_I915_READ
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.5:
	mov	w22, #1
	str	w22, [x19]
	ldr	w0, [x21, #4]
	mov	x1, x20
	bl	_SKL_PS_WIN_POS
	bl	_I915_READ
	str	x0, [x19, #16]
	ldr	w0, [x21, #4]
	mov	x1, x20
	bl	_SKL_PS_WIN_SZ
	bl	_I915_READ
	str	x0, [x19, #8]
	ldr	x8, [x19, #32]
	str	w22, [x8, x20, lsl #2]
Lloh4:
	adrp	x8, _SKL_CRTC_INDEX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SKL_CRTC_INDEX@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	lsl	w8, w22, w8
	ldr	w9, [x19, #28]
	orr	w8, w9, w8
	stp	w20, w8, [x19, #24]
	b	LBB0_7
LBB0_6:
	mov	w8, #-1
Lloh7:
	adrp	x9, _SKL_CRTC_INDEX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SKL_CRTC_INDEX@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	ldr	w10, [x19, #28]
	bic	w9, w10, w9
	stp	w8, w9, [x19, #24]
LBB0_7:
	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
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PS_SCALER_EN,4,2               ; @PS_SCALER_EN
	.comm	_PS_PLANE_SEL_MASK,4,2          ; @PS_PLANE_SEL_MASK
	.comm	_SKL_CRTC_INDEX,4,2             ; @SKL_CRTC_INDEX
	.no_dead_strip	_skylake_get_pfit_config
.subsections_via_symbols
