	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_skl_write_plane_wm             ## -- Begin function skl_write_plane_wm
	.p2align	4, 0x90
_skl_write_plane_wm:                    ## @skl_write_plane_wm
	.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	$40, %rsp
	.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, %r15
	movl	8(%rdi), %edi
	callq	_to_i915
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_ilk_wm_max_level
	movl	(%r15), %edx
	movl	4(%r15), %ebx
	movq	16(%r13), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	leaq	(,%rdx,4), %rcx
	movq	8(%r13), %rdx
	addq	%rcx, %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	addq	(%r13), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rcx,2), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,8), %r15
	addq	$16, %r15
	movl	%eax, %eax
	leaq	4(,%rax,4), %r14
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r13d, %edx
	callq	_PLANE_WM
	movq	(%r15), %rdx
	addq	%r12, %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_skl_write_wm_level
	incl	%r13d
	addq	$4, %r12
	cmpq	%r12, %r14
	jne	LBB0_2
LBB0_3:
	movl	%ebx, %edi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_PLANE_WM_TRANS
	leaq	(%r12,%r12,2), %r14
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	leaq	8(,%r14,8), %rdx
	addq	%r13, %rdx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_skl_write_wm_level
	movq	%r15, %rdi
	callq	_INTEL_GEN
	cmpl	$11, %eax
	jl	LBB0_6
## %bb.4:
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_PLANE_BUF_CFG
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_6:
	cmpq	$0, (%r13,%r14,8)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_swap
LBB0_8:
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_PLANE_BUF_CFG
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_skl_ddb_entry_write
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_PLANE_NV12_BUF_CFG
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_skl_ddb_entry_write            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_skl_write_plane_wm             ; -- Begin function skl_write_plane_wm
	.p2align	2
_skl_write_plane_wm:                    ; @skl_write_plane_wm
	.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	x22, x1
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_to_i915
	mov	x19, x0
	bl	_ilk_wm_max_level
	ldp	w20, w21, [x21]
	ldp	x8, x24, [x22, #8]
	lsl	x25, x20, #2
	ldr	x9, [x22]
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	add	x22, x8, x25
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x27, #0
	mov	w23, #0
	mov	w8, #24
	madd	x8, x20, x8, x24
	add	x28, x8, #16
	add	w8, w0, #1
	lsl	x26, x8, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_PLANE_WM
	mov	x1, x0
	ldr	x8, [x28]
	add	x2, x8, x27
	mov	x0, x19
	bl	_skl_write_wm_level
	add	w23, w23, #1
	add	x27, x27, #4
	cmp	x26, x27
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x21
	mov	x1, x20
	bl	_PLANE_WM_TRANS
	mov	x1, x0
	mov	w8, #24
	madd	x8, x20, x8, x24
	add	x2, x8, #8
	mov	x0, x19
	bl	_skl_write_wm_level
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #11
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	x1, x20
	bl	_PLANE_BUF_CFG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	b	LBB0_8
LBB0_5:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x23, x8, x25
	mov	w8, #24
	mul	x8, x20, x8
	ldr	x8, [x24, x8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x22
	mov	x1, x23
	bl	_swap
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	bl	_PLANE_BUF_CFG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_skl_ddb_entry_write
	mov	x0, x21
	mov	x1, x20
	bl	_PLANE_NV12_BUF_CFG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x23
LBB0_8:
	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	_skl_ddb_entry_write
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
