	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_plane_flush                ## -- Begin function dpu_plane_flush
	.p2align	4, 0x90
_dpu_plane_flush:                       ## @dpu_plane_flush
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_14
## %bb.2:
	movq	%rbx, %rdi
	callq	_to_dpu_plane
	movq	%rax, %r15
	movq	(%rbx), %rdi
	callq	_to_dpu_plane_state
	movq	%rax, %r14
	cmpq	$0, 24(%r15)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movl	$16777215, %esi                 ## imm = 0xFFFFFF
	jmp	LBB0_6
LBB0_14:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
LBB0_4:
	movl	(%r15), %esi
	movq	_DPU_PLANE_COLOR_FILL_FLAG@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_7
## %bb.5:
	movq	%r15, %rdi
LBB0_6:
	movl	$255, %edx
	callq	__dpu_plane_color_fill
LBB0_11:
	cmpq	$0, (%rbx)
	je	LBB0_13
## %bb.12:
	movl	$0, (%r14)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.8:
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.9:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	callq	*%rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid plane\n"

	.comm	_DPU_PLANE_COLOR_FILL_FLAG,4,2  ## @DPU_PLANE_COLOR_FILL_FLAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_plane_flush                ; -- Begin function dpu_plane_flush
	.p2align	2
_dpu_plane_flush:                       ; @dpu_plane_flush
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_to_dpu_plane
	mov	x21, x0
	ldr	x0, [x19]
	bl	_to_dpu_plane_state
	mov	x20, x0
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x0, x21
	mov	w1, #16777215
	b	LBB0_7
LBB0_4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_DPU_ERROR
LBB0_5:
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _DPU_PLANE_COLOR_FILL_FLAG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DPU_PLANE_COLOR_FILL_FLAG@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_11
; %bb.6:
	mov	x0, x21
LBB0_7:
	mov	w2, #255
	bl	__dpu_plane_color_fill
LBB0_8:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
	str	wzr, [x20]
LBB0_10:
	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_11:
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_8
; %bb.12:
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_8
; %bb.13:
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.14:
	blr	x8
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid plane\n"

	.comm	_DPU_PLANE_COLOR_FILL_FLAG,4,2  ; @DPU_PLANE_COLOR_FILL_FLAG
.subsections_via_symbols
