	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i9xx_update_plane
_i9xx_update_plane:                     ## @i9xx_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, %r12d
	movl	%edx, %r13d
	movq	%rsi, %r14
	movl	%edx, -48(%rbp)
	movl	%ecx, -44(%rbp)
	movq	(%rdi), %r15
	callq	_to_intel_crtc
	movl	(%rax), %ebx
	cmpl	$2, %ebx
	jae	LBB0_1
## %bb.3:
	movl	%r13d, -88(%rbp)                ## 4-byte Spill
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_to_intel_framebuffer
	movq	(%rax), %r12
	movl	%ebx, %edi
	callq	_DSPCNTR
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_I915_READ
	movq	%rax, %r15
	movl	(%r14), %esi
	leal	-128(%rsi), %eax
	cmpl	$12, %eax
	jae	LBB0_4
## %bb.5:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, -84(%rbp)                 ## 4-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	_DISPPLANE_PIXFORMAT_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	notq	%rcx
	andq	%rcx, %r15
	cltq
	leaq	l_switch.table.i9xx_update_plane(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	orq	(%rax), %r15
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	jl	LBB0_6
## %bb.7:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	_I915_TILING_NONE@GOTPCREL(%rip), %rdx
	movq	_DISPPLANE_TILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%rdx), %rcx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_8
## %bb.9:
	notq	%rax
	andq	%rax, %r15
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %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_17
LBB0_6:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_8:
	orq	%rax, %r15
LBB0_10:
	movq	%r15, %rsi
	callq	_I915_WRITE
	movq	8(%r14), %rax
	movl	(%rax), %eax
	imull	%ebx, %eax
	movl	16(%r14), %ecx
	leal	7(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$3, %edx
	movl	-88(%rbp), %r13d                ## 4-byte Reload
	imull	%r13d, %edx
	addl	%eax, %edx
	movslq	%edx, %r15
	movq	%r12, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	jl	LBB0_11
## %bb.12:
	movl	16(%r14), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rdx
	sarl	$3, %ecx
	movq	8(%r14), %rax
	movl	(%rax), %r8d
	leaq	-48(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	callq	_intel_gen4_compute_page_offset
	movq	%r12, %rcx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r15, %rdx
	subq	%rax, %rdx
	movl	-48(%rbp), %r13d
	movl	-44(%rbp), %r8d
	movq	%rax, %r15
	jmp	LBB0_13
LBB0_11:
	movq	%r15, %rdx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, %r8d
LBB0_13:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, 8(%rax)
	movq	8(%rcx), %rsi
	movq	8(%r14), %rax
	movl	(%rax), %r9d
	leaq	L_.str.2(%rip), %rdi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r15
	movl	%r13d, %ecx
	callq	_DRM_DEBUG_KMS
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_DSPSTRIDE
	movq	8(%r14), %rcx
	movslq	(%rcx), %rsi
	movq	%rax, %rdi
	callq	_I915_WRITE
	movq	%r12, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	jl	LBB0_15
## %bb.14:
	movl	%ebx, %edi
	callq	_DSPSURF
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rsi
	addq	8(%r15), %rsi
	movl	%eax, %edi
	callq	_I915_MODIFY_DISPBASE
	movl	%ebx, %edi
	callq	_DSPTILEOFF
	movl	-44(%rbp), %ecx
	shll	$16, %ecx
	orl	-48(%rbp), %ecx
	movslq	%ecx, %rsi
	movq	%rax, %rdi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_DSPLINOFF
	movq	%rax, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_15:
	movl	%ebx, %edi
	callq	_DSPADDR
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addq	8(%r15), %rsi
	movq	%rax, %rdi
LBB0_16:
	callq	_I915_WRITE
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_POSTING_READ
	xorl	%eax, %eax
LBB0_17:
	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_BGRX555,8,3          ## @DISPPLANE_BGRX555
	.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
L_.str.2:                               ## @.str.2
	.asciz	"Writing base %08X %08lX %d %d %d\n"

	.no_dead_strip	_i9xx_update_plane
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.i9xx_update_plane
l_switch.table.i9xx_update_plane:
	.quad	_DISPPLANE_BGRX888
	.quad	_DISPPLANE_BGRX101010
	.quad	_DISPPLANE_BGRX555
	.quad	_DISPPLANE_RGBX888
	.quad	_DISPPLANE_RGBX101010
	.quad	_DISPPLANE_BGRX565
	.quad	_DISPPLANE_8BPP
	.quad	_DISPPLANE_BGRX888
	.quad	_DISPPLANE_BGRX101010
	.quad	_DISPPLANE_BGRX555
	.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 i9xx_update_plane
_i9xx_update_plane:                     ; @i9xx_update_plane
	.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	x24, x3
	mov	x25, x2
	mov	x23, x1
	stp	w3, w2, [sp, #8]
	ldr	x22, [x0]
	bl	_to_intel_crtc
	ldr	w20, [x0]
	cmp	w20, #2
	b.hs	LBB0_8
; %bb.1:
	mov	x21, x0
	mov	x0, x23
	bl	_to_intel_framebuffer
	ldr	x27, [x0]
	mov	x0, x20
	bl	_DSPCNTR
	mov	x19, x0
	bl	_I915_READ
	ldr	w1, [x23]
	sub	w8, w1, #128
	cmp	w8, #12
	b.hs	LBB0_9
; %bb.2:
Lloh0:
	adrp	x9, _DISPPLANE_PIXFORMAT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DISPPLANE_PIXFORMAT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	bic	x9, x0, x9
Lloh3:
	adrp	x10, l_switch.table.i9xx_update_plane@PAGE
Lloh4:
	add	x10, x10, l_switch.table.i9xx_update_plane@PAGEOFF
	ldr	x8, [x10, w8, sxtw #3]
	ldr	x8, [x8]
	orr	x26, x8, x9
	mov	x0, x22
	bl	_INTEL_INFO
	ldr	w8, [x0]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.3:
	ldr	x8, [x27]
Lloh5:
	adrp	x9, _I915_TILING_NONE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I915_TILING_NONE@GOTPAGEOFF]
Lloh7:
	adrp	x10, _DISPPLANE_TILED@GOTPAGE
Lloh8:
	ldr	x10, [x10, _DISPPLANE_TILED@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	ldr	x10, [x10]
	bic	x11, x26, x10
	orr	x10, x10, x26
	cmp	x8, x9
	csel	x26, x11, x10, eq
LBB0_4:
	mov	x0, x19
	mov	x1, x26
	bl	_I915_WRITE
	ldr	x8, [x23, #8]
	ldr	w8, [x8]
	mul	w8, w8, w24
	ldr	w9, [x23, #16]
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #3
	madd	w8, w9, w25, w8
	sxtw	x28, w8
	mov	x0, x22
	bl	_INTEL_INFO
	ldr	w8, [x0]
	mov	x26, x28
	cmp	w8, #4
	b.lt	LBB0_6
; %bb.5:
	ldr	x2, [x27]
	ldr	w8, [x23, #16]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w3, w8, #3
	ldr	x8, [x23, #8]
	ldr	w4, [x8]
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_intel_gen4_compute_page_offset
	sub	x26, x28, x0
	ldp	w24, w25, [sp, #8]
	mov	x28, x0
LBB0_6:
	str	x28, [x21, #8]
	ldr	x1, [x27, #8]
	ldr	x8, [x23, #8]
	ldr	w5, [x8]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x26
	mov	x3, x25
	mov	x4, x24
	bl	_DRM_DEBUG_KMS
	mov	x0, x20
	bl	_DSPSTRIDE
	ldr	x8, [x23, #8]
	ldrsw	x1, [x8]
	bl	_I915_WRITE
	mov	x0, x22
	bl	_INTEL_INFO
	ldr	w8, [x0]
	cmp	w8, #4
	b.lt	LBB0_11
; %bb.7:
	mov	x0, x20
	bl	_DSPSURF
	ldr	x8, [x27, #8]
	ldr	x9, [x21, #8]
	add	x1, x9, x8
	bl	_I915_MODIFY_DISPBASE
	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, x26
	b	LBB0_12
LBB0_8:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	b	LBB0_10
LBB0_9:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_DRM_ERROR
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_11:
	mov	x0, x20
	bl	_DSPADDR
	ldr	x8, [x27, #8]
	add	x1, x8, x26
LBB0_12:
	bl	_I915_WRITE
	mov	x0, x19
	bl	_POSTING_READ
	mov	w0, #0
LBB0_13:
	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
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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_BGRX555,8,3          ; @DISPPLANE_BGRX555
	.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
l_.str.2:                               ; @.str.2
	.asciz	"Writing base %08X %08lX %d %d %d\n"

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

.subsections_via_symbols
