	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivb_update_plane
_ivb_update_plane:                      ## @ivb_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	leaq	16(%r14), %r12
	leaq	24(%r14), %rbx
	movl	24(%r14), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	28(%r14), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_drm_rect_width
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_drm_rect_height
	movl	%eax, %r15d
	movq	8(%r14), %rax
	movl	4(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	8(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rbx
	movq	%r12, %rdi
	callq	_drm_rect_width
	movl	%eax, %r13d
	movl	%eax, %r12d
	sarl	$16, %r12d
	movq	%rbx, %rdi
	callq	_drm_rect_height
	movl	%eax, %ebx
	sarl	$16, %ebx
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movl	(%r14), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_ivb_sprite_ctl_crtc
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leal	-1(%rcx), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	cmpl	%r12d, %ecx
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	cmpl	%ebx, %r15d
	je	LBB0_3
LBB0_2:
	decl	%ebx
	movq	_SPRITE_SCALE_ENABLE@GOTPCREL(%rip), %rax
	addl	$-65536, %r13d                  ## imm = 0xFFFF0000
	andl	$-65536, %r13d                  ## imm = 0xFFFF0000
	orl	%ebx, %r13d
	orl	(%rax), %r13d
	movl	%r13d, %eax
LBB0_3:
	movl	%eax, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_intel_fb_xy_to_linear
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movl	-84(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_SPRSTRIDE
	movq	8(%r12), %rcx
	movl	12(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	callq	_SPRPOS
	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
	movl	%r14d, %edi
	callq	_SPRSIZE
	shll	$16, %r15d
	addl	$-65536, %r15d                  ## imm = 0xFFFF0000
	orl	-68(%rbp), %r15d                ## 4-byte Folded Reload
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_I915_WRITE_FW
	movq	%r13, %rdi
	callq	_IS_IVYBRIDGE
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	%r14d, %edi
	callq	_SPRSCALE
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE_FW
LBB0_5:
	cmpq	$0, 48(%r12)
	je	LBB0_7
## %bb.6:
	movl	%r14d, %edi
	callq	_SPRKEYVAL
	movl	32(%r12), %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	callq	_SPRKEYMSK
	movl	36(%r12), %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	callq	_SPRKEYMAX
	movl	40(%r12), %esi
	movl	%eax, %edi
	callq	_I915_WRITE_FW
LBB0_7:
	movq	%r13, %rdi
	callq	_IS_HASWELL
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	je	LBB0_10
LBB0_9:
	movl	%r14d, %edi
	callq	_SPROFFSET
LBB0_11:
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	shll	$16, %esi
	orl	-44(%rbp), %esi                 ## 4-byte Folded Reload
	movl	%eax, %edi
	callq	_I915_WRITE_FW
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	orl	-80(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	%r14d, %edi
	callq	_SPRCTL
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	callq	_SPRSURF
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_intel_plane_ggtt_offset
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	addl	%eax, %esi
	movl	%ebx, %edi
	callq	_I915_WRITE_FW
	movq	%r12, %rdi
	callq	_ivb_update_gamma
	movq	%r13, %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_10:
	movl	%r14d, %edi
	callq	_SPRLINOFF
	movl	%eax, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_I915_WRITE_FW
	movl	%r14d, %edi
	callq	_SPRTILEOFF
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SPRITE_SCALE_ENABLE,4,2        ## @SPRITE_SCALE_ENABLE
	.no_dead_strip	_ivb_update_plane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivb_update_plane
_ivb_update_plane:                      ; @ivb_update_plane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x2
	mov	x24, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x20, x0
	ldr	w21, [x21]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	add	x27, x19, #16
	mov	x22, x19
	ldr	w9, [x22, #24]!
	ldr	w8, [x19, #28]
	stp	w8, w9, [sp, #12]               ; 8-byte Folded Spill
	mov	x0, x22
	bl	_drm_rect_width
	mov	x28, x0
	mov	x0, x22
	bl	_drm_rect_height
	mov	x26, x0
	ldr	x8, [x19, #8]
	ldp	w23, w22, [x8, #4]
	mov	x0, x27
	bl	_drm_rect_width
	mov	x25, x0
	mov	x0, x27
	bl	_drm_rect_height
	asr	w27, w0, #16
	ldr	w8, [x19]
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	mov	x0, x24
	bl	_ivb_sprite_ctl_crtc
	str	w0, [sp, #20]                   ; 4-byte Folded Spill
	sub	w24, w28, #1
	cmp	w28, w25, asr #16
	b.ne	LBB0_3
; %bb.1:
	cmp	w26, w27
	b.ne	LBB0_3
; %bb.2:
	mov	w27, #0
	b	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _SPRITE_SCALE_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPRITE_SCALE_ENABLE@GOTPAGEOFF]
	sub	w9, w27, #1
Lloh2:
	ldr	w8, [x8]
	sub	w10, w25, #16, lsl #12          ; =65536
	and	w10, w10, #0xffff0000
	orr	w9, w9, w10
	orr	w27, w9, w8
LBB0_4:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	mov	w3, #0
	bl	_intel_fb_xy_to_linear
	mov	x25, x0
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x21
	bl	_SPRSTRIDE
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #12]
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_SPRPOS
	ldp	w9, w8, [sp, #12]               ; 8-byte Folded Reload
	orr	w1, w8, w9, lsl #16
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_SPRSIZE
	lsl	w8, w26, #16
	sub	w8, w8, #16, lsl #12            ; =65536
	orr	w1, w8, w24
	bl	_I915_WRITE_FW
	mov	x0, x20
	bl	_IS_IVYBRIDGE
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_SPRSCALE
	mov	x1, x27
	bl	_I915_WRITE_FW
LBB0_6:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_SPRKEYVAL
	ldr	w1, [x19, #32]
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_SPRKEYMSK
	ldr	w1, [x19, #36]
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_SPRKEYMAX
	ldr	w1, [x19, #40]
	bl	_I915_WRITE_FW
LBB0_8:
	mov	x0, x20
	bl	_IS_HASWELL
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_IS_BROADWELL
	cbz	x0, LBB0_12
LBB0_10:
	mov	x0, x21
	bl	_SPROFFSET
LBB0_11:
	orr	w1, w23, w22, lsl #16
	bl	_I915_WRITE_FW
	ldp	w9, w8, [sp, #20]               ; 8-byte Folded Reload
	orr	w22, w9, w8
	mov	x0, x21
	bl	_SPRCTL
	mov	x1, x22
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_SPRSURF
	mov	x21, x0
	mov	x0, x19
	bl	_intel_plane_ggtt_offset
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	add	w1, w0, w8
	mov	x0, x21
	bl	_I915_WRITE_FW
	mov	x0, x19
	bl	_ivb_update_gamma
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_spin_unlock_irqrestore
LBB0_12:
	mov	x0, x21
	bl	_SPRLINOFF
	mov	x1, x25
	bl	_I915_WRITE_FW
	mov	x0, x21
	bl	_SPRTILEOFF
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SPRITE_SCALE_ENABLE,4,2        ; @SPRITE_SCALE_ENABLE
	.no_dead_strip	_ivb_update_plane
.subsections_via_symbols
