	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_plane_prepare_fb
_dpu_plane_prepare_fb:                  ## @dpu_plane_prepare_fb
	.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, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_to_dpu_plane
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_dpu_plane_state
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	__dpu_plane_get_kms
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_DPU_DEBUG_PLANE
	movq	(%r13), %rax
	movq	%rax, (%r12)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_gem_fb_prepare_fb
	movq	(%r12), %rsi
	xorl	%r15d, %r15d
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.4:
	movq	(%rbx), %rdi
	callq	_msm_framebuffer_prepare
	testl	%eax, %eax
	je	LBB0_5
## %bb.9:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	callq	_DPU_ERROR
	movl	%r13d, %r15d
	jmp	LBB0_8
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_3:
	xorl	%edi, %edi
	jmp	LBB0_6
LBB0_5:
	movq	(%r12), %rdi
LBB0_6:
	movq	(%rbx), %rsi
	leaq	-56(%rbp), %rdx
	callq	_dpu_format_populate_layout
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DPU_ERROR_PLANE
	movl	%ebx, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FB[%u]\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to prepare framebuffer\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get format layout, %d\n"

	.no_dead_strip	_dpu_plane_prepare_fb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_plane_prepare_fb
_dpu_plane_prepare_fb:                  ; @dpu_plane_prepare_fb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x22, x0
	ldr	x24, [x1]
	bl	_to_dpu_plane
	mov	x19, x0
	mov	x0, x20
	bl	_to_dpu_plane_state
	mov	x21, x0
	mov	x0, x19
	bl	__dpu_plane_get_kms
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x23, x0
	ldr	w2, [x24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DPU_DEBUG_PLANE
	ldr	x8, [x23]
	str	x8, [x21]
	mov	x0, x22
	mov	x1, x20
	bl	_drm_gem_fb_prepare_fb
	ldr	x1, [x21]
	cbz	x1, LBB0_5
; %bb.2:
	ldr	x0, [x20]
	bl	_msm_framebuffer_prepare
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPU_ERROR
	b	LBB0_9
LBB0_4:
	mov	w22, #0
	b	LBB0_9
LBB0_5:
	mov	x0, #0
	b	LBB0_7
LBB0_6:
	ldr	x0, [x21]
LBB0_7:
	ldr	x1, [x20]
	add	x2, sp, #8
	bl	_dpu_format_populate_layout
	mov	x22, x0
	cbz	w0, LBB0_9
; %bb.8:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_DPU_ERROR_PLANE
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FB[%u]\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to prepare framebuffer\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get format layout, %d\n"

	.no_dead_strip	_dpu_plane_prepare_fb
.subsections_via_symbols
