	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_plane_check_src_coordinates ## -- Begin function intel_plane_check_src_coordinates
	.p2align	4, 0x90
_intel_plane_check_src_coordinates:     ## @intel_plane_check_src_coordinates
	.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
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	4(%rdi), %r15
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	callq	_drm_rotation_90_or_270
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %r12d
	movl	%r12d, %r14d
	sarl	$16, %r14d
	movq	%r15, %rdi
	callq	_drm_rect_width
	movl	%eax, %r15d
	sarl	$16, %r15d
	movl	8(%rbx), %r13d
	movl	%r13d, %eax
	sarl	$16, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_rect_height
	movq	%r14, %rsi
                                        ## kill: def $eax killed $eax def $rax
	sarl	$16, %eax
	andl	$-65536, %r12d                  ## imm = 0xFFFF0000
	movl	%r12d, 4(%rbx)
	leal	(%r15,%r14), %ecx
	shll	$16, %ecx
	movl	%ecx, 12(%rbx)
	andl	$-65536, %r13d                  ## imm = 0xFFFF0000
	movl	%r13d, 8(%rbx)
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	leal	(%rax,%r13), %ecx
	shll	$16, %ecx
	movl	%ecx, 16(%rbx)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdx
	xorl	%r14d, %r14d
	cmpl	$0, 8(%rdx)
	je	LBB0_10
## %bb.1:
	movq	%r15, %r12
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %ecx
	movl	4(%rdx), %r9d
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	testl	%edi, %edi
	je	LBB0_3
## %bb.2:
	movl	%edi, %ebx
	movl	%ecx, %edi
	movq	%rsi, %r15
	movl	%r9d, %esi
	callq	_max
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %ecx
	movl	%eax, %r9d
LBB0_3:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	LBB0_5
## %bb.4:
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_6
LBB0_5:
	testl	%edi, %edi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r12d, %edx
LBB0_9:
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r13d, %eax
	cltd
	idivl	%r9d
	testl	%edx, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	testl	%edx, %edx
	je	LBB0_10
LBB0_8:
	testl	%edi, %edi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.3(%rip), %rdi
	movl	%r13d, %esi
	movl	%ecx, %edx
	movl	%r9d, %ecx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"src x/w (%u, %u) must be a multiple of %u for %sYUV planes\n"

L_.str.1:                               ## @.str.1
	.asciz	"rotated "

L_.str.2:                               ## @.str.2
	.space	1

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"src y/h (%u, %u) must be a multiple of %u for %sYUV planes\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_plane_check_src_coordinates ; -- Begin function intel_plane_check_src_coordinates
	.p2align	2
_intel_plane_check_src_coordinates:     ; @intel_plane_check_src_coordinates
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x0
	ldr	x25, [x0, #24]
	ldr	w0, [x0]
	bl	_drm_rotation_90_or_270
	mov	x19, x0
	ldr	w26, [x24, #4]!
	asr	w21, w26, #16
	mov	x0, x24
	bl	_drm_rect_width
	asr	w23, w0, #16
	ldr	w27, [x24, #4]
	asr	w20, w27, #16
	mov	x0, x24
	bl	_drm_rect_height
	asr	w22, w0, #16
	and	w8, w26, #0xffff0000
	add	w9, w23, w21
	lsl	w9, w9, #16
	and	w10, w27, #0xffff0000
	stp	w8, w10, [x24]
	add	w8, w22, w20
	lsl	w8, w8, #16
	stp	w9, w8, [x24, #8]
	ldr	x9, [x25]
	ldr	w8, [x9, #8]
	cbz	w8, LBB0_10
; %bb.1:
	ldp	w8, w3, [x9]
	cbz	w19, LBB0_3
; %bb.2:
	mov	x0, x8
	mov	x1, x3
	bl	_max
	mov	x8, x0
	mov	x3, x0
LBB0_3:
	sdiv	w9, w21, w8
	msub	w9, w9, w8, w21
	cbnz	w9, LBB0_5
; %bb.4:
	sdiv	w9, w23, w8
	msub	w9, w9, w8, w23
	cbz	w9, LBB0_7
LBB0_5:
Lloh0:
	adrp	x9, l_.str.1@PAGE
Lloh1:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x4, x10, x9, eq
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x23
	mov	x3, x8
LBB0_6:
	bl	_DRM_DEBUG_KMS
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_7:
	sdiv	w8, w20, w3
	msub	w8, w8, w3, w20
	cbnz	w8, LBB0_9
; %bb.8:
	sdiv	w8, w22, w3
	msub	w8, w8, w3, w22
	cbz	w8, LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, l_.str.1@PAGE
Lloh10:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh11:
	adrp	x9, l_.str.2@PAGE
Lloh12:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x4, x9, x8, eq
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x22
	b	LBB0_6
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"src x/w (%u, %u) must be a multiple of %u for %sYUV planes\n"

l_.str.1:                               ; @.str.1
	.asciz	"rotated "

l_.str.2:                               ; @.str.2
	.space	1

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"src y/h (%u, %u) must be a multiple of %u for %sYUV planes\n"

.subsections_via_symbols
