	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_plane_atomic_update
_tegra_plane_atomic_update:             ## @tegra_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	%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	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_to_tegra_plane_state
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	24(%rax), %r15
	movq	%rbx, %rdi
	callq	_to_tegra_plane
	movq	%rax, %r14
	movq	(%rbx), %rax
	cmpl	$0, 32(%rax)
	je	LBB0_11
## %bb.1:
	cmpq	$0, 24(%rax)
	je	LBB0_11
## %bb.2:
	cmpl	$0, 20(%rax)
	je	LBB0_12
## %bb.3:
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
	movq	(%rbx), %rax
	leaq	12(%rax), %rdi
	movswl	14(%rax), %ecx
	movl	%ecx, -56(%rbp)
	movswl	18(%rax), %eax
	movl	%eax, -52(%rbp)
	callq	_drm_rect_width
	sarl	$16, %eax
	movl	%eax, -48(%rbp)
	movq	(%rbx), %rdi
	addq	$12, %rdi
	callq	_drm_rect_height
	sarl	$16, %eax
	movl	%eax, -44(%rbp)
	movq	(%rbx), %rax
	leaq	4(%rax), %rdi
	movl	4(%rax), %ecx
	movl	%ecx, -72(%rbp)
	movl	8(%rax), %eax
	movl	%eax, -68(%rbp)
	callq	_drm_rect_width
	movl	%eax, -64(%rbp)
	movq	(%rbx), %rdi
	addq	$4, %rdi
	callq	_drm_rect_height
	movl	%eax, -60(%rbp)
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	movl	%eax, -112(%rbp)
	movq	%r15, %rdi
	callq	_tegra_fb_is_bottom_up
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	cmpq	$0, 16(%r12)
	setne	%cl
LBB0_5:
	movl	%ecx, -108(%rbp)
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movl	8(%r12), %eax
	movl	%eax, -80(%rbp)
	movl	4(%r12), %eax
	movl	%eax, -84(%rbp)
	movl	(%r12), %eax
	movl	%eax, -88(%rbp)
	movq	16(%r15), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_10
## %bb.6:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_tegra_fb_get_plane
	movq	8(%r15), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	-96(%rbp), %rax
	movq	%rcx, (%rax)
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	-104(%rbp), %rcx
	movl	%eax, (%rcx)
	movq	16(%r15), %rax
	cmpl	$2, 8(%rax)
	jb	LBB0_10
## %bb.7:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_tegra_fb_get_plane
	movq	8(%r15), %rcx
	movq	8(%rcx), %rcx
	addq	(%rax), %rcx
	movq	-96(%rbp), %rax
	movq	%rcx, 8(%rax)
	movq	(%r15), %rax
	movl	4(%rax), %eax
	movq	-104(%rbp), %rcx
	movl	%eax, 4(%rcx)
	movq	16(%r15), %rax
	cmpl	$3, 8(%rax)
	jb	LBB0_10
## %bb.8:
	movl	$2, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_tegra_fb_get_plane
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	addq	(%rax), %rcx
	movq	-96(%rbp), %rax
	movq	%rcx, (%rax,%rbx,8)
	incq	%rbx
	movq	16(%r15), %rax
	movl	8(%rax), %eax
	cmpq	%rax, %rbx
	jb	LBB0_9
LBB0_10:
	leaq	-112(%rbp), %rsi
	movq	%r14, %rdi
	callq	_tegra_dc_setup_window
LBB0_11:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tegra_plane_atomic_disable     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tegra_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 tegra_plane_atomic_update
_tegra_plane_atomic_update:             ; @tegra_plane_atomic_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x23, x1
	mov	x21, x0
	ldr	x0, [x0]
	bl	_to_tegra_plane_state
	mov	x22, x0
	ldr	x8, [x21]
	ldr	x19, [x8, #24]
	mov	x0, x21
	bl	_to_tegra_plane
	ldr	x8, [x21]
	ldr	w9, [x8, #32]
	cbz	w9, LBB0_13
; %bb.1:
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_13
; %bb.2:
	ldr	w8, [x8, #20]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #72
	bl	_memset
	ldr	x0, [x21]
	ldr	d0, [x0, #12]!
	sshr.2s	v0, v0, #16
	str	d0, [sp, #64]
	bl	_drm_rect_width
	asr	w8, w0, #16
	str	w8, [sp, #72]
	ldr	x8, [x21]
	add	x0, x8, #12
	bl	_drm_rect_height
	asr	w8, w0, #16
	str	w8, [sp, #76]
	ldr	x0, [x21]
	ldr	d0, [x0, #4]!
	str	d0, [sp, #48]
	bl	_drm_rect_width
	str	w0, [sp, #56]
	ldr	x8, [x21]
	add	x0, x8, #4
	bl	_drm_rect_height
	str	w0, [sp, #60]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	lsl	w8, w8, #3
	str	w8, [sp, #8]
	mov	x0, x19
	bl	_tegra_fb_is_bottom_up
	cbz	x0, LBB0_6
; %bb.4:
	mov	w8, #1
	b	LBB0_7
LBB0_5:
	mov	x0, x21
	mov	x1, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_tegra_plane_atomic_disable
LBB0_6:
	ldr	x8, [x22, #16]
	cmp	x8, #0
	cset	w8, ne
LBB0_7:
	str	w8, [sp, #12]
	ldr	x8, [x21]
	ldr	w8, [x8]
	str	w8, [sp, #44]
	ldr	w8, [x22, #8]
	str	w8, [sp, #40]
	ldr	d0, [x22]
	str	d0, [sp, #32]
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #8]
	cbz	w8, LBB0_12
; %bb.8:
	mov	x0, x19
	mov	w1, #0
	bl	_tegra_fb_get_plane
	ldr	x8, [x0]
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	add	x8, x9, x8
	ldr	x9, [sp, #24]
	str	x8, [x9]
	ldr	x8, [x19]
	ldr	w8, [x8]
	ldr	x9, [sp, #16]
	str	w8, [x9]
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #8]
	cmp	w8, #2
	b.lo	LBB0_12
; %bb.9:
	mov	x0, x19
	mov	w1, #1
	bl	_tegra_fb_get_plane
	ldr	x8, [x0]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, #8]
	add	x8, x9, x8
	ldr	x9, [sp, #24]
	str	x8, [x9, #8]
	ldr	x8, [x19]
	ldr	w8, [x8, #4]
	ldr	x9, [sp, #16]
	str	w8, [x9, #4]
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #8]
	cmp	w8, #3
	b.lo	LBB0_12
; %bb.10:
	mov	w21, #2
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_tegra_fb_get_plane
	ldr	x8, [x0]
	ldr	x9, [x19, #8]
	lsl	x10, x21, #3
	ldr	x9, [x9, x10]
	add	x8, x9, x8
	ldr	x9, [sp, #24]
	str	x8, [x9, x10]
	add	x21, x21, #1
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #8]
	cmp	x21, x8
	b.lo	LBB0_11
LBB0_12:
	add	x1, sp, #8
	mov	x0, x20
	bl	_tegra_dc_setup_window
LBB0_13:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tegra_plane_atomic_update
.subsections_via_symbols
