	.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
	movq	%rdx, %r13
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r12
	movl	(%rbx), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rax
	movl	(%rax), %r15d
	movl	4(%rax), %r14d
	leaq	16(%r13), %rbx
	movl	16(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	20(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_drm_rect_width
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_drm_rect_height
	movl	%eax, %ebx
	movl	(%r13), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_i9xx_plane_ctl_crtc
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	%r15d, -72(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	movl	%r14d, -76(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	callq	_intel_fb_xy_to_linear
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_INTEL_GEN
	movl	%r13d, %ecx
	cmpl	$4, %eax
	jl	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	8(%rax), %ecx
LBB0_2:
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	-80(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_DSPSTRIDE
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movl	12(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movq	%r12, %rdi
	callq	_INTEL_GEN
	cmpl	$3, %eax
	jg	LBB0_4
## %bb.3:
	movl	%r15d, %edi
	callq	_DSPPOS
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	shll	$16, %esi
	orl	-52(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%r15d, %edi
	callq	_DSPSIZE
	shll	$16, %ebx
	addl	$-65536, %ebx                   ## imm = 0xFFFF0000
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	decl	%esi
	orl	%ebx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_7
LBB0_4:
	movq	%r12, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_7
## %bb.5:
	movq	_PLANE_B@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_7
## %bb.6:
	movl	%r15d, %edi
	callq	_PRIMPOS
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	shll	$16, %esi
	orl	-52(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%r15d, %edi
	callq	_PRIMSIZE
	shll	$16, %ebx
	addl	$-65536, %ebx                   ## imm = 0xFFFF0000
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	decl	%esi
	orl	%ebx, %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%r15d, %edi
	callq	_PRIMCNSTALPHA
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_I915_WRITE_FW
LBB0_7:
	orl	-84(%rbp), %r14d                ## 4-byte Folded Reload
	movq	%r12, %rdi
	callq	_IS_HASWELL
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	je	LBB0_10
LBB0_9:
	movl	%r15d, %edi
	callq	_DSPOFFSET
LBB0_12:
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	shll	$16, %esi
	orl	-72(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%eax, %edi
	callq	_I915_WRITE_FW
LBB0_13:
	movl	%r15d, %edi
	callq	_DSPCNTR
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_I915_WRITE_FW
	movq	%r12, %rdi
	callq	_INTEL_GEN
	movl	%r15d, %edi
	cmpl	$4, %eax
	jl	LBB0_15
## %bb.14:
	callq	_DSPSURF
	jmp	LBB0_16
LBB0_15:
	callq	_DSPADDR
LBB0_16:
	movl	%eax, %r14d
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_plane_ggtt_offset
	addl	%eax, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE_FW
	movq	%r12, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_10:
	movq	%r12, %rdi
	callq	_INTEL_GEN
	cmpl	$4, %eax
	jl	LBB0_13
## %bb.11:
	movl	%r15d, %edi
	callq	_DSPLINOFF
	movl	%eax, %edi
	movl	%r13d, %esi
	callq	_I915_WRITE_FW
	movl	%r15d, %edi
	callq	_DSPTILEOFF
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANE_B,4,2                    ## @PLANE_B
	.no_dead_strip	_i9xx_update_plane
.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	x20, x2
	mov	x24, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x19, x0
	ldr	w21, [x21]
	ldr	x8, [x20, #8]
	ldp	w22, w23, [x8]
	mov	x25, x20
	ldr	w28, [x25, #16]!
	ldr	w26, [x20, #20]
	mov	x0, x25
	bl	_drm_rect_width
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	mov	x0, x25
	bl	_drm_rect_height
	mov	x27, x0
	ldr	w25, [x20]
	mov	x0, x24
	bl	_i9xx_plane_ctl_crtc
	mov	x24, x0
	str	w22, [sp, #8]                   ; 4-byte Folded Spill
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	mov	w3, #0
	bl	_intel_fb_xy_to_linear
	mov	x22, x0
	mov	x0, x19
	bl	_INTEL_GEN
	str	w22, [sp]                       ; 4-byte Folded Spill
	cmp	w0, #4
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	w22, [x8, #8]
LBB0_2:
	str	w22, [sp, #12]                  ; 4-byte Folded Spill
	orr	w24, w24, w25
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x21
	bl	_DSPSTRIDE
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #12]
	bl	_I915_WRITE_FW
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #3
	b.gt	LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_DSPPOS
	orr	w1, w28, w26, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_DSPSIZE
	lsl	w8, w27, #16
	sub	w8, w8, #16, lsl #12            ; =65536
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	sub	w9, w9, #1
	orr	w1, w8, w9
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_IS_CHERRYVIEW
	cbz	x0, LBB0_8
; %bb.5:
Lloh0:
	adrp	x8, _PLANE_B@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLANE_B@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_PRIMPOS
	orr	w1, w28, w26, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_PRIMSIZE
	lsl	w8, w27, #16
	sub	w8, w8, #16, lsl #12            ; =65536
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	sub	w9, w9, #1
	orr	w1, w8, w9
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_PRIMCNSTALPHA
	mov	w1, #0
LBB0_7:
	bl	_I915_WRITE_FW
LBB0_8:
	mov	x0, x19
	bl	_IS_HASWELL
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_IS_BROADWELL
	cbz	x0, LBB0_16
LBB0_10:
	mov	x0, x21
	bl	_DSPOFFSET
LBB0_11:
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	orr	w1, w8, w23, lsl #16
	bl	_I915_WRITE_FW
LBB0_12:
	mov	x0, x21
	bl	_DSPCNTR
	mov	x1, x24
	bl	_I915_WRITE_FW
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #4
	b.lt	LBB0_14
; %bb.13:
	mov	x0, x21
	bl	_DSPSURF
	b	LBB0_15
LBB0_14:
	mov	x0, x21
	bl	_DSPADDR
LBB0_15:
	mov	x21, x0
	mov	x0, x20
	bl	_intel_plane_ggtt_offset
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w1, w0, w8
	mov	x0, x21
	bl	_I915_WRITE_FW
	mov	x0, x19
	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	_spin_unlock_irqrestore
LBB0_16:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #4
	b.lt	LBB0_12
; %bb.17:
	mov	x0, x21
	bl	_DSPLINOFF
	ldr	w1, [sp]                        ; 4-byte Folded Reload
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_DSPTILEOFF
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANE_B,4,2                    ; @PLANE_B
	.no_dead_strip	_i9xx_update_plane
.subsections_via_symbols
