	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_se_check_scaling
_malidp_se_check_scaling:               ## @malidp_se_check_scaling
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	20(%rsi), %esi
	movl	24(%r12), %edi
	callq	_drm_atomic_get_existing_crtc_state
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_malidp_crtc_state
	movq	%rax, %r14
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_drm_atomic_helper_check_plane_state
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	_MALIDP_ROTATED_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r12), %eax
	sete	%cl
	movswl	6(%r12,%rcx,4), %ecx
	cmpl	%ecx, 12(%r12)
	jne	LBB0_6
## %bb.4:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movswl	6(%r12,%rcx,4), %eax
	cmpl	%eax, 16(%r12)
	jne	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
	jmp	LBB0_8
LBB0_6:
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	_DE_SMART@GOTPCREL(%rip), %rcx
	movq	_DE_GRAPHICS2@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	orl	%eax, (%r14)
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_MALIDP_ROTATED_MASK,4,2        ## @MALIDP_ROTATED_MASK
	.comm	_DE_SMART,4,2                   ## @DE_SMART
	.comm	_DE_GRAPHICS2,4,2               ## @DE_GRAPHICS2
	.no_dead_strip	_malidp_se_check_scaling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp_se_check_scaling
_malidp_se_check_scaling:               ; @malidp_se_check_scaling
	.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	x21, x1
	mov	x20, x0
	ldp	w1, w0, [x1, #20]
	bl	_drm_atomic_get_existing_crtc_state
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
	bl	_to_malidp_crtc_state
	mov	x19, x0
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	w4, #1
	mov	w5, #1
	bl	_drm_atomic_helper_check_plane_state
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _MALIDP_ROTATED_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MALIDP_ROTATED_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ands	w8, w9, w8
	mov	w9, #4
	mov	w10, #8
	csel	x9, x10, x9, eq
	add	x9, x21, x9
	ldrsh	w9, [x9, #2]
	ldr	w10, [x21, #12]
	cmp	w10, w9
	b.ne	LBB0_5
; %bb.3:
	cmp	w8, #0
	mov	w8, #8
	mov	w9, #4
	csel	x8, x9, x8, eq
	add	x8, x21, x8
	ldrsh	w8, [x8, #2]
	ldr	w9, [x21, #16]
	cmp	w9, w8
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	b	LBB0_9
LBB0_5:
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DE_SMART@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DE_SMART@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _DE_GRAPHICS2@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DE_GRAPHICS2@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_8
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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_8:
	mov	w0, #0
	ldr	w9, [x19]
	orr	w8, w9, w8
LBB0_9:
	str	w8, [x19]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_MALIDP_ROTATED_MASK,4,2        ; @MALIDP_ROTATED_MASK
	.comm	_DE_SMART,4,2                   ; @DE_SMART
	.comm	_DE_GRAPHICS2,4,2               ; @DE_GRAPHICS2
	.no_dead_strip	_malidp_se_check_scaling
.subsections_via_symbols
