	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_plane_atomic_update
_mtk_plane_atomic_update:               ## @mtk_plane_atomic_update
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_to_mtk_plane_state
	movq	%rax, %r14
	movq	(%r15), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_3
## %bb.1:
	movq	16(%rax), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	callq	_to_mtk_gem_obj
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdx
	movl	(%rcx), %ecx
	movq	(%r15), %rdi
	movswl	10(%rdi), %esi
	movq	8(%rdx), %rbx
	imull	(%rbx), %esi
	addl	(%rax), %esi
	movl	(%rdx), %eax
	movswl	14(%rdi), %edx
	imull	%ecx, %edx
	addl	%esi, %edx
	movl	$1, (%r14)
	movl	%ecx, 4(%r14)
	movl	%eax, 8(%r14)
	movl	%edx, 12(%r14)
	movl	4(%rdi), %eax
	movl	%eax, 32(%r14)
	movl	(%rdi), %eax
	movl	%eax, 28(%r14)
	callq	_drm_rect_width
	movl	%eax, 24(%r14)
	movq	(%r15), %rdi
	callq	_drm_rect_height
	movl	%eax, 20(%r14)
	xorl	%eax, %eax
	callq	_wmb
	movl	$1, 16(%r14)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mtk_plane_atomic_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_plane_atomic_update
_mtk_plane_atomic_update:               ; @mtk_plane_atomic_update
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x0, [x0]
	bl	_to_mtk_plane_state
	ldr	x8, [x20]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x21, [x8, #16]
	cmp	x21, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x21, #16]
	ldr	x0, [x8]
	bl	_to_mtk_gem_obj
	ldr	w8, [x0]
	ldp	x9, x10, [x21]
	ldr	w9, [x9]
	ldr	w11, [x10]
	ldr	x0, [x20]
	ldrsh	w12, [x0, #10]
	ldr	x10, [x10, #8]
	ldr	w10, [x10]
	madd	w8, w10, w12, w8
	ldrsh	w10, [x0, #14]
	madd	w8, w10, w9, w8
	mov	w21, #1
	stp	w21, w9, [x19]
	stp	w11, w8, [x19, #8]
	ldr	d0, [x0]
	stur	d0, [x19, #28]
	bl	_drm_rect_width
	str	w0, [x19, #24]
	ldr	x0, [x20]
	bl	_drm_rect_height
	str	w0, [x19, #20]
	bl	_wmb
	str	w21, [x19, #16]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mtk_plane_atomic_update
.subsections_via_symbols
