	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_program_scaler
_skl_program_scaler:                    ## @skl_program_scaler
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	callq	_to_i915
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r12), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movslq	(%r15), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	(%rbx), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	16(%r15), %rbx
	movl	16(%r15), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	20(%r15), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_drm_rect_width
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_drm_rect_height
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	leaq	24(%r15), %r13
	movq	_INT_MAX@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_drm_rect_calc_hscale
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%r14), %ecx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_drm_rect_calc_vscale
	movl	%eax, %r14d
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_is_planar_yuv_format
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	4(%r12), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_icl_is_hdr_plane
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movl	$1, %ebx
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$1, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_skl_scaler_calc_phase
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
LBB0_2:
	movl	$1, %edi
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_skl_scaler_calc_phase
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_skl_scaler_calc_phase
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$2, %ebx
	movl	$2, %edi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_skl_scaler_calc_phase
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_4:
	movl	%ebx, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_skl_scaler_calc_phase
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	movq	-112(%rbp), %r15                ## 8-byte Reload
	movl	%r15d, %esi
	callq	_SKL_PS_CTRL
	movl	%eax, %r13d
	movq	_PS_SCALER_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	4(%r12), %edi
	callq	_PS_PLANE_SEL
	orl	%eax, %ebx
	movq	-104(%rbp), %rax                ## 8-byte Reload
	orl	(%rax,%r15,4), %ebx
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_VPHASE
	movl	%eax, %r12d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_PS_Y_PHASE
	movl	%eax, %ebx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_PS_UV_RGB_PHASE
	orl	%eax, %ebx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_HPHASE
	movl	%eax, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_PS_Y_PHASE
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_PS_UV_RGB_PHASE
	orl	%eax, %ebx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_WIN_POS
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	shll	$16, %esi
	orl	-64(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_SKL_PS_WIN_SZ
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	shll	$16, %esi
	orl	-72(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%eax, %edi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE_FW                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_PS_SCALER_EN,4,2               ## @PS_SCALER_EN
	.no_dead_strip	_skl_program_scaler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_program_scaler
_skl_program_scaler:                    ; @skl_program_scaler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x27, x2
	mov	x21, x1
	mov	x23, x0
	ldr	w0, [x0, #8]
	bl	_to_i915
	mov	x24, x0
	ldr	w19, [x23]
	ldrsw	x20, [x27]
	ldr	x21, [x21]
	mov	x26, x27
	ldr	w9, [x26, #16]!
	ldr	w8, [x27, #20]
	stp	w8, w9, [sp]                    ; 8-byte Folded Spill
	mov	x0, x26
	bl	_drm_rect_width
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	x0, x26
	bl	_drm_rect_height
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
	add	x28, x27, #24
Lloh0:
	adrp	x22, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _INT_MAX@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x28
	mov	x1, x26
	mov	w2, #0
	bl	_drm_rect_calc_hscale
	mov	x25, x0
	ldr	w3, [x22]
	mov	x0, x28
	mov	x1, x26
	mov	w2, #0
	bl	_drm_rect_calc_vscale
	mov	x26, x0
	ldr	x8, [x27, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_is_planar_yuv_format
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x23, #4]
	mov	x0, x24
	bl	_icl_is_hdr_plane
	cbz	w0, LBB0_3
LBB0_2:
	mov	w28, #1
	mov	w0, #1
	mov	x1, x25
	mov	w2, #0
	bl	_skl_scaler_calc_phase
	mov	x25, x0
	mov	x27, #0
	mov	x24, #0
	b	LBB0_4
LBB0_3:
	mov	w0, #1
	mov	x1, x25
	mov	w2, #0
	bl	_skl_scaler_calc_phase
	mov	x24, x0
	mov	w0, #1
	mov	x1, x26
	mov	w2, #0
	bl	_skl_scaler_calc_phase
	mov	x27, x0
	mov	w28, #2
	mov	w0, #2
	mov	x1, x25
	mov	w2, #1
	bl	_skl_scaler_calc_phase
	mov	x25, x0
LBB0_4:
	mov	x0, x28
	mov	x1, x26
	mov	w2, #0
	bl	_skl_scaler_calc_phase
	mov	x26, x0
	mov	x0, x19
	mov	x1, x20
	bl	_SKL_PS_CTRL
	mov	x28, x0
Lloh2:
	adrp	x8, _PS_SCALER_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PS_SCALER_EN@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
	ldr	w0, [x23, #4]
	bl	_PS_PLANE_SEL
	orr	w8, w0, w22
	ldr	w9, [x21, x20, lsl #2]
	orr	w1, w8, w9
	mov	x0, x28
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	x1, x20
	bl	_SKL_PS_VPHASE
	mov	x23, x0
	mov	x0, x27
	bl	_PS_Y_PHASE
	mov	x27, x0
	mov	x0, x26
	bl	_PS_UV_RGB_PHASE
	orr	w1, w0, w27
	mov	x0, x23
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	x1, x20
	bl	_SKL_PS_HPHASE
	mov	x23, x0
	mov	x0, x24
	bl	_PS_Y_PHASE
	mov	x24, x0
	mov	x0, x25
	bl	_PS_UV_RGB_PHASE
	orr	w1, w0, w24
	mov	x0, x23
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	x1, x20
	bl	_SKL_PS_WIN_POS
	ldp	w9, w8, [sp]                    ; 8-byte Folded Reload
	orr	w1, w9, w8, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x19
	mov	x1, x20
	bl	_SKL_PS_WIN_SZ
	ldp	w9, w8, [sp, #8]                ; 8-byte Folded Reload
	orr	w1, w9, w8, lsl #16
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_I915_WRITE_FW
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_PS_SCALER_EN,4,2               ; @PS_SCALER_EN
	.no_dead_strip	_skl_program_scaler
.subsections_via_symbols
