	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_plane_atomic_check
_ipu_plane_atomic_check:                ## @ipu_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpl	$129, (%rdi)
	movq	24(%rsi), %rax
	sete	%cl
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rsi, %r15
	movl	12(%rsi), %esi
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	movq	%rdi, %rbx
	movb	%cl, -48(%rbp)                  ## 1-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r12
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	24(%r12), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	16(%r15), %edi
	callq	_drm_atomic_get_existing_crtc_state
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
LBB0_4:
	subl	(%rax), %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movb	-48(%rbp), %al                  ## 1-byte Reload
	movb	%al, %r14b
	movq	_DRM_PLANE_HELPER_NO_SCALING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ecx, %edx
	movl	%r14d, %r8d
	movl	$1, %r9d
	callq	_drm_atomic_helper_check_plane_state
	movq	%r13, %r12
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.7:
	cmpl	$0, 4(%r12)
	movl	$0, %r13d
	je	LBB0_5
## %bb.8:
	movl	(%rbx), %edx
	cmpl	$129, %edx
	je	LBB0_11
## %bb.9:
	cmpl	$128, %edx
	jne	LBB0_19
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rdi
	callq	_drm_rect_width
	cmpq	$12, %rax
	jle	LBB0_3
LBB0_11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rbx
	movq	%rbx, %rdi
	callq	_drm_rect_height
	cmpl	$1, %eax
	jle	LBB0_3
## %bb.12:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_17
## %bb.13:
	movq	%rbx, %rdi
	callq	_drm_rect_width
	movq	%rax, %r13
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_drm_rect_width
	cmpq	%rax, %r13
	jne	LBB0_16
## %bb.14:
	movq	%rbx, %rdi
	callq	_drm_rect_height
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_drm_rect_height
	cmpl	%eax, %ebx
	jne	LBB0_16
## %bb.15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	8(%rcx), %rax
	je	LBB0_17
LBB0_16:
	movl	$1, (%r12)
LBB0_17:
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_drm_plane_state_to_eba
	testb	$7, %al
	je	LBB0_20
## %bb.18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_19:
	leaq	L_.str(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_warn
	jmp	LBB0_3
LBB0_20:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movl	(%rax), %eax
	leal	-16385(%rax), %ecx
	cmpl	$-16385, %ecx                   ## imm = 0xBFFF
	jbe	LBB0_3
## %bb.21:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.22:
	movq	(%rcx), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_24
## %bb.23:
	movl	$1, (%r12)
LBB0_24:
	movq	8(%rdx), %rcx
	xorl	%r13d, %r13d
	movl	$-130, %eax
	addl	(%rcx), %eax
	cmpl	$13, %eax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	ja	LBB0_5
## %bb.25:
	movl	$63, %ecx
	btl	%eax, %ecx
	jb	LBB0_32
## %bb.26:
	movl	$14784, %ecx                    ## imm = 0x39C0
	btl	%eax, %ecx
	jae	LBB0_39
## %bb.27:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_drm_plane_state_to_eba
	testb	$7, %al
	jne	LBB0_3
## %bb.28:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	4(%rax), %eax
	leal	-16385(%rax), %ecx
	cmpl	$-16385, %ecx                   ## imm = 0xBFFF
	jbe	LBB0_3
## %bb.29:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.30:
	movq	(%rcx), %rcx
	cmpl	%eax, 4(%rcx)
	je	LBB0_5
## %bb.31:
	movl	$1, (%r12)
	jmp	LBB0_5
LBB0_32:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_plane_state_to_vbo
	cmpq	$16777208, %rax                 ## imm = 0xFFFFF8
	ja	LBB0_3
## %bb.33:
	movq	%rax, %rbx
	andl	$7, %eax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.34:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_38
## %bb.35:
	movq	8(%rcx), %rax
	cmpq	8(%rdx), %rax
	jne	LBB0_38
## %bb.36:
	movq	%r14, %rdi
	callq	_drm_plane_state_to_vbo
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, %rbx
	je	LBB0_38
## %bb.37:
	movl	$1, (%r12)
LBB0_38:
	movq	(%rcx), %rax
	movl	4(%rax), %ecx
	cmpl	8(%rax), %ecx
	jne	LBB0_3
LBB0_39:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_plane_state_to_ubo
	cmpq	$16777208, %rax                 ## imm = 0xFFFFF8
	ja	LBB0_3
## %bb.40:
	movq	%rax, %rbx
	andl	$7, %eax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.41:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_48
## %bb.42:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rax
	cmpq	8(%rcx), %rax
	jne	LBB0_45
## %bb.43:
	movq	%r14, %rdi
	callq	_drm_plane_state_to_ubo
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rax, %rbx
	je	LBB0_45
## %bb.44:
	movl	$1, (%r12)
LBB0_45:
	movq	(%rdx), %rax
	movl	4(%rax), %eax
	leal	-16385(%rax), %ecx
	cmpl	$-16384, %ecx                   ## imm = 0xC000
	jb	LBB0_3
## %bb.46:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	cmpl	%eax, 4(%rcx)
	je	LBB0_49
## %bb.47:
	movl	$1, (%r12)
	jmp	LBB0_49
LBB0_48:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movl	$-16385, %ecx                   ## imm = 0xBFFF
	addl	4(%rax), %ecx
	cmpl	$-16385, %ecx                   ## imm = 0xBFFF
	jbe	LBB0_3
LBB0_49:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movswl	2(%rax), %ecx
	movq	8(%rdx), %rax
	movl	8(%rax), %edx
	decl	%edx
	testl	%ecx, %edx
	jne	LBB0_3
## %bb.50:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movswl	6(%rcx), %ecx
	movl	4(%rax), %eax
	decl	%eax
	testl	%ecx, %eax
	jne	LBB0_3
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_PLANE_HELPER_NO_SCALING,4,2 ## @DRM_PLANE_HELPER_NO_SCALING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported plane type %d\n"

	.no_dead_strip	_ipu_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 ipu_plane_atomic_check
_ipu_plane_atomic_check:                ; @ipu_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
	ldr	x25, [x1, #24]
	ldr	w8, [x0]
	cmp	w8, #129
	cset	w24, eq
	cbz	x25, LBB0_48
; %bb.1:
	mov	x19, x1
	ldr	w1, [x1, #12]
	cbz	w1, LBB0_3
; %bb.2:
	mov	x22, x0
	ldp	x8, x21, [x0, #8]
	ldr	x23, [x8]
	ldr	x26, [x21, #24]
	ldr	w0, [x19, #16]
	bl	_drm_atomic_get_existing_crtc_state
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_49
LBB0_4:
Lloh3:
	adrp	x8, _DRM_PLANE_HELPER_NO_SCALING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_PLANE_HELPER_NO_SCALING@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x2
	mov	x4, x24
	mov	w5, #1
	bl	_drm_atomic_helper_check_plane_state
	cbnz	w0, LBB0_49
; %bb.5:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_48
; %bb.6:
	ldr	w2, [x22]
	cmp	w2, #129
	b.eq	LBB0_9
; %bb.7:
	cmp	w2, #128
	b.ne	LBB0_28
; %bb.8:
	add	x0, x19, #8
	bl	_drm_rect_width
	cmp	x0, #12
	b.le	LBB0_3
LBB0_9:
	add	x22, x19, #8
	mov	x0, x22
	bl	_drm_rect_height
	cmp	w0, #1
	b.le	LBB0_3
; %bb.10:
	cbz	x26, LBB0_15
; %bb.11:
	mov	x0, x22
	bl	_drm_rect_width
	mov	x24, x0
	add	x23, x21, #8
	mov	x0, x23
	bl	_drm_rect_width
	cmp	x24, x0
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x22
	bl	_drm_rect_height
	mov	x22, x0
	mov	x0, x23
	bl	_drm_rect_height
	cmp	w22, w0
	b.ne	LBB0_14
; %bb.13:
	ldr	x8, [x25, #8]
	ldr	x9, [x26, #8]
	cmp	x8, x9
	b.eq	LBB0_15
LBB0_14:
	mov	w8, #1
	str	w8, [x20]
LBB0_15:
	mov	x0, x19
	mov	w1, #0
	bl	_drm_plane_state_to_eba
	tst	x0, #0x7
	b.ne	LBB0_3
; %bb.16:
	ldr	x8, [x25]
	ldr	w8, [x8]
	mov	w9, #-16385
	add	w10, w8, w9
	cmp	w10, w9
	b.ls	LBB0_3
; %bb.17:
	cbz	x26, LBB0_20
; %bb.18:
	ldr	x9, [x26]
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_20
; %bb.19:
	mov	w8, #1
	str	w8, [x20]
LBB0_20:
	ldr	x8, [x25, #8]
	ldr	w8, [x8]
	sub	w8, w8, #130
	cmp	w8, #13
	b.hi	LBB0_48
; %bb.21:
	mov	w9, #1
	lsl	w8, w9, w8
	tst	w8, #0x3f
	b.ne	LBB0_29
; %bb.22:
	mov	w9, #14784
	tst	w8, w9
	b.eq	LBB0_36
; %bb.23:
	mov	x0, x19
	mov	w1, #1
	bl	_drm_plane_state_to_eba
	tst	x0, #0x7
	b.ne	LBB0_3
; %bb.24:
	ldr	x8, [x25]
	ldr	w8, [x8, #4]
	mov	w9, #-16385
	add	w10, w8, w9
	cmp	w10, w9
	b.ls	LBB0_3
; %bb.25:
	cbz	x26, LBB0_48
; %bb.26:
	ldr	x9, [x26]
	ldr	w9, [x9, #4]
	cmp	w9, w8
	b.eq	LBB0_48
; %bb.27:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_49
LBB0_28:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dev_warn
	b	LBB0_3
LBB0_29:
	mov	x0, x19
	bl	_drm_plane_state_to_vbo
	mov	w8, #16777208
	cmp	x0, x8
	b.hi	LBB0_3
; %bb.30:
	mov	x22, x0
	and	x8, x0, #0x7
	cbnz	x8, LBB0_3
; %bb.31:
	cbz	x26, LBB0_35
; %bb.32:
	ldr	x8, [x25, #8]
	ldr	x9, [x26, #8]
	cmp	x8, x9
	b.ne	LBB0_35
; %bb.33:
	mov	x0, x21
	bl	_drm_plane_state_to_vbo
	cmp	x22, x0
	b.eq	LBB0_35
; %bb.34:
	mov	w8, #1
	str	w8, [x20]
LBB0_35:
	ldr	x8, [x25]
	ldp	w9, w8, [x8, #4]
	cmp	w9, w8
	b.ne	LBB0_3
LBB0_36:
	mov	x0, x19
	bl	_drm_plane_state_to_ubo
	mov	w8, #16777208
	cmp	x0, x8
	b.hi	LBB0_3
; %bb.37:
	mov	x22, x0
	and	x8, x0, #0x7
	cbnz	x8, LBB0_3
; %bb.38:
	cbz	x26, LBB0_45
; %bb.39:
	ldr	x8, [x25, #8]
	ldr	x9, [x26, #8]
	cmp	x8, x9
	b.ne	LBB0_42
; %bb.40:
	mov	x0, x21
	bl	_drm_plane_state_to_ubo
	cmp	x22, x0
	b.eq	LBB0_42
; %bb.41:
	mov	w8, #1
	str	w8, [x20]
LBB0_42:
	ldr	x8, [x25]
	ldr	w8, [x8, #4]
	mov	w9, #-16385
	add	w9, w8, w9
	cmn	w9, #4, lsl #12                 ; =16384
	b.lo	LBB0_3
; %bb.43:
	ldr	x9, [x26]
	ldr	w9, [x9, #4]
	cmp	w9, w8
	b.eq	LBB0_46
; %bb.44:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_46
LBB0_45:
	ldr	x8, [x25]
	ldr	w8, [x8, #4]
	mov	w9, #-16385
	add	w8, w8, w9
	cmp	w8, w9
	b.ls	LBB0_3
LBB0_46:
	ldrsh	w9, [x19, #2]
	ldr	x8, [x25, #8]
	ldr	w10, [x8, #8]
	sub	w10, w10, #1
	tst	w10, w9
	b.ne	LBB0_3
; %bb.47:
	ldrsh	w9, [x19, #6]
	ldr	w8, [x8, #4]
	sub	w8, w8, #1
	tst	w8, w9
	b.ne	LBB0_3
LBB0_48:
	mov	w0, #0
LBB0_49:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_PLANE_HELPER_NO_SCALING,4,2 ; @DRM_PLANE_HELPER_NO_SCALING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported plane type %d\n"

	.no_dead_strip	_ipu_plane_atomic_check
.subsections_via_symbols
