	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_plane_duplicate_state
_dpu_plane_duplicate_state:             ## @dpu_plane_duplicate_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	movl	(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_5
## %bb.2:
	callq	_to_dpu_plane_state
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_to_dpu_plane
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_DPU_DEBUG_PLANE
	movl	$0, (%rbx)
	addq	$4, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	___drm_atomic_helper_plane_duplicate_state
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	callq	_DPU_ERROR
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_DPU_ERROR_PLANE
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid plane\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid plane state\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"failed to allocate state\n"

L_.str.3:                               ## @.str.3
	.asciz	"\n"

	.no_dead_strip	_dpu_plane_duplicate_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_plane_duplicate_state
_dpu_plane_duplicate_state:             ; @dpu_plane_duplicate_state
	.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	w0, [x0]
	cbz	w0, LBB0_5
; %bb.2:
	bl	_to_dpu_plane_state
	mov	x20, x0
	mov	x0, x19
	bl	_to_dpu_plane
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #8
	bl	_kmemdup
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.3:
Lloh3:
	adrp	x1, l_.str.3@PAGE
Lloh4:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_DPU_DEBUG_PLANE
	str	wzr, [x20], #4
	mov	x0, x19
	mov	x1, x20
	bl	___drm_atomic_helper_plane_duplicate_state
	b	LBB0_8
LBB0_4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_DPU_ERROR
	mov	x20, #0
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_DPU_ERROR_PLANE
LBB0_8:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid plane\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid plane state\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"failed to allocate state\n"

l_.str.3:                               ; @.str.3
	.asciz	"\n"

	.no_dead_strip	_dpu_plane_duplicate_state
.subsections_via_symbols
