	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm_update_plane_state
_dm_update_plane_state:                 ## @dm_update_plane_state
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movq	%r8, %r14
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	$0, -48(%rbp)
	movq	(%r8), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r8, %rdi
	callq	_to_dm_plane_state
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_dm_plane_state
	movq	%rax, %rsi
	movq	(%r15), %rdx
	movq	_DRM_PLANE_TYPE_CURSOR@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdx
	je	LBB0_24
## %bb.1:
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_should_reset_plane
	movl	%eax, %ebx
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.9:
	movl	12(%r15), %edi
	movq	%r14, %rsi
	callq	_drm_atomic_plane_disabling
	testq	%rax, %rax
	jne	LBB0_23
## %bb.10:
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_atomic_get_new_crtc_state
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_to_dm_crtc_state
	cmpl	$0, (%rax)
	je	LBB0_23
## %bb.12:
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.13:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_WARN_ON
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_dc_create_plane_state
	testq	%rax, %rax
	je	LBB0_14
## %bb.16:
	movq	%rax, %r13
	movl	8(%r15), %esi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_fill_dc_plane_attributes
	testl	%eax, %eax
	jne	LBB0_17
## %bb.18:
	leaq	-48(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dm_atomic_get_state
	testl	%eax, %eax
	je	LBB0_19
LBB0_17:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_dc_plane_state_release
	movl	%ebx, %eax
	jmp	LBB0_24
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.3:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.4:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_drm_atomic_get_old_crtc_state
	movq	%rax, %rdi
	callq	_to_dm_crtc_state
	cmpl	$0, (%rax)
	je	LBB0_23
## %bb.5:
	movq	%rax, %r14
	movl	8(%r15), %esi
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_ATOMIC
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_dm_atomic_get_state
	testl	%eax, %eax
	jne	LBB0_24
## %bb.6:
	movl	(%r14), %esi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdx
	movq	-48(%rbp), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_dc_remove_plane_from_context
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	(%rbx), %rdi
	callq	_dc_plane_state_release
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	jmp	LBB0_22
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_15:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_24
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_19:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	-48(%rbp), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_dc_add_plane_to_context
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movl	$1, (%r13)
LBB0_22:
	movq	16(%rbp), %rax
	movl	$1, (%rax)
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r13, %rdi
	callq	_dc_plane_state_release
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_PLANE_TYPE_CURSOR,8,3      ## @DRM_PLANE_TYPE_CURSOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disabling DRM plane: %d on DRM crtc %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Enabling DRM plane: %d on DRM crtc %d\n"

	.no_dead_strip	_dm_update_plane_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm_update_plane_state
_dm_update_plane_state:                 ; @dm_update_plane_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	stp	x6, xzr, [sp]                   ; 8-byte Folded Spill
	mov	x26, x5
	mov	x24, x4
	mov	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x25, [x4]
	ldr	x28, [x3]
	mov	x0, x4
	bl	_to_dm_plane_state
	mov	x20, x0
	mov	x0, x19
	bl	_to_dm_plane_state
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _DRM_PLANE_TYPE_CURSOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_PLANE_TYPE_CURSOR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_1:
	mov	w26, #0
LBB0_2:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	x27, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x19
	mov	x3, x24
	bl	_should_reset_plane
	mov	x19, x0
	cbz	w26, LBB0_11
; %bb.4:
	ldr	w0, [x23, #12]
	mov	x1, x24
	bl	_drm_atomic_plane_disabling
	mov	w26, #0
	cbnz	x0, LBB0_2
; %bb.5:
	cbz	x25, LBB0_2
; %bb.6:
	mov	x0, x22
	mov	x1, x25
	bl	_drm_atomic_get_new_crtc_state
	mov	x26, x0
	bl	_to_dm_crtc_state
	ldr	w8, [x0]
	cmp	w8, #0
	ccmp	w19, #0, #4, ne
	b.eq	LBB0_1
; %bb.7:
	mov	x28, x0
	ldr	x0, [x20]
	bl	_WARN_ON
	mov	x0, x21
	bl	_dc_create_plane_state
	cbz	x0, LBB0_17
; %bb.8:
	mov	x27, x0
	ldr	w1, [x23, #8]
	ldr	w2, [x25, #8]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	x8, [x25]
	ldr	w0, [x8]
	mov	x1, x27
	mov	x2, x24
	mov	x3, x26
	bl	_fill_dc_plane_attributes
	cbnz	w0, LBB0_10
; %bb.9:
	add	x1, sp, #8
	mov	x0, x22
	bl	_dm_atomic_get_state
	cbz	w0, LBB0_20
LBB0_10:
	mov	x26, x0
	mov	x0, x27
	bl	_dc_plane_state_release
	b	LBB0_2
LBB0_11:
	cbz	w19, LBB0_2
; %bb.12:
	cbz	x28, LBB0_2
; %bb.13:
	mov	x0, x22
	mov	x1, x28
	bl	_drm_atomic_get_old_crtc_state
	bl	_to_dm_crtc_state
	ldr	w8, [x0]
	cbz	w8, LBB0_1
; %bb.14:
	mov	x19, x0
	ldr	w1, [x23, #8]
	ldr	w2, [x28, #8]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_ATOMIC
	add	x1, sp, #8
	mov	x0, x22
	bl	_dm_atomic_get_state
	mov	x26, x0
	cbnz	w0, LBB0_2
; %bb.15:
	ldr	w1, [x19]
	ldr	x2, [x27]
	ldr	x8, [sp, #8]
	ldr	w3, [x8]
	mov	x0, x21
	bl	_dc_remove_plane_from_context
	cbz	w0, LBB0_19
; %bb.16:
	ldr	x0, [x27]
	bl	_dc_plane_state_release
	mov	w26, #0
	str	xzr, [x20]
	mov	w8, #1
	b	LBB0_22
LBB0_17:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_2
LBB0_19:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w26, [x8]
	b	LBB0_2
LBB0_20:
	ldr	w1, [x28]
	ldr	x8, [sp, #8]
	ldr	w3, [x8]
	mov	x0, x21
	mov	x2, x27
	bl	_dc_add_plane_to_context
	cbz	w0, LBB0_23
; %bb.21:
	mov	w26, #0
	str	x27, [x20]
	mov	w8, #1
	str	w8, [x27]
LBB0_22:
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	w8, [x9]
	b	LBB0_2
LBB0_23:
	mov	x0, x27
	bl	_dc_plane_state_release
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_PLANE_TYPE_CURSOR,8,3      ; @DRM_PLANE_TYPE_CURSOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disabling DRM plane: %d on DRM crtc %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Enabling DRM plane: %d on DRM crtc %d\n"

	.no_dead_strip	_dm_update_plane_state
.subsections_via_symbols
