	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_plane_atomic_check
_tegra_plane_atomic_check:              ## @tegra_plane_atomic_check
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_tegra_plane_state
	movq	%rax, %r14
	movq	_DRM_MODE_ROTATE_0@GOTPCREL(%rip), %rax
	movq	_DRM_MODE_REFLECT_Y@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	orl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_to_tegra_plane
	movq	%rax, %rbx
	movl	12(%r12), %edi
	callq	_to_tegra_dc
	cmpl	$0, 12(%r12)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	(%r12), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edi
	leaq	8(%r14), %rsi
	leaq	4(%r14), %rdx
	callq	_tegra_plane_format
	testl	%eax, %eax
	js	LBB0_14
## %bb.3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rbx
	movq	(%r13), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_tegra_plane_setup_legacy_state
	testl	%eax, %eax
	js	LBB0_14
LBB0_5:
	addq	$16, %r14
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_tegra_fb_get_tiling
	testl	%eax, %eax
	js	LBB0_14
## %bb.6:
	movq	(%r14), %rax
	movq	_TEGRA_BO_TILING_MODE_BLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.7:
	movq	(%r13), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
LBB0_10:
	movl	8(%r12), %edi
	movl	%r15d, %esi
	callq	_drm_rotation_simplify
	xorl	%ecx, %ecx
	movq	_DRM_MODE_REFLECT_Y@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	setne	%cl
	movl	%ecx, (%rbx)
	movq	(%r12), %rax
	movq	8(%rax), %rcx
	cmpl	$3, (%rcx)
	jl	LBB0_13
## %bb.11:
	movq	(%rax), %rax
	movq	16(%rax), %rcx
	cmpq	8(%rax), %rcx
	jne	LBB0_12
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_tegra_plane_state_add
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
	jmp	LBB0_14
LBB0_1:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
LBB0_9:
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_ROTATE_0,4,2          ## @DRM_MODE_ROTATE_0
	.comm	_DRM_MODE_REFLECT_Y,4,2         ## @DRM_MODE_REFLECT_Y
	.comm	_TEGRA_BO_TILING_MODE_BLOCK,8,3 ## @TEGRA_BO_TILING_MODE_BLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hardware doesn't support block linear mode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"unsupported UV-plane configuration\n"

	.no_dead_strip	_tegra_plane_atomic_check
.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_check
_tegra_plane_atomic_check:              ; @tegra_plane_atomic_check
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_to_tegra_plane_state
	mov	x21, x0
Lloh0:
	adrp	x8, _DRM_MODE_ROTATE_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_MODE_ROTATE_0@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
Lloh3:
	adrp	x24, _DRM_MODE_REFLECT_Y@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DRM_MODE_REFLECT_Y@GOTPAGEOFF]
	ldr	w26, [x24]
	mov	x0, x20
	bl	_to_tegra_plane
	mov	x20, x0
	ldr	w0, [x19, #12]
	bl	_to_tegra_dc
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x22, x0
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #4]
	add	x1, x21, #8
	add	x2, x21, #4
	bl	_tegra_plane_format
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x21
	bl	_tegra_plane_setup_legacy_state
	tbnz	w0, #31, LBB0_11
LBB0_4:
	add	x23, x21, #16
	ldr	x0, [x19]
	mov	x1, x23
	bl	_tegra_fb_get_tiling
	tbnz	w0, #31, LBB0_11
; %bb.5:
	ldr	x8, [x23]
Lloh5:
	adrp	x9, _TEGRA_BO_TILING_MODE_BLOCK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TEGRA_BO_TILING_MODE_BLOCK@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x22]
	ldr	w8, [x8]
	cbz	w8, LBB0_12
LBB0_7:
	orr	w1, w26, w25
	ldr	w0, [x19, #8]
	bl	_drm_rotation_simplify
	ldr	w8, [x24]
	tst	w8, w0
	cset	w8, ne
	str	w8, [x21]
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	cmp	w9, #3
	b.lt	LBB0_9
; %bb.8:
	ldr	x8, [x8]
	ldp	x8, x9, [x8, #8]
	cmp	x9, x8
	b.ne	LBB0_13
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_tegra_plane_state_add
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_14:
	bl	_DRM_ERROR
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_ROTATE_0,4,2          ; @DRM_MODE_ROTATE_0
	.comm	_DRM_MODE_REFLECT_Y,4,2         ; @DRM_MODE_REFLECT_Y
	.comm	_TEGRA_BO_TILING_MODE_BLOCK,8,3 ; @TEGRA_BO_TILING_MODE_BLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hardware doesn't support block linear mode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"unsupported UV-plane configuration\n"

	.no_dead_strip	_tegra_plane_atomic_check
.subsections_via_symbols
