	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skylake_pfit_enable
_skylake_pfit_enable:                   ## @skylake_pfit_enable
	.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, %r12
	movl	40(%rdi), %edi
	callq	_to_intel_crtc
	movq	%rax, %rbx
	movl	4(%rax), %edi
	callq	_to_i915
	cmpq	$0, 16(%r12)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %r14d
	movq	24(%r12), %rdi
	shrq	$63, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	8(%r12), %eax
	movzwl	%ax, %edi
	movl	%eax, %esi
	shrl	$16, %esi
	movl	(%r12), %eax
	movl	4(%r12), %ecx
	shll	$16, %eax
	cltd
	idivl	%esi
	movl	%eax, %esi
	shll	$16, %ecx
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%eax, %ebx
	movl	$1, %edi
	xorl	%edx, %edx
	callq	_skl_scaler_calc_phase
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$1, %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_skl_scaler_calc_phase
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%r12), %rbx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SKL_PS_CTRL
	movq	_PS_SCALER_EN@GOTPCREL(%rip), %rcx
	movq	_PS_FILTER_MEDIUM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	32(%r12), %rcx
	movslq	%ebx, %r15
	orl	(%rcx,%r15,4), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_VPHASE
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_PS_Y_PHASE
	movl	%eax, %r13d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PS_UV_RGB_PHASE
	orl	%eax, %r13d
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_HPHASE
	movl	%eax, %r13d
	xorl	%edi, %edi
	callq	_PS_Y_PHASE
	movl	%eax, %ebx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_PS_UV_RGB_PHASE
	orl	%eax, %ebx
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_WIN_POS
	movl	12(%r12), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_WIN_SZ
	movl	8(%r12), %esi
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PS_SCALER_EN,4,2               ## @PS_SCALER_EN
	.comm	_PS_FILTER_MEDIUM,4,2           ## @PS_FILTER_MEDIUM
	.no_dead_strip	_skylake_pfit_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skylake_pfit_enable
_skylake_pfit_enable:                   ; @skylake_pfit_enable
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w0, [x0, #40]
	bl	_to_intel_crtc
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w20, [x20]
	ldr	x8, [x19, #24]
	lsr	x0, x8, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldp	w11, w8, [x19, #4]
	lsr	w9, w8, #16
	and	w8, w8, #0xffff
	ldr	w10, [x19]
	lsl	w10, w10, #16
	sdiv	w1, w10, w9
	lsl	w9, w11, #16
	sdiv	w21, w9, w8
	mov	w0, #1
	mov	w2, #0
	bl	_skl_scaler_calc_phase
	mov	x22, x0
	mov	w0, #1
	mov	x1, x21
	mov	w2, #0
	bl	_skl_scaler_calc_phase
	mov	x23, x0
	ldr	x21, [x19, #24]
	mov	x0, x20
	mov	x1, x21
	bl	_SKL_PS_CTRL
Lloh0:
	adrp	x8, _PS_SCALER_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PS_SCALER_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PS_FILTER_MEDIUM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PS_FILTER_MEDIUM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x19, #32]
	sbfiz	x10, x21, #2, #32
	ldr	w9, [x9, x10]
	orr	w1, w8, w9
	bl	_I915_WRITE
	mov	x0, x20
	mov	x1, x21
	bl	_SKL_PS_VPHASE
	mov	x24, x0
	mov	w0, #0
	bl	_PS_Y_PHASE
	mov	x25, x0
	mov	x0, x23
	bl	_PS_UV_RGB_PHASE
	orr	w1, w0, w25
	mov	x0, x24
	bl	_I915_WRITE_FW
	mov	x0, x20
	mov	x1, x21
	bl	_SKL_PS_HPHASE
	mov	x23, x0
	mov	w0, #0
	bl	_PS_Y_PHASE
	mov	x24, x0
	mov	x0, x22
	bl	_PS_UV_RGB_PHASE
	orr	w1, w0, w24
	mov	x0, x23
	bl	_I915_WRITE_FW
	mov	x0, x20
	mov	x1, x21
	bl	_SKL_PS_WIN_POS
	ldr	w1, [x19, #12]
	bl	_I915_WRITE
	mov	x0, x20
	mov	x1, x21
	bl	_SKL_PS_WIN_SZ
	ldr	w1, [x19, #8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_I915_WRITE
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PS_SCALER_EN,4,2               ; @PS_SCALER_EN
	.comm	_PS_FILTER_MEDIUM,4,2           ; @PS_FILTER_MEDIUM
	.no_dead_strip	_skylake_pfit_enable
.subsections_via_symbols
