	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_atomic_plane_check
_drm_atomic_plane_check:                ## @drm_atomic_plane_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	64(%rsi), %r15
	movq	48(%rsi), %r12
	movq	56(%rsi), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	testq	%r12, %r12
	jne	LBB0_3
## %bb.2:
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_31
LBB0_3:
	testq	%r12, %r12
	je	LBB0_6
## %bb.4:
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_31:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
LBB0_32:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_33:
	subl	(%rax), %r14d
LBB0_34:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%r14d, %r14d
	testq	%rbx, %rbx
	je	LBB0_34
## %bb.7:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_drm_crtc_mask
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_8
## %bb.9:
	movq	16(%r12), %rax
	movl	(%rax), %esi
	movl	8(%r12), %edx
	movq	%r15, %rdi
	callq	_drm_plane_check_pixel_format
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	movl	4(%r15), %r14d
	movl	8(%r15), %r15d
	movq	16(%r12), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	callq	_drm_get_format_name
	movl	8(%r12), %r8d
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
	movl	%ebx, %r14d
	jmp	LBB0_34
LBB0_8:
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movl	4(%r15), %r8d
	movl	8(%r15), %ecx
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
	jmp	LBB0_32
LBB0_11:
	movq	24(%r13), %r9
	movq	40(%r13), %rcx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rdx
	subq	%rcx, %rdx
	jl	LBB0_15
## %bb.12:
	cmpq	%rdx, %r9
	jg	LBB0_15
## %bb.13:
	subq	32(%r13), %rax
	jl	LBB0_15
## %bb.14:
	cmpq	%rax, 16(%r13)
	jle	LBB0_16
LBB0_15:
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	movq	32(%r13), %r8
	subq	$8, %rsp
	leaq	L_.str.4(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	pushq	16(%r13)
	callq	_DRM_DEBUG_ATOMIC
	addq	$16, %rsp
	movq	_ERANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_16:
	movl	(%r12), %r11d
	movl	4(%r12), %edx
	movl	%r11d, %r12d
	shll	$16, %r12d
	movl	(%r13), %edi
	movl	4(%r13), %eax
	movl	%r12d, %ecx
	subl	%edi, %ecx
	jb	LBB0_20
## %bb.17:
	cmpl	%ecx, %eax
	ja	LBB0_20
## %bb.18:
	movl	%edx, %esi
	shll	$16, %esi
	movl	%esi, %ecx
	subl	8(%r13), %ecx
	jb	LBB0_20
## %bb.19:
	cmpl	%ecx, 12(%r13)
	jbe	LBB0_21
LBB0_20:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	movl	%edi, %ecx
	shrl	$16, %ecx
	movzwl	%di, %edi
	imull	$15625, %edi, %r8d              ## imm = 0x3D09
	shrl	$10, %r8d
	movl	8(%r13), %r9d
	movl	12(%r13), %edi
	movzwl	%r9w, %ebx
	shrl	$16, %r9d
	imull	$15625, %ebx, %r15d             ## imm = 0x3D09
	shrl	$10, %r15d
	movl	%eax, %r12d
	shrl	$16, %r12d
	movzwl	%ax, %eax
	imull	$15625, %eax, %r13d             ## imm = 0x3D09
	shrl	$10, %r13d
	movzwl	%di, %eax
	movl	%edi, %ebx
	shrl	$16, %ebx
	imull	$15625, %eax, %r10d             ## imm = 0x3D09
	shrl	$10, %r10d
	subq	$8, %rsp
	leaq	L_.str.5(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	%r11
	pushq	%r10
	pushq	%rbx
	pushq	%r13
	pushq	%r12
	pushq	%r15
	callq	_DRM_DEBUG_ATOMIC
	addq	$64, %rsp
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_21:
	movq	%r13, %rdi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	callq	_drm_plane_get_damage_clips
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_drm_plane_get_damage_clips_count
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	testq	%rax, %rax
	jle	LBB0_29
## %bb.22:
	incq	%rax
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %ecx
	movl	4(%rbx), %r9d
	movl	8(%rbx), %r8d
	movl	12(%rbx), %r10d
	cmpl	%r9d, %ecx
	jae	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	cmpl	%r10d, %r8d
	jae	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_23 Depth=1
	cmpl	%r12d, %r9d
	ja	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_23 Depth=1
	cmpl	%edx, %r10d
	ja	LBB0_27
## %bb.28:                              ##   in Loop: Header=BB0_23 Depth=1
	decq	%rax
	addq	$16, %rbx
	cmpq	$1, %rax
	jg	LBB0_23
LBB0_29:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_plane_switching_crtc
	testq	%rax, %rax
	je	LBB0_34
## %bb.30:
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_31
LBB0_27:
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	subq	$8, %rsp
	leaq	L_.str.6(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	pushq	%r10
	callq	_DRM_DEBUG_ATOMIC
	addq	$16, %rsp
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[PLANE:%d:%s] CRTC set but no FB\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"[PLANE:%d:%s] FB set but no CRTC\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n"

L_.str.3:                               ## @.str.3
	.asciz	"[PLANE:%d:%s] invalid pixel format %s, modifier 0x%llx\n"

	.comm	_INT_MAX,8,3                    ## @INT_MAX
L_.str.4:                               ## @.str.4
	.asciz	"[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
L_.str.5:                               ## @.str.5
	.asciz	"[PLANE:%d:%s] invalid source coordinates %u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.6:                               ## @.str.6
	.asciz	"[PLANE:%d:%s] invalid damage clip %d %d %d %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"[PLANE:%d:%s] switching CRTC directly\n"

	.no_dead_strip	_drm_atomic_plane_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_atomic_plane_check
_drm_atomic_plane_check:                ; @drm_atomic_plane_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	ldp	x22, x19, [x1, #56]
	ldr	x23, [x1, #48]
	cmp	x22, #0
	ccmp	x23, #0, #0, ne
	b.eq	LBB0_6
; %bb.1:
	cmp	x23, #0
	ccmp	x22, #0, #0, ne
	b.eq	LBB0_7
; %bb.2:
	cbz	x22, LBB0_10
; %bb.3:
	mov	x20, x1
	mov	x21, x0
	ldr	w24, [x19]
	mov	x0, x22
	bl	_drm_crtc_mask
	tst	w0, w24
	b.eq	LBB0_11
; %bb.4:
	ldr	x8, [x23, #16]
	ldr	w1, [x8]
	ldr	w2, [x23, #8]
	mov	x0, x19
	bl	_drm_plane_check_pixel_format
	cbz	w0, LBB0_12
; %bb.5:
	mov	x22, x0
	ldp	w19, w20, [x19, #4]
	ldr	x8, [x23, #16]
	ldr	w0, [x8]
	sub	x1, x29, #56
	bl	_drm_get_format_name
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x23, #8]
	stp	x0, x8, [sp]
Lloh0:
	adrp	x0, l_.str.3@PAGE
Lloh1:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_DRM_DEBUG_ATOMIC
	b	LBB0_10
LBB0_6:
	ldp	w2, w1, [x19, #4]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldp	w2, w1, [x19, #4]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_DRM_DEBUG_ATOMIC
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_11:
	ldp	w2, w1, [x22]
	ldp	w9, w8, [x19, #4]
	stp	x8, x9, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_12:
	ldr	x8, [x20, #40]
Lloh10:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh11:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x9]
	ldr	x9, [x20, #24]
	subs	x11, x10, x8
	ccmp	x9, x11, #0, ge
	b.gt	LBB0_15
; %bb.13:
	ldr	x11, [x20, #32]
	subs	x10, x10, x11
	b.lt	LBB0_15
; %bb.14:
	ldr	x11, [x20, #16]
	cmp	x11, x10
	b.le	LBB0_16
LBB0_15:
	ldp	w2, w1, [x19, #4]
	ldr	x10, [x20, #32]
	ldr	x11, [x20, #16]
	stp	x9, x11, [sp, #16]
	stp	x8, x10, [sp]
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_ATOMIC
Lloh15:
	adrp	x8, _ERANGE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_9
LBB0_16:
	ldp	w8, w9, [x23]
	lsl	w23, w8, #16
	ldp	w11, w10, [x20]
	subs	w12, w23, w11
	b.lo	LBB0_20
; %bb.17:
	cmp	w10, w12
	b.hi	LBB0_20
; %bb.18:
	lsl	w24, w9, #16
	ldr	w12, [x20, #8]
	subs	w12, w24, w12
	b.lo	LBB0_20
; %bb.19:
	ldr	w13, [x20, #12]
	cmp	w13, w12
	b.ls	LBB0_21
LBB0_20:
	ldp	w2, w1, [x19, #4]
	lsr	w12, w11, #16
	and	w11, w11, #0xffff
	mov	w13, #15625
	mul	w11, w11, w13
	lsr	w11, w11, #10
	ldp	w14, w15, [x20, #8]
	lsr	w16, w14, #16
	and	w14, w14, #0xffff
	mul	w14, w14, w13
	lsr	w14, w14, #10
	lsr	w17, w10, #16
	and	w10, w10, #0xffff
	mul	w10, w10, w13
	lsr	w10, w10, #10
	lsr	w3, w15, #16
	and	w15, w15, #0xffff
	mul	w13, w15, w13
	lsr	w13, w13, #10
	stp	x8, x9, [sp, #64]
	stp	x17, x10, [sp, #32]
	stp	x12, x11, [sp]
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	stp	x3, x13, [sp, #48]
	stp	x16, x14, [sp, #16]
	bl	_DRM_DEBUG_ATOMIC
Lloh19:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_9
LBB0_21:
	mov	x0, x20
	bl	_drm_plane_get_damage_clips
	mov	x22, x0
	mov	x0, x20
	bl	_drm_plane_get_damage_clips_count
	cmp	x0, #1
	b.lt	LBB0_25
; %bb.22:
	add	x8, x0, #1
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldp	w9, w11, [x22]
	ldp	w10, w12, [x22, #8]
	cmp	w9, w11
	ccmp	w10, w12, #2, lo
	ccmp	w11, w23, #2, lo
	ccmp	w12, w24, #2, ls
	b.hi	LBB0_27
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	sub	x8, x8, #1
	add	x22, x22, #16
	cmp	x8, #1
	b.gt	LBB0_23
LBB0_25:
	mov	x0, x21
	mov	x1, x20
	bl	_plane_switching_crtc
	cbz	x0, LBB0_28
; %bb.26:
	ldp	w2, w1, [x19, #4]
Lloh21:
	adrp	x0, l_.str.7@PAGE
Lloh22:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_8
LBB0_27:
	ldp	w2, w1, [x19, #4]
	stp	x11, x12, [sp, #16]
	stp	x9, x10, [sp]
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_8
LBB0_28:
	mov	w22, #0
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[PLANE:%d:%s] CRTC set but no FB\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"[PLANE:%d:%s] FB set but no CRTC\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n"

l_.str.3:                               ; @.str.3
	.asciz	"[PLANE:%d:%s] invalid pixel format %s, modifier 0x%llx\n"

	.comm	_INT_MAX,8,3                    ; @INT_MAX
l_.str.4:                               ; @.str.4
	.asciz	"[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
l_.str.5:                               ; @.str.5
	.asciz	"[PLANE:%d:%s] invalid source coordinates %u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.6:                               ; @.str.6
	.asciz	"[PLANE:%d:%s] invalid damage clip %d %d %d %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"[PLANE:%d:%s] switching CRTC directly\n"

	.no_dead_strip	_drm_atomic_plane_check
.subsections_via_symbols
