	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ironlake_update_plane
_ironlake_update_plane:                 ## @ironlake_update_plane
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, %r12
	movl	%edx, -48(%rbp)
	movl	%ecx, -44(%rbp)
	movq	(%rdi), %rbx
	callq	_to_intel_crtc
	movl	(%rax), %r13d
	cmpl	$3, %r13d
	jae	LBB0_1
## %bb.3:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_to_intel_framebuffer
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	callq	_DSPCNTR
	movq	%r12, %rbx
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_I915_READ
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %esi
	leal	-128(%rsi), %ecx
	cmpl	$10, %ecx
	jae	LBB0_4
## %bb.5:
	movq	_DISPPLANE_PIXFORMAT_MASK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	notq	%rdx
	andq	%rdx, %rax
	movslq	%ecx, %rcx
	leaq	l_switch.table.ironlake_update_plane(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	orq	(%rcx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	_I915_TILING_NONE@GOTPCREL(%rip), %rdx
	movq	_DISPPLANE_TILED@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, %rdi
	orq	%rax, %rdi
	notq	%rsi
	andq	%rax, %rsi
	cmpq	(%rdx), %rcx
	cmovneq	%rdi, %rsi
	movq	_DISPPLANE_TRICKLE_FEED_DISABLE@GOTPCREL(%rip), %rax
	orq	(%rax), %rsi
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_I915_WRITE
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rax
	movl	(%rax), %r8d
	imull	%r8d, %r15d
	movl	16(%rbx), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	imull	%ecx, %r14d
	addl	%r15d, %r14d
	movslq	%r14d, %r14
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rdx
	leaq	-48(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	callq	_intel_gen4_compute_page_offset
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	subq	%rax, %r14
	movq	8(%r12), %rsi
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %r8d
	movq	8(%rbx), %rax
	movl	(%rax), %r9d
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rdx
	callq	_DRM_DEBUG_KMS
	movl	%r13d, %edi
	callq	_DSPSTRIDE
	movq	8(%rbx), %rcx
	movslq	(%rcx), %rsi
	movq	%rax, %rdi
	callq	_I915_WRITE
	movl	%r13d, %edi
	callq	_DSPSURF
	movq	8(%r15), %rsi
	addq	8(%r12), %rsi
	movl	%eax, %edi
	callq	_I915_MODIFY_DISPBASE
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_HASWELL
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	%r13d, %edi
	callq	_DSPOFFSET
	movl	-44(%rbp), %ecx
	shll	$16, %ecx
	orl	-48(%rbp), %ecx
	movslq	%ecx, %rsi
	movq	%rax, %rdi
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
LBB0_2:
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	movl	%r13d, %edi
	callq	_DSPTILEOFF
	movl	-44(%rbp), %ecx
	shll	$16, %ecx
	orl	-48(%rbp), %ecx
	movslq	%ecx, %rsi
	movq	%rax, %rdi
	callq	_I915_WRITE
	movl	%r13d, %edi
	callq	_DSPLINOFF
	movq	%rax, %rdi
	movq	%r14, %rsi
LBB0_8:
	callq	_I915_WRITE
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_POSTING_READ
	xorl	%eax, %eax
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't update plane %d in SAREA\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DISPPLANE_PIXFORMAT_MASK,8,3   ## @DISPPLANE_PIXFORMAT_MASK
	.comm	_DISPPLANE_8BPP,8,3             ## @DISPPLANE_8BPP
	.comm	_DISPPLANE_BGRX565,8,3          ## @DISPPLANE_BGRX565
	.comm	_DISPPLANE_BGRX888,8,3          ## @DISPPLANE_BGRX888
	.comm	_DISPPLANE_RGBX888,8,3          ## @DISPPLANE_RGBX888
	.comm	_DISPPLANE_BGRX101010,8,3       ## @DISPPLANE_BGRX101010
	.comm	_DISPPLANE_RGBX101010,8,3       ## @DISPPLANE_RGBX101010
L_.str.1:                               ## @.str.1
	.asciz	"Unknown pixel format 0x%08x\n"

	.comm	_I915_TILING_NONE,8,3           ## @I915_TILING_NONE
	.comm	_DISPPLANE_TILED,8,3            ## @DISPPLANE_TILED
	.comm	_DISPPLANE_TRICKLE_FEED_DISABLE,8,3 ## @DISPPLANE_TRICKLE_FEED_DISABLE
L_.str.2:                               ## @.str.2
	.asciz	"Writing base %08X %08lX %d %d %d\n"

	.no_dead_strip	_ironlake_update_plane
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ironlake_update_plane
l_switch.table.ironlake_update_plane:
	.quad	_DISPPLANE_BGRX888
	.quad	_DISPPLANE_BGRX101010
	.quad	_DISPPLANE_RGBX888
	.quad	_DISPPLANE_RGBX101010
	.quad	_DISPPLANE_BGRX565
	.quad	_DISPPLANE_8BPP
	.quad	_DISPPLANE_BGRX888
	.quad	_DISPPLANE_BGRX101010
	.quad	_DISPPLANE_RGBX888
	.quad	_DISPPLANE_RGBX101010

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ironlake_update_plane
_ironlake_update_plane:                 ; @ironlake_update_plane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x25, x3
	mov	x24, x2
	mov	x23, x1
	stp	w3, w2, [sp, #8]
	ldr	x21, [x0]
	bl	_to_intel_crtc
	ldr	w20, [x0]
	cmp	w20, #3
	b.hs	LBB0_4
; %bb.1:
	mov	x22, x0
	mov	x0, x23
	bl	_to_intel_framebuffer
	ldr	x26, [x0]
	mov	x0, x20
	bl	_DSPCNTR
	mov	x19, x0
	bl	_I915_READ
	ldr	w1, [x23]
	sub	w8, w1, #128
	cmp	w8, #10
	b.hs	LBB0_5
; %bb.2:
Lloh0:
	adrp	x9, _DISPPLANE_PIXFORMAT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DISPPLANE_PIXFORMAT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, l_switch.table.ironlake_update_plane@PAGE
Lloh4:
	add	x10, x10, l_switch.table.ironlake_update_plane@PAGEOFF
	ldr	x8, [x10, w8, sxtw #3]
	bic	x9, x0, x9
	ldr	x8, [x8]
	orr	x8, x8, x9
	ldr	x9, [x26]
Lloh5:
	adrp	x10, _I915_TILING_NONE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _I915_TILING_NONE@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	adrp	x11, _DISPPLANE_TILED@GOTPAGE
Lloh9:
	ldr	x11, [x11, _DISPPLANE_TILED@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
	orr	x12, x11, x8
	bic	x8, x8, x11
	cmp	x9, x10
	csel	x8, x8, x12, eq
Lloh11:
	adrp	x9, _DISPPLANE_TRICKLE_FEED_DISABLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DISPPLANE_TRICKLE_FEED_DISABLE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	orr	x1, x9, x8
	mov	x0, x19
	bl	_I915_WRITE
	ldr	x8, [x23, #8]
	ldr	w4, [x8]
	mul	w8, w4, w25
	ldr	w9, [x23, #16]
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w3, w9, #3
	madd	w8, w3, w24, w8
	sxtw	x24, w8
	ldr	x2, [x26]
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_intel_gen4_compute_page_offset
	str	x0, [x22, #8]
	sub	x24, x24, x0
	ldr	x1, [x26, #8]
	ldp	w4, w3, [sp, #8]
	ldr	x8, [x23, #8]
	ldr	w5, [x8]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x24
	bl	_DRM_DEBUG_KMS
	mov	x0, x20
	bl	_DSPSTRIDE
	ldr	x8, [x23, #8]
	ldrsw	x1, [x8]
	bl	_I915_WRITE
	mov	x0, x20
	bl	_DSPSURF
	ldr	x8, [x26, #8]
	ldr	x9, [x22, #8]
	add	x1, x9, x8
	bl	_I915_MODIFY_DISPBASE
	mov	x0, x21
	bl	_IS_HASWELL
	cbz	x0, LBB0_7
; %bb.3:
	mov	x0, x20
	bl	_DSPOFFSET
	ldp	w8, w9, [sp, #8]
	orr	w8, w9, w8, lsl #16
	sxtw	x1, w8
	b	LBB0_8
LBB0_4:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_DRM_ERROR
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	_DSPTILEOFF
	ldp	w8, w9, [sp, #8]
	orr	w8, w9, w8, lsl #16
	sxtw	x1, w8
	bl	_I915_WRITE
	mov	x0, x20
	bl	_DSPLINOFF
	mov	x1, x24
LBB0_8:
	bl	_I915_WRITE
	mov	x0, x19
	bl	_POSTING_READ
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't update plane %d in SAREA\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DISPPLANE_PIXFORMAT_MASK,8,3   ; @DISPPLANE_PIXFORMAT_MASK
	.comm	_DISPPLANE_8BPP,8,3             ; @DISPPLANE_8BPP
	.comm	_DISPPLANE_BGRX565,8,3          ; @DISPPLANE_BGRX565
	.comm	_DISPPLANE_BGRX888,8,3          ; @DISPPLANE_BGRX888
	.comm	_DISPPLANE_RGBX888,8,3          ; @DISPPLANE_RGBX888
	.comm	_DISPPLANE_BGRX101010,8,3       ; @DISPPLANE_BGRX101010
	.comm	_DISPPLANE_RGBX101010,8,3       ; @DISPPLANE_RGBX101010
l_.str.1:                               ; @.str.1
	.asciz	"Unknown pixel format 0x%08x\n"

	.comm	_I915_TILING_NONE,8,3           ; @I915_TILING_NONE
	.comm	_DISPPLANE_TILED,8,3            ; @DISPPLANE_TILED
	.comm	_DISPPLANE_TRICKLE_FEED_DISABLE,8,3 ; @DISPPLANE_TRICKLE_FEED_DISABLE
l_.str.2:                               ; @.str.2
	.asciz	"Writing base %08X %08lX %d %d %d\n"

	.no_dead_strip	_ironlake_update_plane
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ironlake_update_plane
l_switch.table.ironlake_update_plane:
	.quad	_DISPPLANE_BGRX888
	.quad	_DISPPLANE_BGRX101010
	.quad	_DISPPLANE_RGBX888
	.quad	_DISPPLANE_RGBX101010
	.quad	_DISPPLANE_BGRX565
	.quad	_DISPPLANE_8BPP
	.quad	_DISPPLANE_BGRX888
	.quad	_DISPPLANE_BGRX101010
	.quad	_DISPPLANE_RGBX888
	.quad	_DISPPLANE_RGBX101010

.subsections_via_symbols
