	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_plane_downscale_amount
_skl_plane_downscale_amount:            ## @skl_plane_downscale_amount
	.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, %r13
	movq	%rdi, %rbx
	movl	24(%rsi), %edi
	callq	_to_intel_plane
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_intel_wm_plane_visible
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_u32_to_fixed16                 ## TAILCALL
LBB0_1:
	movq	(%r14), %rax
	movq	_PLANE_CURSOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	(%r13), %r14d
	movl	4(%r13), %r15d
	movl	8(%r13), %r12d
	movl	12(%r13), %r13d
	jmp	LBB0_4
LBB0_3:
	leaq	20(%r13), %rbx
	movq	%rbx, %rdi
	callq	_drm_rect_width
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_drm_rect_height
	movl	%eax, %r15d
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_drm_rect_width
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_drm_rect_height
	movl	%eax, %r13d
LBB0_4:
	sarl	$16, %r14d
	sarl	$16, %r15d
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_div_fixed16
	movl	%eax, %ebx
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_div_fixed16
	movl	%eax, %r14d
	movl	$1, %edi
	callq	_u32_to_fixed16
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_max_fixed16
	movl	%eax, %ebx
	movl	$1, %edi
	callq	_u32_to_fixed16
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_max_fixed16
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mul_fixed16                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANE_CURSOR,8,3               ## @PLANE_CURSOR
	.no_dead_strip	_skl_plane_downscale_amount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_plane_downscale_amount
_skl_plane_downscale_amount:            ; @skl_plane_downscale_amount
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x1, #24]
	bl	_to_intel_plane
	mov	x20, x0
	mov	x0, x21
	mov	x1, x19
	bl	_intel_wm_plane_visible
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_u32_to_fixed16
LBB0_2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _PLANE_CURSOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PLANE_CURSOR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldp	w20, w21, [x19]
	ldp	w22, w19, [x19, #8]
	b	LBB0_5
LBB0_4:
	add	x21, x19, #20
	mov	x0, x21
	bl	_drm_rect_width
	mov	x20, x0
	mov	x0, x21
	bl	_drm_rect_height
	mov	x21, x0
	add	x19, x19, #16
	mov	x0, x19
	bl	_drm_rect_width
	mov	x22, x0
	mov	x0, x19
	bl	_drm_rect_height
	mov	x19, x0
LBB0_5:
	asr	w0, w20, #16
	asr	w20, w21, #16
	mov	x1, x22
	bl	_div_fixed16
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	bl	_div_fixed16
	mov	x19, x0
	mov	w0, #1
	bl	_u32_to_fixed16
	mov	x1, x0
	mov	x0, x21
	bl	_max_fixed16
	mov	x20, x0
	mov	w0, #1
	bl	_u32_to_fixed16
	mov	x1, x0
	mov	x0, x19
	bl	_max_fixed16
	mov	x1, x0
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mul_fixed16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANE_CURSOR,8,3               ; @PLANE_CURSOR
	.no_dead_strip	_skl_plane_downscale_amount
.subsections_via_symbols
