	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_armada_drm_plane_atomic_check  ## -- Begin function armada_drm_plane_atomic_check
	.p2align	4, 0x90
_armada_drm_plane_atomic_check:         ## @armada_drm_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, %r13
	movq	%rsi, %rdi
	callq	_to_armada_plane_state
	cmpl	$0, 48(%r13)
	je	LBB0_2
## %bb.1:
	movq	%rax, %r14
	movq	40(%r13), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movl	$0, (%r13)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	32(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rsi
	callq	_drm_atomic_get_existing_crtc_state
	movq	%rax, %r12
	jmp	LBB0_6
LBB0_5:
	movq	(%rbx), %r12
LBB0_6:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_drm_atomic_helper_check_plane_state
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	(%r12), %r15d
	je	LBB0_11
## %bb.8:
	movl	8(%r13), %eax
	orl	4(%r13), %eax
	testb	$1, %al
	jne	LBB0_9
## %bb.10:
	leaq	4(%r13), %rbx
	leaq	16(%r13), %rdi
	callq	_drm_rect_height
	sarl	$17, %eax
	movl	%eax, (%r14)
	movl	4(%r13), %eax
	sarl	%eax
	movl	%eax, 4(%r14)
	movq	%rbx, %rdi
	callq	_drm_rect_height
	sarl	%eax
	jmp	LBB0_12
LBB0_11:
	leaq	16(%r13), %rdi
	callq	_drm_rect_height
	sarl	$16, %eax
	movl	%eax, (%r14)
	leaq	4(%r13), %rdi
	movl	4(%r13), %eax
	movl	%eax, 4(%r14)
	callq	_drm_rect_height
LBB0_12:
	movl	%eax, 8(%r14)
	shll	$16, (%r14)
	leaq	16(%r13), %rdi
	callq	_drm_rect_width
	sarl	$16, %eax
	orl	%eax, (%r14)
	movl	4(%r14), %eax
	shll	$16, %eax
	leaq	4(%r13), %rdi
	movzwl	12(%r13), %ecx
	orl	%eax, %ecx
	movl	%ecx, 4(%r14)
	shll	$16, 8(%r14)
	callq	_drm_rect_width
	movzwl	%ax, %eax
	orl	%eax, 8(%r14)
	movl	16(%r14), %edx
	movl	20(%r14), %esi
	movq	%r13, %rdi
	movl	%r15d, %ecx
	callq	_armada_drm_plane_calc
	movl	%r15d, 12(%r14)
	jmp	LBB0_13
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_armada_drm_plane_atomic_check  ; -- Begin function armada_drm_plane_atomic_check
	.p2align	2
_armada_drm_plane_atomic_check:         ; @armada_drm_plane_atomic_check
	.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	x19, x1
	mov	x0, x1
	bl	_to_armada_plane_state
	ldr	w8, [x19, #48]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x21, [x19, #40]
	cmp	x21, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_2:
	mov	w0, #0
	str	wzr, [x19]
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
LBB0_4:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_6
; %bb.5:
	mov	x1, x21
	bl	_drm_atomic_get_existing_crtc_state
	mov	x21, x0
	b	LBB0_7
LBB0_6:
	ldr	x21, [x21]
LBB0_7:
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w4, #1
	mov	w5, #0
	bl	_drm_atomic_helper_check_plane_state
	cbnz	w0, LBB0_3
; %bb.8:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ands	w21, w9, w8
	b.eq	LBB0_11
; %bb.9:
	mov	x22, x19
	ldp	w8, w9, [x22, #4]!
	orr	w8, w9, w8
	tbnz	w8, #0, LBB0_13
; %bb.10:
	add	x0, x19, #16
	bl	_drm_rect_height
	asr	w8, w0, #17
	ldr	w9, [x19, #4]
	asr	w9, w9, #1
	stp	w8, w9, [x20]
	mov	x0, x22
	bl	_drm_rect_height
	asr	w0, w0, #1
	b	LBB0_12
LBB0_11:
	add	x0, x19, #16
	bl	_drm_rect_height
	mov	x8, x19
	ldr	w9, [x8, #4]!
	asr	w10, w0, #16
	stp	w10, w9, [x20]
	mov	x0, x8
	bl	_drm_rect_height
LBB0_12:
	str	w0, [x20, #8]
	ldr	w8, [x20]
	lsl	w8, w8, #16
	str	w8, [x20]
	add	x0, x19, #16
	bl	_drm_rect_width
	ldp	w8, w9, [x20]
	orr	w8, w8, w0, asr #16
	add	x0, x19, #4
	ldrh	w10, [x19, #12]
	bfi	w10, w9, #16, #16
	stp	w8, w10, [x20]
	ldr	w8, [x20, #8]
	lsl	w8, w8, #16
	str	w8, [x20, #8]
	bl	_drm_rect_width
	and	w8, w0, #0xffff
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	ldp	w2, w1, [x20, #16]
	mov	x0, x19
	mov	x3, x21
	bl	_armada_drm_plane_calc
	mov	w0, #0
	str	w21, [x20, #12]
	b	LBB0_3
LBB0_13:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
