	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun8i_vi_layer_atomic_check
_sun8i_vi_layer_atomic_check:           ## @sun8i_vi_layer_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, %rbx
	callq	_plane_to_sun8i_vi_layer
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_drm_atomic_get_existing_crtc_state
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_1:
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_DRM_PLANE_HELPER_NO_SCALING@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %r13d
	movl	(%r15), %edi
	callq	_BIT
	movl	%r12d, %ecx
	testl	%r13d, %eax
	je	LBB0_7
## %bb.6:
	movq	_SUN8I_VI_SCALER_SCALE_MIN@GOTPCREL(%rip), %rax
	movq	_SUN8I_VI_SCALER_SCALE_MAX@GOTPCREL(%rip), %rcx
	movl	(%rax), %r12d
	movl	(%rcx), %ecx
LBB0_7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movl	$1, %r8d
	movl	$1, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_atomic_helper_check_plane_state ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_PLANE_HELPER_NO_SCALING,4,2 ## @DRM_PLANE_HELPER_NO_SCALING
	.comm	_SUN8I_VI_SCALER_SCALE_MIN,4,2  ## @SUN8I_VI_SCALER_SCALE_MIN
	.comm	_SUN8I_VI_SCALER_SCALE_MAX,4,2  ## @SUN8I_VI_SCALER_SCALE_MAX
	.no_dead_strip	_sun8i_vi_layer_atomic_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun8i_vi_layer_atomic_check
_sun8i_vi_layer_atomic_check:           ; @sun8i_vi_layer_atomic_check
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	bl	_plane_to_sun8i_vi_layer
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w0, [x19]
	bl	_drm_atomic_get_existing_crtc_state
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh3:
	adrp	x8, _DRM_PLANE_HELPER_NO_SCALING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_PLANE_HELPER_NO_SCALING@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	w23, [x8]
	ldr	w0, [x21]
	bl	_BIT
Lloh6:
	adrp	x8, _SUN8I_VI_SCALER_SCALE_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SUN8I_VI_SCALER_SCALE_MIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _SUN8I_VI_SCALER_SCALE_MAX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SUN8I_VI_SCALER_SCALE_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w0, w23
	csel	w2, w22, w8, eq
	csel	w3, w22, w9, eq
	mov	x0, x19
	mov	x1, x20
	mov	w4, #1
	mov	w5, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_drm_atomic_helper_check_plane_state
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_PLANE_HELPER_NO_SCALING,4,2 ; @DRM_PLANE_HELPER_NO_SCALING
	.comm	_SUN8I_VI_SCALER_SCALE_MIN,4,2  ; @SUN8I_VI_SCALER_SCALE_MIN
	.comm	_SUN8I_VI_SCALER_SCALE_MAX,4,2  ; @SUN8I_VI_SCALER_SCALE_MAX
	.no_dead_strip	_sun8i_vi_layer_atomic_check
.subsections_via_symbols
